[IMP] mrp,stock(_picking_batch): make created products "Storable" by default
This commit makes it so the default "Product Type" = "Storable
Product" ('type'='product') when creating a new product in a
manufacturing order or an inventory transfer. Previously the default
was "Consumable".
Specification 1 of Inventory Onboarding task.
Task: 2220129
Enterprise PR: odoo/enterprise#10719
This commit is contained in:
@@ -129,7 +129,7 @@
|
||||
<field name="id" invisible="1"/>
|
||||
<field name="allowed_product_ids" invisible="1"/>
|
||||
<field name="product_tracking" invisible="1"/>
|
||||
<field name="product_id" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="product_id" context="{'default_type': 'product'}" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
<field name="product_description_variants" attrs="{'invisible': [('product_description_variants', 'in', (False, ''))], 'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<label for="product_qty" string="Quantity"/>
|
||||
@@ -207,7 +207,7 @@
|
||||
context="{'default_date_expected': date_planned_start, 'default_location_id': location_src_id, 'default_location_dest_id': production_location_id, 'default_state': 'draft', 'default_raw_material_production_id': id, 'default_picking_type_id': picking_type_id, 'default_company_id': company_id}"
|
||||
attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}">
|
||||
<tree delete="0" default_order="is_done,sequence" editable="bottom">
|
||||
<field name="product_id" required="1" attrs="{'readonly': ['|', '|', ('has_move_lines', '=', True), ('state', '=', 'cancel'), '&', ('state', '!=', 'draft'), ('additional', '=', False) ]}"/>
|
||||
<field name="product_id" required="1" context="{'default_type': 'product'}" attrs="{'readonly': ['|', '|', ('has_move_lines', '=', True), ('state', '=', 'cancel'), '&', ('state', '!=', 'draft'), ('additional', '=', False) ]}"/>
|
||||
|
||||
<field name="move_line_ids" invisible="1">
|
||||
<tree>
|
||||
@@ -264,7 +264,7 @@
|
||||
<page string="By-Products" name="finished_products" groups="mrp.group_mrp_byproducts">
|
||||
<field name="move_byproduct_ids" context="{'default_location_id': production_location_id, 'default_location_dest_id': location_src_id, 'default_state': 'draft', 'default_production_id': id, 'default_picking_type_id': picking_type_id, 'default_company_id': company_id}" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&', ('state', '=', 'done'), ('is_locked', '=', True)]}">
|
||||
<tree delete="0" default_order="is_done,sequence" decoration-muted="is_done" editable="bottom">
|
||||
<field name="product_id" domain="[('id', '!=', parent.product_id)]" required="1"/>
|
||||
<field name="product_id" context="{'default_type': 'product'}" domain="[('id', '!=', parent.product_id)]" required="1"/>
|
||||
|
||||
<field name="move_line_ids" invisible="1">
|
||||
<tree>
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
<field name="priority">1000</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom" decoration-muted="(state == 'done' and is_locked == True)" decoration-danger="qty_done>product_uom_qty and state!='done' and parent.picking_type_code != 'incoming'" decoration-success="qty_done==product_uom_qty and state!='done' and not result_package_id">
|
||||
<field name="product_id" required="1" attrs="{'readonly': ['|', ('state', '=', 'done'), ('move_id', '!=', False)]}"/>
|
||||
<field name="product_id" required="1" context="{'default_type': 'product'}" attrs="{'readonly': ['|', ('state', '=', 'done'), ('move_id', '!=', False)]}"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="move_id" invisible="1"/>
|
||||
<field name="picking_id" invisible="1"/>
|
||||
|
||||
@@ -357,7 +357,7 @@
|
||||
<field name="product_uom_category_id" invisible="1"/>
|
||||
<field name="has_tracking" invisible="1"/>
|
||||
<field name="display_assign_serial" invisible="1"/>
|
||||
<field name="product_id" required="1" attrs="{'readonly': ['|', '&', ('state', '!=', 'draft'), ('additional', '=', False), ('has_move_lines', '=', True)]}"/>
|
||||
<field name="product_id" required="1" context="{'default_type': 'product'}" attrs="{'readonly': ['|', '&', ('state', '!=', 'draft'), ('additional', '=', False), ('has_move_lines', '=', True)]}"/>
|
||||
<field name="description_picking" string="Description" optional="hide"/>
|
||||
<field name="date_expected" optional="hide" attrs="{'readonly': [('show_operations', '=', True), ('is_locked', '=', True)]}"/>
|
||||
<field name="is_initial_demand_editable" invisible="1"/>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<group name="main_group">
|
||||
<group>
|
||||
<field name="product_id" readonly="context.get('set_product_readonly', False)" force_save="1" help="Product this lot/serial number contains. You cannot change it anymore if it has already been moved."/>
|
||||
<field name="product_id" context="{'default_type': 'product'}" readonly="context.get('set_product_readonly', False)" force_save="1" help="Product this lot/serial number contains. You cannot change it anymore if it has already been moved."/>
|
||||
<label for="product_qty" attrs="{'invisible': [('display_complete', '=', False)]}"/>
|
||||
<div class="o_row" attrs="{'invisible': [('display_complete', '=', False)]}">
|
||||
<field name="product_qty"/>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="product_id"/>
|
||||
<field name="product_id" context="{'default_type': 'product'}"/>
|
||||
<label for="scrap_qty"/>
|
||||
<div class="o_row">
|
||||
<field name="scrap_qty"/>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<tree editable="top" decoration-muted="state == 'cancel'" string="Move Lines" default_order="location_id">
|
||||
<field name="tracking" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="product_id" required="1" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="product_id" context="{'default_type': 'product'}" required="1" attrs="{'readonly': [('id', '!=', False)]}"/>
|
||||
<field name="picking_id" required="1" attrs="{'readonly': [('id', '!=', False)]}"
|
||||
options="{'no_create_edit': True}" domain="[('id', 'in', parent.picking_ids)]"/>
|
||||
<field name="lot_id" groups="stock.group_production_lot" attrs="{'readonly': [('tracking', 'not in', ['lot', 'serial'])]}"/>
|
||||
|
||||
Reference in New Issue
Block a user