mirror of
https://github.com/bringout/oca-financial.git
synced 2026-04-26 21:22:00 +02:00
174 lines
7.8 KiB
XML
174 lines
7.8 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!--
|
|
Copyright (C) 2023 Akretion (http://www.akretion.com/)
|
|
@author: Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
|
|
-->
|
|
<odoo>
|
|
<record id="view_move_form_inherit" model="ir.ui.view">
|
|
<field name="model">account.move</field>
|
|
<field name="inherit_id" ref="account.view_move_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath
|
|
expr="//field[@name='invoice_line_ids']/tree/field[last()]"
|
|
position="after"
|
|
>
|
|
<field
|
|
name="subtotal_ecotax"
|
|
optional="show"
|
|
attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund', 'out_receipt'))]}"
|
|
/>
|
|
<field
|
|
name="ecotax_amount_unit"
|
|
optional="hide"
|
|
attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund', 'out_receipt'))]}"
|
|
/>
|
|
<button
|
|
name="edit_ecotax_lines"
|
|
type="object"
|
|
string="Ecotax"
|
|
attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund', 'out_receipt'))]}"
|
|
/>
|
|
<field name="ecotax_line_ids" invisible="1">
|
|
<tree editable="bottom">
|
|
<field name="classification_id" />
|
|
<field name="force_amount_unit" />
|
|
<field name="amount_unit" />
|
|
<field name="amount_total" />
|
|
</tree>
|
|
</field>
|
|
</xpath>
|
|
<xpath
|
|
expr="//field[@name='invoice_line_ids']/form/sheet/field[@name='name']"
|
|
position="after"
|
|
>
|
|
<field
|
|
name="ecotax_line_ids"
|
|
colspan="2"
|
|
attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund', 'out_receipt'))]}"
|
|
>
|
|
<tree editable="bottom">
|
|
<field name="classification_id" />
|
|
<field name="force_amount_unit" />
|
|
<field name="amount_unit" />
|
|
<field name="amount_total" />
|
|
</tree>
|
|
</field>
|
|
<field
|
|
name="subtotal_ecotax"
|
|
attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund', 'out_receipt'))]}"
|
|
/>
|
|
<field
|
|
name="ecotax_amount_unit"
|
|
attrs="{'invisible': [('parent.move_type', 'not in', ('out_invoice', 'out_refund', 'out_receipt'))]}"
|
|
/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='tax_totals']" position="after">
|
|
<field
|
|
name="amount_ecotax"
|
|
class="oe_subtotal_footer_separator"
|
|
attrs="{'invisible': [ '|', ('move_type', 'not in', ('out_invoice', 'out_refund', 'out_receipt')), ('amount_ecotax', '=', 0)]}"
|
|
/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record id="view_move_line_ecotax_form" model="ir.ui.view">
|
|
<field name="name">account.move.line.ecotax.form</field>
|
|
<field name="model">account.move.line</field>
|
|
<field name="arch" type="xml">
|
|
<form create="false">
|
|
<sheet>
|
|
<field name="product_uom_category_id" invisible="1" />
|
|
<field name="display_type" invisible="1" />
|
|
<field name="parent_state" invisible="1" />
|
|
<group>
|
|
<field name="partner_id" invisible="1" />
|
|
<field name="company_id" invisible="1" />
|
|
<field name="debit" invisible="1" />
|
|
<field name="credit" invisible="1" />
|
|
<field
|
|
name="product_id"
|
|
widget="many2one_barcode"
|
|
readonly="1"
|
|
/>
|
|
<field name="quantity" readonly="1" />
|
|
<field
|
|
name="product_uom_id"
|
|
groups="uom.group_uom"
|
|
readonly="1"
|
|
/>
|
|
<field name="price_unit" readonly="1" />
|
|
<field name="discount" string="Disc.%" readonly="1" />
|
|
<field name="currency_id" invisible="1" />
|
|
</group>
|
|
<group>
|
|
<field
|
|
name="analytic_line_ids"
|
|
groups="analytic.group_analytic_accounting"
|
|
widget="many2many_tags"
|
|
readonly="1"
|
|
/>
|
|
<field
|
|
name="account_id"
|
|
options="{'no_create': True}"
|
|
domain="[('company_id', '=', company_id)]"
|
|
readonly="1"
|
|
/>
|
|
<field name="tax_ids" widget="many2many_tags" readonly="1" />
|
|
<field
|
|
name="analytic_distribution"
|
|
groups="analytic.group_analytic_accounting"
|
|
readonly="1"
|
|
/>
|
|
</group>
|
|
<label
|
|
for="name"
|
|
string="Description"
|
|
attrs="{'invisible': [('display_type', '!=', False)]}"
|
|
/>
|
|
<label
|
|
for="name"
|
|
string="Section"
|
|
attrs="{'invisible': [('display_type', '!=', 'line_section')]}"
|
|
/>
|
|
<label
|
|
for="name"
|
|
string="Note"
|
|
attrs="{'invisible': [('display_type', '!=', 'line_note')]}"
|
|
/>
|
|
<field name="name" widget="text" readonly="1" />
|
|
<notebook>
|
|
<page string="Ecotaxe lines" name="ecotax_line">
|
|
<field
|
|
name="ecotax_line_ids"
|
|
nolabel="1"
|
|
attrs="{'readonly': [('parent_state', '!=', 'draft')]}"
|
|
>
|
|
<tree editable="bottom">
|
|
<field name="classification_id" />
|
|
<field name="force_amount_unit" />
|
|
<field name="amount_unit" />
|
|
<field
|
|
name="amount_total"
|
|
sum="Total Ecotaxe"
|
|
/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
</notebook>
|
|
<group>
|
|
<field
|
|
name="price_subtotal"
|
|
string="Subtotal"
|
|
groups="account.group_show_line_subtotals_tax_excluded"
|
|
/>
|
|
<field
|
|
name="price_total"
|
|
string="Total"
|
|
groups="account.group_show_line_subtotals_tax_included"
|
|
/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
</odoo>
|