Skip to content

Commit

Permalink
[FIX] l10n_ar_sale: error al hacer vista previa de pedido de venta
Browse files Browse the repository at this point in the history
closes #180

Ticket: 75538
Signed-off-by: Filoquin adhoc <[email protected]>
  • Loading branch information
pablohmontenegro committed May 29, 2024
1 parent 9bd39a5 commit e3eb428
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion l10n_ar_sale/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
'name': 'Argentinian Sale Total Fields',
'version': "16.0.1.7.0",
'version': "16.0.1.8.0",
'category': 'Localization/Argentina',
'sequence': 14,
'author': 'ADHOC SA',
Expand Down
7 changes: 7 additions & 0 deletions l10n_ar_sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,10 @@ def _create_invoices(self, grouped=False, final=False, date=None):
to_fix = invoices.filtered(lambda x: x.l10n_latam_use_documents and not x.l10n_latam_document_type_id)
to_fix._compute_l10n_latam_available_document_types()
return invoices

def is_module_installed(self, module):
module_installed = self.env['ir.module.module'].search([
('name', '=', module),
('state', '=', 'installed'),
])
return True if module_installed else False
2 changes: 1 addition & 1 deletion l10n_ar_sale/views/sale_report_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<span t-field="doc.client_order_ref"/>
</t>

<t t-if="doc.incoterm">
<t t-if="doc.is_module_installed('sale_stock')">
<br/><strong>Incoterm:</strong><span t-field="doc.incoterm.name"/>
</t>

Expand Down

0 comments on commit e3eb428

Please sign in to comment.