Align invoice line tax field names
This commit is contained in:
+2
-15
@@ -126,13 +126,8 @@ class InvoiceLine(metaclass=PoolMeta):
|
||||
'on_change_with_product_type'
|
||||
)
|
||||
|
||||
itbis_invoiced_line = fields.Function(Monetary(
|
||||
"ITBIS Invoiced", currency='currency', digits='currency',
|
||||
states=_LINE_STATES),
|
||||
'get_itbis_invoiced_line'
|
||||
)
|
||||
itbis_line = fields.Function(Monetary(
|
||||
"ITBIS", currency='currency', digits='currency',
|
||||
"ITBIS Invoiced", currency='currency', digits='currency',
|
||||
states=_LINE_STATES),
|
||||
'get_itbis_line'
|
||||
)
|
||||
@@ -243,13 +238,9 @@ class InvoiceLine(metaclass=PoolMeta):
|
||||
return cls._round_amount(line, subtotal)
|
||||
return Decimal('0.0')
|
||||
|
||||
@classmethod
|
||||
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_line(cls, lines, name):
|
||||
return cls.get_itbis_invoiced_line(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):
|
||||
@@ -275,10 +266,6 @@ class InvoiceLine(metaclass=PoolMeta):
|
||||
def get_line_total(cls, lines, name):
|
||||
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_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_line(self, name=None):
|
||||
return InvoiceLine._compute_tax_kind_amount(self, 'itbis')
|
||||
|
||||
@@ -93,10 +93,6 @@ msgid "Process Posted Supplier Invoices"
|
||||
msgstr "Procesar Facturas de Proveedores Contabilizadas"
|
||||
|
||||
msgctxt "field:account.invoice.line,itbis_line:"
|
||||
msgid "ITBIS"
|
||||
msgstr "ITBIS Facturado"
|
||||
|
||||
msgctxt "field:account.invoice.line,itbis_invoiced_line:"
|
||||
msgid "ITBIS Invoiced"
|
||||
msgstr "ITBIS Facturado"
|
||||
|
||||
|
||||
@@ -52,9 +52,6 @@ class AccountInvoiceDoUnitTestCase(unittest.TestCase):
|
||||
self.assertEqual(
|
||||
InvoiceLine._compute_tax_kind_amount(line, 'itbis'),
|
||||
Decimal('18.00'))
|
||||
self.assertEqual(
|
||||
InvoiceLine.on_change_with_itbis_invoiced_line(line),
|
||||
Decimal('18.00'))
|
||||
self.assertEqual(
|
||||
InvoiceLine.on_change_with_itbis_line(line),
|
||||
Decimal('18.00'))
|
||||
|
||||
@@ -98,7 +98,6 @@ class AccountInvoiceDoTestCase(ModuleTestCase):
|
||||
self.assertEqual(invoice.total_amount, Decimal('300.00'))
|
||||
line, = invoice.lines
|
||||
self.assertEqual(line.product_type, '')
|
||||
self.assertEqual(line.itbis_invoiced_line, Decimal('0.00'))
|
||||
self.assertEqual(line.itbis_line, Decimal('0.00'))
|
||||
self.assertEqual(line.line_total, Decimal('300.00'))
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<xpath expr="/form/notebook/page[@id='general']/field[@name='amount']"
|
||||
position="after">
|
||||
<newline/>
|
||||
<label name="itbis_invoiced_line"/>
|
||||
<field name="itbis_invoiced_line"/>
|
||||
<label name="itbis_line"/>
|
||||
<field name="itbis_line"/>
|
||||
<label name="itbis_withholding_line"/>
|
||||
<field name="itbis_withholding_line"/>
|
||||
<label name="isc_line"/>
|
||||
|
||||
@@ -15,7 +15,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
</xpath>
|
||||
|
||||
<xpath expr="/tree/field[@name='amount']" position="after">
|
||||
<field name="itbis_invoiced_line" optional="0"/>
|
||||
<field name="itbis_line" optional="0"/>
|
||||
<field name="itbis_withholding_line" optional="0"/>
|
||||
<field name="isc_line" optional="0"/>
|
||||
<field name="cdt_line" optional="0"/>
|
||||
|
||||
Reference in New Issue
Block a user