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.

16 lines
447 B

  1. # Copyright 2019 ACSONE SA/NV
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import api, models
  4. class SaleOrder(models.Model):
  5. _inherit = 'sale.order'
  6. @api.multi
  7. def _prepare_contract_value(self, contract_template):
  8. self.ensure_one()
  9. vals = super(SaleOrder, self)._prepare_contract_value(
  10. contract_template)
  11. vals['mandate_id'] = self.mandate_id.id
  12. return vals