[add] unfinisched packages warning
This commit is contained in:
parent
a575235231
commit
0f3bc4088c
4 changed files with 47 additions and 3 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
"data": [
|
"data": [
|
||||||
"data/ir_sequence_data.xml",
|
"data/ir_sequence_data.xml",
|
||||||
"views/sale_order_batch_views.xml",
|
"views/sale_order_batch_views.xml",
|
||||||
|
"views/sale_order_batch_product_views.xml",
|
||||||
"views/sale_order_views.xml",
|
"views/sale_order_views.xml",
|
||||||
"views/sale_menus.xml",
|
"views/sale_menus.xml",
|
||||||
"security/ir.model.access.csv",
|
"security/ir.model.access.csv",
|
||||||
|
|
|
||||||
|
|
@ -14,14 +14,15 @@ class SaleOrderBatchProduct(models.Model):
|
||||||
ondelete="cascade",
|
ondelete="cascade",
|
||||||
index=True,
|
index=True,
|
||||||
copy=False,
|
copy=False,
|
||||||
|
readonly=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
product_id = fields.Many2one(comodel_name="product.product", required=True, readonly=False)
|
product_id = fields.Many2one(comodel_name="product.product", required=True, readonly=True)
|
||||||
|
|
||||||
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")
|
sale_order_line_ids = fields.Many2many("sale.order.line", compute="_compute_sale_order_line_ids", store=True)
|
||||||
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")
|
||||||
|
|
|
||||||
42
sale_order_batch/views/sale_order_batch_product_views.xml
Normal file
42
sale_order_batch/views/sale_order_batch_product_views.xml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="view_order_batch_product_form" model="ir.ui.view">
|
||||||
|
<field name="name">sale.order.batch.product.form</field>
|
||||||
|
<field name="model">sale.order.batch.product</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form>
|
||||||
|
<sheet>
|
||||||
|
<div class="oe_button_box" name="button_box">
|
||||||
|
</div>
|
||||||
|
<h1>
|
||||||
|
<field name="product_id"/>
|
||||||
|
</h1>
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="batch_id"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="product_packaging_id"/>
|
||||||
|
<field name="product_packaging_qty"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<notebook>
|
||||||
|
<page string="Sale Order Lines" name="order_line">
|
||||||
|
<field name="sale_order_line_ids" widget="section_and_note_one2many">
|
||||||
|
<tree editable="bottom">
|
||||||
|
<field name="sequence" widget="handle"/>
|
||||||
|
<field name="order_partner_id"/>
|
||||||
|
<field name="product_template_id"/>
|
||||||
|
<field name="name"/>
|
||||||
|
<field name="product_uom_qty"/>
|
||||||
|
<field name="price_unit"/>
|
||||||
|
<field name="price_subtotal"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</page>
|
||||||
|
</notebook>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
</page>
|
</page>
|
||||||
<page string="Products" name="products">
|
<page string="Products" name="products">
|
||||||
<field name="product_ids">
|
<field name="product_ids">
|
||||||
<tree create="0" editable="1">
|
<tree create="0">
|
||||||
<field name="product_template_id"/>
|
<field name="product_template_id"/>
|
||||||
<field name="product_uom_qty"/>
|
<field name="product_uom_qty"/>
|
||||||
<field name="product_packaging_qty" groups="product.group_stock_packaging"/>
|
<field name="product_packaging_qty" groups="product.group_stock_packaging"/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue