updated expense condition

This commit is contained in:
projectsodoo 2020-12-20 09:08:13 +05:30
parent df1bb030dc
commit 3bad728a41
1 changed files with 2 additions and 2 deletions

View File

@ -62,10 +62,10 @@ class ProjectCreateExpense(models.TransientModel):
def action_create_project_expense(self):
expenses_amt = self.expenses_amt
if self.expenses_amt > 0:
expenses_amt = expenses_amount * -1
if expenses_amt == 0:
raise ValidationError(_("Amount shoud not be zero"))
if expenses_amt > 0:
expenses_amt = expenses_amt * -1
analytic = self.env['account.analytic.line'].create({
'project_id': False,
'partner_id': False,