[IMP] Simplify inheritance of states

This commit is contained in:
mreficent
2019-08-09 20:40:47 +02:00
committed by Denis Roussel
parent 217ce6e8b5
commit 6831782fa3

View File

@@ -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.'))