[FIX] mrp: fix MO product domain
In 16.2, this commit https://github.com/odoo/odoo/commit/b0a6c525b06fabf8cf869890d8383f8304bae697 modified products' domain on a manufacturing order. The domain added was not correct as it overrided the domain from stock_move instead of doing the intersection of the two domains. task_id: 3630626 closes odoo/odoo#148208 X-original-commit: aedbbae168612a8ea3a2df5cb855432cf3001d26 Signed-off-by: Steve Van Essche <svs@odoo.com>
This commit is contained in:
@@ -366,7 +366,7 @@
|
||||
context="{'default_date': date_start, 'default_date_deadline': date_start, 'default_location_id': location_src_id, 'default_location_dest_id': production_location_id, 'default_warehouse_id': warehouse_id, 'default_state': 'draft', 'default_raw_material_production_id': id, 'default_picking_type_id': picking_type_id, 'default_company_id': company_id, 'form_view_ref': 'stock.view_stock_move_operations'}"
|
||||
readonly="state == 'cancel' or (state == 'done' and is_locked)" options="{'delete': [('state', '=', 'draft')]}">
|
||||
<tree default_order="is_done, manual_consumption desc, sequence" editable="bottom">
|
||||
<field name="product_id" force_save="1" context="{'default_detailed_type': 'product'}" required="1" readonly="move_lines_count > 0 or state == 'cancel' or (state != 'draft' and not additional)" domain="[('id', '!=', parent.product_id)]"/>
|
||||
<field name="product_id" force_save="1" context="{'default_detailed_type': 'product'}" required="1" readonly="move_lines_count > 0 or state == 'cancel' or (state != 'draft' and not additional)" domain="['&', ('type', 'in', ['product', 'consu']), ('id', '!=', parent.product_id)]"/>
|
||||
<field name="location_id" string="From" readonly="1" force_save="1" groups="stock.group_stock_multi_locations" optional="show"/>
|
||||
<!-- test_immediate_validate_uom_2, test_product_produce_different_uom -->
|
||||
<field name="product_uom" column_invisible="True"/>
|
||||
|
||||
Reference in New Issue
Block a user