Ensure to set correct company context when calling today
issue11046 review370421002
This commit is contained in:
1 parent
e0ca3bc4a8
commit
a78ffbed17
1 file changed
+2
-1
@@ -182,7 +182,8 @@ class Promotion(
|
||||
def _promotions_domain(cls, sale):
|
||||
pool = Pool()
|
||||
Date = pool.get('ir.date')
|
||||
sale_date = sale.sale_date or Date.today()
|
||||
with Transaction().set_context(company=sale.company.id):
|
||||
sale_date = sale.sale_date or Date.today()
|
||||
return [
|
||||
['OR',
|
||||
('start_date', '<=', sale_date),
|
||||
|
||||
Reference in new issue
Block a user