Merge branch 'Get-the-appropriate-sii-operation-keys' into '6.0'
Get the appropriate sii operation keys. See merge request datalifeit/trytond-aeat_sii!5
This commit is contained in:
commit
3b5d541534
|
@ -137,7 +137,9 @@ class Invoice(metaclass=PoolMeta):
|
|||
return super(Invoice, cls).copy(records, default=default)
|
||||
|
||||
def _get_sii_operation_key(self):
|
||||
return 'R1' if self.untaxed_amount < Decimal('0.0') else 'F1'
|
||||
keys = ((self.party_tax_identifier or self.party.tax_identifier)
|
||||
and ('R1', 'F1') or ('R5', 'F2'))
|
||||
return self.untaxed_amount < Decimal('0.0') and keys[0] or keys[1]
|
||||
|
||||
@classmethod
|
||||
def reset_sii_keys(cls, invoices):
|
||||
|
|
Loading…
Reference in New Issue