[IMP] a_i_c_chronology: simplify if statements
This commit is contained in:
parent
1d7a9fe2d8
commit
045616358d
@ -23,7 +23,7 @@ class AccountInvoice(models.Model):
|
|||||||
('date_invoice', '<', inv.date_invoice),
|
('date_invoice', '<', inv.date_invoice),
|
||||||
('journal_id', '=', inv.journal_id.id)],
|
('journal_id', '=', inv.journal_id.id)],
|
||||||
limit=1)
|
limit=1)
|
||||||
if len(invoices) > 0:
|
if invoices:
|
||||||
date_invoice_format = fields.Date.\
|
date_invoice_format = fields.Date.\
|
||||||
from_string(inv.date_invoice)
|
from_string(inv.date_invoice)
|
||||||
date_invoice_tz = fields\
|
date_invoice_tz = fields\
|
||||||
@ -40,7 +40,7 @@ class AccountInvoice(models.Model):
|
|||||||
inv.journal_id.id)],
|
inv.journal_id.id)],
|
||||||
limit=1)
|
limit=1)
|
||||||
|
|
||||||
if len(invoices) > 0:
|
if invoices:
|
||||||
date_invoice_format = fields.Date.\
|
date_invoice_format = fields.Date.\
|
||||||
from_string(inv.date_invoice)
|
from_string(inv.date_invoice)
|
||||||
date_invoice_tz = fields\
|
date_invoice_tz = fields\
|
||||||
|
Loading…
Reference in New Issue
Block a user