Use invoiced line tax field names

This commit is contained in:
José Arturo García
2026-07-22 22:40:12 -04:00
parent cdd5a48a36
commit 793628cf3d
6 changed files with 56 additions and 56 deletions
+27 -27
View File
@@ -126,40 +126,40 @@ class InvoiceLine(metaclass=PoolMeta):
'on_change_with_product_type'
)
itbis_line = fields.Function(Monetary(
itbis_invoiced_line = fields.Function(Monetary(
"ITBIS Invoiced", currency='currency', digits='currency',
states=_LINE_STATES),
'get_itbis_line'
'get_itbis_invoiced_line'
)
itbis_withholding_line = fields.Function(Monetary(
itbis_withholding_invoiced_line = fields.Function(Monetary(
"ITBIS Withholding", currency='currency', digits='currency',
states=_LINE_STATES),
'get_itbis_withholding_line'
'get_itbis_withholding_invoiced_line'
)
isc_line = fields.Function(Monetary(
"ISC", currency='currency', digits='currency',
isc_invoiced_line = fields.Function(Monetary(
"ISC Invoiced", currency='currency', digits='currency',
states=_LINE_STATES),
'get_isc_line'
'get_isc_invoiced_line'
)
cdt_line = fields.Function(Monetary(
"CDT", currency='currency', digits='currency',
cdt_invoiced_line = fields.Function(Monetary(
"CDT Invoiced", currency='currency', digits='currency',
states=_LINE_STATES),
'get_cdt_line'
'get_cdt_invoiced_line'
)
isr_withholding_line = fields.Function(Monetary(
isr_withholding_invoiced_line = fields.Function(Monetary(
"ISR Withholding", currency='currency', digits='currency',
states=_LINE_STATES),
'get_isr_withholding_line'
'get_isr_withholding_invoiced_line'
)
tip_line = fields.Function(Monetary(
"Tip", currency='currency', digits='currency',
tip_invoiced_line = fields.Function(Monetary(
"Tip Invoiced", currency='currency', digits='currency',
states=_LINE_STATES),
'get_tip_line'
'get_tip_invoiced_line'
)
line_total = fields.Function(Monetary(
@@ -239,27 +239,27 @@ class InvoiceLine(metaclass=PoolMeta):
return Decimal('0.0')
@classmethod
def get_itbis_line(cls, lines, name):
def get_itbis_invoiced_line(cls, lines, name):
return {l.id: cls._compute_tax_kind_amount(l, 'itbis') for l in lines}
@classmethod
def get_itbis_withholding_line(cls, lines, name):
def get_itbis_withholding_invoiced_line(cls, lines, name):
return {l.id: cls._compute_tax_kind_amount(l, 'itbis_withholding') for l in lines}
@classmethod
def get_isc_line(cls, lines, name):
def get_isc_invoiced_line(cls, lines, name):
return {l.id: cls._compute_tax_kind_amount(l, 'isc') for l in lines}
@classmethod
def get_cdt_line(cls, lines, name):
def get_cdt_invoiced_line(cls, lines, name):
return {l.id: cls._compute_tax_kind_amount(l, 'cdt') for l in lines}
@classmethod
def get_isr_withholding_line(cls, lines, name):
def get_isr_withholding_invoiced_line(cls, lines, name):
return {l.id: cls._compute_tax_kind_amount(l, 'isr_withholding') for l in lines}
@classmethod
def get_tip_line(cls, lines, name):
def get_tip_invoiced_line(cls, lines, name):
return {l.id: cls._compute_tax_kind_amount(l, 'tip') for l in lines}
@classmethod
@@ -267,27 +267,27 @@ class InvoiceLine(metaclass=PoolMeta):
return {l.id: cls._compute_line_total_amount(l) for l in lines}
@fields.depends(*_LINE_DEPENDS, methods=['on_change_with_amount'])
def on_change_with_itbis_line(self, name=None):
def on_change_with_itbis_invoiced_line(self, name=None):
return InvoiceLine._compute_tax_kind_amount(self, 'itbis')
@fields.depends(*_LINE_DEPENDS, methods=['on_change_with_amount'])
def on_change_with_itbis_withholding_line(self, name=None):
def on_change_with_itbis_withholding_invoiced_line(self, name=None):
return InvoiceLine._compute_tax_kind_amount(self, 'itbis_withholding')
@fields.depends(*_LINE_DEPENDS, methods=['on_change_with_amount'])
def on_change_with_isc_line(self, name=None):
def on_change_with_isc_invoiced_line(self, name=None):
return InvoiceLine._compute_tax_kind_amount(self, 'isc')
@fields.depends(*_LINE_DEPENDS, methods=['on_change_with_amount'])
def on_change_with_cdt_line(self, name=None):
def on_change_with_cdt_invoiced_line(self, name=None):
return InvoiceLine._compute_tax_kind_amount(self, 'cdt')
@fields.depends(*_LINE_DEPENDS, methods=['on_change_with_amount'])
def on_change_with_isr_withholding_line(self, name=None):
def on_change_with_isr_withholding_invoiced_line(self, name=None):
return InvoiceLine._compute_tax_kind_amount(self, 'isr_withholding')
@fields.depends(*_LINE_DEPENDS, methods=['on_change_with_amount'])
def on_change_with_tip_line(self, name=None):
def on_change_with_tip_invoiced_line(self, name=None):
return InvoiceLine._compute_tax_kind_amount(self, 'tip')
@fields.depends(*_LINE_DEPENDS, methods=['on_change_with_amount'])