credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #05582
[Branch ~credativ/openobject-addons/6.1] Rev 7051: [MERGE] fix for lp:796570
Merge authors:
Eetu Salpaharju,mtr
Meera Trambadia (OpenERP) (mtr-openerp)
mtr <mtr@mtr>
------------------------------------------------------------
revno: 7051 [merge]
committer: Craig Gowing (credativ) <craig.gowing@xxxxxxxxxxxxxx>
branch nick: addons
timestamp: Tue 2013-10-22 10:35:21 +0100
message:
[MERGE] fix for lp:796570
modified:
sale/sale.py
--
lp:~credativ/openobject-addons/6.1
https://code.launchpad.net/~credativ/openobject-addons/6.1
Your team credativ is subscribed to branch lp:~credativ/openobject-addons/6.1.
To unsubscribe from this branch go to https://code.launchpad.net/~credativ/openobject-addons/6.1/+edit-subscription
=== modified file 'sale/sale.py'
--- sale/sale.py 2012-10-09 12:16:14 +0000
+++ sale/sale.py 2013-10-22 09:35:21 +0000
@@ -1207,6 +1207,7 @@
partner_obj = self.pool.get('res.partner')
product_obj = self.pool.get('product.product')
context = dict(context, lang=lang, partner_id=partner_id)
+ fiscal_obj = self.pool.get('account.fiscal.position')
if partner_id:
lang = partner_obj.browse(cr, uid, partner_id, context=context).lang
context_partner = dict(context, lang=lang)
@@ -1238,10 +1239,11 @@
uos = False
if product_obj.description_sale:
result['notes'] = product_obj.description_sale
- fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position, context=context) or False
+ fpos = fiscal_position and fiscal_obj.browse(cr, uid, fiscal_position, context=context) or False
if update_tax: #The quantity only have changed
result['delay'] = (product_obj.sale_delay or 0.0)
- result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, product_obj.taxes_id)
+ tax_ids = product_obj.taxes_id or product_obj.property_account_income.tax_ids or product_obj.categ_id.property_account_income_categ.tax_ids
+ result['tax_id'] = fiscal_obj.map_tax(cr, uid, fpos, tax_ids, context=context)
result.update({'type': product_obj.procure_method})
if not flag: