Files
odoo_source/addons/account/data/account_data.xml
T
maximilien(malb) 9c134ec379 [IMP] account: simplify payment term usability
v16.0 introduced a new payment term view and the possibility of an early payment discount.

However, this view and the underlying behaviour can be simplified.

- Changed the payment term view and the report invoice view to better display the installment
- Removed the balance field from payment terms, replacing it with percentage
- Simplified the due date configuration in the payment terms
- Simplified early payment discount by only enabling it on one-line payment term, so it's user-friendlier
- Moved the early payment computation on the payment term rather than the company

task-3090382

See :
Enterprise : https://github.com/odoo/enterprise/pull/36046

closes odoo/odoo#110274

Upgrade: https://github.com/odoo/upgrade/pull/4349
Related: odoo/enterprise#36046
Related: odoo/upgrade#4349
Signed-off-by: Laurent Smet <las@odoo.com>
2023-02-28 19:08:51 +01:00

165 lines
8.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record forcecreate="True" id="decimal_payment" model="decimal.precision">
<field name="name">Payment Terms</field>
<field name="digits">6</field>
</record>
<!-- Open Settings from Purchase Journal to configure mail servers -->
<record id="action_open_settings" model="ir.actions.act_window">
<field name="name">Settings</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context" eval="{'module': 'general_settings', 'bin_size': False}"/>
</record>
<!-- TAGS FOR CASH FLOW STATEMENT DIRECT METHOD -->
<record id="account_tag_operating" model="account.account.tag">
<field name="name">Operating Activities</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_financing" model="account.account.tag">
<field name="name">Financing Activities</field>
<field name="applicability">accounts</field>
</record>
<record id="account_tag_investing" model="account.account.tag">
<field name="name">Investing &amp; Extraordinary Activities</field>
<field name="applicability">accounts</field>
</record>
<!--
Payment terms
-->
<record id="account_payment_term_immediate" model="account.payment.term">
<field name="name">Immediate Payment</field>
<field name="note">Payment terms: Immediate Payment</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 0})]"/>
</record>
<record id="account_payment_term_15days" model="account.payment.term">
<field name="name">15 Days</field>
<field name="note">Payment terms: 15 Days</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 15})]"/>
</record>
<record id="account_payment_term_21days" model="account.payment.term">
<field name="name">21 Days</field>
<field name="note">Payment terms: 21 Days</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 21})]"/>
</record>
<record id="account_payment_term_30days" model="account.payment.term">
<field name="name">30 Days</field>
<field name="note">Payment terms: 30 Days</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 30})]"/>
</record>
<record id="account_payment_term_45days" model="account.payment.term">
<field name="name">45 Days</field>
<field name="note">Payment terms: 45 Days</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 45})]"/>
</record>
<record id="account_payment_term_end_following_month" model="account.payment.term">
<field name="name">End of Following Month</field>
<field name="note">Payment terms: End of Following Month</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'delay_type':'days_after_end_of_next_month', 'nb_days': 0})]"/>
</record>
<record id="account_payment_term_30_days_end_month_the_10" model="account.payment.term">
<field name="name">10 Days after End of Next Month</field>
<field name="note">Payment terms: 10 Days after End of Next Month</field>
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'percent', 'value_amount': 100.0, 'delay_type':'days_after_end_of_next_month', 'nb_days': 10})]"/>
</record>
<record id="account_payment_term_advance_60days" model="account.payment.term">
<field name="name">30% Now, Balance 60 Days</field>
<field name="note">Payment terms: 30% Now, Balance 60 Days</field>
<field name="line_ids" eval="[
Command.clear(),
Command.create({'value': 'percent', 'value_amount': 30.0, 'nb_days': 0}),
Command.create({'value': 'percent', 'value_amount': 70.0, 'nb_days': 60})]"/>
</record>
<record id="account_payment_term_30days_early_discount" model="account.payment.term">
<field name="name">2/7 Net 30</field>
<field name="note">Payment terms: 30 Days, 2% Early Payment Discount under 7 days</field>
<field name="display_on_invoice">True</field>
<field name="early_discount">True</field>
<field name="discount_percentage">2</field>
<field name="discount_days">7</field>
<field name="line_ids" eval="[
Command.clear(),
Command.create({'value': 'percent', 'value_amount': 100.0, 'nb_days': 30})]"/>
</record>
<!--
Account Statement Sequences
-->
<record id="sequence_reconcile_seq" model="ir.sequence">
<field name="name">Account reconcile sequence</field>
<field name="code">account.reconcile</field>
<field name="prefix">A</field>
<field eval="1" name="number_next"/>
<field eval="1" name="number_increment"/>
<field eval="False" name="company_id"/>
</record>
<!-- Account-related subtypes for messaging / Chatter -->
<record id="mt_invoice_validated" model="mail.message.subtype">
<field name="name">Validated</field>
<field name="res_model">account.move</field>
<field name="default" eval="False"/>
<field name="description">Invoice validated</field>
</record>
<record id="mt_invoice_paid" model="mail.message.subtype">
<field name="name">Paid</field>
<field name="res_model">account.move</field>
<field name="default" eval="False"/>
<field name="description">Invoice paid</field>
</record>
<record id="mt_invoice_created" model="mail.message.subtype">
<field name="name">Invoice Created</field>
<field name="res_model">account.move</field>
<field name="default" eval="False"/>
<field name="hidden" eval="True"/>
<field name="description">Invoice Created</field>
</record>
<!-- Payment methods -->
<record id="account_payment_method_manual_in" model="account.payment.method">
<field name="name">Manual</field>
<field name="code">manual</field>
<field name="payment_type">inbound</field>
</record>
<record id="account_payment_method_manual_out" model="account.payment.method">
<field name="name">Manual</field>
<field name="code">manual</field>
<field name="payment_type">outbound</field>
</record>
<!-- Partner Trust Property -->
<record forcecreate="True" id="default_followup_trust" model="ir.property">
<field name="name">Followup Trust Property</field>
<field name="fields_id" search="[('model', '=', 'res.partner'), ('name', '=', 'trust')]"/>
<field name="value">normal</field>
<field name="type">selection</field>
</record>
<!-- Share Button in action menu -->
<record id="model_account_move_action_share" model="ir.actions.server">
<field name="name">Share</field>
<field name="model_id" ref="account.model_account_move"/>
<field name="binding_model_id" ref="account.model_account_move"/>
<field name="binding_view_types">form</field>
<field name="state">code</field>
<field name="code">action = records.action_share()</field>
</record>
</data>
</odoo>