From ebff4bd519ab8f92e6511dfeb8e3e09b70b75a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 20 Apr 2021 09:18:58 +0200 Subject: [PATCH] Remove contextual domain on company issue10302 review338141004 --- price_list.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/price_list.py b/price_list.py index 820d577cb4..8f105bd008 100644 --- a/price_list.py +++ b/price_list.py @@ -8,7 +8,6 @@ from trytond.i18n import gettext from trytond.model import ModelView, ModelSQL, MatchMixin, fields, \ DeactivableMixin, sequence_ordered from trytond.tools import decistmt -from trytond.pyson import If, Eval from trytond.transaction import Transaction from trytond.pool import Pool @@ -21,13 +20,10 @@ class PriceList(DeactivableMixin, ModelSQL, ModelView): name = fields.Char('Name', required=True, translate=True, help="The main identifier of the price list.") - company = fields.Many2One('company.company', 'Company', required=True, - select=True, domain=[ - ('id', If(Eval('context', {}).contains('company'), '=', '!='), - Eval('context', {}).get('company', -1)), - ], - help=("Make the price list belong to the company.\n" - "It defines the currency of the price list.")) + company = fields.Many2One( + 'company.company', "Company", required=True, select=True, + help="Make the price list belong to the company.\n" + "It defines the currency of the price list.") tax_included = fields.Boolean('Tax Included', help="Check if result's formula includes taxes.") unit = fields.Selection([