From f2ef7dc29b779a37c75ad22062767185588e054c Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 6 Dec 2013 11:31:50 +0100 Subject: [PATCH 1/6] [REF] stock_account, product: moved the standard price historization in 'product' module, as it doesn't depend of stock (or account) at all and it was causing problems for products created before stock_account was installed, like all demo data products (no entry for them in prices_history table) bzr revid: qdp-launchpad@openerp.com-20131206103150-2mnvsipy9uai3xlk --- addons/product/product.py | 67 +++++++++++++++++++++++++++++++- addons/stock/stock.py | 2 +- addons/stock_account/product.py | 68 --------------------------------- 3 files changed, 67 insertions(+), 70 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index 6797d9a31ea..a076417ebff 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -21,6 +21,7 @@ import math import re +import time from _common import rounding @@ -413,15 +414,56 @@ class product_template(osv.osv): return super(product_template, self).name_get(cr, user, ids, context) +class prices_history(osv.osv): + """ + Keep track of the ``product.product`` standard prices as they are changed. + """ + + _name = 'prices.history' + _rec_name = 'datetime' + _order = 'datetime desc' + + _columns = { + 'company_id': fields.many2one('res.company', required=True), + 'product_id': fields.many2one('product.product', 'Product', required=True), + 'datetime': fields.datetime('Historization Time'), + 'cost': fields.float('Historized Cost'), + 'reason': fields.char('Reason'), + } + + def _get_default_company(self, cr, uid, context=None): + if 'force_company' in context: + return context['force_company'] + else: + company = self.pool['res.users'].browse(cr, uid, uid, + context=context).company_id + return company.id if company else False + + _defaults = { + 'datetime': fields.datetime.now, + 'company_id': _get_default_company, + } + + class product_product(osv.osv): def view_header_get(self, cr, uid, view_id, view_type, context=None): if context is None: context = {} res = super(product_product, self).view_header_get(cr, uid, view_id, view_type, context) if (context.get('categ_id', False)): - return _('Products: ')+self.pool.get('product.category').browse(cr, uid, context['categ_id'], context=context).name + return _('Products: ') + self.pool.get('product.category').browse(cr, uid, context['categ_id'], context=context).name return res + def get_history_price(self, cr, uid, product_id, company_id, context=None): + if context is None: + context = {} + date = context.get('history_date', time.strftime('%Y-%m-%d %H:%M:%s')) + prices_history_obj = self.pool.get('prices.history') + history_ids = prices_history_obj.search(cr, uid, [('company_id', '=', company_id), ('product_id', '=', product_id), ('datetime', '<=', date)], limit=1) + if history_ids: + return prices_history_obj.read(cr, uid, history_ids[0], ['cost'], context=context)['cost'] + raise osv.except_osv(_('Error!'), _("No standard price associated for product with ID %d for the given date" % (product_id))) + def _product_price(self, cr, uid, ids, name, arg, context=None): res = {} if context is None: @@ -779,6 +821,29 @@ class product_product(osv.osv): args.append((('categ_id', 'child_of', context['search_default_categ_id']))) return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count) + def create(self, cr, uid, vals, context=None): + ''' Store the initial standard price in order to be able to retrieve the cost of a product for a given date''' + product_id = super(product_product, self).create(cr, uid, vals, context=context) + price_history_obj = self.pool['prices.history'] + price_history_obj.create(cr, uid, { + 'product_id': product_id, + 'cost': vals.get('standard_price', 0.0), + 'reason': _('Product created and standard price set'), + }, context=context) + return product_id + + def write(self, cr, uid, ids, values, context=None): + ''' Store the standard price change in order to be able to retrieve the cost of a product for a given date''' + if 'standard_price' in values: + price_history_obj = self.pool['prices.history'] + for product in self.browse(cr, uid, ids, context=context): + price_history_obj.create(cr, uid, { + 'product_id': product.id, + 'cost': values['standard_price'], + 'reason': _('standard price is changed.'), + }, context=context) + return super(product_product, self).write(cr, uid, ids, values, context=context) + class product_packaging(osv.osv): _name = "product.packaging" diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 984f3fc4b12..93fd62f20ca 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1254,7 +1254,7 @@ class stock_move(osv.osv): 'priority': fields.selection([('0', 'Not urgent'), ('1', 'Urgent')], 'Priority'), 'create_date': fields.datetime('Creation Date', readonly=True, select=True), 'date': fields.datetime('Date', required=True, select=True, help="Move date: scheduled date until move is done, then date of actual move processing", states={'done': [('readonly', True)]}), - 'date_expected': fields.datetime('Scheduled Date', states={'done': [('readonly', True)]}, required=True, select=True, help="Scheduled date for the processing of this move"), + 'date_expected': fields.datetime('Expected Date', states={'done': [('readonly', True)]}, required=True, select=True, help="Scheduled date for the processing of this move"), 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type', '<>', 'service')], states={'done': [('readonly', True)]}), # TODO: improve store to add dependency on product UoM 'product_qty': fields.function(_quantity_normalize, type='float', store=True, string='Quantity', diff --git a/addons/stock_account/product.py b/addons/stock_account/product.py index 54c86f7cf11..9681084a6c8 100644 --- a/addons/stock_account/product.py +++ b/addons/stock_account/product.py @@ -21,55 +21,10 @@ from openerp.osv import fields, osv from openerp.tools.translate import _ -import time - -class prices_history(osv.osv): - """ - Keep track of the ``product.product`` standard prices as they are changed. - """ - - _name = 'prices.history' - _rec_name = 'datetime' - _order = 'datetime desc' - - _columns = { - 'company_id': fields.many2one('res.company', required=True), - 'product_id': fields.many2one('product.product', 'Product', required=True), - 'datetime': fields.datetime('Historization Time'), - 'cost': fields.float('Historized Cost'), - 'reason': fields.char('Reason'), - # TODO 'origin': openerp.osv.fields.reference(), - #'quant_id': openerp.osv.fields.many2one('stock.quant'), - } - - def _get_default_company(self, cr, uid, context=None): - if 'force_company' in context: - return context['force_company'] - else: - company = self.pool['res.users'].browse(cr, uid, uid, - context=context).company_id - return company.id if company else False - - _defaults = { - #'quant_id': False, - 'datetime': fields.datetime.now, - 'company_id': _get_default_company, - } - class product_product(osv.osv): _inherit = "product.product" - def get_history_price(self, cr, uid, product_id, company_id, context=None): - if context is None: - context = {} - date = context.get('history_date', time.strftime('%Y-%m-%d %H:%M:%s')) - prices_history_obj = self.pool.get('prices.history') - history_ids = prices_history_obj.search(cr, uid, [('company_id', '=', company_id), ('product_id', '=', product_id), ('datetime', '<=', date)], limit=1) - if history_ids: - return prices_history_obj.read(cr, uid, history_ids[0], ['cost'], context=context)['cost'] - raise osv.except_osv(_('Error!'), _("No standard price associated for product with ID %d for the given date" % (product_id))) - def get_product_accounts(self, cr, uid, product_id, context=None): """ To get the stock input account, stock output account and stock journal related to product. @param product_id: product id @@ -210,29 +165,6 @@ class product_product(osv.osv): return move_ids - def create(self, cr, uid, vals, context=None): - ''' Store the initial standard price in order to be able to retrieve the cost of a product for a given date (to make stock valuation at date)''' - product_id = super(product_product, self).create(cr, uid, vals, context=context) - price_history_obj = self.pool['prices.history'] - price_history_obj.create(cr, uid, { - 'product_id': product_id, - 'cost': vals.get('standard_price', 0.0), - 'reason': _('Product created and standard price set'), - }, context=context) - return product_id - - def write(self, cr, uid, ids, values, context=None): - ''' Store the standard price change in order to be able to retrieve the cost of a product for a given date (to make stock valuation at date)''' - if 'standard_price' in values: - price_history_obj = self.pool['prices.history'] - for product in self.browse(cr, uid, ids, context=context): - price_history_obj.create(cr, uid, { - 'product_id': product.id, - 'cost': values['standard_price'], - 'reason': _('standard price is changed.'), - }, context=context) - return super(product_product, self).write(cr, uid, ids, values, context=context) - _columns = { 'valuation': fields.property(type='selection', selection=[('manual_periodic', 'Periodical (manual)'), ('real_time', 'Real Time (automated)')], string='Inventory Valuation', From a0caaa3d6d16bb87b58040a9325b65ccbc3c6a5e Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 6 Dec 2013 17:30:54 +0100 Subject: [PATCH 2/6] [FIX] product: moved the standard price historization on product_template table instead of product.product (the column is there) bzr revid: qdp-launchpad@openerp.com-20131206163054-3lpu43m16lvc8okp --- addons/product/product.py | 110 +++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index a076417ebff..4b63100dbee 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -295,6 +295,37 @@ class product_category(osv.osv): ] +class prices_history(osv.osv): + """ + Keep track of the ``product.template`` standard prices as they are changed. + """ + + _name = 'prices.history' + _rec_name = 'datetime' + _order = 'datetime desc' + + _columns = { + 'company_id': fields.many2one('res.company', required=True), + 'product_template_id': fields.many2one('product.template', 'Product Template', required=True), + 'datetime': fields.datetime('Historization Time'), + 'cost': fields.float('Historized Cost'), + 'reason': fields.char('Reason'), + } + + def _get_default_company(self, cr, uid, context=None): + if 'force_company' in context: + return context['force_company'] + else: + company = self.pool['res.users'].browse(cr, uid, uid, + context=context).company_id + return company.id if company else False + + _defaults = { + 'datetime': fields.datetime.now, + 'company_id': _get_default_company, + } + + #---------------------------------------------------------- # Products @@ -366,13 +397,33 @@ class product_template(osv.osv): return {'value': {'uom_po_id': uom_id}} return {} + def create(self, cr, uid, vals, context=None): + ''' Store the initial standard price in order to be able to retrieve the cost of a product template for a given date''' + product_template_id = super(product_template, self).create(cr, uid, vals, context=context) + price_history_obj = self.pool['prices.history'] + price_history_obj.create(cr, uid, { + 'product_template_id': product_template_id, + 'cost': vals.get('standard_price', 0.0), + 'reason': _('Product template created and standard price set'), + }, context=context) + return product_template_id + def write(self, cr, uid, ids, vals, context=None): + ''' Store the standard price change in order to be able to retrieve the cost of a product template for a given date''' if 'uom_po_id' in vals: new_uom = self.pool.get('product.uom').browse(cr, uid, vals['uom_po_id'], context=context) for product in self.browse(cr, uid, ids, context=context): old_uom = product.uom_po_id if old_uom.category_id.id != new_uom.category_id.id: raise osv.except_osv(_('Unit of Measure categories Mismatch!'), _("New Unit of Measure '%s' must belong to same Unit of Measure category '%s' as of old Unit of Measure '%s'. If you need to change the unit of measure, you may deactivate this product from the 'Procurements' tab and create a new one.") % (new_uom.name, old_uom.category_id.name, old_uom.name,)) + if 'standard_price' in vals: + price_history_obj = self.pool['prices.history'] + for prod_template_id in ids: + price_history_obj.create(cr, uid, { + 'product_template_id': prod_template_id, + 'cost': vals['standard_price'], + 'reason': _('standard price is changed.'), + }, context=context) return super(product_template, self).write(cr, uid, ids, vals, context=context) _defaults = { @@ -414,37 +465,6 @@ class product_template(osv.osv): return super(product_template, self).name_get(cr, user, ids, context) -class prices_history(osv.osv): - """ - Keep track of the ``product.product`` standard prices as they are changed. - """ - - _name = 'prices.history' - _rec_name = 'datetime' - _order = 'datetime desc' - - _columns = { - 'company_id': fields.many2one('res.company', required=True), - 'product_id': fields.many2one('product.product', 'Product', required=True), - 'datetime': fields.datetime('Historization Time'), - 'cost': fields.float('Historized Cost'), - 'reason': fields.char('Reason'), - } - - def _get_default_company(self, cr, uid, context=None): - if 'force_company' in context: - return context['force_company'] - else: - company = self.pool['res.users'].browse(cr, uid, uid, - context=context).company_id - return company.id if company else False - - _defaults = { - 'datetime': fields.datetime.now, - 'company_id': _get_default_company, - } - - class product_product(osv.osv): def view_header_get(self, cr, uid, view_id, view_type, context=None): if context is None: @@ -457,12 +477,13 @@ class product_product(osv.osv): def get_history_price(self, cr, uid, product_id, company_id, context=None): if context is None: context = {} + product = self.browse(cr, uid, product_id, context=context) date = context.get('history_date', time.strftime('%Y-%m-%d %H:%M:%s')) prices_history_obj = self.pool.get('prices.history') - history_ids = prices_history_obj.search(cr, uid, [('company_id', '=', company_id), ('product_id', '=', product_id), ('datetime', '<=', date)], limit=1) + history_ids = prices_history_obj.search(cr, uid, [('company_id', '=', company_id), ('product_template_id', '=', product.product_tmpl_id.id), ('datetime', '<=', date)], limit=1) if history_ids: return prices_history_obj.read(cr, uid, history_ids[0], ['cost'], context=context)['cost'] - raise osv.except_osv(_('Error!'), _("No standard price associated for product with ID %d for the given date" % (product_id))) + raise osv.except_osv(_('Error!'), _("No standard price associated for product %s for the given date" % (product.name))) def _product_price(self, cr, uid, ids, name, arg, context=None): res = {} @@ -821,29 +842,6 @@ class product_product(osv.osv): args.append((('categ_id', 'child_of', context['search_default_categ_id']))) return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count) - def create(self, cr, uid, vals, context=None): - ''' Store the initial standard price in order to be able to retrieve the cost of a product for a given date''' - product_id = super(product_product, self).create(cr, uid, vals, context=context) - price_history_obj = self.pool['prices.history'] - price_history_obj.create(cr, uid, { - 'product_id': product_id, - 'cost': vals.get('standard_price', 0.0), - 'reason': _('Product created and standard price set'), - }, context=context) - return product_id - - def write(self, cr, uid, ids, values, context=None): - ''' Store the standard price change in order to be able to retrieve the cost of a product for a given date''' - if 'standard_price' in values: - price_history_obj = self.pool['prices.history'] - for product in self.browse(cr, uid, ids, context=context): - price_history_obj.create(cr, uid, { - 'product_id': product.id, - 'cost': values['standard_price'], - 'reason': _('standard price is changed.'), - }, context=context) - return super(product_product, self).write(cr, uid, ids, values, context=context) - class product_packaging(osv.osv): _name = "product.packaging" From eabe8af3bb1bacb931faf0318ebb6532bbd4b4fe Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 6 Dec 2013 17:32:43 +0100 Subject: [PATCH 3/6] [FIX] stock: always set the internal transfers picking type as active bzr revid: qdp-launchpad@openerp.com-20131206163243-7v6y4szabdyrgiu9 --- addons/stock/stock.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 93fd62f20ca..d67f98d8f6b 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2532,7 +2532,6 @@ class stock_warehouse(osv.osv): output_loc = warehouse.lot_stock_id picking_type_obj.write(cr, uid, warehouse.in_type_id.id, {'default_location_dest_id': input_loc.id}, context=context) picking_type_obj.write(cr, uid, warehouse.out_type_id.id, {'default_location_src_id': output_loc.id}, context=context) - picking_type_obj.write(cr, uid, warehouse.int_type_id.id, {'active': new_reception_step != 'one_step'}, context=context) picking_type_obj.write(cr, uid, warehouse.pick_type_id.id, {'active': new_delivery_step != 'ship_only'}, context=context) picking_type_obj.write(cr, uid, warehouse.pack_type_id.id, {'active': new_delivery_step == 'pick_pack_ship'}, context=context) @@ -2666,7 +2665,7 @@ class stock_warehouse(osv.osv): 'sequence_id': int_seq_id, 'default_location_src_id': wh_stock_loc.id, 'default_location_dest_id': wh_stock_loc.id, - 'active': reception_steps != 'one_step', + 'active': True, 'pack': False, 'color': color}, context=context) pack_type_id = picking_type_obj.create(cr, uid, vals={ From 3115161c29c6537676dc5d1ef529bc99ca290812 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 6 Dec 2013 17:33:07 +0100 Subject: [PATCH 4/6] [FIX] stock_account: fixed the stock valuation at date report bzr revid: qdp-launchpad@openerp.com-20131206163307-zurim6dmg30pxnzl --- .../wizard/stock_valuation_history.py | 44 ++++++++++++++++--- .../wizard/stock_valuation_history_view.xml | 1 + 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/addons/stock_account/wizard/stock_valuation_history.py b/addons/stock_account/wizard/stock_valuation_history.py index 1bbd70ac204..96ddce2c0ff 100644 --- a/addons/stock_account/wizard/stock_valuation_history.py +++ b/addons/stock_account/wizard/stock_valuation_history.py @@ -36,6 +36,7 @@ class wizard_valuation_history(osv.osv_memory): class stock_history(osv.osv): _name = 'stock.history' _auto = False + _order = 'date asc' def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False): res = super(stock_history, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby) @@ -54,7 +55,7 @@ class stock_history(osv.osv): res = {} for line in self.browse(cr, uid, ids, context=context): if line.product_id.cost_method == 'real': - res[line.id] = line.quantity * line.price_unit_on_move + res[line.id] = line.quantity * line.price_unit_on_quant else: res[line.id] = line.quantity * product_obj.get_history_price(cr, uid, line.product_id.id, line.company_id.id, context=context) return res @@ -68,7 +69,7 @@ class stock_history(osv.osv): 'product_categ_id': fields.many2one('product.category', 'Product Category', required=True), 'quantity': fields.integer('Quantity'), 'date': fields.datetime('Operation Date'), - 'price_unit_on_move': fields.float('Value'), + 'price_unit_on_quant': fields.float('Value'), 'cost_method': fields.char('Cost Method'), 'inventory_value': fields.function(_get_inventory_value, string="Inventory Value", type='float', readonly=True), } @@ -77,23 +78,52 @@ class stock_history(osv.osv): tools.drop_view_if_exists(cr, 'stock_history') cr.execute(""" CREATE OR REPLACE VIEW stock_history AS ( - SELECT - stock_move.id AS id, + (SELECT + quant.id AS id, stock_move.id AS move_id, stock_move.location_dest_id AS location_id, stock_move.product_id AS product_id, product_template.categ_id AS product_categ_id, - stock_move.product_qty AS quantity, + quant.qty AS quantity, stock_move.date AS date, ir_property.value_text AS cost_method, - stock_move.price_unit as price_unit_on_move + quant.cost as price_unit_on_quant FROM stock_move + LEFT JOIN + stock_quant quant ON quant.id IN (SELECT quant_id FROM stock_quant_move_rel WHERE move_id = stock_move.id) + LEFT JOIN + stock_location location ON stock_move.location_dest_id = location.id LEFT JOIN product_product ON product_product.id = stock_move.product_id LEFT JOIN product_template ON product_template.id = product_product.product_tmpl_id LEFT JOIN ir_property ON (ir_property.name = 'cost_method' and ir_property.res_id = 'product.template,' || product_template.id::text) - WHERE stock_move.state = 'done' + WHERE stock_move.state = 'done' AND location.usage = 'internal' + ) UNION + (SELECT + - quant.id AS id, + stock_move.id AS move_id, + stock_move.location_id AS location_id, + stock_move.product_id AS product_id, + product_template.categ_id AS product_categ_id, + - quant.qty AS quantity, + stock_move.date AS date, + ir_property.value_text AS cost_method, + quant.cost as price_unit_on_quant + FROM + stock_move + LEFT JOIN + stock_quant quant ON quant.id IN (SELECT quant_id FROM stock_quant_move_rel WHERE move_id = stock_move.id) + LEFT JOIN + stock_location location ON stock_move.location_id = location.id + LEFT JOIN + product_product ON product_product.id = stock_move.product_id + LEFT JOIN + product_template ON product_template.id = product_product.product_tmpl_id + LEFT JOIN + ir_property ON (ir_property.name = 'cost_method' and ir_property.res_id = 'product.template,' || product_template.id::text) + WHERE stock_move.state = 'done' AND location.usage = 'internal' + ) )""") diff --git a/addons/stock_account/wizard/stock_valuation_history_view.xml b/addons/stock_account/wizard/stock_valuation_history_view.xml index e00404e757b..9d45903f766 100644 --- a/addons/stock_account/wizard/stock_valuation_history_view.xml +++ b/addons/stock_account/wizard/stock_valuation_history_view.xml @@ -61,6 +61,7 @@ + From 823e945477d11a6b6272ee7e00a286328b9d7c4b Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 6 Dec 2013 17:50:06 +0100 Subject: [PATCH 5/6] [FIX] stock_account: fixed the stock valuation at date report bzr revid: qdp-launchpad@openerp.com-20131206165006-47db8kyuxjm8s0bo --- addons/stock_account/wizard/stock_valuation_history.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock_account/wizard/stock_valuation_history.py b/addons/stock_account/wizard/stock_valuation_history.py index 96ddce2c0ff..1d61d29faf4 100644 --- a/addons/stock_account/wizard/stock_valuation_history.py +++ b/addons/stock_account/wizard/stock_valuation_history.py @@ -79,7 +79,7 @@ class stock_history(osv.osv): cr.execute(""" CREATE OR REPLACE VIEW stock_history AS ( (SELECT - quant.id AS id, + stock_move.id::text || '-' || quant.id::text AS id, stock_move.id AS move_id, stock_move.location_dest_id AS location_id, stock_move.product_id AS product_id, @@ -103,7 +103,7 @@ class stock_history(osv.osv): WHERE stock_move.state = 'done' AND location.usage = 'internal' ) UNION (SELECT - - quant.id AS id, + '-' || stock_move.id::text || '-' || quant.id::text AS id, stock_move.id AS move_id, stock_move.location_id AS location_id, stock_move.product_id AS product_id, From 1e4d89bf7916c9202ef29549703fb97e6a3ad29e Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 6 Dec 2013 17:59:56 +0100 Subject: [PATCH 6/6] [IMP] stock_account: usability of stock value at date report bzr revid: qdp-launchpad@openerp.com-20131206165956-75u2srxtb7mbusyq --- addons/stock_account/wizard/stock_valuation_history.py | 3 ++- addons/stock_account/wizard/stock_valuation_history_view.xml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/stock_account/wizard/stock_valuation_history.py b/addons/stock_account/wizard/stock_valuation_history.py index 1d61d29faf4..a56726bb1c6 100644 --- a/addons/stock_account/wizard/stock_valuation_history.py +++ b/addons/stock_account/wizard/stock_valuation_history.py @@ -21,7 +21,8 @@ class wizard_valuation_history(osv.osv_memory): data = self.read(cr, uid, ids, context=context)[0] ctx = context.copy() ctx['history_date'] = data['date'] - ctx['group_by'] = ['product_id'] + ctx['search_default_group_by_product'] = True + ctx['search_default_group_by_location'] = True return { 'domain': "[('date', '<=', '" + data['date'] + "')]", 'name': _('Stock Value At Date'), diff --git a/addons/stock_account/wizard/stock_valuation_history_view.xml b/addons/stock_account/wizard/stock_valuation_history_view.xml index 9d45903f766..273e77aebff 100644 --- a/addons/stock_account/wizard/stock_valuation_history_view.xml +++ b/addons/stock_account/wizard/stock_valuation_history_view.xml @@ -38,7 +38,7 @@ Stock Value At Date stock.history - + @@ -60,7 +60,7 @@ - +