I'm just finishing adding some field in stock.pack.operation , but now i need to call value from order.sales.line(field description which is "name")to stock.pack.operation (description_picking) . Last time i call the product_id for testing my code , its works . Now im change my code to call value from (field description) it return blank or no data . Thanks.
<field name="arch" type="xml">
<xpath expr="//page/field[@name='pack_operation_product_ids']/tree/field[@name='product_id']" position="after">
<field name="description_picking"/>
</xpath>
class descmoduledo(models.Model):
_inherit ='stock.picking'
#product_id = fields.Many2one("product.product", "Product") TESTINGorder_line = fields.Many2one('sale.order.line', string='Description')# description_picking = fields.Text(string='Picking Description',store=True,related='order_line.product_id' description_picking = fields.Text(string='Picking Description',store=True,related='order_line.name')
class StockPackOperation(models.Model):
_inherit ='stock.pack.operation'
order_line = fields.Many2one('sale.order.line', string='Description')
description_picking = fields.Text(string='Picking Description',store=True,related='order_line.name')