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

@ -16,14 +16,14 @@
</record>
<record id="view_payment_term_tree" model="ir.ui.view">
<field name="name">account.payment.term.tree</field>
<field name="name">account.payment.term.list</field>
<field name="model">account.payment.term</field>
<field name="arch" type="xml">
<tree string="Payment Terms">
<list string="Payment Terms">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</list>
</field>
</record>
@ -34,52 +34,66 @@
<form string="Payment Terms">
<sheet>
<field name="active" invisible="1"/>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<group>
<group>
<field name="name"/>
</group>
<group>
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</group>
</group>
<group>
<field name="note" placeholder="Payment term explanation for the customer..."/>
</group>
<label for="display_on_invoice"/>
<field name="display_on_invoice"/>
<separator string="Terms"/>
<p class="text-muted">
The last line's computation type should be "Balance" to ensure that the whole amount will be allocated.
</p>
<field name="line_ids">
<tree string="Payment Terms" editable="top" no_open="True">
<field name="value" string="Due Type"/>
<field name="value_amount" attrs="{'invisible': [('value', '=', 'balance')]}" />
<field name="months"/>
<field name="days"/>
<field name="end_month" widget="boolean_toggle" options="{'autosave': False}"/>
<field name="days_after" attrs="{'invisible': [('end_month','=', False)]}"/>
<field name="discount_percentage"/>
<field name="discount_days"/>
</tree>
</field>
<div class="oe_edit_only">
<separator string="Example"/>
<field name="example_invalid" invisible="1"/>
<div attrs="{'invisible': [('example_invalid', '=', False)]}">
The Payment Term must have one Balance line.
</div>
<div attrs="{'invisible': [('example_invalid', '=', True)]}" class="d-flex" >
For any invoice of
<span class="mx-1"/> <field name="example_amount" /> <span class="mx-1"/>
dated
<span class="mx-1"/> <field name="example_date" class="oe_inline" style="color: #704A66; font-weight: bold"/>,
the due date(s) and amount(s) will be:
</div>
<field name="example_preview" attrs="{'invisible': [('example_invalid', '=', True)]}"/>
<field name="fiscal_country_codes" invisible="1"/>
<field name="company_id" invisible="1"/>
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
<div class="oe_title">
<label for="name" string="Payment Terms"/>
<h1><field name="name" nolabel="1" placeholder="e.g. 30 days"/></h1>
</div>
<group>
<field name="company_id" options="{'no_create': True}" class="w-25" groups="base.group_multi_company" placeholder="Visible to all"/>
<label for="early_discount"/>
<div class="o_field_highlight">
<field name="early_discount"/>
<field name="discount_percentage"
class="text-end o_field_highlight o_input oe_inline"
invisible="not early_discount"/>
<span invisible="not early_discount"> % if paid within </span>
<field name="discount_days"
class="text-end o_field_highlight o_input oe_inline"
invisible="not early_discount"/>
<span invisible="not early_discount"> days</span>
<div invisible="not early_discount">
<span> Reduced tax:
<field name="early_pay_discount_computation" class="w-auto"/>
</span>
</div>
</div>
</group>
<group>
<group string="Due Terms">
<field name="line_ids" widget="payment_term_line_ids" nolabel="1">
<list string="Payment Terms" editable="bottom" no_open="True">
<field name="value_amount"/>
<field name="value" nolabel="1"/>
<field name="nb_days" string="After"/>
<field name="delay_type" nolabel="1"/>
<field name="display_days_next_month" column_invisible="1"/>
<field name="days_next_month" width="30px" nolabel="1" invisible="not display_days_next_month"/>
</list>
</field>
</group>
<group string="Preview">
<div colspan="2">
<field name="display_on_invoice" nolabel="1"/>
<label for="display_on_invoice"/>
</div>
<div class="d-flex gap-2" colspan="2" col="4">
Example:
<field name="example_amount" class="oe_inline"/>
on
<field name="example_date" class="fw-bold border-bottom o_example_date"/>
</div>
<div colspan="2" class="py-1 bg-secondary">
<field name="note" placeholder="Description on invoice (e.g. Payment terms: 30 days after invoice date)" class="border-bottom o_example_note"/>
<field name="example_preview_discount" class="ps-2"
invisible="not early_discount or not display_on_invoice"/>
<field name="example_preview" class="ps-2"
invisible="not display_on_invoice"/>
</div>
</group>
</group>
</sheet>
</form>
</field>
@ -90,14 +104,10 @@
<field name="model">account.payment.term</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="name"/>
<field name="note"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div><strong class="o_kanban_record_title"><t t-esc="record.name.value"/></strong></div>
<div t-if="!widget.isHtmlEmpty(record.note.raw_value)"><t t-out="record.note.value"/></div>
</div>
<t t-name="card">
<field class="fw-bolder fs-5" name="name"/>
<field name="note"/>
</t>
</templates>
</kanban>
@ -107,7 +117,8 @@
<record id="action_payment_term_form" model="ir.actions.act_window">
<field name="name">Payment Terms</field>
<field name="res_model">account.payment.term</field>
<field name="view_mode">tree,kanban,form</field>
<field name="path">payment-terms</field>
<field name="view_mode">list,kanban,form</field>
<field name="search_view_id" ref="view_payment_term_search"/>
</record>