[IMP] accounting: invoice view modifications

Following some user brain tests analysis, the following small modifications have been implemented to improve the usability of the app.

* Delete the quick create option of the payment terms
* Change the name of the payment column in the invoice menu
* Removing the tags of the payment column when the state is different of posted
* When only one currency is activated the currency symbol wasn't displayed anymore cause of recent change on the js side with "group", by adding the field currency_id invisible in the arch the problem is solved

closes odoo/odoo#106903

Task-id: 3085423
Related: odoo/enterprise#34558
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
This commit is contained in:
maximilien(malb)
2022-12-02 11:37:59 +01:00
parent 4c5b867ff6
commit e660b4db6d
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -421,11 +421,12 @@
<field name="company_currency_id" invisible="1"/>
<field name="to_check" optional="hide" widget="boolean_toggle"/>
<field name="payment_state"
string="Payment"
widget="badge"
decoration-danger="payment_state == 'not_paid'"
decoration-warning="payment_state in ('partial', 'in_payment')"
decoration-success="payment_state in ('paid', 'reversed')"
attrs="{'invisible': [('payment_state', 'in', ('invoicing_legacy'))]}"
attrs="{'invisible': ['|', ('payment_state', 'in', ('invoicing_legacy')), ('state', '!=', 'posted')]}"
optional="show"/>
<field name="state" widget="badge" decoration-success="state == 'posted'" decoration-info="state == 'draft'" optional="show"/>
<field name="move_type" invisible="context.get('default_move_type', True)"/>
@@ -825,7 +826,8 @@
attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('invoice_payment_term_id', '!=', False)]}"> or </span>
<field name="invoice_payment_term_id"
context="{'example_date': invoice_date, 'example_amount': tax_totals['amount_total']}"
placeholder="Terms"/>
placeholder="Terms"
options="{'no_quick_create':True}"/>
</div>
<label for="journal_id"
@@ -20,6 +20,7 @@
<field name="company_id" invisible="1" force_save="1"/>
<field name="partner_id" invisible="1" force_save="1"/>
<field name="country_code" invisible="1" force_save="1"/>
<field name="currency_id" invisible="1" />
<field name="show_partner_bank_account" invisible="1"/>
<field name="require_partner_bank_account" invisible="1"/>