Skip to content

Commit

Permalink
[MIG] account_ecotax_sale: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gurneyalex committed Oct 14, 2024
1 parent 4173439 commit 14dbb57
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion account_ecotax_sale/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "sale Ecotax Management",
"summary": "Sale Ecotaxe",
"version": "16.0.2.0.0",
"version": "17.0.1.0.0",
"author": "Akretion,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-fiscal-rule",
"category": "Localization/Account Taxes",
Expand Down
3 changes: 2 additions & 1 deletion account_ecotax_sale/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ def _compute_ecotax(self):

@api.depends("product_id", "company_id")
def _compute_tax_id(self):
super()._compute_tax_id()
res = super()._compute_tax_id()
for line in self:
line.tax_id |= line._get_computed_ecotaxes()
return res

def _get_computed_ecotaxes(self):
self.ensure_one()
Expand Down
2 changes: 1 addition & 1 deletion account_ecotax_sale/tests/test_sale_ecotax.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class TestsaleEcotax(AccountTestInvoicingCommon):
@classmethod
def setUpClass(cls, chart_template_ref="l10n_fr.l10n_fr_pcg_chart_template"):
super(TestsaleEcotax, cls).setUpClass(chart_template_ref)
super().setUpClass(chart_template_ref)

cls.ecotax_classification = cls.env["account.ecotax.classification"]
cls.ecotax_classification1 = cls.ecotax_classification.create(
Expand Down
12 changes: 4 additions & 8 deletions account_ecotax_sale/views/sale_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<field name="sequence" invisible="1" />
<field name="product_uom_category_id" invisible="1" />
<group>
<group attrs="{'invisible': [('display_type', '!=', False)]}">
<group invisible="display_type">
<field
name="product_id"
readonly="1"
Expand Down Expand Up @@ -108,20 +108,16 @@
<field name="sequence" invisible="1" />
</group>
</group>
<label
for="name"
string="Description"
attrs="{'invisible': [('display_type', '!=', False)]}"
/>
<label for="name" string="Description" invisible="display_type" />
<label
for="name"
string="Section Name (eg. Products, Services)"
attrs="{'invisible': [('display_type', '!=', 'line_section')]}"
invisible="display_type != 'line_section'"
/>
<label
for="name"
string="Note"
attrs="{'invisible': [('display_type', '!=', 'line_note')]}"
invisible="display_type != 'line_note'"
/>
<field name="name" />
<div name="invoice_lines" groups="base.group_no_one" invisible="1">
Expand Down

0 comments on commit 14dbb57

Please sign in to comment.