Skip to content

Commit

Permalink
[FIX] foreign partner e-inv enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
primes2h committed May 8, 2019
1 parent 00e0575 commit b33a120
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion l10n_it_fatturapa/__manifest__.py
Expand Up @@ -5,7 +5,7 @@

{
'name': 'Italian Localization - Fattura elettronica - Base',
'version': '12.0.1.3.0',
'version': '12.0.1.3.1',
'category': 'Localization/Italy',
'summary': 'Fatture elettroniche',
'author': 'Davide Corio, Agile Business Group, Innoviu, '
Expand Down
4 changes: 2 additions & 2 deletions l10n_it_fatturapa/models/partner.py
Expand Up @@ -128,8 +128,8 @@ def _check_ftpa_partner_data(self):
' generation.'
) % partner.name)

@api.onchange('country_id')
def onchange_country_id_e_inv(self):
@api.onchange('country_id', 'electronic_invoice_subjected')
def onchange_partner_codice_destinatario(self):
if self.country_id.code == 'IT':
self.codice_destinatario = STANDARD_ADDRESSEE_CODE
else:
Expand Down
Expand Up @@ -360,7 +360,7 @@ def test_9_xml_export(self):
self.tax_22.price_include = True
self.set_sequences(9, 18, '2018-01-07')
partner = self.res_partner_fatturapa_4
partner.onchange_country_id_e_inv()
partner.onchange_partner_codice_destinatario()
partner.write(partner._convert_to_write(partner._cache))
self.assertEqual(partner.codice_destinatario, 'XXXXXXX')
invoice = self.invoice_model.create({
Expand Down

0 comments on commit b33a120

Please sign in to comment.