<button name="view_picking" string="Receive Products" type="object" attrs="{'invisible': ['|', ('shipped','=',True), ('state','!=', 'approved')]}" class="oe_highlight"/>
<button name="view_invoice" string="Receive Invoice" type="object" attrs="{'invisible': ['|', ('invoice_method','in', ['picking', 'manual']), '|', ('state','!=', 'approved'), ('invoiced','=',True) ]}" class="oe_highlight"/>
<button name="action_cancel_draft" states="cancel,sent,confirmed" string="Set to Draft" type="object" />
- <button name="purchase_cancel" states="draft,confirmed,sent,bid" string="Cancel"/>
- <button name="action_cancel" states="approved,except_picking,except_invoice" string="Cancel" type="object" />
+ <button name="action_cancel" states="draft,confirmed,sent,bid,approved,except_picking,except_invoice" string="Cancel" type="object" />
<field name="state" widget="statusbar" statusbar_visible="draft,sent,bid,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue"}' readonly="1"/>
</header>
<sheet>
<page string="Products">
<field name="order_line">
<tree string="Purchase Order Lines" editable="bottom">
- <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,parent.state,context)"/>
+ <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,False,parent.state,context)"/>
<field name="name"/>
<field name="date_planned"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</page>
<page string="RFQ & Bid">
<group>
- <field name="payment_term_id" widget="selection"/>
<field name="incoterm_id"/>
<field name="bid_date"/>
<field name="bid_validity"/>
<group>
<field name="invoice_method"/>
<field name="invoiced"/>
- <field name="payment_term_id" widget="selection"/>
+ <field name="payment_term_id" options="{'no_open': True, 'no_create': True}"/>
<field name="fiscal_position" attrs="{'readonly': [('invoiced','=', True)]}" />
<!-- We do not need these fields anymore, the information is in open chatter -->
<field name="validator" groups="base.group_no_one"/>