From 99807baad853754ed17fe5cbc536e15ec4d49e44 Mon Sep 17 00:00:00 2001 From: Graeme Gellatly Date: Wed, 13 Mar 2019 22:50:47 +1300 Subject: [PATCH] [FIX] Make company_id a required field in statement wizard --- partner_statement/wizard/statement_common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/partner_statement/wizard/statement_common.py b/partner_statement/wizard/statement_common.py index ac01f816..e8476a8e 100644 --- a/partner_statement/wizard/statement_common.py +++ b/partner_statement/wizard/statement_common.py @@ -14,7 +14,8 @@ class StatementCommon(models.AbstractModel): company_id = fields.Many2one( comodel_name='res.company', default=lambda self: self.env.user.company_id, - string='Company' + string='Company', + required=True, ) date_end = fields.Date(required=True, default=fields.Date.context_today) show_aging_buckets = fields.Boolean(default=True) @@ -22,7 +23,7 @@ class StatementCommon(models.AbstractModel): default=lambda self: len(self._context['active_ids']) ) filter_partners_non_due = fields.Boolean( - string='Don\'t show partners with no due entries', default=True) + string="Don't show partners with no due entries", default=True) filter_negative_balances = fields.Boolean( "Exclude Negative Balances", default=True )