From 3c047b2332dddc8c6014f8bd306c1f51c32c6dcd Mon Sep 17 00:00:00 2001
From: jke-openerp
Date: Tue, 1 Oct 2013 17:29:47 +0200
Subject: [PATCH] WMS usability - En cours (reste demodata et btn View picking
bzr revid: jke@openerp.com-20131001152947-hdwtuoqx65mcfsxa
---
addons/procurement/procurement.py | 1 +
addons/procurement/procurement_view.xml | 48 +++++++++++++++++++++++-
addons/stock/procurement.py | 2 +-
addons/stock/stock.py | 8 +++-
addons/stock/stock_data.xml | 14 +++----
addons/stock/stock_view.xml | 21 +++++++++--
addons/stock_picking_wave/__openerp__.py | 5 ++-
7 files changed, 84 insertions(+), 15 deletions(-)
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index 6614a8f7967..2a3293e9050 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -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):
'''
diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml
index be2ed8fc097..d6548f58bce 100644
--- a/addons/procurement/procurement_view.xml
+++ b/addons/procurement/procurement_view.xml
@@ -77,6 +77,48 @@
+
+
+
+ Procurement for Groups
+ procurement.order
+ form
+ tree,form
+ [('group_id','=',active_id)]
+
+
+
+
+
+ procurement.group.form
+ procurement.group
+
+
+
+
+
procurement.order.select
procurement.order
@@ -97,7 +139,7 @@
-
+
Procurement Orders
ir.actions.act_window
@@ -121,6 +163,10 @@
+
+
+
+
Procurements
diff --git a/addons/stock/procurement.py b/addons/stock/procurement.py
index a42cfcd1919..61e3c018abe 100644
--- a/addons/stock/procurement.py
+++ b/addons/stock/procurement.py
@@ -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"),
}
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index e87c3d36db1..bda4bc6ecd9 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -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"),
diff --git a/addons/stock/stock_data.xml b/addons/stock/stock_data.xml
index 880bc1b6839..7da16df9451 100644
--- a/addons/stock/stock_data.xml
+++ b/addons/stock/stock_data.xml
@@ -105,7 +105,7 @@
- incoming
+ incoming
True
@@ -113,7 +113,7 @@
Delivery Orders
-
+
outgoing
@@ -150,9 +150,6 @@ watch your stock valuation, and track production lots upstream and downstream (b
-
-
-
@@ -168,12 +165,12 @@ watch your stock valuation, and track production lots upstream and downstream (b
- Your Company: Ship Only (MTO)
+ Your Company: Ship Only (MTO)
10
- Your Company: Stock → Customer
+ Your Company: Stock → Customer
move
@@ -259,5 +256,8 @@ watch your stock valuation, and track production lots upstream and downstream (b
+
+
+
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 3e227b82a52..5a8a2533e9e 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -609,7 +609,7 @@
-
+
@@ -640,8 +640,7 @@
-
-
+
@@ -877,7 +876,7 @@
-
+
@@ -1335,12 +1334,25 @@
+
+
+ All Operations
+ stock.picking.type
+ ir.actions.act_window
+ form
+ list,form
+
+
@@ -1616,6 +1628,7 @@
+
diff --git a/addons/stock_picking_wave/__openerp__.py b/addons/stock_picking_wave/__openerp__.py
index f98ce3bc1ba..f787c3eb979 100644
--- a/addons/stock_picking_wave/__openerp__.py
+++ b/addons/stock_picking_wave/__openerp__.py
@@ -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,
}