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
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:36',
|
'creation': '2010-09-20 12:33:35',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2011-09-15 15:04:45',
|
'modified': '2012-03-28 19:19:38',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all Table Mapper Detail
|
# These values are common for all Table Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Table Mapper Detail',
|
'doctype': u'Table Mapper Detail',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'parent': 'Sales Order-Receivable Voucher',
|
'parent': u'Sales Order-Receivable Voucher',
|
||||||
'parentfield': 'table_mapper_details',
|
'parentfield': u'table_mapper_details',
|
||||||
'parenttype': 'DocType Mapper'
|
'parenttype': u'DocType Mapper'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all Field Mapper Detail
|
# These values are common for all Field Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'parent': 'Sales Order-Receivable Voucher',
|
'parent': u'Sales Order-Receivable Voucher',
|
||||||
'parentfield': 'field_mapper_details',
|
'parentfield': u'field_mapper_details',
|
||||||
'parenttype': 'DocType Mapper'
|
'parenttype': u'DocType Mapper'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType Mapper
|
# These values are common for all DocType Mapper
|
||||||
{
|
{
|
||||||
'doctype': u'DocType Mapper',
|
'doctype': u'DocType Mapper',
|
||||||
'from_doctype': 'Sales Order',
|
'from_doctype': u'Sales Order',
|
||||||
'module': 'Accounts',
|
'module': u'Accounts',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'ref_doc_submitted': 1,
|
'ref_doc_submitted': 1,
|
||||||
'to_doctype': 'Receivable Voucher'
|
'to_doctype': u'Receivable Voucher'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocType Mapper, Sales Order-Receivable Voucher
|
# DocType Mapper, Sales Order-Receivable Voucher
|
||||||
{
|
{
|
||||||
'doctype': u'DocType Mapper',
|
'doctype': u'DocType Mapper',
|
||||||
'name': 'Sales Order-Receivable Voucher'
|
'name': u'Sales Order-Receivable Voucher'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'checking_operator': '=',
|
'checking_operator': u'=',
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'customer',
|
'from_field': u'customer',
|
||||||
'map': 'Yes',
|
'map': u'Yes',
|
||||||
'match_id': 0,
|
'match_id': 0,
|
||||||
'to_field': 'customer'
|
'to_field': u'customer'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'eval: obj.basic_rate and (flt(obj.amount) - flt(obj.billed_amt))/flt(obj.basic_rate) or obj.qty',
|
'from_field': u'eval: obj.basic_rate and (flt(obj.amount) - flt(obj.billed_amt))/flt(obj.basic_rate) or obj.qty',
|
||||||
'map': 'Yes',
|
'map': u'Yes',
|
||||||
'match_id': 1,
|
'match_id': 1,
|
||||||
'to_field': 'qty'
|
'to_field': u'qty'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'parent',
|
'from_field': u'parent',
|
||||||
'map': 'Yes',
|
'map': u'Yes',
|
||||||
'match_id': 1,
|
'match_id': 1,
|
||||||
'to_field': 'sales_order'
|
'to_field': u'sales_order'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'name',
|
'from_field': u'name',
|
||||||
'map': 'Yes',
|
'map': u'Yes',
|
||||||
'match_id': 1,
|
'match_id': 1,
|
||||||
'to_field': 'so_detail'
|
'to_field': u'so_detail'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'eval:flt(obj.amount) - flt(obj.billed_amt)',
|
'from_field': u'eval:flt(obj.amount) - flt(obj.billed_amt)',
|
||||||
'map': 'Yes',
|
'map': u'Yes',
|
||||||
'match_id': 1,
|
'match_id': 1,
|
||||||
'to_field': 'amount'
|
'to_field': u'amount'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'eval: (flt(obj.amount) - flt(obj.billed_amt))* flt(obj.export_rate)/flt(obj.basic_rate)',
|
'from_field': u'eval: (flt(obj.amount) - flt(obj.billed_amt))* flt(obj.export_rate)/flt(obj.basic_rate)',
|
||||||
'map': 'Yes',
|
'map': u'Yes',
|
||||||
'match_id': 1,
|
'match_id': 1,
|
||||||
'to_field': 'export_amount'
|
'to_field': u'export_amount'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'checking_operator': '=',
|
'checking_operator': u'=',
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'project_name',
|
'from_field': u'project_name',
|
||||||
'map': 'Yes',
|
'map': u'Yes',
|
||||||
'match_id': 0,
|
'match_id': 0,
|
||||||
'to_field': 'project_name'
|
'to_field': u'project_name'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'reserved_warehouse',
|
'from_field': u'reserved_warehouse',
|
||||||
'map': 'Yes',
|
'map': u'Yes',
|
||||||
'match_id': 1,
|
'match_id': 1,
|
||||||
'to_field': 'warehouse'
|
'to_field': u'warehouse'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'naming_series',
|
'from_field': u'naming_series',
|
||||||
'map': 'No',
|
'map': u'No',
|
||||||
'match_id': 0,
|
'match_id': 0,
|
||||||
'to_field': 'naming_series'
|
'to_field': u'naming_series'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Field Mapper Detail',
|
'doctype': u'Field Mapper Detail',
|
||||||
'from_field': 'incentives',
|
'from_field': u'incentives',
|
||||||
'map': 'No',
|
'map': u'No',
|
||||||
'match_id': 3,
|
'match_id': 3,
|
||||||
'to_field': 'incentives'
|
'to_field': u'incentives'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Field Mapper Detail
|
# Field Mapper Detail
|
||||||
@ -148,54 +148,43 @@
|
|||||||
|
|
||||||
# Table Mapper Detail
|
# Table Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Table Mapper Detail',
|
'doctype': u'Table Mapper Detail',
|
||||||
'from_table': 'Sales Order',
|
'from_table': u'Sales Order',
|
||||||
'match_id': 0,
|
'match_id': 0,
|
||||||
'to_table': 'Receivable Voucher',
|
'to_table': u'Receivable Voucher',
|
||||||
'validation_logic': 'docstatus=1'
|
'validation_logic': u'docstatus=1'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Table Mapper Detail
|
# Table Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Table Mapper Detail',
|
'doctype': u'Table Mapper Detail',
|
||||||
'from_field': 'sales_order_detail',
|
'from_field': u'sales_order_detail',
|
||||||
'from_table': 'Sales Order Detail',
|
'from_table': u'Sales Order Detail',
|
||||||
'match_id': 1,
|
'match_id': 1,
|
||||||
'to_field': 'entries',
|
'to_field': u'entries',
|
||||||
'to_table': 'RV Detail',
|
'to_table': u'RV Detail',
|
||||||
'validation_logic': 'docstatus = 1'
|
'validation_logic': u'(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Table Mapper Detail
|
# Table Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Table Mapper Detail',
|
'doctype': u'Table Mapper Detail',
|
||||||
'from_field': 'sales_order_detail',
|
'from_field': u'other_charges',
|
||||||
'from_table': 'Sales Order Detail',
|
'from_table': u'RV Tax 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',
|
|
||||||
'match_id': 2,
|
'match_id': 2,
|
||||||
'to_field': 'other_charges',
|
'to_field': u'other_charges',
|
||||||
'to_table': 'RV Tax Detail',
|
'to_table': u'RV Tax Detail',
|
||||||
'validation_logic': 'name is not null'
|
'validation_logic': u'name is not null'
|
||||||
},
|
},
|
||||||
|
|
||||||
# Table Mapper Detail
|
# Table Mapper Detail
|
||||||
{
|
{
|
||||||
'doctype': 'Table Mapper Detail',
|
'doctype': u'Table Mapper Detail',
|
||||||
'from_field': 'sales_team',
|
'from_field': u'sales_team',
|
||||||
'from_table': 'Sales Team',
|
'from_table': u'Sales Team',
|
||||||
'match_id': 3,
|
'match_id': 3,
|
||||||
'to_field': 'sales_team',
|
'to_field': u'sales_team',
|
||||||
'to_table': 'Sales Team',
|
'to_table': u'Sales Team',
|
||||||
'validation_logic': 'name is not null'
|
'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',
|
'patch_file': 'mapper_fix',
|
||||||
'description': 'DN-RV duplicate table entry'
|
'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