This commit: - adds a fiduciary mode which allows fast encoding of invoices. This is an Accounting setting which must be activated. This fiduciary mode allows one to edit directly the invoice sequence and enter the total amount of the invoice (by creating a single line which contains the base price, the tax amount, and the most frequent account) such that we match this 'quick total amount'. - adds a new test for this feature - adds a 'quick edit total amount' in the tax computation which verifies that the 'quick edit total amount' correctly matches sum of the base and the tax (in case of fiduciary mode) - sorts and filters the accounts suggestions in an invoice line. The most frequent accounts for a particular partner rank higher while filtering on the type of account suggested (this is disabled if the user searches itself for the account) - selects by default the most frequent account for a particular partner when creating a new invoice line - adds the option to hide some columns (label & quantity) - moves the car column after the account column in case the Fleet app is installed Task-id: 2857253 Community PR: odoo#91938 Enterprise PR: odoo/enterprise#27605 Part-of: odoo/odoo#91938
47 lines
2.3 KiB
XML
47 lines
2.3 KiB
XML
<?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>
|
|
|
|
<record id="account_move_view_tree" model="ir.ui.view">
|
|
<field name="name">account.move.tree.inherit.fleet</field>
|
|
<field name="model">account.move</field>
|
|
<field name="inherit_id" ref="account.view_move_tree"/>
|
|
<field name="mode">primary</field>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='date']" position="attributes">
|
|
<attribute name="string">Creation Date</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='date']" position="after">
|
|
<field name="invoice_date" optional="show"/>
|
|
</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="model">account.move.line</field>
|
|
<field name="inherit_id" ref="account.view_move_line_tree"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='name']" position='after'>
|
|
<field name="vehicle_id" optional='hidden'/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|