mirror of
https://github.com/NaN-tic/trytond-sale_product_raw.git
synced 2023-12-14 03:13:00 +01:00
Add ir.model.button record.
This commit is contained in:
parent
b41ee857f2
commit
ccb3cdc458
1
sale.py
1
sale.py
|
@ -38,6 +38,7 @@ class Sale(metaclass=PoolMeta):
|
|||
| (Eval('state') == 'cancel')),
|
||||
'readonly': ~Eval('groups', []).contains(
|
||||
Id('sale', 'group_sale')),
|
||||
'icon': 'tryton-forward',
|
||||
},
|
||||
})
|
||||
|
||||
|
|
10
sale.xml
10
sale.xml
|
@ -33,6 +33,16 @@
|
|||
<field name="perm_delete" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="sale_handle_production_exception_button">
|
||||
<field name="name">handle_production_exception</field>
|
||||
<field name="string">Handle Production Exception</field>
|
||||
<field name="model" search="[('model', '=', 'sale.sale')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group" id="sale_handle_production_exception_button_group_sale">
|
||||
<field name="button" ref="sale_handle_production_exception_button"/>
|
||||
<field name="group" ref="sale.group_sale"/>
|
||||
</record>
|
||||
|
||||
<!-- sale.handle.production.exception -->
|
||||
<record model="ir.action.wizard" id="wizard_production_handle_exception">
|
||||
<field name="name">Handle Production Exception</field>
|
||||
|
|
|
@ -2,16 +2,12 @@
|
|||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/notebook/page[@id='sale']/group[@id='states']/field[@name='invoice_state']"
|
||||
position="after">
|
||||
<xpath expr="/form/notebook/page[@id='sale']/group[@id='states']/field[@name='invoice_state']" position="after">
|
||||
<label name="production_state"/>
|
||||
<field name="production_state"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@id='sale']/group[@id='amount_buttons']/group/button[@name='handle_invoice_exception']"
|
||||
position="after">
|
||||
<button name="handle_production_exception"
|
||||
string="Handle Production Exception"
|
||||
icon="tryton-forward"/>
|
||||
<xpath expr="/form/group[@id='buttons']/button[@name='handle_invoice_exception']" position="after">
|
||||
<button name="handle_production_exception"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@name='invoices']" position="after">
|
||||
<page string="Productions" id="productions">
|
||||
|
|
Loading…
Reference in a new issue