diff options
| author | mreficent <miquel.raich@eficent.com> | 2020-02-19 12:42:23 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-02-20 14:58:33 +0000 |
| commit | 3dffce34bf80c2a8d8682ef986d6daafa5bb0b7f (patch) | |
| tree | 3ec174f7aa3d672d07635d4f54401ff3d7fa3725 /addons/account/wizard | |
| parent | 62c9227fdaac43329e48cd9446b40eee60dfeb1c (diff) | |
[IMP] fields: log warning for ignored selection
When a field is related, defining a selection or selection_add will
have no effect and the paramater is ignored.
Log a warning and fix all fields badly definied
Closes odoo/odoo#45716
closes odoo/odoo#45832
Related: odoo/enterprise#8613
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/account/wizard')
| -rw-r--r-- | addons/account/wizard/setup_wizards.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/account/wizard/setup_wizards.py b/addons/account/wizard/setup_wizards.py index 56b484ce92b..012c32f6ea7 100644 --- a/addons/account/wizard/setup_wizards.py +++ b/addons/account/wizard/setup_wizards.py @@ -16,8 +16,7 @@ class FinancialYearOpeningWizard(models.TransientModel): opening_date = fields.Date(string='Opening Date', required=True, related='company_id.account_opening_date', help="Date from which the accounting is managed in Odoo. It is the date of the opening entry.", readonly=False) fiscalyear_last_day = fields.Integer(related="company_id.fiscalyear_last_day", required=True, readonly=False, help="The last day of the month will be used if the chosen day doesn't exist.") - fiscalyear_last_month = fields.Selection(selection=[(1, 'January'), (2, 'February'), (3, 'March'), (4, 'April'), (5, 'May'), (6, 'June'), (7, 'July'), (8, 'August'), (9, 'September'), (10, 'October'), (11, 'November'), (12, 'December')], - related="company_id.fiscalyear_last_month", readonly=False, + fiscalyear_last_month = fields.Selection(related="company_id.fiscalyear_last_month", readonly=False, required=True, help="The last day of the month will be used if the chosen day doesn't exist.") |
