Skip to content

Commit e3eb428

Browse files
[FIX] l10n_ar_sale: error al hacer vista previa de pedido de venta
closes #180 Ticket: 75538 Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar>
1 parent 9bd39a5 commit e3eb428

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

l10n_ar_sale/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
'name': 'Argentinian Sale Total Fields',
3-
'version': "16.0.1.7.0",
3+
'version': "16.0.1.8.0",
44
'category': 'Localization/Argentina',
55
'sequence': 14,
66
'author': 'ADHOC SA',

l10n_ar_sale/models/sale_order.py

+7
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,10 @@ def _create_invoices(self, grouped=False, final=False, date=None):
117117
to_fix = invoices.filtered(lambda x: x.l10n_latam_use_documents and not x.l10n_latam_document_type_id)
118118
to_fix._compute_l10n_latam_available_document_types()
119119
return invoices
120+
121+
def is_module_installed(self, module):
122+
module_installed = self.env['ir.module.module'].search([
123+
('name', '=', module),
124+
('state', '=', 'installed'),
125+
])
126+
return True if module_installed else False

l10n_ar_sale/views/sale_report_templates.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
<span t-field="doc.client_order_ref"/>
146146
</t>
147147

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

0 commit comments

Comments
 (0)