Add company to context

This commit is contained in:
Jared Esparza 2022-05-04 15:21:30 +02:00
parent e3e15d77e8
commit 8637d201ec
1 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@
# copyright notices and license terms. # copyright notices and license terms.
from trytond.model import fields from trytond.model import fields
from trytond.pool import PoolMeta, Pool from trytond.pool import PoolMeta, Pool
from trytond.pyson import Eval
from trytond.modules.stock.move import STATES from trytond.modules.stock.move import STATES
__all__ = ['StockMove'] __all__ = ['StockMove']
@ -11,7 +12,10 @@ class StockMove(metaclass=PoolMeta):
__name__ = 'stock.move' __name__ = 'stock.move'
bulk_product = fields.Many2One('product.product', 'Bulk Product', bulk_product = fields.Many2One('product.product', 'Bulk Product',
states=STATES) states=STATES, context={
'company': Eval('company'),
},
depends=['company'])
# TODO: check if is necessary # TODO: check if is necessary
@classmethod @classmethod