[IMP] Reorganize settings of warehouse a little bit

bzr revid: jco@openerp.com-20140327102421-su64nxq6x9zpdw19
This commit is contained in:
Josse Colpaert 2014-03-27 11:24:21 +01:00
parent 2038e005dc
commit e3ed834d55
2 changed files with 29 additions and 17 deletions

View File

@ -80,11 +80,11 @@ This installs the module product_expiry."""),
help="""Allows to configure inventory valuations on products and product categories."""),
'group_stock_multiple_locations': fields.boolean("Manage multiple locations and warehouses",
implied_group='stock.group_locations',
help="""This allows to configure and use multiple stock locations and warehouses,
instead of having a single default one."""),
'group_stock_adv_location': fields.boolean("Active Push and Pull inventory flows",
help="""This will show you the locations and allows you to
define multiple picking types and warehouses. """),
'group_stock_adv_location': fields.boolean("Manage advanced routes for your warehouse",
implied_group='stock.group_adv_location',
help="""This option supplements the warehouse application by effectively implementing Push and Pull inventory flows. """),
help="""This option supplements the warehouse application by effectively implementing Push and Pull inventory flows through Routes. """),
'decimal_precision': fields.integer('Decimal precision on weight', help="As an example, a decimal precision of 2 will allow weights like: 9.99 kg, whereas a decimal precision of 4 will allow weights like: 0.0231 kg."),
'propagation_minimum_delta': fields.related('company_id', 'propagation_minimum_delta', type='integer', string="Minimum days to trigger a propagation of date change in pushed/pull flows."),
'module_stock_dropshipping': fields.boolean("Manage dropshipping",
@ -93,6 +93,13 @@ This installs the module product_expiry."""),
'module_stock_picking_wave': fields.boolean('Manage picking wave', help='Install the picking wave module which will help you grouping your pickings and processing them in batch'),
}
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': True,
}}
return {}
def _default_company(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.company_id.id

View File

@ -71,25 +71,13 @@
<label for="group_stock_multiple_locations"/>
</div>
<div>
<field name="module_claim_from_delivery" class="oe_inline"/>
<label for="module_claim_from_delivery"/>
</div>
<div>
<field name="group_stock_adv_location" class="oe_inline"/>
<field name="group_stock_adv_location" class="oe_inline" on_change="onchange_adv_location(group_stock_adv_location)"/>
<label for="group_stock_adv_location"/>
</div>
<div attrs="{'invisible': [('group_stock_adv_location', '=', False)]}">
<label for="propagation_minimum_delta"/>
<field name="propagation_minimum_delta" class="oe_inline"/>
</div>
<div>
<field name="module_stock_dropshipping" class="oe_inline"/>
<label for="module_stock_dropshipping"/>
</div>
<div>
<field name="module_stock_picking_wave" class="oe_inline"/>
<label for="module_stock_picking_wave"/>
</div>
</div>
</group>
<group>
@ -113,6 +101,23 @@
</div>
</div>
</group>
<group>
<label for="id" string="Functionalities"/>
<div>
<div>
<field name="module_claim_from_delivery" class="oe_inline"/>
<label for="module_claim_from_delivery"/>
</div>
<div>
<field name="module_stock_dropshipping" class="oe_inline"/>
<label for="module_stock_dropshipping"/>
</div>
<div>
<field name="module_stock_picking_wave" class="oe_inline"/>
<label for="module_stock_picking_wave"/>
</div>
</div>
</group>
</form>
</field>
</record>