from odoo import models, fields, api class StockMove(models.Model): @api.multi def get_data(self): data = self.env['sale.order.line'].search([]) print("Get Data Function") for rec in data: print(rec.x_serialnumber) for record in self: record.x_serialnumber = rec.x_serialnumber _inherit = 'stock.move' x_serialnumber = fields.Text(string="Serial Number", compute='get_data')"
On Sale order line it shows like this:
Serial Number: in both lines
112233
445566
But in stock move:
Serial Number: in both lines
445566
445566