[IMP] stock_account: cost field editable on FIFO + AUTO

Before this commit, when 'Inventory Valuation' was on 'Automated' and
'Costing Method' was on FIFO, the product cost field wasn't editable
anymore.
Now, it still editable in this configuration (other configuration aren't
affected).

Task #1937164

closes odoo/odoo#31145

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
svs-odoo
2019-03-29 14:54:45 +00:00
parent 62c9dedafd
commit 63d2a1675b
+2 -2
View File
@@ -38,7 +38,7 @@
</field>
<field name="standard_price" position="replace">
<field name="standard_price"
attrs="{'readonly':[('valuation','=','real_time')]}"
attrs="{'readonly':[('valuation','=','real_time'), ('cost_method', '!=', 'fifo')]}"
widget='monetary' options="{'currency_field': 'cost_currency_id', 'field_digits': True}"
class="float-left oe_inline"/>
<div name="update_cost_price">
@@ -66,7 +66,7 @@
<label for="standard_price"/>
<div name="standard_price_div" class="row ml-0">
<field name="standard_price"
attrs="{'readonly':[('valuation','=','real_time')]}"
attrs="{'readonly':[('valuation','=','real_time'), ('cost_method', '!=', 'fifo')]}"
widget='monetary' options="{'currency_field': 'currency_id', 'field_digits': True}" class="float-left"/>
<div name="update_cost_price">
<button string="Update Cost" type="action"