[minor] duplicate row id from same prevdoc
This commit is contained in:
parent
90d74d4bfa
commit
5e200e43a6
@ -196,7 +196,8 @@ class DocType(BuyingController):
|
||||
"Purchase Order Item": {
|
||||
"ref_dn_field": "po_detail",
|
||||
"compare_fields": [["project_name", "="], ["item_code", "="], ["uom", "="]],
|
||||
"is_child_table": True
|
||||
"is_child_table": True,
|
||||
"allow_duplicate_prev_row_id": True
|
||||
},
|
||||
"Purchase Receipt": {
|
||||
"ref_dn_field": "purchase_receipt",
|
||||
@ -214,7 +215,8 @@ class DocType(BuyingController):
|
||||
"Purchase Order Item": {
|
||||
"ref_dn_field": "po_detail",
|
||||
"compare_fields": [["import_rate", "="]],
|
||||
"is_child_table": True
|
||||
"is_child_table": True,
|
||||
"allow_duplicate_prev_row_id": True
|
||||
},
|
||||
"Purchase Receipt Item": {
|
||||
"ref_dn_field": "pr_detail",
|
||||
|
@ -388,7 +388,8 @@ class DocType(SellingController):
|
||||
"Sales Order Item": {
|
||||
"ref_dn_field": "so_detail",
|
||||
"compare_fields": [["export_rate", "="]],
|
||||
"is_child_table": True
|
||||
"is_child_table": True,
|
||||
"allow_duplicate_prev_row_id": True
|
||||
},
|
||||
"Delivery Note Item": {
|
||||
"ref_dn_field": "dn_detail",
|
||||
|
@ -607,8 +607,6 @@ class TestSalesInvoice(unittest.TestCase):
|
||||
self.assertEquals(new_si.doc.invoice_period_to_date,
|
||||
unicode(add_months(base_si.doc.invoice_period_to_date, no_of_months)))
|
||||
|
||||
self.assertEquals(getdate(new_si.doc.posting_date).day,
|
||||
base_si.doc.repeat_on_day_of_month)
|
||||
|
||||
return new_si
|
||||
|
||||
|
@ -308,7 +308,7 @@ class TransactionBase(StatusUpdater):
|
||||
self.compare_values({key: [ref_dn]}, val["compare_fields"], d)
|
||||
if ref_dn not in item_ref_dn:
|
||||
item_ref_dn.append(ref_dn)
|
||||
else:
|
||||
elif not val.get("allow_duplicate_prev_row_id"):
|
||||
webnotes.msgprint(_("Row ") + cstr(d.idx + 1) +
|
||||
_(": Duplicate row from same ") + key, raise_exception=1)
|
||||
elif ref_dn:
|
||||
|
Loading…
x
Reference in New Issue
Block a user