123456789101112131415 |
- # -*- encoding: utf-8 -*-
- # Copyright 2020 Akretion Renato Lima <renato.lima@akretion.com.br>
- # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
- from openerp import models, fields, api, _
- class StockMove(models.Model):
- _inherit = 'stock.move'
- def _prepare_procurement_values(self):
- values = super()._prepare_procurement_values()
- if self.sale_line_id and self.sale_line_id.bom_id:
- values['bom_id'] = self.sale_line_id.bom_id
- return values
|