diff --git a/addons/mrp/report/order.rml b/addons/mrp/report/order.rml index af55afce91b..200ca5bb76e 100644 --- a/addons/mrp/report/order.rml +++ b/addons/mrp/report/order.rml @@ -265,10 +265,10 @@ [[ formatLang(o.date_planned, date_time = True) ]] - [[ o.sale_ref or ' ' ]] + [[ o.sale_ref or removeParentNode('para')]] - [[ o.sale_name or '' ]] + [[ o.sale_name or removeParentNode('para') ]] diff --git a/addons/product/product.py b/addons/product/product.py index 52d643940f5..f577437cedb 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -209,13 +209,6 @@ class product_category(osv.osv): 'child_id': fields.one2many('product.category', 'parent_id', string='Child Categories'), 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of product categories."), 'type': fields.selection([('view','View'), ('normal','Normal')], 'Category Type'), - 'property_stock_variation': fields.property( - 'account.account', - type='many2one', - relation='account.account', - string="Stock variation Account", - method=True, - view_load=True, help="This account will be used in product when valuation type is real-time valuation ",), } @@ -465,9 +458,6 @@ class product_product(osv.osv): 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Sale Price')), 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Sale Price')), 'pricelist_id': fields.dummy(string='Pricelist',relation='product.pricelist', type='many2one'), - 'valuation':fields.selection([('manual_periodic','Manual Periodic Valuation'), - ('real_time','Real Time valuation'), - ('','')],'Valuation',help="Decide if the system must automatically creates account moves based on stock moves"), } def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id): diff --git a/addons/product/product_data.xml b/addons/product/product_data.xml index c1635152fad..4763c191817 100644 --- a/addons/product/product_data.xml +++ b/addons/product/product_data.xml @@ -145,11 +145,6 @@ parameter) will see those record just disappear. Stock Weight 2 - - property_stock_variation - - - - + diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index 44250e51bf5..254fe737526 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -148,7 +148,6 @@ - @@ -217,7 +216,6 @@ - diff --git a/addons/stock/product.py b/addons/stock/product.py index 5336143befb..5c9a87a1f23 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -312,6 +312,9 @@ class product_product(osv.osv): 'track_incoming': fields.boolean('Track Incoming Lots', help="Forces to use a tracking lot during receptions"), 'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to use a tracking lot during deliveries"), 'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one', domain=[('usage','=','internal')]), + 'valuation':fields.selection([('manual_periodic','Manual Periodic Valuation'), + ('real_time','Real Time valuation'), + ('','')],'Valuation',help="Decide if the system must automatically creates account moves based on stock moves"), } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): res = super(product_product,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) @@ -417,6 +420,13 @@ class product_category(osv.osv): type='many2one', relation='account.account', string='Stock Output Account', method=True, view_load=True, help='This account will be used to value the output stock'), + 'property_stock_variation': fields.property( + 'account.account', + type='many2one', + relation='account.account', + string="Stock variation Account", + method=True, + view_load=True, help="This account will be used in product when valuation type is real-time valuation ",), } product_category() diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml index 02c60968e04..c0c5b1a491e 100644 --- a/addons/stock/product_view.xml +++ b/addons/stock/product_view.xml @@ -28,6 +28,10 @@ + + + + @@ -122,7 +126,18 @@ - + + + product.valuation.form.inherit + product.product + form + + + + + + + diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index 65553e9fc2b..bfa1845b43c 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -288,7 +288,13 @@ - + + + property_stock_variation + + + +