default value shops in party
This commit is contained in:
parent
11ce4a5aa4
commit
f900457769
7
party.py
7
party.py
|
@ -4,10 +4,17 @@
|
|||
from trytond.model import fields
|
||||
from trytond.pyson import Eval
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
__all__ = ['Party']
|
||||
|
||||
|
||||
class Party(metaclass=PoolMeta):
|
||||
__name__ = "party.party"
|
||||
|
||||
shops = fields.Many2Many('purchase.shop_party', 'party', 'shop', 'Shops')
|
||||
|
||||
@staticmethod
|
||||
def default_shops():
|
||||
return Transaction().context.get('shops')
|
||||
|
||||
|
|
Loading…
Reference in New Issue