Add company to context

This commit is contained in:
Jared Esparza 2022-05-05 11:44:15 +02:00
parent 6865aa6d21
commit fef0c5a87e
2 changed files with 10 additions and 2 deletions

View File

@ -43,7 +43,11 @@ class PrintGeneralLedgerStart(ModelView):
accounts = fields.Many2Many('account.account', None, None, 'Accounts')
all_accounts = fields.Boolean('All accounts with and without balance', help='If unchecked only '
'print accounts with previous balance different from 0 or with moves')
parties = fields.Many2Many('party.party', None, None, 'Parties')
parties = fields.Many2Many('party.party', None, None, 'Parties',
context={
'company': Eval('company'),
},
depends=['company'])
output_format = fields.Selection([
('pdf', 'PDF'),
('html', 'HTML'),

View File

@ -48,7 +48,11 @@ class PrintTaxesByInvoiceAndPeriodStart(ModelView):
('refunded', 'Refunded'),
], 'Tax Type', required=True)
totals_only = fields.Boolean('Totals Only')
parties = fields.Many2Many('party.party', None, None, 'Parties')
parties = fields.Many2Many('party.party', None, None, 'Parties',
context={
'company': Eval('company'),
},
depends=['company'])
output_format = fields.Selection([
('pdf', 'PDF'),
('html', 'HTML'),