| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<record id="view_sales_order_filter" model="ir.ui.view"> |
| 4 |
<field name="name">sale.order.list.select</field> |
| 5 |
<field name="model">sale.order</field> |
| 6 |
<field name="inherit_id" ref="sale.view_sales_order_filter"/> |
| 7 |
<field name="arch" type="xml"> |
| 8 |
<filter name="my_sale_orders_filter" position="after"> |
| 9 |
<filter string="Exceeded Declaration of Intent" |
| 10 |
name="l10n_it_edi_doi_declaration_of_intent_exceeded" |
| 11 |
domain="[('l10n_it_edi_doi_id.remaining','<', 0)]"/> |
| 12 |
</filter> |
| 13 |
<xpath expr="//search/group" position="inside"> |
| 14 |
<filter string="Declaration of Intent" |
| 15 |
name="l10n_it_edi_doi_declaration_of_intent" |
| 16 |
context="{'group_by': 'l10n_it_edi_doi_id'}"/> |
| 17 |
</xpath> |
| 18 |
</field> |
| 19 |
</record> |
| 20 |
|
| 21 |
<record id="view_quotation_tree" model="ir.ui.view"> |
| 22 |
<field name="name">sale.order.list</field> |
| 23 |
<field name="model">sale.order</field> |
| 24 |
<field name="priority">1000</field> |
| 25 |
<field name="arch" type="xml"> |
| 26 |
<list class="o_sale_order" |
| 27 |
string="Sales Orders" |
| 28 |
sample="1" |
| 29 |
decoration-muted="state == 'cancel'"> |
| 30 |
<field name="name" string="Number"/> |
| 31 |
<field name="date_order" widget="date"/> |
| 32 |
<field name="partner_id"/> |
| 33 |
<field name="currency_id" column_invisible="True"/> |
| 34 |
<field name="state" |
| 35 |
decoration-success="state == 'sale'" |
| 36 |
decoration-info="state == 'draft'" |
| 37 |
decoration-primary="state == 'sent'" |
| 38 |
widget="badge"/> |
| 39 |
<field name="l10n_it_edi_doi_not_yet_invoiced" decoration-bf="1" sum="Total" string="Not Yet Invoiced Amount"/> |
| 40 |
</list> |
| 41 |
</field> |
| 42 |
</record> |
| 43 |
|
| 44 |
<record id="view_order_form" model="ir.ui.view"> |
| 45 |
<field name="name">sale.order.form</field> |
| 46 |
<field name="model">sale.order</field> |
| 47 |
<field name="inherit_id" ref="sale.view_order_form"/> |
| 48 |
<field name="arch" type="xml"> |
| 49 |
<div name="button_box" position="inside"> |
| 50 |
<button groups="account.group_account_invoice" |
| 51 |
type="object" |
| 52 |
class="oe_stat_button" |
| 53 |
name="action_open_declaration_of_intent" |
| 54 |
icon="fa-list" |
| 55 |
invisible="not l10n_it_edi_doi_id"> |
| 56 |
<div class="o_field_widget o_stat_info"> |
| 57 |
<span class="o_stat_text">Declaration of Intent</span> |
| 58 |
</div> |
| 59 |
</button> |
| 60 |
</div> |
| 61 |
<header position="after"> |
| 62 |
<div class="alert alert-warning mb-0" role="alert" |
| 63 |
invisible="not l10n_it_edi_doi_warning"> |
| 64 |
<field name="l10n_it_edi_doi_warning"/> |
| 65 |
</div> |
| 66 |
</header> |
| 67 |
<xpath expr="//label[@for='fiscal_position_id']" position="before"> |
| 68 |
<field name="l10n_it_edi_doi_use" invisible="True"/> |
| 69 |
<field name="l10n_it_edi_doi_id" |
| 70 |
invisible="not l10n_it_edi_doi_use" |
| 71 |
options='{"no_quick_create": True}' |
| 72 |
domain="[ |
| 73 |
('state', '!=', 'draft'), |
| 74 |
('company_id', '=', company_id), |
| 75 |
('currency_id', '=', currency_id), |
| 76 |
('partner_id', 'parent_of', partner_id)]"/> |
| 77 |
</xpath> |
| 78 |
</field> |
| 79 |
</record> |
| 80 |
|
| 81 |
</odoo> |