Browse Source
[FIX]Mandatory field product_uom_id missing
pull/124/head
Cybrosys Technologies
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
mrp_production_draft/models/mrp_production.py
|
|
@ -48,6 +48,8 @@ class MrpProduction(models.Model): |
|
|
|
|
|
|
|
@api.model |
|
|
|
def create(self, values): |
|
|
|
if not values.get('product_uom_id'): |
|
|
|
values['product_uom_id'] = self.env['product.product'].browse(values['product_id']).uom_id.id |
|
|
|
production = super(mp, self).create(values) |
|
|
|
return production |
|
|
|
|
|
|
|