mirror of
https://gitlab.com/datalifeit/trytond-aeat_sii
synced 2023-12-13 20:30:37 +01:00
Add company cotronl on finctional fields
Grafted from changeset-cf90287a916f
This commit is contained in:
parent
a098da5148
commit
4844a23bc5
1 changed files with 4 additions and 2 deletions
|
@ -116,6 +116,7 @@ class Invoice:
|
|||
SIIReport = pool.get('aeat.sii.report')
|
||||
|
||||
result = {}
|
||||
|
||||
for name in names:
|
||||
result[name] = dict((i.id, None) for i in invoices)
|
||||
|
||||
|
@ -133,8 +134,9 @@ class Invoice:
|
|||
|
||||
if lines:
|
||||
cursor.execute(*join.select(table.state, report.operation_type,
|
||||
table.invoice,
|
||||
where=(table.id.in_(lines)) & (table.state != None)))
|
||||
table.invoice,
|
||||
where=((table.id.in_(lines)) & (table.state != None) &
|
||||
(table.company == report.company))))
|
||||
|
||||
for state, op, inv in cursor.fetchall():
|
||||
if 'sii_state' in names:
|
||||
|
|
Loading…
Reference in a new issue