19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:30:07 +01:00
parent ba20ce7443
commit 768b70e05e
2357 changed files with 1057103 additions and 712486 deletions

View file

@ -6,19 +6,19 @@
<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 expr="//field[@name='journal_line_ids' or @name='line_ids']//field[@name='account_id']" position="after">
<field name='need_vehicle' column_invisible="True"/>
<field name='vehicle_id' column_invisible="parent.move_type not in ('in_invoice', 'in_refund', 'in_receipt')" required="need_vehicle and parent.move_type 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'/>
<field name='need_vehicle' column_invisible="True"/>
<field name='vehicle_id' column_invisible="parent.move_type not in ('in_invoice', 'in_refund', 'in_receipt')" required="need_vehicle and parent.move_type in ('in_invoice', 'in_refund')" optional='hidden'/>
</xpath>
</field>
</record>
<record id="account_move_view_tree" model="ir.ui.view">
<field name="name">account.move.tree.inherit.fleet</field>
<field name="name">account.move.list.inherit.fleet</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_tree"/>
<field name="mode">primary</field>
@ -27,13 +27,13 @@
<attribute name="string">Creation Date</attribute>
</xpath>
<xpath expr="//field[@name='date']" position="after">
<field name="invoice_date" optional="show"/>
<field name="invoice_date" optional="show" readonly="state != 'draft'"/>
</xpath>
</field>
</record>
<record id="view_move_line_tree_fleet" model="ir.ui.view">
<field name="name">view.move.line.tree.fleet</field>
<field name="name">view.move.line.list.fleet</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="arch" type="xml">

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id='fleet_vehicle_log_services_view_form' model='ir.ui.view'>
<field name="name">fleet.vehicle.log.services.form.inherit.account</field>
<field name="model">fleet.vehicle.log.services</field>
<field name="inherit_id" ref="fleet.fleet_vehicle_log_services_view_form"/>
<field name="priority" eval="1" />
<field name="arch" type="xml">
<xpath expr="//sheet" position="inside">
<div class="oe_button_box" name="button_box">
<button
name="action_open_account_move"
type="object"
class="oe_stat_button"
icon="fa-pencil-square-o"
invisible="not account_move_line_id">
<div class="o_field_widget o_stat_info">
<span class="o_stat_text text-success"
invisible="account_move_state != 'posted'"
title="Service's Bill">Service's Bill</span>
<span class="o_stat_text text-warning"
invisible="account_move_state == 'posted'"
title="Service's Bill">Service's Bill</span>
</div>
</button>
</div>
</xpath>
<xpath expr="//field[@name='amount']" position="attributes">
<attribute name="readonly">account_move_line_id</attribute>
</xpath>
</field>
</record>
</odoo>

View file

@ -10,7 +10,7 @@
type="object"
class="oe_stat_button"
icon="fa-pencil-square-o"
attrs="{'invisible': [('bill_count', '=', 0)]}"
invisible="bill_count == 0"
help="show the vendor bills for this vehicle">
<field name="bill_count" widget="statinfo" string="Bills"/>
</button>