Store party NCF defaults per party
Publicar paquete PyPI / publish (push) Successful in 2m46s

This commit is contained in:
José Arturo García
2026-09-30 23:44:24 -04:00
parent 9acb5142b9
commit a76e794304
2 changed files with 18 additions and 4 deletions
+8
View File
@@ -8,6 +8,7 @@ from trytond.modules.ncf_manager.sequence import Sequence
from trytond.modules.ncf_manager.importer import (
normalize_dgii_row, parse_dgii_authorizations)
from trytond.modules.ncf_manager.invoice import Invoice
from trytond.modules.ncf_manager.party import Party, PartyNcfType
class NcfManagerUnitTestCase(unittest.TestCase):
@@ -73,6 +74,13 @@ class NcfManagerUnitTestCase(unittest.TestCase):
self.assertIn('template.type == product_type', source)
self.assertIn("line.type == 'line'", source)
def test_party_ncf_type_is_stored_per_party_and_company(self):
self.assertIn('ncf_types', Party._fields)
self.assertEqual(
Party._fields['ncf_types'].model_name, 'party.party.ncf_type')
self.assertIn('party', PartyNcfType._fields)
self.assertIn('company', PartyNcfType._fields)
def test_csv_parser_preserves_unquoted_detail(self):
source_format, rows = parse_dgii_authorizations(
f'{self.HEADERS}\r\n{self.ROW}\r\n'.encode())