cleanup for print format
This commit is contained in:
parent
28804bfb62
commit
f84c240d1c
@ -10,6 +10,12 @@ from frappe import _, throw
|
||||
from erpnext.controllers.stock_controller import StockController
|
||||
|
||||
class SellingController(StockController):
|
||||
def __setup__(self):
|
||||
self.table_print_templates = {
|
||||
self.fname: "templates/print_formats/includes/item_grid.html",
|
||||
"other_charges": "templates/print_formats/includes/taxes.html",
|
||||
}
|
||||
|
||||
def validate(self):
|
||||
super(SellingController, self).validate()
|
||||
self.validate_max_discount()
|
||||
|
@ -18,10 +18,6 @@ class SalesOrder(SellingController):
|
||||
person_tname = 'Target Detail'
|
||||
partner_tname = 'Partner Target Detail'
|
||||
territory_tname = 'Territory Target Detail'
|
||||
table_print_templates = {
|
||||
"sales_order_details": "templates/print_formats/includes/item_grid.html",
|
||||
"other_charges": "templates/print_formats/includes/taxes.html",
|
||||
}
|
||||
|
||||
def validate_mandatory(self):
|
||||
# validate transaction date v/s delivery date
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"autoname": "MREQD-.#####",
|
||||
"creation": "2013-02-22 01:28:02.000000",
|
||||
"creation": "2013-02-22 01:28:02",
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"fields": [
|
||||
@ -28,6 +28,7 @@
|
||||
"oldfieldname": "item_name",
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_width": "100px",
|
||||
"reqd": 0,
|
||||
"search_index": 1,
|
||||
@ -70,6 +71,21 @@
|
||||
"reqd": 1,
|
||||
"width": "80px"
|
||||
},
|
||||
{
|
||||
"fieldname": "uom",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Stock UOM",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "uom",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "UOM",
|
||||
"permlevel": 0,
|
||||
"print_width": "70px",
|
||||
"read_only": 1,
|
||||
"reqd": 1,
|
||||
"width": "70px"
|
||||
},
|
||||
{
|
||||
"fieldname": "warehouse",
|
||||
"fieldtype": "Link",
|
||||
@ -89,21 +105,6 @@
|
||||
"fieldtype": "Column Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"fieldname": "uom",
|
||||
"fieldtype": "Link",
|
||||
"in_list_view": 1,
|
||||
"label": "Stock UOM",
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "uom",
|
||||
"oldfieldtype": "Link",
|
||||
"options": "UOM",
|
||||
"permlevel": 0,
|
||||
"print_width": "70px",
|
||||
"read_only": 1,
|
||||
"reqd": 1,
|
||||
"width": "70px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"fieldname": "schedule_date",
|
||||
@ -216,6 +217,7 @@
|
||||
"oldfieldname": "ordered_qty",
|
||||
"oldfieldtype": "Currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
@ -232,9 +234,10 @@
|
||||
],
|
||||
"idx": 1,
|
||||
"istable": 1,
|
||||
"modified": "2014-02-03 11:35:26.000000",
|
||||
"modified": "2014-07-18 01:04:18.470761",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Material Request Item",
|
||||
"owner": "Administrator"
|
||||
"owner": "Administrator",
|
||||
"permissions": []
|
||||
}
|
@ -4,10 +4,9 @@
|
||||
<th>Sr</th>
|
||||
<th>Item Name</th>
|
||||
<th>Description</th>
|
||||
<th>Qty</th>
|
||||
<th>UoM</th>
|
||||
<th>Basic Rate</th>
|
||||
<th>Amount</th>
|
||||
<th class="text-right">Qty</th>
|
||||
<th class="text-right">Rate</th>
|
||||
<th class="text-right">Amount</th>
|
||||
</tr>
|
||||
{%- for row in data -%}
|
||||
<tr>
|
||||
@ -20,8 +19,7 @@
|
||||
</td>
|
||||
<td style="width: 37%;">
|
||||
<div style="border: 0px;">{{ row.description }}</div></td>
|
||||
<td style="width: 5%; text-align: right;">{{ row.qty }}</td>
|
||||
<td style="width: 5%;">{{ row.stock_uom }}</td>
|
||||
<td style="width: 10%; text-align: right;">{{ row.qty }} {{ row.stock_uom }}</td>
|
||||
<td style="width: 15%; text-align: right;">{{
|
||||
format(row.rate, table_meta.get_field("rate"), doc) }}</td>
|
||||
<td style="width: 15%; text-align: right;">{{ format(row.amount, table_meta.get_field("amount"), doc) }}</td>
|
||||
|
@ -14,6 +14,10 @@ class Note(Document):
|
||||
import re
|
||||
self.name = re.sub("[%'\"#*?`]", "", self.title.strip())
|
||||
|
||||
def before_print(self):
|
||||
self.print_heading = self.name
|
||||
self.sub_heading = ""
|
||||
|
||||
def get_permission_query_conditions(user):
|
||||
if not user: user = frappe.session.user
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"db_name": "test_frappe",
|
||||
"db_password": "test_frappe",
|
||||
"mute_emails": 1
|
||||
"mute_emails": 1,
|
||||
"developer_mode": 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user