From d0b007235d02242de2d54b365ed6f7b8de8510b8 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 28 May 2013 18:54:48 +0530 Subject: [PATCH] [buying/selling] fixes after responsive merge --- .../purchase_invoice/test_purchase_invoice.py | 1 + .../doctype/sales_invoice/sales_invoice.txt | 119 ++++++++++++------ public/js/transaction.js | 4 + stock/doctype/serial_no/test_serial_no.py | 4 +- 4 files changed, 86 insertions(+), 42 deletions(-) diff --git a/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/accounts/doctype/purchase_invoice/test_purchase_invoice.py index ebd44d4a60..2ae569b7eb 100644 --- a/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -24,6 +24,7 @@ from webnotes.utils import cint import webnotes.defaults test_dependencies = ["Item", "Cost Center"] +test_ignore = ["Serial No"] class TestPurchaseInvoice(unittest.TestCase): def test_gl_entries_without_auto_inventory_accounting(self): diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt index 8390be92a1..757db0ace5 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.txt +++ b/accounts/doctype/sales_invoice/sales_invoice.txt @@ -2,7 +2,7 @@ { "creation": "2013-05-24 19:29:05", "docstatus": 0, - "modified": "2013-05-28 12:43:23", + "modified": "2013-05-28 18:23:35", "modified_by": "Administrator", "owner": "Administrator" }, @@ -31,7 +31,6 @@ "parent": "Sales Invoice", "parentfield": "permissions", "parenttype": "DocType", - "permlevel": 0, "read": 1 }, { @@ -258,43 +257,6 @@ "read_only": 0, "width": "50%" }, - { - "doctype": "DocField", - "fieldname": "net_total", - "fieldtype": "Currency", - "label": "Net Total*", - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1, - "reqd": 1 - }, - { - "doctype": "DocField", - "fieldname": "net_total_export", - "fieldtype": "Currency", - "label": "Net Total (Export)", - "options": "currency", - "print_hide": 0, - "read_only": 1 - }, - { - "doctype": "DocField", - "fieldname": "recalculate_values", - "fieldtype": "Button", - "label": "Re-Calculate Values", - "oldfieldtype": "Button", - "print_hide": 1, - "read_only": 0 - }, - { - "doctype": "DocField", - "fieldname": "col_break25", - "fieldtype": "Column Break", - "read_only": 0, - "width": "50%" - }, { "description": "Select Items from Sales Order", "doctype": "DocField", @@ -328,6 +290,43 @@ "print_hide": 1, "read_only": 0 }, + { + "doctype": "DocField", + "fieldname": "col_break25", + "fieldtype": "Column Break", + "read_only": 0, + "width": "50%" + }, + { + "doctype": "DocField", + "fieldname": "recalculate_values", + "fieldtype": "Button", + "label": "Re-Calculate Values", + "oldfieldtype": "Button", + "print_hide": 1, + "read_only": 0 + }, + { + "doctype": "DocField", + "fieldname": "net_total", + "fieldtype": "Currency", + "label": "Net Total*", + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1, + "reqd": 1 + }, + { + "doctype": "DocField", + "fieldname": "net_total_export", + "fieldtype": "Currency", + "label": "Net Total (Export)", + "options": "currency", + "print_hide": 0, + "read_only": 1 + }, { "doctype": "DocField", "fieldname": "currency_section", @@ -1309,20 +1308,60 @@ "read_only": 0, "report_hide": 1 }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "doctype": "DocPerm", + "permlevel": 1, + "report": 0, + "role": "Accounts Manager", + "submit": 0, + "write": 0 + }, { "amend": 1, "cancel": 1, "create": 1, "doctype": "DocPerm", + "permlevel": 0, + "report": 1, + "role": "Accounts Manager", + "submit": 1, + "write": 1 + }, + { + "amend": 1, + "cancel": 0, + "create": 1, + "doctype": "DocPerm", + "permlevel": 0, "report": 1, "role": "Accounts User", "submit": 1, "write": 1 }, + { + "amend": 0, + "cancel": 0, + "create": 0, + "doctype": "DocPerm", + "permlevel": 1, + "report": 0, + "role": "Accounts User", + "submit": 0, + "write": 0 + }, { "doctype": "DocPerm", "match": "customer", - "report": 0, + "permlevel": 0, + "report": 1, "role": "Customer" + }, + { + "doctype": "DocPerm", + "permlevel": 0, + "role": "Retail User" } ] \ No newline at end of file diff --git a/public/js/transaction.js b/public/js/transaction.js index 1fe412110e..78f792d018 100644 --- a/public/js/transaction.js +++ b/public/js/transaction.js @@ -158,6 +158,10 @@ erpnext.TransactionController = wn.ui.form.Controller.extend({ this.calculate_taxes_and_totals(); }, + calculate_charges: function() { + this.calculate_taxes_and_totals(); + }, + included_in_print_rate: function(doc, cdt, cdn) { var tax = wn.model.get_doc(cdt, cdn); try { diff --git a/stock/doctype/serial_no/test_serial_no.py b/stock/doctype/serial_no/test_serial_no.py index fb27aa9329..8ffaabcb10 100644 --- a/stock/doctype/serial_no/test_serial_no.py +++ b/stock/doctype/serial_no/test_serial_no.py @@ -81,8 +81,8 @@ class TestSerialNo(unittest.TestCase): self.assertFalse(gl_entries) webnotes.defaults.set_global_default("auto_inventory_accounting", 0) - - + +test_dependencies = ["Item"] test_records = [ [ {