← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~elicoidal/purchase-wkfl/purchase-wkfl-fix-0001 into lp:purchase-wkfl

 

Eric Caudal - www.elico-corp.com has proposed merging lp:~elicoidal/purchase-wkfl/purchase-wkfl-fix-0001 into lp:purchase-wkfl.

Requested reviews:
  Purchase Core Editors (purchase-core-editors)

For more details, see:
https://code.launchpad.net/~elicoidal/purchase-wkfl/purchase-wkfl-fix-0001/+merge/208758
-- 
https://code.launchpad.net/~elicoidal/purchase-wkfl/purchase-wkfl-fix-0001/+merge/208758
Your team Purchase Core Editors is requested to review the proposed merge of lp:~elicoidal/purchase-wkfl/purchase-wkfl-fix-0001 into lp:purchase-wkfl.
=== modified file 'purchase_landed_costs/purchase.py'
--- purchase_landed_costs/purchase.py	2013-12-12 15:34:53 +0000
+++ purchase_landed_costs/purchase.py	2014-02-28 10:15:58 +0000
@@ -281,7 +281,7 @@
             apply_on = 'order'
             po_obj = self.pool.get('purchase.order')
             po = po_obj.browse(cr, uid, purchase_order_id, context=context)
-            fiscal_position = po.fiscal_position or False
+	    fiscal_position = po.fiscal_position and po.fiscal_position.id or False 
         else:
             apply_on = 'line'
         if not product_id:
@@ -550,7 +550,7 @@
         po = (landed_cost.purchase_order_id or
               landed_cost.purchase_order_line_id.order_id)
         currency_id = landed_cost.purchase_order_id.pricelist_id.currency_id.id
-        fiscal_position = po.fiscal_position or False
+	fiscal_position = po.fiscal_position and po.fiscal_position.id or False 
         journal_obj = self.pool.get('account.journal')
         journal_ids = journal_obj.search(
             cr, uid,
@@ -587,7 +587,7 @@
         vals_inv = self._prepare_landed_cost_inv(cr, uid, landed_cost,
                                                  context=context)
         inv_id = invoice_obj.create(cr, uid, vals_inv, context=context)
-        fiscal_position = (po.fiscal_position or False)
+	fiscal_position = po.fiscal_position and po.fiscal_position.id or False 
         exp_account_id = prod_obj._choose_exp_account_from(
             cr, uid,
             landed_cost.product_id,


Follow ups