Skip to content

Commit

Permalink
[MIG] account_fiscal_position_vat_check: v18 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-via committed Nov 27, 2024
1 parent 06a8625 commit 5171340
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion account_fiscal_position_vat_check/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from . import account_move
from . import partner
from . import res_partner
4 changes: 2 additions & 2 deletions account_fiscal_position_vat_check/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def _post(self, soft=True):
"You are trying to validate a customer "
"invoice/refund with the fiscal position '%(fp)s' "
"that require the customer to have a VAT number. "
"But the Customer '%(rp)s' "
"But the partner '%(rp)s' "
"doesn't have a VAT number in Odoo. "
"Please add the VAT number of this Customer in Odoo "
"Please add the VAT number of this partner in Odoo "
"and try to validate again."
)
% {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<field name="arch" type="xml">
<field name="vat_required" position="attributes">
<!-- always display that field -->
<attribute name="attrs">{}</attribute>
<attribute name="invisible">0</attribute>
</field>
</field>
</record>
Expand All @@ -22,7 +22,7 @@
<field name="inherit_id" ref="account.view_account_position_tree" />
<field name="arch" type="xml">
<field name="name" position="after">
<field name="vat_required" />
<field name="vat_required" optional="show" />
</field>
</field>
</record>
Expand Down
2 changes: 1 addition & 1 deletion account_fiscal_position_vat_check/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class="alert alert-warning"
role="alert"
groups="account.group_account_invoice,account.group_account_readonly"
attrs="{'invisible': [('show_warning_vat_required', '=', False)]}"
invisible="not show_warning_vat_required"
>
<b>Missing VAT number</b>: this partner has the fiscal position <em>
<field name="property_account_position_id" readonly="1" />
Expand Down

0 comments on commit 5171340

Please sign in to comment.