← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/purchase-wkfl/7.0-fix-agreement-trigger-nbi into lp:purchase-wkfl

 

Nicolas Bessi - Camptocamp has proposed merging lp:~camptocamp/purchase-wkfl/7.0-fix-agreement-trigger-nbi into lp:purchase-wkfl.

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

For more details, see:
https://code.launchpad.net/~camptocamp/purchase-wkfl/7.0-fix-agreement-trigger-nbi/+merge/217746

Fix trigger when line is created
-- 
https://code.launchpad.net/~camptocamp/purchase-wkfl/7.0-fix-agreement-trigger-nbi/+merge/217746
Your team Purchase Core Editors is requested to review the proposed merge of lp:~camptocamp/purchase-wkfl/7.0-fix-agreement-trigger-nbi into lp:purchase-wkfl.
=== modified file 'framework_agreement/model/framework_agreement.py'
--- framework_agreement/model/framework_agreement.py	2014-02-05 09:08:33 +0000
+++ framework_agreement/model/framework_agreement.py	2014-04-30 11:45:25 +0000
@@ -249,8 +249,8 @@
         res = set()
         pol_obj = self.pool.get('purchase.order.line')
         for row in pol_obj.browse(cr, uid, ids, context=context):
-            if row.framework_agreement_id:
-                res.update([row.framework_agreement_id.id])
+            if row.order_id.framework_agreement_id:
+                res.update([row.order_id.framework_agreement_id.id])
         return res
 
     _store_tuple = (lambda self, cr, uid, ids, c={}: ids, ['quantity'], 10)


Follow ups