You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
559 B

  1. # Copyright 2018 Road-Support - Roel Adriaans
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import api, models
  4. class AccountAnalyticAccount(models.Model):
  5. _inherit = 'account.analytic.account'
  6. @api.model
  7. def _prepare_invoice_line(self, line, invoice_id):
  8. invoice_line_vals = super(AccountAnalyticAccount, self). \
  9. _prepare_invoice_line(line, invoice_id)
  10. invoice_line_vals.update({
  11. 'layout_category_id': line.layout_category_id.id,
  12. })
  13. return invoice_line_vals