Skip to content

Commit

Permalink
[MIG]account_invoice_check_total: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
moitabenfdz committed Aug 2, 2024
1 parent 187938e commit 8525063
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion account_invoice_check_total/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Account Invoice Check Total",
"summary": """
Check if the verification total is equal to the bill's total""",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"website": "https://github.com/OCA/account-invoicing",
"author": "Acsone SA/NV, Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand Down
1 change: 0 additions & 1 deletion account_invoice_check_total/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class AccountMove(models.Model):
check_total = fields.Monetary(
string="Verification Total",
readonly=True,
states={"draft": [("readonly", False)]},
copy=False,
)
check_total_display_difference = fields.Monetary(
Expand Down
5 changes: 3 additions & 2 deletions account_invoice_check_total/views/account_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
<xpath expr="//div[@name='journal_div']" position="after">
<field
name="check_total"
readonly="state != 'draft'"
groups="account_invoice_check_total.group_supplier_inv_check_total"
attrs="{'invisible': [('move_type', 'not in', ['in_invoice', 'in_refund'])]}"
invisible="move_type not in ['in_invoice', 'in_refund']"
/>
</xpath>
<xpath expr="//field[@name='amount_residual']" position="after">
<field
name="check_total_display_difference"
groups="account_invoice_check_total.group_supplier_inv_check_total"
attrs="{'invisible': ['|', ('move_type', 'not in', ['in_invoice', 'in_refund']), ('check_total_display_difference', '=', 0)]}"
invisible="move_type not in ['in_invoice', 'in_refund'] or check_total == 0"
/>
</xpath>
</field>
Expand Down
23 changes: 7 additions & 16 deletions account_invoice_check_total/views/res_config_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,15 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[@name='sepa_right_pane']/parent::div" position="after">
<div
class="col-xs-12 col-md-6 o_setting_box"
<xpath expr="//setting[@id='sepa_payments']" position="after">
<setting
id="inv_check_total"
title="If you check this box, the system verifies that the total computed amount is the same as the verification total."
company_dependent="1"
help="Check whether the total computed amount is the same as the verification total"
>
<div class="o_setting_left_pane">
<field name="group_supplier_inv_check_total" />
</div>
<div class="o_setting_right_pane" name="inv_check_total_right_pane">
<label
string="Check Total on Vendor Bills"
for="group_supplier_inv_check_total"
/>
<div class="text-muted">
Check whether the total computed amount is the same as the verification total
</div>
</div>
</div>
<field name="group_supplier_inv_check_total" />
</setting>
</xpath>
</field>
</record>
Expand Down

0 comments on commit 8525063

Please sign in to comment.