updated condition

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

View File

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