Skip to content
Snippets Groups Projects
Commit 0e28db88 authored by Christophe Matthieu's avatar Christophe Matthieu
Browse files

[FIX] stock: Decimal precision on weight can not be saved

parent fcf6ef47
No related branches found
No related tags found
No related merge requests found
......@@ -144,3 +144,15 @@ class StockSettings(models.TransientModel):
warehouses.mapped('int_type_id').write({'active': active})
return True
@api.model
def get_default_decimal_precision(self, fields):
# don't forward-port in v11.0, the API of config wizards changed.
digits = self.env.ref('product.decimal_stock_weight').digits
return {'decimal_precision': digits}
@api.multi
def set_decimal_precision(self):
# don't forward-port in v11.0, the API of config wizards changed.
for record in self:
self.env.ref('product.decimal_stock_weight').write({'digits': record.decimal_precision})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment