[英]Add Column to sale order lines from product.template in Odoo 15
Products in odoo have informations like name,type,price,Internal Reference ect.. odoo 中的产品具有名称、类型、价格、内部参考等信息。 I want to add Internal Reference of a product in sale order lines我想在销售订单行中添加产品的内部参考
as you see in the picture we have in order lines product,description,qty,price ect.. i want to add Internal Reference to this infos.正如您在图片中看到的,我们有订单行产品、描述、数量、价格等。我想为这些信息添加内部参考。
how can i add Internal Reference from image 1 (product) to image 2 (Order lines)如何将图像 1(产品)的内部参考添加到图像 2(订单行)
inherit sale.order.line and add a field继承sale.order.line 增加一个字段
default_code = fields.Char(string='Internal Reference ', related="product_id.default_code")
add this default_code
field in xml by inheriting the the order_lines
view.通过继承order_lines
视图在 xml 中添加此default_code
字段。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.