mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[11.0] stock_request_analytic:
* clean views. * allow to create a stock.request with no analytic account. * remove copy attribute in non-stored field. * remove non-existing field from compute method.
This commit is contained in:
@@ -13,9 +13,8 @@ class StockRequest(models.Model):
|
||||
|
||||
@api.constrains('analytic_account_id')
|
||||
def _check_analytic_company_constrains(self):
|
||||
if any(request.company_id and
|
||||
request.analytic_account_id.company_id !=
|
||||
request.company_id for request in self):
|
||||
if any(r.company_id and r.analytic_account_id and
|
||||
r.analytic_account_id.company_id != r.company_id for r in self):
|
||||
raise ValidationError(
|
||||
_('You cannot link a analytic account '
|
||||
'to a stock request that belongs to '
|
||||
|
||||
Reference in New Issue
Block a user