mirror of
https://gitlab.com/datalifeit/trytond-aeat_sii
synced 2023-12-13 20:30:37 +01:00
Revert commit with changeset a5afa7b49f93. It's not correct, because the problem was solved on the account_es module
This commit is contained in:
parent
09fd258fc6
commit
d9820fe1a5
1 changed files with 0 additions and 14 deletions
|
@ -19,20 +19,6 @@ __all__ = [
|
||||||
_logger = getLogger(__name__)
|
_logger = getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def _amount_getter(field_name):
|
|
||||||
# In tryton 3.4 credit note amounts are positive
|
|
||||||
# They must be negative before being informed to SII
|
|
||||||
# This code should not be merged into higher tryton series
|
|
||||||
|
|
||||||
def is_credit_note(invoice):
|
|
||||||
return (invoice.type in {'in_credit_note', 'out_credit_note'})
|
|
||||||
|
|
||||||
def amount_getter(self, invoice):
|
|
||||||
val = attrgetter(field_name)(invoice)
|
|
||||||
return val if val is None or not is_credit_note(invoice) else -val
|
|
||||||
return amount_getter
|
|
||||||
|
|
||||||
|
|
||||||
class BaseTrytonInvoiceMapper(Model):
|
class BaseTrytonInvoiceMapper(Model):
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue