trytond-patches/party_c1cc3484518d.patch
Bernat Brunet Torruella ff90fad934 Update path patches
2015-02-19 10:21:09 +01:00

34 lines
1.3 KiB
Diff

# exporting patch:
# HG changeset patch
# User Cédric Krier <ced@b2ck.com>
# Date 1417619627 -3600
# Wed Dec 03 16:13:47 2014 +0100
# Node ID c1cc3484518d4d296c10019d1ee54c709cf8b996
# Parent ca47fe15e8b29f309952f0f0207fc990b0336971
# Add missing company domain/field
# issue4311
# review7691002
diff -r ca47fe15e8b2 -r c1cc3484518d configuration.py
--- .a/trytond/trytond/modules/party/configuration.py Tue Dec 02 12:55:24 2014 +0100
+++ .b/trytond/trytond/modules/party/configuration.py Wed Dec 03 16:13:47 2014 +0100
@@ -1,6 +1,7 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import ModelView, ModelSQL, ModelSingleton, fields
+from trytond.pyson import Eval
__all__ = ['Configuration']
@@ -12,6 +13,10 @@
party_sequence = fields.Property(fields.Many2One('ir.sequence',
'Party Sequence', domain=[
('code', '=', 'party.party'),
+ ['OR',
+ ('company', '=', Eval('context', {}).get('company', -1)),
+ ('company', '=', None),
+ ],
]))
party_lang = fields.Property(fields.Many2One("ir.lang", 'Party Language',
help=('The value set on this field will preset the language on new '