diff --git a/l10n_ar_stock/models/res_company.py b/l10n_ar_stock/models/res_company.py index 4251f731..fc408b6f 100644 --- a/l10n_ar_stock/models/res_company.py +++ b/l10n_ar_stock/models/res_company.py @@ -33,7 +33,7 @@ def arba_cot_connect(self): Method to be called """ self.ensure_one() - cuit = self.partner_id.ensure_vat() + cuit = self._context.get('force_cot_cuit') or self.partner_id.ensure_vat() if not self.arba_cot: raise UserError(_( @@ -51,7 +51,7 @@ def arba_cot_connect(self): # wrapper=None, cacert=None, trace=False, testing="" arba_cot_url = self.get_arba_cot_login_url(environment_type) ws.Usuario = cuit - ws.Password = self.arba_cot + ws.Password = self._context.get('force_cot_password') or self.arba_cot ws.Conectar(url=arba_cot_url) _logger.info( 'Connection getted to ARBA COT with url "%s" and CUIT %s' % (