add new field that show the product barcode
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
1
Trả lời
1279
Lượt xem
Hi,
1. Inherit stock.move.line and add a related field for product barcode like;
class StockMove(models.Model): _inherit = "stock.move.line" product_barcode = fields.Char(related="product_id.barcode", string="Barcode")2. Then inherit view and add the field product_barcode;
< record id="view_stock_move_line_detailed_operation_tree_inherit" model="ir.ui.view"> < field name="name">stock.move.line.operations.tree.inherit < field name="model">stock.move.line < field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/> < field name="arch" type="xml"> < xpath expr="//tree/field[@name='package_id']" position="after"> < field name="product_barcode"/> < /xpath> < /field> < /record>Regards
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký