[IMP] Stock: Several improvement on locations and warehouses settings
- Separate group_stock_multiple_locations into 2 groups: o group_stock_multi_locations o group_stock_multi_warehouses - Add a selection fields to manage the 3 levels of warehouses management complexity: o Manage 1 WH with 1 location o Manage 1 WH with multi locations o Manage multi WHs with multi locations - Display the menuitems and fields accordingly - On a company creation : Create a related Warehouse - stock.location : Add a helper on the parent location - stock.warehouse : Add a helper on the company_id field
This commit is contained in:
@@ -620,7 +620,7 @@
|
||||
<field name="user_id"/>
|
||||
<field name="origin"/>
|
||||
</group>
|
||||
<group groups="stock.group_locations">
|
||||
<group groups="stock.group_stock_multi_locations">
|
||||
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
|
||||
<field name="location_dest_id" domain="[('usage','=','internal')]"/>
|
||||
</group>
|
||||
@@ -680,7 +680,7 @@
|
||||
<field name="product_uom_qty" readonly="1"/>
|
||||
<field name="restrict_lot_id" groups="stock.group_production_lot"/>
|
||||
<field name="product_uom" options="{'no_open':True,'no_create':True}" readonly="1" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" readonly="1" string="Destination Loc." widget="selection" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="scrapped" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<button name="%(stock.move_scrap)d"
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
<tr>
|
||||
<th><strong>Product</strong></th>
|
||||
<th class="text-right"><strong>Quantity</strong></th>
|
||||
<th class="text-center" groups="stock.group_locations">
|
||||
<th class="text-center" groups="stock.group_stock_multi_locations">
|
||||
<strong>Source Location</strong>
|
||||
</th>
|
||||
<th class="text-center" groups="stock.group_locations">
|
||||
<th class="text-center" groups="stock.group_stock_multi_locations">
|
||||
<strong>Destination Location</strong>
|
||||
</th>
|
||||
</tr>
|
||||
@@ -94,10 +94,10 @@
|
||||
<span t-field="line.product_uom_qty"/>
|
||||
<span t-field="line.product_uom.name" groups="product.group_uom"/>
|
||||
</td>
|
||||
<td class="text-center" groups="stock.group_locations">
|
||||
<td class="text-center" groups="stock.group_stock_multi_locations">
|
||||
<span t-field="line.location_id.name"/>
|
||||
</td>
|
||||
<td class="text-center" groups="stock.group_locations">
|
||||
<td class="text-center" groups="stock.group_stock_multi_locations">
|
||||
<span t-field="line.location_dest_id.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -115,10 +115,10 @@
|
||||
<span t-field="line2.product_uom_qty"/>
|
||||
<span t-field="line2.product_uom.name"/>
|
||||
</td>
|
||||
<td class="text-center" groups="stock.group_locations">
|
||||
<td class="text-center" groups="stock.group_stock_multi_locations">
|
||||
<span t-field="line2.location_id.name"/>
|
||||
</td>
|
||||
<td class="text-center" groups="stock.group_locations">
|
||||
<td class="text-center" groups="stock.group_stock_multi_locations">
|
||||
<span t-field="line2.location_dest_id.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<field name="restrict_lot_id" domain="[('product_id','=',product_id)]" groups="stock.group_production_lot"
|
||||
context="{'default_product_id': product_id}"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="do_move_consume" string="Ok" type="object" class="btn-primary"/>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<field name="product_id" />
|
||||
<field name="partner_id"/>
|
||||
<field name="address_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="company_id" groups="base.group_multi_company" invisible="1"/>
|
||||
<field name="guarantee_limit"/>
|
||||
<field name="state"/>
|
||||
@@ -55,8 +55,8 @@
|
||||
<field name="address_id" groups="sale.group_delivery_invoice_address"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="location_id" on_change="onchange_location_id(location_id)" groups="stock.group_locations" domain="[('usage', 'in', ('internal', 'customer'))]"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations" domain="[('usage', 'in', ('internal', 'customer'))]"/>
|
||||
<field name="location_id" on_change="onchange_location_id(location_id)" groups="stock.group_stock_multi_locations" domain="[('usage', 'in', ('internal', 'customer'))]"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" domain="[('usage', 'in', ('internal', 'customer'))]"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="guarantee_limit"/>
|
||||
</group>
|
||||
@@ -81,8 +81,8 @@
|
||||
<field name="to_invoice"/>
|
||||
<field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale')]"/>
|
||||
<field name="invoiced"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="History">
|
||||
@@ -98,8 +98,8 @@
|
||||
<field name="product_id" on_change="product_id_change(parent.pricelist_id, product_id, product_uom, product_uom_qty, parent.partner_id, False, context)"/>
|
||||
<field name='name'/>
|
||||
<field name="lot_id" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_uom_qty" string="Quantity"/>
|
||||
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="price_unit"/>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<page name="extra" string="Extra Info">
|
||||
<group string="General Information">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="location_id" widget="selection" groups="stock.group_locations"/>
|
||||
<field name="location_id" widget="selection" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="user_id"/>
|
||||
<field name="pricelist_id" groups="product.group_sale_pricelist"/>
|
||||
<field name="picking_id" readonly="1"/>
|
||||
@@ -658,9 +658,9 @@
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
<group col="4">
|
||||
<field name="picking_type_id" widget="selection" groups="stock.group_locations"
|
||||
<field name="picking_type_id" widget="selection" groups="stock.group_stock_multi_locations"
|
||||
on_change="onchange_picking_type_id(picking_type_id)"/>
|
||||
<field name="stock_location_id" groups="stock.group_locations"/>
|
||||
<field name="stock_location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="pricelist_id" groups="product.group_sale_pricelist"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
@@ -718,7 +718,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Point of Sale Configuration" decoration-muted="state == 'inactive'">
|
||||
<field name="name" />
|
||||
<field name="stock_location_id" groups="stock.group_locations"/>
|
||||
<field name="stock_location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
@@ -732,7 +732,7 @@
|
||||
<field name="name" />
|
||||
<filter string="Active" domain="[('state', '=', 'active')]" />
|
||||
<filter string="Inactive" domain="[('state', '=', 'inactive')]" />
|
||||
<field name="stock_location_id" groups="stock.group_locations" />
|
||||
<field name="stock_location_id" groups="stock.group_stock_multi_locations" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -250,8 +250,8 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="date_planned"/>
|
||||
<field name="picking_type_id" domain="[('code','=','incoming')]" options="{'no_create': True}" context="{'special_shortened_wh_name': True}" groups="stock.group_locations"/>
|
||||
<field name="dest_address_id" groups="stock.group_locations" attrs="{'invisible': [('default_location_dest_id_usage', '!=', 'customer')], 'required': [('default_location_dest_id_usage', '=', 'customer')]}"/>
|
||||
<field name="picking_type_id" domain="[('code','=','incoming')]" options="{'no_create': True}" context="{'special_shortened_wh_name': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="dest_address_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('default_location_dest_id_usage', '!=', 'customer')], 'required': [('default_location_dest_id_usage', '=', 'customer')]}"/>
|
||||
<field name="default_location_dest_id_usage" invisible="1"/>
|
||||
<field name="incoterm_id"/>
|
||||
</group>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<field name="date_order" string="Order Date"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="dest_address_id" groups="stock.group_locations"/>
|
||||
<field name="dest_address_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="date_planned" invisible="1"/>
|
||||
<field name="origin"/>
|
||||
<field name="state"/>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='sales_person']" position="before">
|
||||
<group string="Shipping Information" name="sale_shipping">
|
||||
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_locations"/>
|
||||
<field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="incoterm" widget="selection" groups="base.group_user"/>
|
||||
<field name="picking_policy" required="True"/>
|
||||
</group>
|
||||
|
||||
@@ -7,7 +7,7 @@ class stock_config_settings(osv.osv_memory):
|
||||
_name = 'stock.config.settings'
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
def set_group_locations(self, cr, uid, ids, context=None):
|
||||
def set_group_stock_multi_locations(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
If we are not in multiple locations,
|
||||
we can deactivate the internal picking types of the warehouses.
|
||||
@@ -17,7 +17,7 @@ class stock_config_settings(osv.osv_memory):
|
||||
wh_obj = self.pool['stock.warehouse']
|
||||
whs = wh_obj.search(cr, uid, [], context=context)
|
||||
warehouses = wh_obj.browse(cr, uid, whs, context=context)
|
||||
if obj.group_stock_multiple_locations:
|
||||
if obj.group_stock_multi_locations:
|
||||
# Check inactive picking types and of warehouses make them active (by warehouse)
|
||||
inttypes = [x.int_type_id.id for x in warehouses if not x.int_type_id.active]
|
||||
if inttypes:
|
||||
@@ -29,6 +29,18 @@ class stock_config_settings(osv.osv_memory):
|
||||
self.pool['stock.picking.type'].write(cr, uid, inttypes, {'active': False}, context=context)
|
||||
return True
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
res = super(stock_config_settings, self).default_get(cr, uid, fields, context=context)
|
||||
if 'warehouse_and_location_usage_level' in fields or not fields:
|
||||
res['warehouse_and_location_usage_level'] = int(res.get('group_stock_multi_locations', False)) + int(res.get('group_stock_multi_warehouses', False))
|
||||
return res
|
||||
|
||||
def onchange_warehouse_and_location_usage_level(self, cr, uid, ids, level, context=None):
|
||||
return {'value': {
|
||||
'group_stock_multi_locations': level > 0,
|
||||
'group_stock_multi_warehouses': level > 1,
|
||||
}}
|
||||
|
||||
_columns = {
|
||||
'group_product_variant': fields.selection([
|
||||
(0, "No variants on products"),
|
||||
@@ -91,12 +103,6 @@ class stock_config_settings(osv.osv_memory):
|
||||
], "Product Owners",
|
||||
implied_group='stock.group_tracking_owner',
|
||||
help="""This way you can receive products attributed to a certain owner. """),
|
||||
'group_stock_multiple_locations': fields.selection([
|
||||
(0, 'Do not record internal moves within a warehouse'),
|
||||
(1, 'Manage several locations per warehouse')
|
||||
], "Multi Locations",
|
||||
implied_group='stock.group_locations',
|
||||
help="""This will show you the locations and allows you to define multiple picking types and warehouses."""),
|
||||
'group_stock_adv_location': fields.selection([
|
||||
(0, 'No automatic routing of products'),
|
||||
(1, 'Advanced routing of products using rules')
|
||||
@@ -127,11 +133,21 @@ class stock_config_settings(osv.osv_memory):
|
||||
'module_delivery_temando': fields.boolean("Temando integration"),
|
||||
'module_delivery_ups': fields.boolean("UPS integration"),
|
||||
'module_delivery_usps': fields.boolean("USPS integration"),
|
||||
# Warehouse and location usage_level :
|
||||
'warehouse_and_location_usage_level': fields.selection([
|
||||
(0, 'Manage only 1 Warehouse with only 1 stock location'),
|
||||
(1, 'Manage only 1 Warehouse, composed by several stock locations'),
|
||||
(2, 'Manage several Warehouses, each one composed by several stock locations')
|
||||
], "Warehouses and Locations usage level"),
|
||||
'group_stock_multi_locations': fields.boolean('Manage several stock locations',
|
||||
implied_group='stock.group_stock_multi_locations'),
|
||||
'group_stock_multi_warehouses': fields.boolean('Manage several warehouses',
|
||||
implied_group='stock.group_stock_multi_warehouses'),
|
||||
}
|
||||
|
||||
def onchange_adv_location(self, cr, uid, ids, group_stock_adv_location, context=None):
|
||||
if group_stock_adv_location:
|
||||
return {'value': {'group_stock_multiple_locations': 1}}
|
||||
return {'value': {'warehouse_and_location_usage_level': 1}}
|
||||
return {}
|
||||
|
||||
def _default_company(self, cr, uid, context=None):
|
||||
|
||||
@@ -55,8 +55,10 @@
|
||||
</group>
|
||||
<group string="Location & Warehouse">
|
||||
<field name="module_procurement_jit" widget="radio"/>
|
||||
<field name="group_stock_multiple_locations" widget="radio"/>
|
||||
|
||||
<field name="warehouse_and_location_usage_level" widget="radio" on_change="onchange_warehouse_and_location_usage_level(warehouse_and_location_usage_level)"/>
|
||||
<field name="group_stock_multi_locations" invisible="1"/>
|
||||
<field name="group_stock_multi_warehouses" invisible="1"/>
|
||||
|
||||
<label for="group_stock_adv_location"/>
|
||||
<div>
|
||||
<field name="group_stock_adv_location" widget="radio" on_change="onchange_adv_location(group_stock_adv_location)"/>
|
||||
|
||||
@@ -2,14 +2,20 @@
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
|
||||
<record id="group_locations" model="res.groups">
|
||||
<field name="name">Manage Multiple Locations and Warehouses</field>
|
||||
<record id="group_stock_multi_locations" model="res.groups">
|
||||
<field name="name">Manage multiple stock_locations</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="group_stock_multi_warehouses" model="res.groups">
|
||||
<field name="name">Manage multiple warehouses</field>
|
||||
<field name="category_id" ref="base.module_category_hidden"/>
|
||||
</record>
|
||||
|
||||
<record id="group_stock_user" model="res.groups">
|
||||
<field name="name">User</field>
|
||||
<field name="category_id" ref="base.module_category_warehouse_management"/>
|
||||
<field name="implied_ids" eval="[(4, ref('base.group_user')), (4, ref('stock.group_locations'))]"/>
|
||||
<field name="implied_ids" eval="[(4, ref('base.group_user')), (4, ref('stock.group_stock_multi_locations'))]"/>
|
||||
</record>
|
||||
<record id="group_stock_manager" model="res.groups">
|
||||
<field name="name">Manager</field>
|
||||
@@ -123,6 +129,5 @@
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -110,7 +110,8 @@ class stock_location(osv.osv):
|
||||
""", select=True),
|
||||
'complete_name': fields.function(_complete_name, type='char', string="Full Location Name",
|
||||
store={'stock.location': (_get_sublocations, ['name', 'location_id', 'active'], 10)}),
|
||||
'location_id': fields.many2one('stock.location', 'Parent Location', select=True, ondelete='cascade'),
|
||||
'location_id': fields.many2one('stock.location', 'Parent Location', select=True, ondelete='cascade',
|
||||
help="The parent location that includes this location. Example : The 'Dispatch Zone' is the 'Gate 1' parent location."),
|
||||
'child_ids': fields.one2many('stock.location', 'location_id', 'Contains'),
|
||||
|
||||
'partner_id': fields.many2one('res.partner', 'Owner', help="Owner of the location if not internal"),
|
||||
@@ -3294,7 +3295,7 @@ class stock_warehouse(osv.osv):
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Warehouse Name', required=True, select=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, select=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, select=True, help='The company is automatically set from your user preferences.'),
|
||||
'partner_id': fields.many2one('res.partner', 'Address'),
|
||||
'view_location_id': fields.many2one('stock.location', 'View Location', required=True, domain=[('usage', '=', 'view')]),
|
||||
'lot_stock_id': fields.many2one('stock.location', 'Location Stock', domain=[('usage', '=', 'internal')], required=True),
|
||||
@@ -3703,7 +3704,7 @@ class stock_warehouse(osv.osv):
|
||||
max_sequence = self.pool.get('stock.picking.type').search_read(cr, uid, [], ['sequence'], order='sequence desc')
|
||||
max_sequence = max_sequence and max_sequence[0]['sequence'] or 0
|
||||
internal_active_false = (warehouse.reception_steps == 'one_step') and (warehouse.delivery_steps == 'ship_only')
|
||||
internal_active_false = internal_active_false and not self.user_has_groups(cr, uid, 'stock.group_locations')
|
||||
internal_active_false = internal_active_false and not self.user_has_groups(cr, uid, 'stock.group_stock_multi_locations')
|
||||
|
||||
in_type_id = picking_type_obj.create(cr, uid, vals={
|
||||
'name': _('Receipts'),
|
||||
|
||||
+35
-33
@@ -13,7 +13,7 @@
|
||||
<menuitem id="menu_stock_warehouse_mgmt" name="Operations" parent="menu_stock_root" sequence="2" groups="base.group_no_one"/>
|
||||
<menuitem id="menu_stock_config_settings" name="Configuration" parent="menu_stock_root"
|
||||
sequence="100" groups="group_stock_manager,base.group_configuration"/>
|
||||
<menuitem id="menu_warehouse_config" name="Warehouse Management" parent="menu_stock_config_settings" groups="base.group_configuration" sequence="1"/>
|
||||
<menuitem id="menu_warehouse_config" name="Warehouse Management" parent="menu_stock_config_settings" groups="stock.group_stock_manager" sequence="1"/>
|
||||
<menuitem id="menu_routes_config" name="Routes" parent="menu_stock_config_settings" sequence="2" groups="stock.group_adv_location"/>
|
||||
<menuitem id="menu_packages_config" name="Packages" parent="menu_stock_config_settings" sequence="3" groups="product.group_stock_packaging"/>
|
||||
<menuitem
|
||||
@@ -47,7 +47,7 @@
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="product_uom_id" groups="product.group_uom"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -119,7 +119,7 @@
|
||||
<tree string="Inventory Details" editable="bottom" decoration-info="product_qty != theoretical_qty" decoration-danger="theoretical_qty < 0">
|
||||
<field name="product_id" domain="[('type','=','product')]" on_change="onchange_createline(location_id, product_id, product_uom_id, package_id, prod_lot_id, partner_id)"/>
|
||||
<field name="product_uom_id" groups="product.group_uom" string="UoM" on_change="onchange_createline(location_id, product_id, product_uom_id, package_id, prod_lot_id, partner_id)"/>
|
||||
<field name="location_id" domain="[('id', 'child_of', parent.location_id)]" groups="stock.group_locations" on_change="onchange_createline(location_id, product_id, product_uom_id, package_id, prod_lot_id, partner_id)"/>
|
||||
<field name="location_id" domain="[('id', 'child_of', parent.location_id)]" groups="stock.group_stock_multi_locations" on_change="onchange_createline(location_id, product_id, product_uom_id, package_id, prod_lot_id, partner_id)"/>
|
||||
<field name="prod_lot_id" on_change="onchange_createline(location_id, product_id, product_uom_id, package_id, prod_lot_id, partner_id)" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot"/>
|
||||
<field name="package_id" domain="['|', ('location_id','=', False), ('location_id', '=', location_id)]" on_change="onchange_createline(location_id, product_id, product_uom_id, package_id, prod_lot_id, partner_id)" groups="stock.group_tracking_lot"/>
|
||||
<field name="partner_id" on_change="onchange_createline(location_id, product_id, product_uom_id, package_id, prod_lot_id, partner_id)" groups="stock.group_tracking_owner"/>
|
||||
@@ -210,7 +210,7 @@
|
||||
<field name="name"/>
|
||||
<field name="product_id"/>
|
||||
<field name="qty"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
@@ -280,8 +280,8 @@
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="product_packaging" domain="[('product_tmpl_id','=',product_tmpl_id)]" groups="product.group_stock_packaging"/>
|
||||
<field name="picking_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="create_date" groups="base.group_no_one"/>
|
||||
<field name="date" string="Date" groups="base.group_no_one"/>
|
||||
<field name="date_expected" string="Date Expected"/>
|
||||
@@ -518,7 +518,8 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem action="action_location_form" id="menu_action_location_form" groups="stock.group_locations"
|
||||
<menuitem action="action_location_form" id="menu_action_location_form"
|
||||
groups="stock.group_stock_multi_locations"
|
||||
parent="menu_warehouse_config" sequence="2"/>
|
||||
|
||||
<record id="view_warehouse" model="ir.ui.view">
|
||||
@@ -582,7 +583,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Warehouse">
|
||||
<field name="name"/>
|
||||
<field name="lot_stock_id" groups="stock.group_locations"/>
|
||||
<field name="lot_stock_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="partner_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -599,7 +600,8 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
<menuitem action="action_warehouse_form" id="menu_action_warehouse_form" groups="stock.group_stock_manager"
|
||||
<menuitem action="action_warehouse_form" id="menu_action_warehouse_form"
|
||||
groups="stock.group_stock_multi_warehouses"
|
||||
parent="menu_warehouse_config" sequence="1"/>
|
||||
|
||||
<!--
|
||||
@@ -698,7 +700,7 @@
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" groups="product.group_uom" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Locations" groups="stock.group_locations">
|
||||
<group string="Locations" groups="stock.group_stock_multi_locations">
|
||||
<field name="location_id" domain="[('id', 'child_of', picking_source_location_id)]"/>
|
||||
<field name="location_dest_id" domain="[('id', 'child_of', picking_destination_location_id)]"/>
|
||||
</group>
|
||||
@@ -823,8 +825,8 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_id" attrs="{'invisible': [('picking_type_code', '=', 'internal')]}" on_change="onchange_picking_type(picking_type_id,partner_id)"/>
|
||||
<field name="location_id" groups="stock.group_locations" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations" attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}"/>
|
||||
<field name="backorder_id" readonly="1" attrs="{'invisible': [('backorder_id','=',False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -853,15 +855,15 @@
|
||||
<field name="owner_id" groups="stock.group_tracking_owner"/>
|
||||
<field name="location_id" domain="[('id', 'child_of', parent.location_id)]" invisible="1"/>
|
||||
<field name="location_dest_id" domain="[('id', 'child_of', parent.location_dest_id)]" invisible="1"/>
|
||||
<field name="from_loc" groups="stock.group_locations,stock.group_tracking_lot"/>
|
||||
<field name="to_loc" groups="stock.group_locations,stock.group_tracking_lot"/>
|
||||
<field name="from_loc" groups="stock.group_stock_multi_locations,stock.group_tracking_lot"/>
|
||||
<field name="to_loc" groups="stock.group_stock_multi_locations,stock.group_tracking_lot"/>
|
||||
<field name="result_package_id" groups="stock.group_tracking_lot" context="{'location_id': location_dest_id}" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="product_qty" readonly="1" attrs="{'required': [('product_id', '!=', False)]}"/>
|
||||
<field name="qty_done" attrs="{'readonly': [('lots_visible', '=', True)]}"/>
|
||||
<button name="split_lot" string="Lot Split" type="object" icon="fa-list" groups="stock.group_production_lot"
|
||||
attrs="{'invisible': ['|', ('lots_visible', '=', False), ('state', 'not in', ['confirmed', 'assigned', 'waiting', 'partially_available','done'])]}"/>
|
||||
<button name="show_details" string="Modify" type="object" icon="fa-pencil" groups="stock.group_locations"
|
||||
<button name="show_details" string="Modify" type="object" icon="fa-pencil" groups="stock.group_stock_multi_locations"
|
||||
states="confirmed,assigned,waiting,partially_available"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -870,8 +872,8 @@
|
||||
<tree editable="bottom" decoration-muted="qty_done>0">
|
||||
<field name="package_id" required="1" string="Package To Move"/>
|
||||
<field name="location_id" domain="[('id', 'child_of', parent.location_id)]" invisible="1"/>
|
||||
<field name="from_loc" groups="stock.group_locations,stock.group_tracking_lot"/>
|
||||
<field name="to_loc" groups="stock.group_locations,stock.group_tracking_lot"/>
|
||||
<field name="from_loc" groups="stock.group_stock_multi_locations,stock.group_tracking_lot"/>
|
||||
<field name="to_loc" groups="stock.group_stock_multi_locations,stock.group_tracking_lot"/>
|
||||
<field name="location_dest_id" domain="[('id', 'child_of', parent.location_dest_id)]" invisible="1"/>
|
||||
<field name="result_package_id" groups="stock.group_tracking_lot" context="{'location_id': location_dest_id}" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
@@ -1223,7 +1225,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<pivot string="Stock Moves Analysis">
|
||||
<field name="product_id" type="row"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations" type="row"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" type="row"/>
|
||||
<field name="product_uom_qty" type="measure"/>
|
||||
</pivot>
|
||||
</field>
|
||||
@@ -1235,7 +1237,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Stock Moves Analysis">
|
||||
<field name="product_id"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations" type="row"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" type="row"/>
|
||||
<field name="product_uom_qty" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
@@ -1260,8 +1262,8 @@
|
||||
icon="terp-gtk-jump-to-ltr" context="{'scrap': True}"
|
||||
states="draft,waiting,confirmed,assigned"
|
||||
groups="stock.group_stock_user"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="date" groups="base.group_no_one"/>
|
||||
<field name="date_expected"/>
|
||||
<field name="state"/>
|
||||
@@ -1332,13 +1334,13 @@
|
||||
</group>
|
||||
<group name="origin_grp" string="Origin">
|
||||
<field name="origin"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="picking_id" domain="[('picking_type_id','=',picking_type_id)]"/>
|
||||
<field name="create_date" groups="base.group_no_one"/>
|
||||
<field name="procure_method" attrs="{'readonly': [('state', '!=', 'draft')]}" groups="stock.group_adv_location"/>
|
||||
<field name="group_id"/>
|
||||
</group>
|
||||
<group name="destination_grp" string="Destination" groups="stock.group_locations">
|
||||
<group name="destination_grp" string="Destination" groups="stock.group_stock_multi_locations">
|
||||
<field name="location_dest_id" />
|
||||
<field name="partner_id" context="{'contact_display':'partner'}" />
|
||||
<field name="picking_partner_id" context="{'contact_display':'partner'}"/>
|
||||
@@ -1426,8 +1428,8 @@
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Product" name="by_product" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Picking" name="groupby_picking_id" domain="[]" context="{'group_by':'picking_id'}"/>
|
||||
<filter string="Source" name="groupby_location_id" domain="[]" context="{'group_by':'location_id'}" groups="stock.group_locations"/>
|
||||
<filter string="Destination" name="groupby_dest_location_id" domain="[]" context="{'group_by':'location_dest_id'}" groups="stock.group_locations"/>
|
||||
<filter string="Source" name="groupby_location_id" domain="[]" context="{'group_by':'location_id'}" groups="stock.group_stock_multi_locations"/>
|
||||
<filter string="Destination" name="groupby_dest_location_id" domain="[]" context="{'group_by':'location_dest_id'}" groups="stock.group_stock_multi_locations"/>
|
||||
<filter string="Status" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Creation" name="groupby_create_date" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
|
||||
<filter string="Scheduled" name="groupby_date" domain="[]" context="{'group_by':'date_expected'}"/>
|
||||
@@ -1727,8 +1729,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Reordering Rules">
|
||||
<field name="name"/>
|
||||
<field name="warehouse_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="warehouse_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
<field name="product_min_qty"/>
|
||||
@@ -1744,7 +1746,7 @@
|
||||
<search string="Reordering Rules Search">
|
||||
<field name="name" string="Reordering Rules"/>
|
||||
<field name="warehouse_id"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="product_id"/>
|
||||
<group expand="0" string="Group By">
|
||||
@@ -1770,9 +1772,9 @@
|
||||
<field name="product_id" on_change="onchange_product_id(product_id)"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
|
||||
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
<field name="location_id" groups="stock.group_locations"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="group_id" groups="stock.group_adv_location"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
</group>
|
||||
@@ -1978,8 +1980,8 @@
|
||||
<button type="object" name="show_picking" icon="fa-list-alt" attrs="{'invisible': [('picking_id', '=', False)]}"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="date"/>
|
||||
<field name="location_id" groups="stock.group_locations" string="Source Location Zone"/>
|
||||
<field name="location_dest_id" groups="stock.group_locations" string="Destination Location Zone"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" string="Source Location Zone"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" string="Destination Location Zone"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -2047,7 +2049,7 @@
|
||||
<menuitem id="menu_quants" name="Inventory Valuation" parent="stock.menu_warehouse_report" sequence="120" action="quantsact"/>
|
||||
<menuitem id="menu_procurement_rules" name="Global Procurement Rules" parent="stock.menu_routes_config" action="procrules" groups="base.group_no_one" sequence="3"/>
|
||||
<menuitem id="menu_stock_location_path" name="Global Push Rules" parent="stock.menu_routes_config" action="stolocpath" groups="base.group_no_one" sequence="4"/>
|
||||
<menuitem id="menu_pickingtype" name="Operations Types" parent="stock.menu_warehouse_config" action="action_picking_type_list" sequence="4" groups="stock.group_locations"/>
|
||||
<menuitem id="menu_pickingtype" name="Operations Types" parent="stock.menu_warehouse_config" action="action_picking_type_list" sequence="4" groups="stock.group_stock_multi_locations"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="product_open_orderpoint">
|
||||
<field name="context">{'default_product_id': active_id, 'search_default_product_id': active_id}</field>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
a new task.
|
||||
</p>
|
||||
<group>
|
||||
<field name="warehouse_id" groups="stock.group_locations"/>
|
||||
<field name="warehouse_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_tmpl_id" invisible="1"/>
|
||||
<field name="product_variant_count" invisible="1"/>
|
||||
<field name="product_id" on_change="onchange_product_id(product_id, context)"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
widget="selection"
|
||||
domain="[('product_tmpl_id', '=', product_tmpl_id)]"
|
||||
attrs="{'readonly': [('product_variant_count', '=', 1)]}"/>
|
||||
<field name="location_id" groups="stock.group_locations" on_change="onchange_location_id(location_id, product_id, context)"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" on_change="onchange_location_id(location_id, product_id, context)"/>
|
||||
<field name="new_quantity"/>
|
||||
<field name="lot_id" context="{'search_default_product_id':product_id,'default_product_id':product_id}" groups="stock.group_production_lot"/>
|
||||
<p groups="stock.group_production_lot" class="oe_grey">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<field name="restrict_lot_id" domain="[('product_id','=',product_id)]" groups="stock.group_production_lot"
|
||||
context="{'default_product_id': product_id}"/>
|
||||
<field name="location_id" string="Scrap Location" widget="selection"
|
||||
domain="[('usage','!=','view'),('scrap_location','=',True)]" groups="stock.group_locations"/>
|
||||
domain="[('usage','!=','view'),('scrap_location','=',True)]" groups="stock.group_stock_multi_locations"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="move_scrap" string="Scrap" type="object" class="btn-primary"/>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<group>
|
||||
<field name="parent_location_id" invisible="1"/>
|
||||
<field name="original_location_id" invisible="1"/>
|
||||
<field name="location_id" options="{'no_create': True, 'no_open': True}" groups="stock.group_locations"/>
|
||||
<field name="location_id" options="{'no_create': True, 'no_open': True}" groups="stock.group_stock_multi_locations"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="create_returns" string="Return" type="object" class="btn-primary"/>
|
||||
|
||||
Reference in New Issue
Block a user