diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/account_fleet/views | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/account_fleet/views')
| -rw-r--r-- | addons/account_fleet/views/account_move_views.xml | 18 | ||||
| -rw-r--r-- | addons/account_fleet/views/fleet_vehicle_views.xml | 20 |
2 files changed, 38 insertions, 0 deletions
diff --git a/addons/account_fleet/views/account_move_views.xml b/addons/account_fleet/views/account_move_views.xml new file mode 100644 index 00000000..e4c86d01 --- /dev/null +++ b/addons/account_fleet/views/account_move_views.xml @@ -0,0 +1,18 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo> + <record id="view_move_form" model="ir.ui.view"> + <field name="name">account.move.form</field> + <field name="model">account.move</field> + <field name="inherit_id" ref="account.view_move_form"/> + <field name="arch" type="xml"> + <xpath expr="//field[@name='line_ids']//field[@name='account_id']" position="after"> + <field name='need_vehicle' invisible='1'/> + <field name='vehicle_id' attrs="{'required': [('need_vehicle', '=', True), ('parent.move_type', 'in', ('in_invoice', 'in_refund'))], 'column_invisible': [('parent.move_type', 'not in', ('in_invoice', 'in_refund'))]}" optional='hidden'/> + </xpath> + <xpath expr="//field[@name='invoice_line_ids']//field[@name='account_id']" position="after"> + <field name='need_vehicle' invisible='1'/> + <field name='vehicle_id' attrs="{'required': [('need_vehicle', '=', True), ('parent.move_type', 'in', ('in_invoice', 'in_refund'))], 'column_invisible': [('parent.move_type', 'not in', ('in_invoice', 'in_refund'))]}" optional='hidden'/> + </xpath> + </field> + </record> +</odoo> diff --git a/addons/account_fleet/views/fleet_vehicle_views.xml b/addons/account_fleet/views/fleet_vehicle_views.xml new file mode 100644 index 00000000..92a5a8dd --- /dev/null +++ b/addons/account_fleet/views/fleet_vehicle_views.xml @@ -0,0 +1,20 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo> + <record id="fleet_vehicle_view_form" model="ir.ui.view"> + <field name="name">fleet.vehicle.form</field> + <field name="model">fleet.vehicle</field> + <field name="inherit_id" ref="fleet.fleet_vehicle_view_form"/> + <field name="arch" type="xml"> + <xpath expr="//button[@name='open_assignation_logs']" position='before'> + <button name="action_view_bills" + type="object" + class="oe_stat_button" + icon="fa-pencil-square-o" + attrs="{'invisible': [('bill_count', '=', 0)]}" + help="show the vendor bills for this vehicle"> + <field name="bill_count" widget="statinfo" string="Bills"/> + </button> + </xpath> + </field> + </record> +</odoo> |
