Add company context to coupon parties field
issue11635 review439351003
This commit is contained in:
@@ -191,7 +191,10 @@ class Sale(metaclass=PoolMeta):
|
||||
},
|
||||
depends={'coupon_parties'})
|
||||
coupon_parties = fields.Function(fields.Many2Many(
|
||||
'party.party', None, None, "Coupon Parties"),
|
||||
'party.party', None, None, "Coupon Parties",
|
||||
context={
|
||||
'company': Eval('company', -1),
|
||||
}),
|
||||
'on_change_with_coupon_parties')
|
||||
|
||||
@fields.depends(methods=['_coupon_parties'])
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# 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.modules.company.tests import CompanyTestMixin
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
|
||||
|
||||
class SalePromotionCouponTestCase(ModuleTestCase):
|
||||
class SalePromotionCouponTestCase(CompanyTestMixin, ModuleTestCase):
|
||||
'Test Sale Promotion Coupon module'
|
||||
module = 'sale_promotion_coupon'
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[tryton]
|
||||
version=6.5.0
|
||||
depends:
|
||||
company
|
||||
ir
|
||||
sale
|
||||
sale_promotion
|
||||
|
||||
Reference in New Issue
Block a user