Skip to content

Instantly share code, notes, and snippets.

@ianjosephwilson
Created January 14, 2013 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianjosephwilson/4531457 to your computer and use it in GitHub Desktop.
Save ianjosephwilson/4531457 to your computer and use it in GitHub Desktop.
<record model="ir.ui.view" id="inventory_view_form">
<field name="model">inventory.inventory</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Inventory" col="4">
<label name="warehouse"/>
<field name="warehouse"/>
<label name="lost_found"/>
<field name="lost_found"/>
<label name="date"/>
<field name="date"/>
<label name="company"/>
<field name="company"/>
<label colspan="2" id="empty"/>
<button string="Complete Inventory" type="action"
name="%(wizard_complete_inventory)d"
states="{'readonly': Or(Not(Equal(Eval('state'), 'draft')), Not(Bool(Eval('warehouse'))))}"
colspan="2"
help="Add inventory lines with the specified products and locations."/>
<field name="lines" colspan="4"/>
<group col="4" colspan="4" id="group_buttons">
<label name="state"/>
<field name="state"/>
<group colspan="2" col="3" id="buttons">
<button string="Cancel"
name="cancel"
states="{'invisible': In(Eval('state'), ['cancel', 'done']), 'readonly': Not(In(%(stock.group_stock)d, Eval('groups', [])))}"
icon="tryton-cancel" />
<button string="Confirm"
name="done"
states="{'invisible': In(Eval('state'), ['done','cancel']), 'readonly': Not(In(%(stock.group_stock)d, Eval('groups', [])))}"
icon="tryton-ok"/>
</group>
</group>
</form>
]]>
</field>
</record>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment