Skip to content

Commit

Permalink
[MIG] account_invoice_tax: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
docker-odoo authored and maq-adhoc committed Oct 15, 2024
1 parent dd0e086 commit ae111e9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions account_invoice_tax/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
'name': 'Account Invoice Tax',
'version': "17.0.1.0.0",
'version': "18.0.1.0.0",
'author': 'ADHOC SA',
'category': 'Localization',
'depends': [
Expand All @@ -17,7 +17,7 @@
],
},
'license': 'AGPL-3',
'installable': False,
'installable': True,
'auto_install': False,
'application': False,
}
7 changes: 7 additions & 0 deletions account_invoice_tax/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ def copy(self, default=None):
res.tax_totals = self.tax_totals

return res

def button_draft(self):
for move in self:
super(AccountMove, move.with_context(
tax_list_origin=move.mapped('invoice_line_ids.tax_ids'),
tax_total_origin=move.tax_totals)
).button_draft()
6 changes: 3 additions & 3 deletions account_invoice_tax/static/src/xml/tax_totals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

<t t-name="account.TaxGroupComponent" t-inherit="account.TaxGroupComponent" t-inherit-mode="extension" owl="1">
<xpath expr="//span[hasclass('o_tax_group_edit')]" position="replace">
<span class="o_tax_group_edit">
<span class="o_tax_group_amount_value">
<t t-out="props.taxGroup.formatted_tax_group_amount"/>
<span class="o_tax_group_edit" t-on-click.prevent="() => this.setState('edit')">
<span class="o_tax_group_amount_value o_list_monetary">
<t t-out="formatMonetary(props.taxGroup.tax_amount_currency)"/>
</span>
</span>
</xpath>
Expand Down
4 changes: 2 additions & 2 deletions account_invoice_tax/wizards/account_invoice_tax_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<field name="company_id" invisible="1"/>
<field name="move_id" invisible="1"/>
<field colspan="2" nolabel="1" name="tax_line_ids">
<tree decoration-info="new_tax == True" editable="bottom">
<list decoration-info="new_tax == True" editable="bottom">
<field name="tax_id" domain="[('type_tax_use', '=', 'purchase'), ('company_id', '=', parent.company_id)]" options="{'no_create': True, 'no_edit': True}"/>
<field name="amount"/>
<field name="new_tax" column_invisible="True"/>
</tree>
</list>
</field>
</group>
<footer>
Expand Down

0 comments on commit ae111e9

Please sign in to comment.