configuration.py: se retiran atributos consulta de rango de resolucion ya que segun Resolucion004 se hace desde la nueva webservice con GetNumberingRange
This commit is contained in:
parent
96a9a0bf76
commit
85df85d355
|
@ -10,9 +10,6 @@ class Configuration(
|
|||
__name__ = 'account_invoice_facho.configuration'
|
||||
|
||||
dian_fe_key= fields.MultiValue(fields.Char('Dian FE KEY'))
|
||||
dian_fe_numeracion_username = fields.MultiValue(fields.Char('Username'))
|
||||
dian_fe_numeracion_password = fields.MultiValue(fields.Char('Password'))
|
||||
dian_fe_numeracion_key = fields.MultiValue(fields.Char('Dian FE Numeracion Key'))
|
||||
dian_fe_llave_publica = fields.MultiValue(fields.Char('Publica PCKS#12'))
|
||||
dian_fe_llave_privada = fields.MultiValue(fields.Char('Privada PCKS#12'))
|
||||
dian_fe_llave_frasepaso = fields.MultiValue(fields.Char('Frasepaso PCKS#12'))
|
||||
|
@ -34,10 +31,7 @@ class ConfigurationDianFECompany(ModelSQL, CompanyValueMixin):
|
|||
configuration = fields.Many2One('account_invoice_facho.configuration', 'Configuration',
|
||||
required=True, ondelete='CASCADE')
|
||||
|
||||
dian_fe_numeracion_username = fields.Char('Username')
|
||||
dian_fe_numeracion_password = fields.Char('Password')
|
||||
dian_fe_numeracion_key = fields.Char('Dian FE Numeracion Key')
|
||||
dian_fe_key = fields.Char('Dian FE Key')
|
||||
dian_fe_key = fields.Char('Dian key')
|
||||
dian_fe_llave_publica = fields.Char('Publica PCKS#12')
|
||||
dian_fe_llave_privada = fields.Char('Publica PCKS#12')
|
||||
dian_fe_test_setid = fields.Char('Dian testsetid')
|
||||
|
|
27
invoice.py
27
invoice.py
|
@ -28,31 +28,37 @@ class Party(metaclass=PoolMeta):
|
|||
__name__ = 'party.party'
|
||||
|
||||
fe_identifiers = fields.One2Many('account_invoice_facho.party.fe_identifier',
|
||||
'party', 'Fe Identifiers', required=True)
|
||||
'party', 'Fe Identifiers')
|
||||
fe_organizations = fields.One2Many('account_invoice_facho.party.fe_organization',
|
||||
'party', 'Fe Organizations', required=True)
|
||||
'party', 'Fe Organizations')
|
||||
|
||||
@property
|
||||
def fe_identifier(self):
|
||||
fe_identifier = fields.Function(fields.Many2One('account_invoice_facho.party.fe_identifier',
|
||||
'Fe Identifier'),
|
||||
'get_fe_identifier')
|
||||
|
||||
fe_organization = fields.Function(fields.Many2One('account_invoice_facho.party.fe_organization',
|
||||
'Fe Organization'),
|
||||
'get_fe_organization')
|
||||
|
||||
def get_fe_identifier(self, name):
|
||||
try:
|
||||
return self.fe_identifiers[0]
|
||||
except IndexError:
|
||||
return None
|
||||
|
||||
@property
|
||||
def fe_organization(self):
|
||||
def get_fe_organization(self, name):
|
||||
try:
|
||||
return self.fe_organizations[0]
|
||||
except IndexError:
|
||||
return None
|
||||
|
||||
def tofacho(self):
|
||||
tax_identifier = self.tax_identifer
|
||||
if tax_identifer is None:
|
||||
tax_identifer = ''
|
||||
tax_identifier = self.tax_identifier
|
||||
if tax_identifier is None:
|
||||
tax_identifier = ''
|
||||
return form.Party(
|
||||
name = self.name,
|
||||
ident = tax_identifer,
|
||||
ident = tax_identifier,
|
||||
responsability_code = self.fe_identifier.fe_code,
|
||||
organization_code = self.fe_organization.fe_code,
|
||||
)
|
||||
|
@ -105,6 +111,7 @@ class Invoice(metaclass=PoolMeta):
|
|||
fe_habilitacion = fields.Boolean('FE Habilitacion?',
|
||||
states=_states,
|
||||
depends=_depends)
|
||||
# TODO adicionar atributo fe_identifier y permitir seleccion desde form
|
||||
fe_delivery_state = fields.Selection([
|
||||
('draft', 'draft'),
|
||||
('queued', 'Queued'), # local encola
|
||||
|
|
|
@ -2,13 +2,6 @@
|
|||
<form>
|
||||
<label name="dian_fe_key"/>
|
||||
<field name="dian_fe_key"/>
|
||||
|
||||
<label name="dian_fe_numeracion_username"/>
|
||||
<field name="dian_fe_numeracion_username"/>
|
||||
<label name="dian_fe_numeracion_password"/>
|
||||
<field name="dian_fe_numeracion_password"/>
|
||||
<label name="dian_fe_numeracion_key"/>
|
||||
<field name="dian_fe_numeracion_key"/>
|
||||
<label name="dian_fe_NITProveedorTecnologico"/>
|
||||
<field name="dian_fe_NITProveedorTecnologico"/>
|
||||
<label name="dian_fe_NITObligadoFacturarElectronicamente"/>
|
||||
|
|
Loading…
Reference in New Issue