Skip to content

Commit

Permalink
purchase_packaging : add post_init_hook to correctly initialize produ…
Browse files Browse the repository at this point in the history
…ct_purchase_qty
  • Loading branch information
Laetitia Gangloff authored and lmignon committed Mar 9, 2017
1 parent cdd3013 commit b167451
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions purchase_packaging/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# -*- coding: utf-8 -*-

from . import models


def set_product_purchase_qty(cr, registry):
cr.execute("""update purchase_order_line
set product_purchase_qty = product_qty""")
1 change: 1 addition & 0 deletions purchase_packaging/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"data": ["views/product_views.xml",
"views/purchase_views.xml",
],
"post_init_hook": "set_product_purchase_qty",
"license": "AGPL-3",
"installable": True,
"application": False,
Expand Down

0 comments on commit b167451

Please sign in to comment.