Hi, I try to include "('type', '=', 'invoice')" into the penultimate line ->
domain.extend([('recurring_next_date', '<=', date_ref)])
in order to get ->
domain.extend([('recurring_next_date', '<=', date_ref),('type', '=', 'invoice')])
Is there any way to achive it?
The original function is the following:
class ContractContract(models.Model):
_name = 'contract.contract'
@api.model
def _get_contracts_to_invoice_domain(self, date_ref=None):
domain = []
if not date_ref:
date_ref = fields.Date.context_today(self)
domain.extend([('recurring_next_date', '<=', date_ref)])
return domain