← Back to team overview

openerp-community-reviewer team mailing list archive

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

 

Nicolas Bessi - Camptocamp has proposed merging lp:~camptocamp/purchase-wkfl/7.0-fix-missing-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-missing-trigger-nbi/+merge/206934

[FIX] merge trouble, missing trigger on purchase order line
-- 
https://code.launchpad.net/~camptocamp/purchase-wkfl/7.0-fix-missing-trigger-nbi/+merge/206934
Your team Purchase Core Editors is requested to review the proposed merge of lp:~camptocamp/purchase-wkfl/7.0-fix-missing-trigger-nbi into lp:purchase-wkfl.
=== modified file 'framework_agreement/model/purchase.py'
--- framework_agreement/model/purchase.py	2014-02-05 08:47:53 +0000
+++ framework_agreement/model/purchase.py	2014-02-18 13:48:02 +0000
@@ -36,13 +36,19 @@
             res.update([x.id for x in row.order_line])
         return res
 
+    def _get_po_line_store(self, cr, uid, ids, context=None):
+        return ids
+
+
     _store_tuple = (_get_po_store, ['framework_agreement_id'], 20)
+    _line_store_tuple = (_get_po_line_store, [], 20)
 
     _columns = {'framework_agreement_id': fields.related('order_id',
                                                          'framework_agreement_id',
                                                          type='many2one',
                                                          readonly=True,
-                                                         store={'purchase.order': _store_tuple},
+                                                         store={'purchase.order': _store_tuple,
+                                                                'purchase.order.line': _line_store_tuple},
                                                          relation='framework.agreement',
                                                          string='Agreement')}
 


Follow ups