تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2986 أدوات العرض

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") TESTING

order_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')
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 22
2406
1
يوليو 22
20113
0
أبريل 22
3074
3
سبتمبر 21
3243
2
سبتمبر 21
4543