mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
travis errors and review comments
This commit is contained in:
@@ -15,5 +15,5 @@
|
||||
"data": ["views/stock_warehouse_orderpoint_view.xml"],
|
||||
"license": "AGPL-3",
|
||||
'installable': True,
|
||||
'application': True,
|
||||
'application': False,
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user