From 6afb907103de33cc77fbcba0f5eb776cd03147b3 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 5 Dec 2013 14:11:17 +0100 Subject: [PATCH] [FIX] stock_account: fixed wrong implementation of default value for property fields bzr revid: qdp-launchpad@openerp.com-20131205131117-kuaubvz9esd025l7 --- addons/stock_account/__openerp__.py | 1 - addons/stock_account/product.py | 8 -------- addons/stock_account/stock_account_data.xml | 14 +++++++++++++- addons/stock_account/valuationandcostmethod.yml | 6 ------ 4 files changed, 13 insertions(+), 16 deletions(-) delete mode 100644 addons/stock_account/valuationandcostmethod.yml diff --git a/addons/stock_account/__openerp__.py b/addons/stock_account/__openerp__.py index 78cbd2c539d..be52f3e7572 100644 --- a/addons/stock_account/__openerp__.py +++ b/addons/stock_account/__openerp__.py @@ -56,7 +56,6 @@ Dashboard / Reports for Warehouse Management will include: 'product_data.xml', 'product_view.xml', 'stock_account_view.xml', - 'valuationandcostmethod.yml', ], 'test': [ diff --git a/addons/stock_account/product.py b/addons/stock_account/product.py index b2e2ceb0cf0..e45ca2adedb 100644 --- a/addons/stock_account/product.py +++ b/addons/stock_account/product.py @@ -250,10 +250,6 @@ class product_product(osv.osv): , required=True), } - _defaults = { - 'valuation': 'manual_periodic', - } - class product_template(osv.osv): _name = 'product.template' @@ -278,10 +274,6 @@ class product_template(osv.osv): "there is a specific valuation account set on the destination location. When not set on the product, the one from the product category is used."), } - _defaults = { - 'cost_method': 'standard', - } - class product_category(osv.osv): _inherit = 'product.category' diff --git a/addons/stock_account/stock_account_data.xml b/addons/stock_account/stock_account_data.xml index 8cacc1163d3..4dea1742498 100644 --- a/addons/stock_account/stock_account_data.xml +++ b/addons/stock_account/stock_account_data.xml @@ -3,7 +3,7 @@ - Stock Journal Sequence + stock journal sequence STJ/%(year)s/ @@ -14,6 +14,18 @@ + + Cost Method Property + + standard + selection + + + Valuation Property + + manual_periodic + selection + diff --git a/addons/stock_account/valuationandcostmethod.yml b/addons/stock_account/valuationandcostmethod.yml deleted file mode 100644 index dcc5f934495..00000000000 --- a/addons/stock_account/valuationandcostmethod.yml +++ /dev/null @@ -1,6 +0,0 @@ -- - Write on all products valuation and cost method (temporary patch for default value problems for properties in demo data) -- - !python {model: product.product}: | - prod_ids = self.search(cr, uid, []) - self.write(cr, uid, prod_ids, {'cost_method':'real', 'valuation':'manual_periodic'})