Skip to content

Commit

Permalink
[MIG] l10n_uy_reports: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
docker-odoo authored and mem-adhoc committed Dec 10, 2024
1 parent 59a75c7 commit 88d6ddc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions l10n_uy_reports/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Uruguay - Accounting Reports',
'version': "17.0.1.0.0",
'version': "18.0.1.0.0",
'author': 'ADHOC SA',
'license': 'LGPL-3',
'category': 'Localization',
Expand All @@ -23,5 +23,5 @@
],
},
'auto_install': True,
'installable': False,
'installable': True,
}
8 changes: 4 additions & 4 deletions l10n_uy_reports/report/account_uy_vat_line_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
</record>

<record id="view_account_uy_vat_line_tree" model="ir.ui.view">
<field name="name">account.uy.vat.line.tree</field>
<field name="name">account.uy.vat.line.list</field>
<field name="model">account.uy.vat.line</field>
<field name="arch" type="xml">
<tree editable="bottom">
<list editable="bottom">
<field name="date"/>
<field name="move_id"/>
<field name="partner_id"/>
Expand All @@ -46,7 +46,7 @@
<field name="other_taxes" sum="Total"/>
<field name="total" sum="Total"/>
<button name="open_journal_entry" string="Open" type="object" icon="fa-external-link" help="Open journal entry"/>
</tree>
</list>
</field>
</record>

Expand All @@ -70,7 +70,7 @@
<record id="action_account_uy_vat_line" model="ir.actions.act_window">
<field name="name">VAT Summary</field>
<field name="res_model">account.uy.vat.line</field>
<field name="view_mode">pivot,tree</field>
<field name="view_mode">pivot,list</field>
<field name="context">{'search_default_posted': 1, 'time_ranges': {'field': 'date', 'range': 'last_month'}}</field>
</record>

Expand Down
5 changes: 2 additions & 3 deletions l10n_uy_reports/wizards/form_report_wiz.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ def _get_form_2181_data(self):
for rut_partner, invoices in data.items():
amount_total = {}
for inv in invoices:
group_by_subtotal_values = list(inv.tax_totals.get('groups_by_subtotal').values())[0] if list(inv.tax_totals.get('groups_by_subtotal').values()) else []
for item in group_by_subtotal_values:
tax_group_id = item.get('tax_group_id')
for item in inv.tax_totals.get('subtotals'):
tax_group_id = item.get('tax_groups')
if tax_group_id in taxes_group_ids:
# los comprobantes exentos tienen 0.0 en tax_group_amount, entonces tomamos tax_group_base_amount
inv_amount = item.get('tax_group_amount') if not tax_group_id == self.env.ref('l10n_uy_account.tax_group_vat_exempt').id else item.get('tax_group_base_amount')
Expand Down

0 comments on commit 88d6ddc

Please sign in to comment.