changeset ffdfb2a0c773 in modules/product_price_list:default
details:
https://hg.tryton.org/modules/product_price_list?cmd=changeset&node=ffdfb2a0c773
description:
Remove contextual domain on company
issue10302
review338141004
diffstat:
price_list.py | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (29 lines):
diff -r 82fef152026e -r ffdfb2a0c773 price_list.py
--- a/price_list.py Sat Apr 10 23:46:23 2021 +0200
+++ b/price_list.py Tue Apr 20 09:18:58 2021 +0200
@@ -8,7 +8,6 @@
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 @@
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([