From 9fc52399a869fcbc4b3b0cb9ed747bf0e7d70cd0 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Thu, 13 Dec 2012 13:02:37 +0530 Subject: [PATCH 1/3] [IMP] uom_id was passed instead of uom. bzr revid: psa@tinyerp.com-20121213073237-2fm642lm2n6md4hg --- addons/sale/wizard/sale_make_invoice_advance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 0fa4cd52cf2..338118679de 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -78,7 +78,7 @@ class sale_advance_payment_inv(osv.osv_memory): result = [] for sale in sale_obj.browse(cr, uid, sale_ids, context=context): val = inv_line_obj.product_id_change(cr, uid, [], wizard.product_id.id, - uom_id=False, partner_id=sale.partner_id.id, fposition_id=sale.fiscal_position.id) + uom=False, partner_id=sale.partner_id.id, fposition_id=sale.fiscal_position.id) res = val['value'] # determine and check income account From e9a355f840462b003402538b58e0ee0989eade4d Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Thu, 13 Dec 2012 16:23:31 +0530 Subject: [PATCH 2/3] [IMP] sale.fiscal_position.id was passed instead of sale.fiscal_position. bzr revid: psa@tinyerp.com-20121213105331-77v6x57l3vzb7114 --- addons/sale/wizard/sale_make_invoice_advance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index 338118679de..c9eff5e9c6a 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -86,7 +86,7 @@ class sale_advance_payment_inv(osv.osv_memory): prop = ir_property_obj.get(cr, uid, 'property_account_income_categ', 'product.category', context=context) prop_id = prop and prop.id or False - account_id = fiscal_obj.map_account(cr, uid, sale.fiscal_position.id or False, prop_id) + account_id = fiscal_obj.map_account(cr, uid, sale.fiscal_position or False, prop_id) if not account_id: raise osv.except_osv(_('Configuration Error!'), _('There is no income account defined as global property.')) From 04de836f078a6168732e59165c0bf7ed75a0f2fc Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Thu, 13 Dec 2012 17:06:49 +0530 Subject: [PATCH 3/3] [IMP] Improved code. bzr revid: psa@tinyerp.com-20121213113649-04rhxk61gmcys4o3 --- addons/sale/wizard/sale_make_invoice_advance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py index c9eff5e9c6a..006f27eb168 100644 --- a/addons/sale/wizard/sale_make_invoice_advance.py +++ b/addons/sale/wizard/sale_make_invoice_advance.py @@ -78,7 +78,7 @@ class sale_advance_payment_inv(osv.osv_memory): result = [] for sale in sale_obj.browse(cr, uid, sale_ids, context=context): val = inv_line_obj.product_id_change(cr, uid, [], wizard.product_id.id, - uom=False, partner_id=sale.partner_id.id, fposition_id=sale.fiscal_position.id) + uom_id=False, partner_id=sale.partner_id.id, fposition_id=sale.fiscal_position.id) res = val['value'] # determine and check income account