addons14/contract/models/contract.py
def _prepare_recurring_invoices_values(self, date_ref=False):
        """
        This method builds the list of invoices values to create, based on
        the lines to invoice of the contracts in self.
        !!! The date of next invoice (recurring_next_date) is updated here !!!
        :return: list of dictionaries (invoices values)
        """
        invoices_values = []
        for contract in self:
            if not date_ref:
                date_ref = contract.recurring_next_date
            if not date_ref:
                # this use case is possible when recurring_create_invoice is
                # called for a finished contract
                continue
            contract_lines = contract._get_lines_to_invoice(date_ref)
            if not contract_lines:
                continue
            invoice_vals, move_form = contract._prepare_invoice(date_ref)
            invoice_vals["invoice_line_ids"] = []
            for line in contract_lines:
                invoice_line_vals = line._prepare_invoice_line(move_form=move_form)
                if invoice_line_vals:
                    # Allow extension modules to return an empty dictionary for
                    # nullifying line
                    invoice_vals["invoice_line_ids"].append((0, 0, invoice_line_vals))
            invoices_values.append(invoice_vals)
            contract_lines._update_recurring_next_date()
        return invoices_values

        This method builds the list of invoices values to create, based on
        the lines to invoice of the contracts in self.
        !!! The date of next invoice (recurring_next_date) is updated here !!!
        :return: list of dictionaries (invoices values)
        
This method builds the list of invoices values to create, based on
the lines to invoice of the contracts in self.
The date of next invoice (recurring_next_date) is updated here
This method builds the list of invoices values to create based on the lines to invoice of the contracts in self . The date of next invoice ( recurring_next_date ) is updated here
def _prepare_recurring_invoices_values(self, date_ref=False):
        invoices_values = []
        for contract in self:
            if not date_ref:
                date_ref = contract.recurring_next_date
            if not date_ref:
                continue
            contract_lines = contract._get_lines_to_invoice(date_ref)
            if not contract_lines:
                continue
            invoice_vals, move_form = contract._prepare_invoice(date_ref)
            invoice_vals["invoice_line_ids"] = []
            for line in contract_lines:
                invoice_line_vals = line._prepare_invoice_line(move_form=move_form)
                if invoice_line_vals:
                    invoice_vals["invoice_line_ids"].append((0, 0, invoice_line_vals))
            invoices_values.append(invoice_vals)
            contract_lines._update_recurring_next_date()
        return invoices_values
def _prepare_recurring_invoices_values ( self , date_ref = False ) : invoices_values = [ ] for contract in self : if not date_ref : date_ref = contract . recurring_next_date if not date_ref : continue contract_lines = contract . _get_lines_to_invoice ( date_ref ) if not contract_lines : continue invoice_vals , move_form = contract . _prepare_invoice ( date_ref ) invoice_vals [ "invoice_line_ids" ] = [ ] for line in contract_lines : invoice_line_vals = line . _prepare_invoice_line ( move_form = move_form ) if invoice_line_vals : invoice_vals [ "invoice_line_ids" ] . append ( ( 0 , 0 , invoice_line_vals ) ) invoices_values . append ( invoice_vals ) contract_lines . _update_recurring_next_date ( ) return invoices_values
This method builds the list of invoices values to create, based on
the lines to invoice of the contracts in self.
This method builds the list of invoices values to create based on the lines to invoice of the contracts in self .
"""
        This method builds the list of invoices values to create, based on
        the lines to invoice of the contracts in self.
        !!! The date of next invoice (recurring_next_date) is updated here !!!
        :return: list of dictionaries (invoices values)
        """ # this use case is possible when recurring_create_invoice is # called for a finished contract # Allow extension modules to return an empty dictionary for # nullifying line
list of dictionaries (invoices values)
list of dictionaries ( invoices values )
self
date_ref