| 1 | # -*- coding: utf-8 -*- |
| 2 | # Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 3 | |
| 4 | from odoo import api, models |
| 5 | |
| 6 | |
| 7 | class PurchaseRequisitionCreateAlternative(models.TransientModel): |
| 8 | _inherit = 'purchase.requisition.create.alternative' |
| 9 | |
| 10 | @api.model |
| 11 | def _get_alternative_line_value(self, order_line, product_tmpl_ids_with_description): |
| 12 | res_line = super()._get_alternative_line_value(order_line, product_tmpl_ids_with_description) |
| 13 | if order_line.sale_line_id: |
| 14 | res_line['sale_line_id'] = order_line.sale_line_id.id |
| 15 | |
| 16 | return res_line |