travis errors and review comments

This commit is contained in:
jbeficent
2016-10-25 16:16:37 +02:00
committed by lreficent
parent e13c14e93c
commit 4bd2d3ad00
2 changed files with 10 additions and 9 deletions

View File

@@ -15,5 +15,5 @@
"data": ["views/stock_warehouse_orderpoint_view.xml"],
"license": "AGPL-3",
'installable': True,
'application': True,
'application': False,
}

View File

@@ -15,12 +15,13 @@ class StockWarehouseOrderpoint(models.Model):
@api.constrains('product_uom', 'procure_uom_id')
def _check_procure_uom(self):
if any(orderpoint.product_uom
and orderpoint.procure_uom_id
and orderpoint.product_uom.category_id
!= orderpoint.procure_uom_id.category_id
for orderpoint in self):
raise UserError(_('Error: The product default Unit of Measure and '
'the procurement Unit of Measure must be in '
'the same category.'))
if any(orderpoint.product_uom and
orderpoint.procure_uom_id and
orderpoint.product_uom.category_id !=
orderpoint.procure_uom_id.category_id
for orderpoint in self):
raise UserError(
_('Error: The product default Unit of Measure and '
'the procurement Unit of Measure must be in the '
'same category.'))
return True