Use dedicated model for products and lots by locations
issue9874 review314911002
This commit is contained in:
1 parent
06ed756934
commit
2cd3fe5bbf
1 file changed
+7
@@ -94,6 +94,8 @@ class Template(
|
||||
fields.Many2One('product.uom.category', 'Default UOM Category'),
|
||||
'on_change_with_default_uom_category',
|
||||
searcher='search_default_uom_category')
|
||||
default_uom_digits = fields.Function(fields.Integer("Default Unit Digits"),
|
||||
'on_change_with_default_uom_digits')
|
||||
categories = fields.Many2Many(
|
||||
'product.template-product.category', 'template', 'category',
|
||||
"Categories",
|
||||
@@ -213,6 +215,11 @@ class Template(
|
||||
return [('default_uom.category' + clause[0].lstrip(name),)
|
||||
+ tuple(clause[1:])]
|
||||
|
||||
@fields.depends('default_uom')
|
||||
def on_change_with_default_uom_digits(self, name=None):
|
||||
if self.default_uom:
|
||||
return self.default_uom.digits
|
||||
|
||||
@classmethod
|
||||
def _new_code(cls):
|
||||
pool = Pool()
|
||||
|
||||
Reference in new issue
Block a user