Remove extra columns from Belgian standard intrastat export
Closes #13368
This commit is contained in:
1 parent
1da4e8811e
commit
a7dba58f95
3 files changed
+9
-10
No files matched your search
@@ -465,10 +465,11 @@ class IntrastatDeclarationExport_Incoterm(metaclass=PoolMeta):
|
||||
__name__ = 'account.stock.eu.intrastat.declaration.export'
|
||||
|
||||
def export_fallback_row(self, line):
|
||||
return super().export_fallback_row(line) + [
|
||||
line.transport.code if line.transport else '',
|
||||
line.incoterm.code if line.incoterm else '',
|
||||
]
|
||||
row = super().export_fallback_row(line)
|
||||
if self.record.extended:
|
||||
row.append(line.transport.code if line.transport else '')
|
||||
row.append(line.incoterm.code if line.incoterm else '')
|
||||
return row
|
||||
|
||||
|
||||
class IntrastatDeclarationExportResult(ModelView):
|
||||
@@ -507,8 +508,6 @@ class IntrastatDeclarationExport_BE(metaclass=PoolMeta):
|
||||
round(line.additional_unit, 2)
|
||||
if line.additional_unit is not None else '',
|
||||
round(line.value, 2),
|
||||
'', # transport
|
||||
'', # incoterm
|
||||
line.country_of_origin.code
|
||||
if dispatch and line.country_of_origin else '',
|
||||
line.vat.code if dispatch and line.vat else '',
|
||||
@@ -521,8 +520,8 @@ class IntrastatDeclarationExport_BE_Incoterm(metaclass=PoolMeta):
|
||||
def export_be_row(self, line):
|
||||
row = super().export_be_row(line)
|
||||
if self.record.extended:
|
||||
row[7] = line.transport.code if line.transport else ''
|
||||
row[8] = line.incoterm.code if line.incoterm else ''
|
||||
row.insert(8, line.transport.code if line.transport else '')
|
||||
row.insert(9, line.incoterm.code if line.incoterm else '')
|
||||
return row
|
||||
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ Export declaration::
|
||||
>>> _ = declaration.click('export')
|
||||
>>> export = Wizard('account.stock.eu.intrastat.declaration.export', [declaration])
|
||||
>>> export.form.file
|
||||
b'19;FR;11;2;9403 10 51;60.0;20.0;1800.00;;;;\r\n19;FR;21;2;9403 10 51;15.0;5.0;750.00;;;;\r\n'
|
||||
b'19;FR;11;2;9403 10 51;60.0;20.0;1800.00;;\r\n19;FR;21;2;9403 10 51;15.0;5.0;750.00;;\r\n'
|
||||
>>> export.form.filename.endswith('.csv')
|
||||
True
|
||||
>>> declaration.state
|
||||
|
||||
@@ -295,7 +295,7 @@ Export declaration::
|
||||
>>> export.form.filename.endswith('.csv')
|
||||
True
|
||||
>>> export.form.file
|
||||
b'29;FR;12;2;9403 10 51;60.0;20.0;1800.00;;;CN;\r\n29;FR;21;2;9403 10 51;15.0;5.0;750.00;;;CN;FR40303265045\r\n'
|
||||
b'29;FR;12;2;9403 10 51;60.0;20.0;1800.00;CN;\r\n29;FR;21;2;9403 10 51;15.0;5.0;750.00;CN;FR40303265045\r\n'
|
||||
>>> declaration.state
|
||||
'closed'
|
||||
|
||||
|
||||
Reference in new issue
Block a user