mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] Simplify inheritance of states
This commit is contained in:
@@ -15,7 +15,7 @@ class StockRequest(models.Model):
|
||||
def _check_analytic_company_constrains(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 '
|
||||
'another company.'))
|
||||
raise ValidationError(
|
||||
_('You cannot link a analytic account '
|
||||
'to a stock request that belongs to '
|
||||
'another company.'))
|
||||
|
||||
Reference in New Issue
Block a user