Odoo 8 - create automatically open invoice -
we're working on odoo 8, enjoying app. we'd create open invoice automatically every customer.
we create contracts , works well, still have click on "generate invoice" , creates draft invoice.
to 2 issues, didn't find yet solution on web.
would know solution ?
you need override original method validate invoices after creation.
class accountanalyticaccount(models.model): _inherit = "account.analytic.account" @api.multi def _recurring_create_invoice(self, automatic=false): invoice_ids = super(accountanalyticaccount, self)._recurring_create_invoice(automatic=automatic) # validate invoices here self.env['account.invoice'].browse(invoice_ids).signal_workflow('invoice_open') return invoice_ids don't forget module dependance in __openerp__:
'depends': ['account_analytic_analysis'],
Comments
Post a Comment