Allow setting unit on request without product

issue9106
review297121043
This commit is contained in:
Maxime Richez committed 2020-03-20 19:06:34 +01:00
1 parent 2dab6c0514
commit 23e84aa0df
2 files changed
+5 -1

No files matched your search

+2
View File
@@ -1,3 +1,5 @@
* Allow setting unit on request without product
Version 5.4.0 - 2019-11-04
* Bug fixes (see mercurial logs for details)
+3 -1
View File
@@ -34,7 +34,9 @@ class PurchaseRequest(ModelSQL, ModelView):
uom = fields.Many2One('product.uom', 'UOM', select=True,
ondelete='RESTRICT',
domain=[
('category', '=', Eval('product_uom_category')),
If(Bool(Eval('product_uom_category')),
('category', '=', Eval('product_uom_category')),
('category', '!=', -1)),
],
states={
'required': Bool(Eval('product')),