[add] added open packages to product view

This commit is contained in:
Niels Göttsch 2024-07-21 01:59:10 +02:00 committed by Niels Göttsch
parent 0f3bc4088c
commit e6bbb155c8
2 changed files with 4 additions and 4 deletions

View file

@ -22,7 +22,9 @@ class SaleOrderBatchProduct(models.Model):
product_template_id = fields.Many2one( product_template_id = fields.Many2one(
"product.template", related="product_id.product_tmpl_id", string="Product Template" "product.template", related="product_id.product_tmpl_id", string="Product Template"
) )
sale_order_line_ids = fields.Many2many("sale.order.line", compute="_compute_sale_order_line_ids", store=True) sale_order_line_ids = fields.Many2many(
"sale.order.line", compute="_compute_sale_order_line_ids", store=True, readonly=False
)
product_uom_category_id = fields.Many2one(related="product_id.uom_id.category_id", depends=["product_id"]) product_uom_category_id = fields.Many2one(related="product_id.uom_id.category_id", depends=["product_id"])
product_uom_qty = fields.Float(compute="_compute_uom_qty") product_uom_qty = fields.Float(compute="_compute_uom_qty")
product_uom = fields.Many2one(related="product_id.uom_id") product_uom = fields.Many2one(related="product_id.uom_id")

View file

@ -23,11 +23,9 @@
<notebook> <notebook>
<page string="Sale Order Lines" name="order_line"> <page string="Sale Order Lines" name="order_line">
<field name="sale_order_line_ids" widget="section_and_note_one2many"> <field name="sale_order_line_ids" widget="section_and_note_one2many">
<tree editable="bottom"> <tree editable="bottom" create="0">
<field name="sequence" widget="handle"/> <field name="sequence" widget="handle"/>
<field name="order_partner_id"/> <field name="order_partner_id"/>
<field name="product_template_id"/>
<field name="name"/>
<field name="product_uom_qty"/> <field name="product_uom_qty"/>
<field name="price_unit"/> <field name="price_unit"/>
<field name="price_subtotal"/> <field name="price_subtotal"/>