Skip to content

Commit

Permalink
[MIG] l10n_es_aeat_mod592: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arantxa-s73 committed Nov 26, 2024
1 parent b73a885 commit 9a3cdb4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion l10n_es_aeat_mod592/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

{
"name": "AEAT modelo 592",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Accounting",
"author": "Tecnativa, Binhex System Solutions, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-spain",
Expand Down
2 changes: 1 addition & 1 deletion l10n_es_aeat_mod592/models/mod592.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def calculate(self):
else:
manufacturer_lines.append((0, 0, m_vals))
item.manufacturer_line_ids = manufacturer_lines
item.recompute()
item.env.flush_all()
return res

def button_recover(self):
Expand Down
6 changes: 3 additions & 3 deletions l10n_es_aeat_mod592/tests/test_l10n_es_aeat_mod592.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_model_592(self):
# export_xlsx_acquirer
xlsx_res = self.model592.export_xlsx_acquirer()
res = self.report_obj._get_report_from_name(xlsx_res["report_name"])._render(
self.model592.ids, {}
xlsx_res["report_name"],self.model592.ids, {}
)
wb = open_workbook(file_contents=res[0])
sheet = wb.sheet_by_index(0)
Expand All @@ -230,15 +230,15 @@ def test_model_592(self):
# export_xlsx_manufacturer
xlsx_res = self.model592.export_xlsx_manufacturer()
res = self.report_obj._get_report_from_name(xlsx_res["report_name"])._render(
self.model592.ids, {}
xlsx_res["report_name"],self.model592.ids, {}
)
wb = open_workbook(file_contents=res[0])
sheet = wb.sheet_by_index(0)
self.assertEqual(sheet.cell(1, 0).value, "M001")
# report_l10n_es_mod592_pdf
res = self.report_obj._get_report_from_name(
"l10n_es_aeat_mod592.report_l10n_es_mod592_pdf"
)._render_qweb_text(self.model592.ids)
)._render_qweb_text("l10n_es_aeat_mod592.report_l10n_es_mod592_pdf",self.model592.ids)
res_text = str(res[0])
self.assertRegex(res_text, "A001")
self.assertRegex(res_text, "A002")
Expand Down
1 change: 1 addition & 0 deletions setup/l10n_es_aeat_mod592/odoo/addons/l10n_es_aeat_mod592
6 changes: 6 additions & 0 deletions setup/l10n_es_aeat_mod592/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 9a3cdb4

Please sign in to comment.