add new identifier product

add new options tax_classification
This commit is contained in:
Wilson Gomez 2023-12-04 07:21:50 -05:00
parent 1f1eabe181
commit 5c2cc261bb
4 changed files with 62 additions and 24 deletions

View File

@ -5612,7 +5612,11 @@ msgstr ""
msgctxt "selection:product.identifier,type:"
msgid "Products Tariff Heading CO"
msgstr ""
msgstr "Partidas Arancelarias Colombia"
msgctxt "selection:product.identifier,type:"
msgid "United Nations Standard Products and Services Code (UNSPSC)"
msgstr "Código Estándar de Productos y Servicios de Naciones Unidas (UNSPSC)"
msgctxt "selection:sale.sale,invoice_type:"
msgid "Computador"

View File

@ -27,7 +27,7 @@ TYPE_DOCUMENT = [
('31', 'NIT'),
('41', 'Pasaporte'),
('42', 'Tipo de Documento Extranjero'),
('47', 'PEP'),
('47', 'PEP (Permiso Especial Permanencia)'),
('50', 'NIT de otro pais'),
('91', 'NUIP'),
('', ''),

View File

@ -15,7 +15,10 @@ class ProductIdentifier(metaclass=PoolMeta):
@classmethod
def __setup__(cls):
super(ProductIdentifier, cls).__setup__()
cls.type.selection.extend([('hs_co', 'Products Tariff Heading CO')])
cls.type.selection.extend([
('hs_co', 'Products Tariff Heading CO'),
('unspsc', 'United Nations Standard Products and Services Code (UNSPSC)'),
])
class PriceList(metaclass=PoolMeta):

73
tax.py
View File

@ -13,6 +13,56 @@ from trytond.exceptions import UserError
_ZERO = Decimal('0.0')
CLASIFICATION = [
('', ''),
('01', 'IVA'),
('02', 'IC'),
('03', 'ICA'),
('04', 'INC'),
('05', 'ReteIVA'),
('06', 'ReteFuente'),
('07', 'ReteICA'),
('20', 'FtoHorticultura'),
('21', 'Timbre'),
('22', 'Bolsas'),
('23', 'INCarbono'),
('24', 'INCombustibles'),
('25', 'Sobretasa Combustibles'),
('26', 'Sordicom'),
('30', 'IC Datos'),
('32', 'ICL'),
('33', 'INPP'),
('34', 'IBUA'),
('35', 'ICUI'),
('ZZ', 'Otro'),
('NA', 'No Aceptada'),
]
HELP_CLASIFICATION = {
'01': 'IVA (impuesto sobre las Ventas)',
'02': 'IC (Impuesto al Consumo Departamental Nominal)',
'03': 'ICA (Impuesto de Industria, Comercio y Aviso)',
'04': 'INC (Impuesto Nacional al Consumo)',
'05': 'ReteIVA (Retención sobre el IVA)',
'06': 'ReteFuente (Retención sobre Renta)',
'07': 'ReteICA (Retención sobre el ICA)',
'08': 'IC% (Impuesto al Consumo Departamental Porcentual)',
'20': 'FtoHorticultura (Cuota de Fomento Hortifruticula)',
'21': 'Timbre (Impuesto de Timbre)',
'22': 'INC Bolsas (Impuesto Nacional al consumo de Bolsa Plástica)',
'23': 'INCarbono (Impuesto Nacional del Carbono)',
'24': 'INCombustibles (Impuesto Nacional a los Combustibles)',
'25': 'Sobretasa Combustibles',
'26': 'Sordicom (Contribución minoristas(Combustibles))',
'30': 'IC Datos (Impuesto al Consumo de Datos)',
'32': 'ICL (Impuesto al Comsumo de Licores)',
'33': 'INPP (Impuesto Nacional Productos Plasticos)',
'34': 'IBUA (Impuesto a las bebidas ultraprocesadas azucaradas)',
'35': 'ICUI (Impuesto a los productos comestibles ultraprocesados \n industrialmente y/o con alto contenido de azúcares añadidos, sodio o grasas saturadas)',
'ZZ': 'Otro',
'NA': 'No Aceptada',
}
class Tax(metaclass=PoolMeta):
__name__ = 'account.tax'
@ -27,27 +77,8 @@ class Tax(metaclass=PoolMeta):
('bomberil', 'Impuesto Bomberil'),
('avtableros', 'Impuesto Avisos y Tableros'),
], 'Classification For Reports')
classification_tax = fields.Selection([
('', ''),
('01', 'IVA'),
('02', 'IC'),
('03', 'ICA'),
('04', 'INC'),
('05', 'ReteIVA'),
('06', 'ReteFuente'),
('07', 'ReteICA'),
('20', 'FtoHorticultura'),
('21', 'Timbre'),
('22', 'Bolsas'),
('23', 'INCarbono'),
('24', 'INCombustibles'),
('25', 'Sobretasa Combustibles'),
('26', 'Sordicom'),
('ZZ', 'Otro'),
('NA', 'No Aceptada'),
('renta', 'renta'),
('autorenta', 'autorenta'),
], 'Classification Tax Electronic Invoice')
classification_tax = fields.Selection(CLASIFICATION, 'Classification Tax Electronic Invoice',
help_selection=HELP_CLASIFICATION)
not_printable = fields.Boolean('Not Printable')
iva_costo = fields.Boolean('IVA Mayor Valor Costo', states={
'invisible': Eval('classification') != 'iva'