WMS usability - En cours (reste demodata et btn View picking
bzr revid: jke@openerp.com-20131001152947-hdwtuoqx65mcfsxa
This commit is contained in:
@@ -67,6 +67,7 @@ class procurement_group(osv.osv):
|
||||
'name': lambda self, cr, uid, c: self.pool.get('ir.sequence').get(cr, uid, 'procurement.group') or '',
|
||||
'move_type': lambda self, cr, uid, c: 'one'
|
||||
}
|
||||
|
||||
|
||||
class procurement_rule(osv.osv):
|
||||
'''
|
||||
|
||||
@@ -77,6 +77,48 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="do_view_procurements" model="ir.actions.act_window">
|
||||
<field name="name">Procurement for Groups </field>
|
||||
<field name="res_model">procurement.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('group_id','=',active_id)]</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
TODO-JKE
|
||||
|
||||
<record id="do_view_pickings" model="ir.actions.act_window">
|
||||
<field name="name">Pickings for Groups </field>
|
||||
<field name="res_model">stock.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('group_id','=',active_id)]</field>
|
||||
</record>
|
||||
-->
|
||||
|
||||
<record id="procurement_group_form_view" model="ir.ui.view">
|
||||
<field name="name">procurement.group.form</field>
|
||||
<field name="model">procurement.group</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Procurement group" version="7.0">
|
||||
<sheet>
|
||||
<div class="oe_right oe_button_box">
|
||||
<button name="%(do_view_procurements)d" string="View all procurements" type="action" />
|
||||
|
||||
</div>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="move_type"/>
|
||||
<field name="partner_id"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_procurement_filter" model="ir.ui.view">
|
||||
<field name="name">procurement.order.select</field>
|
||||
<field name="model">procurement.order</field>
|
||||
@@ -97,7 +139,7 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="procurement_action" model="ir.actions.act_window">
|
||||
<field name="name">Procurement Orders</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -121,6 +163,10 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<record id="procurement_exceptions" model="ir.actions.act_window">
|
||||
<field name="name">Procurements</field>
|
||||
|
||||
@@ -83,7 +83,7 @@ class procurement_rule(osv.osv):
|
||||
class procurement_order(osv.osv):
|
||||
_inherit = "procurement.order"
|
||||
_columns = {
|
||||
'location_id': fields.many2one('stock.location', 'Procurement Location'),
|
||||
'location_id': fields.many2one('stock.location', 'Procurement Location',required=True),
|
||||
'move_ids': fields.one2many('stock.move', 'procurement_id', 'Moves', help="Moves created by the procurement"),
|
||||
'move_dest_id': fields.many2one('stock.move', 'Destination Move', help="Move which caused (created) the procurement"),
|
||||
}
|
||||
|
||||
@@ -478,6 +478,12 @@ class stock_picking(osv.osv):
|
||||
_inherit = ['mail.thread']
|
||||
_description = "Picking List"
|
||||
_order = "priority desc, date desc, id desc"
|
||||
|
||||
def _set_min_date(self, cr, uid, id, field, value,arg,context=None):
|
||||
move_obj = self.pool.get("stock.move")
|
||||
move_obj.write(cr,uid,[move.id for move in self.browse(cr,uid,id,context=context).move_lines],{'date_expected' : value })
|
||||
|
||||
|
||||
def get_min_max_date(self, cr, uid, ids, field_name, arg, context=None):
|
||||
""" Finds minimum and maximum dates for picking.
|
||||
@return: Dictionary of values
|
||||
@@ -596,7 +602,7 @@ class stock_picking(osv.osv):
|
||||
),
|
||||
'priority': fields.selection([('0', 'Low'), ('1', 'Normal'), ('2', 'High')], string='Priority', required=True),
|
||||
|
||||
'min_date': fields.function(get_min_max_date, multi="min_max_date",
|
||||
'min_date': fields.function(get_min_max_date, multi="min_max_date",fnct_inv=_set_min_date, readonly=False,
|
||||
store={'stock.move': (_get_pickings, ['state', 'date_expected'], 20)}, type='datetime', string='Scheduled Date', select=1, help="Scheduled time for the first part of the shipment to be processed"),
|
||||
'max_date': fields.function(get_min_max_date, multi="min_max_date",
|
||||
store={'stock.move': (_get_pickings, ['state', 'date_expected'], 20)}, type='datetime', string='Max. Expected Date', select=2, help="Scheduled time for the last part of the shipment to be processed"),
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
<field name="sequence_id" ref="seq_picking_type_in"/>
|
||||
<field name="default_location_src_id" ref="stock_location_suppliers"/>
|
||||
<field name="default_location_dest_id" ref="stock_location_stock"/>
|
||||
<field name="code_id">incoming</field>
|
||||
<field name="code_id">incoming</field>
|
||||
<field name="auto_force_assign">True</field>
|
||||
</record>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<field name="name">Delivery Orders</field>
|
||||
<field name="sequence_id" ref="seq_picking_type_out"/>
|
||||
<field name="default_location_src_id" ref="stock_location_stock"/>
|
||||
<field name="default_location_dest_id" ref="stock_location_customers"/>
|
||||
<field name="default_location_dest_id" ref="stock_location_customers"/>
|
||||
<field name="code_id">outgoing</field>
|
||||
</record>
|
||||
|
||||
@@ -150,9 +150,6 @@ watch your stock valuation, and track production lots upstream and downstream (b
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Procurement rules
|
||||
-->
|
||||
@@ -168,12 +165,12 @@ watch your stock valuation, and track production lots upstream and downstream (b
|
||||
|
||||
|
||||
<record id="route_warehouse0_mto" model='stock.location.route'>
|
||||
<field name="name">Your Company: Ship Only (MTO)</field>
|
||||
<field name="name">Your Company: Ship Only (MTO)</field>
|
||||
<field name="sequence">10</field>
|
||||
</record>
|
||||
|
||||
<record id="procurement_rule_customer_mto" model="procurement.rule">
|
||||
<field name="name">Your Company: Stock → Customer</field>
|
||||
<field name="name">Your Company: Stock → Customer</field>
|
||||
<field name="action">move</field>
|
||||
<field name="location_id" ref="stock_location_customers"/>
|
||||
<field name="location_src_id" ref="stock_location_stock"/>
|
||||
@@ -259,5 +256,8 @@ watch your stock valuation, and track production lots upstream and downstream (b
|
||||
<record id="picking_type_internal" model="stock.picking.type">
|
||||
<field name="warehouse_id" ref="warehouse0"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -609,7 +609,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="date"/>
|
||||
<field name="min_date" readonly="1" attrs="{'invisible': [('min_date','=',False)]}"/>
|
||||
<field name="min_date" attrs="{'invisible': [('min_date','=',False)]}"/>
|
||||
<field name="origin" placeholder="e.g. PO0032" class="oe_inline"/>
|
||||
</group>
|
||||
</group>
|
||||
@@ -640,8 +640,7 @@
|
||||
<field name="move_type"/>
|
||||
<field name="picking_type_id"/>
|
||||
<field name="priority"/>
|
||||
<field name="quant_reserved_exist" invisible="1"/>
|
||||
|
||||
<field name="quant_reserved_exist" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
@@ -877,7 +876,7 @@
|
||||
<group>
|
||||
<group name="main_grp" string="Details">
|
||||
<field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, False)"/>
|
||||
<field name="procure_method"/>
|
||||
<field name="procure_method" attrs="{'invisible': [('state', '==', 'confirmed')],'readonly': [('group_id', '==', False)] }" />
|
||||
<field name="group_id"/>
|
||||
<label for="product_uom_qty"/>
|
||||
<div>
|
||||
@@ -1335,12 +1334,25 @@
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_picking_type_list" model="ir.actions.act_window">
|
||||
<field name="name">All Operations</field>
|
||||
<field name="res_model">stock.picking.type</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
action="action_picking_type_form"
|
||||
id="menu_action_picking_type_form"
|
||||
parent="menu_stock_warehouse_mgmt" sequence="1"/>
|
||||
|
||||
<menuitem
|
||||
id="menu_pickingtype"
|
||||
name="Types of Operation"
|
||||
parent="stock.menu_stock_configuration"
|
||||
action="action_picking_type_list" />
|
||||
|
||||
|
||||
<!-- Order Point -->
|
||||
@@ -1616,6 +1628,7 @@
|
||||
<menuitem action="action_orderpoint_form" id="menu_stock_order_points" parent="stock.menu_stock_configuration" sequence="10"/>
|
||||
<menuitem id="menu_quants" name="Current Inventory" parent="stock.menu_stock_inventory_control" sequence="20" action="quantsact"/>
|
||||
<menuitem id="menu_procurement_rules" name="Procurement Rules" parent="stock.menu_stock_configuration" action="procrules" groups="base.group_no_one"/>
|
||||
<menuitem id="menu_pickingtype" name="Types of Operation" parent="stock.menu_stock_configuration" action="action_picking_type_list" groups="base.group_no_one"/>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,10 @@ This module adds the picking wave option in warehouse management.
|
||||
'stock_picking_wave_view.xml',
|
||||
'stock_picking_wave_sequence.xml',
|
||||
'wizard/picking_to_wave_view.xml'],
|
||||
'demo': [],
|
||||
'demo': [
|
||||
'stock_picking_wave_data.xml',
|
||||
],
|
||||
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user