mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[12.0][IMP] account_spread_cost_revenue, auto spread on validate invoice
This commit is contained in:
@@ -7,6 +7,11 @@ from odoo import api, models
|
||||
class AccountInvoice(models.Model):
|
||||
_inherit = 'account.invoice'
|
||||
|
||||
def action_invoice_open(self):
|
||||
for invoice in self:
|
||||
invoice.invoice_line_ids.create_auto_spread()
|
||||
return super().action_invoice_open()
|
||||
|
||||
@api.multi
|
||||
def action_move_create(self):
|
||||
"""Invoked when validating the invoices."""
|
||||
|
||||
Reference in New Issue
Block a user