[IMP] stock: Move the valuation field of the product into accountint tab and set Input Account and Output Account read-only if valuation is not Real Time

bzr revid: sbh@tinyerp.com-20100915103158-75ji09bpbw21tswf
This commit is contained in:
sbh (Open ERP) 2010-09-15 16:01:58 +05:30
parent 3b72903901
commit 784b5e5a46
1 changed files with 12 additions and 6 deletions

View File

@ -75,10 +75,16 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="priority">26</field>
<field name="arch" type="xml">
<field name="property_account_expense" position="after">
<field name="property_stock_account_output" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="base.group_extended"/>
<field name="property_stock_account_input" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="base.group_extended"/>
</field>
<xpath expr="/form/notebook/page[@string='Accounting']" position="inside">
<newline/>
<group groups="base.group_extended">
<separator string="Stock Input/Output Account" colspan="2"/>
<newline/>
<field name="valuation"/>
<field name="property_stock_account_output" attrs="{'readonly':[('valuation', '!=', 'real_time')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="base.group_extended"/>
<field name="property_stock_account_input" attrs="{'readonly':[('valuation', '!=', 'real_time')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="base.group_extended"/>
</group>
</xpath>
</field>
</record>
@ -121,7 +127,7 @@
</field>
</record>
<record id="view_product_valuation_form" model="ir.ui.view">
<!-- <record id="view_product_valuation_form" model="ir.ui.view">
<field name="name">product.valuation.stock.form.inherit</field>
<field name="model">product.product</field>
<field name="type">form</field>
@ -131,7 +137,7 @@
<field name="valuation"/>
</field>
</field>
</record>
</record>-->
</data>
</openerp>