[MERGE] stock: usability improvements

bzr revid: qdp-launchpad@openerp.com-20140408075353-5yy5to2hb65vo41q
This commit is contained in:
Quentin (OpenERP) 2014-04-08 09:53:53 +02:00
commit 79344b903b
6 changed files with 40 additions and 32 deletions

View File

@ -36,12 +36,10 @@ OpenERP has the capacity to manage lots and serial numbers ensuring compliance w
Key Features
------------
* Moves history and planning,
* Stock valuation (standard or average price, ...)
* Robustness faced with Inventory differences
* Automatic reordering rules
* Minimum stock rules
* Support for barcodes
* Rapid detection of mistakes through double entry system
* Traceability (Upstream / Downstream, Serial numbers, ...)
* Traceability (Serial Numbers, Packages, ...)
Dashboard / Reports for Warehouse Management will include:
----------------------------------------------------------

View File

@ -67,7 +67,8 @@ class procurement_rule(osv.osv):
help="Source location is action=move"),
'route_id': fields.many2one('stock.location.route', 'Route',
help="If route_id is False, the rule is global"),
'procure_method': fields.selection([('make_to_stock', 'Make to Stock'), ('make_to_order', 'Make to Order')], 'Procure Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
'procure_method': fields.selection([('make_to_stock', 'Take From Stock'), ('make_to_order', 'Create Procurement')], 'Move Supply Method', required=True,
help="""Determines the procurement method of the stock move that will be generated: whether it will need to 'take from the available stock' in its source location or needs to ignore its stock and create a procurement over there."""),
'route_sequence': fields.related('route_id', 'sequence', string='Route Sequence',
store={
'stock.location.route': (_get_rules, ['sequence'], 10),

View File

@ -73,18 +73,17 @@ This installs the module product_expiry."""),
'group_stock_tracking_lot': fields.boolean("Use packages: pallets, boxes, ...",
implied_group='stock.group_tracking_lot',
help="""This allows you to manage products by using serial numbers. When you select a serial number on product moves, you can get the traceability of that product."""),
'group_stock_tracking_owner': fields.boolean("Manage owner on stock",
implied_group='stock.group_tracking_owner',
help="""This way you can receive products attributed to a certain owner. """),
'group_stock_tracking_owner': fields.boolean("Manage owner on stock",
implied_group='stock.group_tracking_owner',
help="""This way you can receive products attributed to a certain owner. """),
'module_stock_account': fields.boolean("Generate accounting entries per stock movement",
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 +92,11 @@ 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="Additional Features"/>
<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>

View File

@ -1633,7 +1633,6 @@ class stock_move(osv.osv):
'location_id': fields.many2one('stock.location', 'Source Location', required=True, select=True, states={'done': [('readonly', True)]}, help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."),
'location_dest_id': fields.many2one('stock.location', 'Destination Location', required=True, states={'done': [('readonly', True)]}, select=True, help="Location where the system will stock the finished products."),
# FP Note: should we remove this?
'partner_id': fields.many2one('res.partner', 'Destination Address ', states={'done': [('readonly', True)]}, help="Optional address where goods are to be delivered, specifically used for allotment"),
@ -1662,7 +1661,8 @@ class stock_move(osv.osv):
'split_from': fields.many2one('stock.move', string="Move Split From", help="Technical field used to track the origin of a split move, which can be useful in case of debug"),
'backorder_id': fields.related('picking_id', 'backorder_id', type='many2one', relation="stock.picking", string="Back Order of", select=True),
'origin': fields.char("Source"),
'procure_method': fields.selection([('make_to_stock', 'Make to Stock'), ('make_to_order', 'Make to Order')], 'Procurement Method', required=True, help="Make to Stock: When needed, the product is taken from the stock or we wait for replenishment. \nMake to Order: When needed, the product is purchased or produced."),
'procure_method': fields.selection([('make_to_stock', 'Default: Take From Stock'), ('make_to_order', 'Advanced: Apply Procurement Rules')], 'Supply Method', required=True,
help="""By default, the system will take from the stock in the source location and passively wait for availability. The other possibility allows you to directly create a procurement on the source location (and thus ignore its current stock) to gather products. If we want to chain moves and have this one to wait for the previous, this second option should be chosen."""),
# used for colors in tree views:
'scrapped': fields.related('location_dest_id', 'scrap_location', type='boolean', relation='stock.location', string='Scrapped', readonly=True),
@ -3904,7 +3904,7 @@ class stock_warehouse_orderpoint(osv.osv):
'logic': fields.selection([('max', 'Order to Max'), ('price', 'Best price (not yet active!)')], 'Reordering Mode', required=True),
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True, ondelete="cascade"),
'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete="cascade"),
'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type', '!=', 'service')]),
'product_id': fields.many2one('product.product', 'Product', required=True, ondelete='cascade', domain=[('type', '=', 'product')]),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'product_min_qty': fields.float('Minimum Quantity', required=True,
help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\

View File

@ -1109,12 +1109,12 @@
<field name="location_id" groups="stock.group_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="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">
<field name="location_dest_id" />
<field name="partner_id" context="{'contact_display':'partner'}" />
<field name="partner_id" context="{'contact_display':'partner'}" />
</group>
<group name="quants_grp" string="Reserved Quants" colspan="4" groups="base.group_no_one">
<field name="reserved_quant_ids"/>
@ -1140,7 +1140,7 @@
<group>
<group>
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.partner_id)"/>
<field name="procure_method"/>
<field name="procure_method" groups="stock.group_adv_location"/>
<field name="picking_type_id" invisible="1"/>
<label for="product_uom_qty"/>
<div>
@ -1679,7 +1679,7 @@
</xpath>
<xpath expr="//group[@name='propagation_group']" position="before">
<group attrs="{'invisible': [('action', '!=', 'move')]}" string="Moving Options">
<field name="procure_method"/>
<field name="procure_method" groups="stock.group_adv_location"/>
<field name="location_src_id" attrs="{'required': [('action', '=', 'move')]}"/>
<field name="partner_address_id" groups="stock.group_adv_location" context="{'show_address': 1}" options="{'always_reload': 1}"/>
<label for="delay" string="Delay" groups="stock.group_adv_location"/>