Add company pattern to multivalue calls
issue10162 review335761002
This commit is contained in:
1 parent
638ac94104
commit
8b02ad5ba1
1 file changed
+3
-2
+3
-2
@@ -15,10 +15,11 @@ class Product(metaclass=PoolMeta):
|
||||
class ProductSupplier(metaclass=PoolMeta):
|
||||
__name__ = 'purchase.product_supplier'
|
||||
|
||||
def get_supply_period(self, **pattern):
|
||||
def get_supply_period(self):
|
||||
'Return the supply period for the purchase request'
|
||||
pool = Pool()
|
||||
Configuration = pool.get('purchase.configuration')
|
||||
config = Configuration(1)
|
||||
supply_period = config.get_multivalue('supply_period', **pattern)
|
||||
supply_period = config.get_multivalue(
|
||||
'supply_period', company=self.company.id)
|
||||
return supply_period or datetime.timedelta(1)
|
||||
Reference in new issue
Block a user