Skip to content

Commit

Permalink
[FIX] fixes #14
Browse files Browse the repository at this point in the history
  • Loading branch information
Danisan committed Aug 10, 2019
1 parent 4f134d3 commit d50afb0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<field name='short_name'>RUT</field>
<field name='name'>RUT</field>
<field name='sequence'>1</field>
<field name='is_vat' eval='True'/>
<field name='country_id' ref="base.cl"/>
</record>
<record model='l10n_latam.identification.type' id='it_RUN'>
Expand Down
10 changes: 0 additions & 10 deletions addons/l10n_cl/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,3 @@ def validate_rut(self):
raise UserError(_(
'No RUT configured for partner [%i] %s') % (self.id, self.name))
return self.l10n_cl_rut

@api.onchange('country_id')
def _adjust_identification_type(self):
if self.country_id == self.env.ref('base.cl'):
self.l10n_latam_identification_type_id = self.env.ref(
'l10n_cl.it_RUT')
else:
self.l10n_latam_identification_type_id = self.env.ref(
'l10n_latam_base.it_vat')
self.vat = self.l10n_cl_rut = self.l10n_cl_rut_dv = False

0 comments on commit d50afb0

Please sign in to comment.