updated expense condition
This commit is contained in:
parent
df1bb030dc
commit
3bad728a41
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue