From f996e84c6b660da03588a56a7144a9b8097bfdc8 Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" <mra@tinyerp.com> Date: Thu, 12 Feb 2009 11:19:34 +0530 Subject: [PATCH] fix: fiscal position bzr revid: mra@tinyerp.com-20090212054934-mcli1mckg4cflk46 --- addons/mrp/mrp.py | 3 ++- addons/sale_crm/wizard/makesale.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index a45f91104a38..39ecce87c728 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -1073,7 +1073,8 @@ class mrp_procurement(osv.osv): 'partner_address_id': address_id, 'location_id': procurement.location_id.id, 'pricelist_id': pricelist_id, - 'order_line': [(0,0,line)] + 'order_line': [(0,0,line)], + 'fiscal_position': partner.property_account_position and partner.property_account_position.id or False }) self.write(cr, uid, [procurement.id], {'state':'running', 'purchase_id':purchase_id}) return purchase_id diff --git a/addons/sale_crm/wizard/makesale.py b/addons/sale_crm/wizard/makesale.py index 1c7a708cfb82..d2ba03becf9e 100644 --- a/addons/sale_crm/wizard/makesale.py +++ b/addons/sale_crm/wizard/makesale.py @@ -99,6 +99,7 @@ class make_sale(wizard.interface): 'partner_shipping_id': partner_addr['delivery'], 'order_policy': 'manual', 'date_order': now(), + 'fiscal_position': fpos } if data['form']['analytic_account']: vals['project_id'] = data['form']['analytic_account'] -- GitLab