mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
purchase_packaging : add post_init_hook to correctly initialize product_purchase_qty
This commit is contained in:
committed by
Thomas Binsfeld
parent
2c915f3dce
commit
d4b755d3a8
@@ -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""")
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user