Merge branch 'master' of github.com:webnotes/erpnext into handlerupdate
This commit is contained in:
commit
946edbf11a
@ -3,137 +3,137 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2010-08-08 17:09:36',
|
||||
'creation': '2010-09-20 12:33:35',
|
||||
'docstatus': 0,
|
||||
'modified': '2011-09-15 15:04:45',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
'modified': '2012-03-28 19:19:38',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all Table Mapper Detail
|
||||
{
|
||||
'doctype': 'Table Mapper Detail',
|
||||
'doctype': u'Table Mapper Detail',
|
||||
'name': '__common__',
|
||||
'parent': 'Sales Order-Receivable Voucher',
|
||||
'parentfield': 'table_mapper_details',
|
||||
'parenttype': 'DocType Mapper'
|
||||
'parent': u'Sales Order-Receivable Voucher',
|
||||
'parentfield': u'table_mapper_details',
|
||||
'parenttype': u'DocType Mapper'
|
||||
},
|
||||
|
||||
# These values are common for all Field Mapper Detail
|
||||
{
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'name': '__common__',
|
||||
'parent': 'Sales Order-Receivable Voucher',
|
||||
'parentfield': 'field_mapper_details',
|
||||
'parenttype': 'DocType Mapper'
|
||||
'parent': u'Sales Order-Receivable Voucher',
|
||||
'parentfield': u'field_mapper_details',
|
||||
'parenttype': u'DocType Mapper'
|
||||
},
|
||||
|
||||
# These values are common for all DocType Mapper
|
||||
{
|
||||
'doctype': u'DocType Mapper',
|
||||
'from_doctype': 'Sales Order',
|
||||
'module': 'Accounts',
|
||||
'from_doctype': u'Sales Order',
|
||||
'module': u'Accounts',
|
||||
'name': '__common__',
|
||||
'ref_doc_submitted': 1,
|
||||
'to_doctype': 'Receivable Voucher'
|
||||
'to_doctype': u'Receivable Voucher'
|
||||
},
|
||||
|
||||
# DocType Mapper, Sales Order-Receivable Voucher
|
||||
{
|
||||
'doctype': u'DocType Mapper',
|
||||
'name': 'Sales Order-Receivable Voucher'
|
||||
'name': u'Sales Order-Receivable Voucher'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'checking_operator': '=',
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'customer',
|
||||
'map': 'Yes',
|
||||
'checking_operator': u'=',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'customer',
|
||||
'map': u'Yes',
|
||||
'match_id': 0,
|
||||
'to_field': 'customer'
|
||||
'to_field': u'customer'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'eval: obj.basic_rate and (flt(obj.amount) - flt(obj.billed_amt))/flt(obj.basic_rate) or obj.qty',
|
||||
'map': 'Yes',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'eval: obj.basic_rate and (flt(obj.amount) - flt(obj.billed_amt))/flt(obj.basic_rate) or obj.qty',
|
||||
'map': u'Yes',
|
||||
'match_id': 1,
|
||||
'to_field': 'qty'
|
||||
'to_field': u'qty'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'parent',
|
||||
'map': 'Yes',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'parent',
|
||||
'map': u'Yes',
|
||||
'match_id': 1,
|
||||
'to_field': 'sales_order'
|
||||
'to_field': u'sales_order'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'name',
|
||||
'map': 'Yes',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'name',
|
||||
'map': u'Yes',
|
||||
'match_id': 1,
|
||||
'to_field': 'so_detail'
|
||||
'to_field': u'so_detail'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'eval:flt(obj.amount) - flt(obj.billed_amt)',
|
||||
'map': 'Yes',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'eval:flt(obj.amount) - flt(obj.billed_amt)',
|
||||
'map': u'Yes',
|
||||
'match_id': 1,
|
||||
'to_field': 'amount'
|
||||
'to_field': u'amount'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'eval: (flt(obj.amount) - flt(obj.billed_amt))* flt(obj.export_rate)/flt(obj.basic_rate)',
|
||||
'map': 'Yes',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'eval: (flt(obj.amount) - flt(obj.billed_amt))* flt(obj.export_rate)/flt(obj.basic_rate)',
|
||||
'map': u'Yes',
|
||||
'match_id': 1,
|
||||
'to_field': 'export_amount'
|
||||
'to_field': u'export_amount'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'checking_operator': '=',
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'project_name',
|
||||
'map': 'Yes',
|
||||
'checking_operator': u'=',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'project_name',
|
||||
'map': u'Yes',
|
||||
'match_id': 0,
|
||||
'to_field': 'project_name'
|
||||
'to_field': u'project_name'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'reserved_warehouse',
|
||||
'map': 'Yes',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'reserved_warehouse',
|
||||
'map': u'Yes',
|
||||
'match_id': 1,
|
||||
'to_field': 'warehouse'
|
||||
'to_field': u'warehouse'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'naming_series',
|
||||
'map': 'No',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'naming_series',
|
||||
'map': u'No',
|
||||
'match_id': 0,
|
||||
'to_field': 'naming_series'
|
||||
'to_field': u'naming_series'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
{
|
||||
'doctype': 'Field Mapper Detail',
|
||||
'from_field': 'incentives',
|
||||
'map': 'No',
|
||||
'doctype': u'Field Mapper Detail',
|
||||
'from_field': u'incentives',
|
||||
'map': u'No',
|
||||
'match_id': 3,
|
||||
'to_field': 'incentives'
|
||||
'to_field': u'incentives'
|
||||
},
|
||||
|
||||
# Field Mapper Detail
|
||||
@ -148,54 +148,43 @@
|
||||
|
||||
# Table Mapper Detail
|
||||
{
|
||||
'doctype': 'Table Mapper Detail',
|
||||
'from_table': 'Sales Order',
|
||||
'doctype': u'Table Mapper Detail',
|
||||
'from_table': u'Sales Order',
|
||||
'match_id': 0,
|
||||
'to_table': 'Receivable Voucher',
|
||||
'validation_logic': 'docstatus=1'
|
||||
'to_table': u'Receivable Voucher',
|
||||
'validation_logic': u'docstatus=1'
|
||||
},
|
||||
|
||||
# Table Mapper Detail
|
||||
{
|
||||
'doctype': 'Table Mapper Detail',
|
||||
'from_field': 'sales_order_detail',
|
||||
'from_table': 'Sales Order Detail',
|
||||
'doctype': u'Table Mapper Detail',
|
||||
'from_field': u'sales_order_detail',
|
||||
'from_table': u'Sales Order Detail',
|
||||
'match_id': 1,
|
||||
'to_field': 'entries',
|
||||
'to_table': 'RV Detail',
|
||||
'validation_logic': 'docstatus = 1'
|
||||
'to_field': u'entries',
|
||||
'to_table': u'RV Detail',
|
||||
'validation_logic': u'(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1'
|
||||
},
|
||||
|
||||
# Table Mapper Detail
|
||||
{
|
||||
'doctype': 'Table Mapper Detail',
|
||||
'from_field': 'sales_order_detail',
|
||||
'from_table': 'Sales Order Detail',
|
||||
'match_id': 1,
|
||||
'to_field': 'entries',
|
||||
'to_table': 'RV Detail',
|
||||
'validation_logic': '(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1'
|
||||
},
|
||||
|
||||
# Table Mapper Detail
|
||||
{
|
||||
'doctype': 'Table Mapper Detail',
|
||||
'from_field': 'other_charges',
|
||||
'from_table': 'RV Tax Detail',
|
||||
'doctype': u'Table Mapper Detail',
|
||||
'from_field': u'other_charges',
|
||||
'from_table': u'RV Tax Detail',
|
||||
'match_id': 2,
|
||||
'to_field': 'other_charges',
|
||||
'to_table': 'RV Tax Detail',
|
||||
'validation_logic': 'name is not null'
|
||||
'to_field': u'other_charges',
|
||||
'to_table': u'RV Tax Detail',
|
||||
'validation_logic': u'name is not null'
|
||||
},
|
||||
|
||||
# Table Mapper Detail
|
||||
{
|
||||
'doctype': 'Table Mapper Detail',
|
||||
'from_field': 'sales_team',
|
||||
'from_table': 'Sales Team',
|
||||
'doctype': u'Table Mapper Detail',
|
||||
'from_field': u'sales_team',
|
||||
'from_table': u'Sales Team',
|
||||
'match_id': 3,
|
||||
'to_field': 'sales_team',
|
||||
'to_table': 'Sales Team',
|
||||
'validation_logic': 'name is not null'
|
||||
'to_field': u'sales_team',
|
||||
'to_table': u'Sales Team',
|
||||
'validation_logic': u'name is not null'
|
||||
}
|
||||
]
|
||||
]
|
10
erpnext/patches/mar_2012/so_rv_mapper_fix.py
Normal file
10
erpnext/patches/mar_2012/so_rv_mapper_fix.py
Normal file
@ -0,0 +1,10 @@
|
||||
def execute():
|
||||
import webnotes
|
||||
count = webnotes.conn.sql("""SELECT COUNT(*) FROM `tabTable Mapper Detail`
|
||||
WHERE parent='Sales Order-Receivable Voucher'
|
||||
AND from_table='Sales Order Detail'""")
|
||||
if count and count[0][0]==2:
|
||||
webnotes.conn.sql("""DELETE FROM `tabTable Mapper Detail`
|
||||
WHERE parent='Sales Order-Receivable Voucher'
|
||||
AND from_table='Sales Order Detail'
|
||||
AND validation_logic='docstatus = 1'""")
|
@ -217,5 +217,10 @@ patch_list = [
|
||||
'patch_file': 'mapper_fix',
|
||||
'description': 'DN-RV duplicate table entry'
|
||||
},
|
||||
{
|
||||
'patch_module': 'patches.mar_2012',
|
||||
'patch_file': 'so_rv_mapper_fix',
|
||||
'description': 'SO-RV duplicate mapper entry removal'
|
||||
},
|
||||
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user