+
+
+
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 26ca5ed8c0e..9f904ded0c3 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -935,10 +935,10 @@ class mrp_production(osv.osv):
'location_id': source_location_id,
'location_dest_id': destination_location_id,
'move_dest_id': production.move_prod_id.id,
- 'state': 'waiting',
'company_id': production.company_id.id,
}
move_id = stock_move.create(cr, uid, data, context=context)
+ stock_move.action_confirm(cr, uid, [move_id], context=context)
production.write({'move_created_ids': [(6, 0, [move_id])]}, context=context)
return move_id
@@ -962,10 +962,10 @@ class mrp_production(osv.osv):
'location_id': source_location_id,
'location_dest_id': destination_location_id,
'move_dest_id': parent_move_id,
- 'state': 'waiting',
'company_id': production.company_id.id,
'procure_method': 'make_to_order',
})
+ stock_move.action_confirm(cr, uid, [move_id], context=context)
production.write({'move_lines': [(4, move_id)]}, context=context)
return move_id
diff --git a/addons/mrp/mrp_data.xml b/addons/mrp/mrp_data.xml
index 42ad2b911af..42290edde38 100644
--- a/addons/mrp/mrp_data.xml
+++ b/addons/mrp/mrp_data.xml
@@ -32,7 +32,7 @@ This application supports complete integration and production scheduling for sto
-->
- Your Company Manufacture
+ Manufacture5
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index 1566cf05045..6614a8f7967 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -74,6 +74,7 @@ class procurement_rule(osv.osv):
'''
_name = 'procurement.rule'
_description = "Procurement Rule"
+ _order = "name"
def _get_action(self, cr, uid, context=None):
return []
diff --git a/addons/project_mrp/project_mrp_view.xml b/addons/project_mrp/project_mrp_view.xml
index 4f7c2e59358..08ac6c94ec2 100644
--- a/addons/project_mrp/project_mrp_view.xml
+++ b/addons/project_mrp/project_mrp_view.xml
@@ -18,9 +18,7 @@
-
-
-
+
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 4c0d0f16019..47bb972c07a 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -667,10 +667,8 @@ class purchase_order(osv.osv):
return user_date.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
def _prepare_order_picking(self, cr, uid, order, context=None):
- type_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'picking_type_in')[1]
- type = self.pool.get("stock.picking.type").browse(cr, uid, type_id, context=context)
return {
- 'name': self.pool.get('ir.sequence').get_id(cr, uid, type.sequence_id.id, 'id'),
+ 'name': self.pool.get('ir.sequence').get_id(cr, uid, order.picking_type_id.sequence_id.id, 'id'),
'origin': order.name + ((order.origin and (':' + order.origin)) or ''),
'date': self.date_to_datetime(cr, uid, order.date_order, context),
'partner_id': order.dest_address_id.id or order.partner_id.id,
@@ -679,12 +677,11 @@ class purchase_order(osv.osv):
'purchase_id': order.id,
'company_id': order.company_id.id,
'move_lines' : [],
- 'picking_type_id': type_id,
+ 'picking_type_id': order.picking_type_id.id,
}
def _prepare_order_line_move(self, cr, uid, order, order_line, picking_id, group_id, context=None):
''' prepare the stock move data from the PO line '''
- type_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'picking_type_in')[1]
price_unit = order_line.price_unit
if order_line.product_uom.id != order_line.product_id.uom_id.id:
price_unit *= order_line.product_uom.factor
@@ -709,7 +706,7 @@ class purchase_order(osv.osv):
'purchase_line_id': order_line.id,
'company_id': order.company_id.id,
'price_unit': price_unit,
- 'picking_type_id': type_id,
+ 'picking_type_id': order.picking_type_id.id,
'group_id': group_id,
}
@@ -739,7 +736,7 @@ class purchase_order(osv.osv):
stock_move = self.pool.get('stock.move')
new_group = False
- if any([(x.group_id == False) for x in order_lines]):
+ if any([(not x.group_id) for x in order_lines]):
new_group = self.pool.get("procurement.group").create(cr, uid, {'name':order.name, 'partner_id': order.partner_id.id}, context=context)
@@ -1379,4 +1376,15 @@ class account_invoice_line(osv.Model):
readonly=True),
}
+class product_product(osv.osv):
+ _inherit = "product.product"
+
+ def _get_buy_route(self, cr, uid, context=None):
+ buy_route = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'purchase', 'route_warehouse0_buy')[1]
+ return [buy_route]
+
+ _defaults = {
+ 'route_ids': _get_buy_route,
+ }
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/purchase/purchase_data.xml b/addons/purchase/purchase_data.xml
index af53d5d9634..280f503a431 100644
--- a/addons/purchase/purchase_data.xml
+++ b/addons/purchase/purchase_data.xml
@@ -71,7 +71,7 @@
-->
- Your Company Buy
+ Buy5
diff --git a/addons/purchase/test/fifo_price.yml b/addons/purchase/test/fifo_price.yml
index 63b42706191..c34f55fb03c 100644
--- a/addons/purchase/test/fifo_price.yml
+++ b/addons/purchase/test/fifo_price.yml
@@ -297,6 +297,12 @@
!python {model: stock.picking}: |
picking_obj = self.browse(cr, uid, ref("outgoing_fifo_shipment_neg"))
picking_obj.do_partial(context=context)
+-
+ The behavior of fifo/lifo is not garantee if the quants are created at the same second, so i just wait one second
+-
+ !python {model: stock.picking}: |
+ import time
+ time.sleep(1)
-
Let us create another out of 400 kg
-
@@ -392,4 +398,4 @@
quant_obj = self.pool.get("stock.quant")
quants = quant_obj.search(cr, uid, [('product_id','=',ref("product_fifo_negative"))])
print "Quants:", [(x.qty, x.location_id.name, x.in_date, x.cost, x.id) for x in quant_obj.browse(cr, uid, quants)]
- assert self.browse(cr, uid, ref("product_fifo_negative")).standard_price == 65.0, "Product price not updated accordingly. %s found instead of 65" %(self.browse(cr, uid, ref("product_fifo_negative")).standard_price,)
\ No newline at end of file
+ assert self.browse(cr, uid, ref("product_fifo_negative")).standard_price == 65.0, "Product price not updated accordingly. %s found instead of 65" %(self.browse(cr, uid, ref("product_fifo_negative")).standard_price,)
diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml
index 0c11029b48b..d5867cb749a 100644
--- a/addons/sale_journal/sale_journal_view.xml
+++ b/addons/sale_journal/sale_journal_view.xml
@@ -85,17 +85,6 @@
-
- stock.picking.journal.view.tree
- stock.picking
-
-
-
-
-
-
-
-
res.partner.journal.property.form.inheritres.partner
diff --git a/addons/sale_stock_location/sale_stock_location_view.xml b/addons/sale_stock_location/sale_stock_location_view.xml
index 07590c31ba2..63503ba1472 100644
--- a/addons/sale_stock_location/sale_stock_location_view.xml
+++ b/addons/sale_stock_location/sale_stock_location_view.xml
@@ -45,7 +45,7 @@
stock.location.route
-
+
diff --git a/addons/stock/procurement.py b/addons/stock/procurement.py
index 59741659a25..7701b6b8383 100644
--- a/addons/stock/procurement.py
+++ b/addons/stock/procurement.py
@@ -47,7 +47,7 @@ class procurement_rule(osv.osv):
return res
_columns = {
- 'location_id': fields.many2one('stock.location', 'Destination Location'),
+ 'location_id': fields.many2one('stock.location', 'Procurement Location'),
'location_src_id': fields.many2one('stock.location', 'Source Location',
help="Source location is action=move"),
'route_id': fields.many2one('stock.location.route', 'Route',
diff --git a/addons/stock/static/src/js/stock_picking_type.js b/addons/stock/static/src/js/stock_picking_type.js
index 7cfb3e1b77e..49886b8e689 100644
--- a/addons/stock/static/src/js/stock_picking_type.js
+++ b/addons/stock/static/src/js/stock_picking_type.js
@@ -52,9 +52,9 @@ openerp.stock = function(openerp) {
labelFontColor: '#000',
label: label,
levelColors: [
- "#ff0000",
+ "#a9d70b",
"#f9c802",
- "#a9d70b"
+ "#ff0000"
],
});
},
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 176d360569b..0ac35510178 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -215,7 +215,10 @@ class stock_quant(osv.osv):
# add location_dest_id in parameters (False=use the destination of the move)
def quants_move(self, cr, uid, quants, move, context=None):
for quant, qty in quants:
- self.move_single_quant(cr, uid, quant, qty, move, context=context)
+ #quant may be a browse record or None
+ quant_record = self.move_single_quant(cr, uid, quant, qty, move, context=context)
+ #quant_record is the quant newly created or already split
+ self._quant_reconcile_negative(cr, uid, quant_record, context=context)
def check_preferred_location(self, cr, uid, move, context=None):
return move.location_dest_id
@@ -233,7 +236,6 @@ class stock_quant(osv.osv):
'history_ids': [(4, move.id)]
})
quant.refresh()
- self._quant_reconcile_negative(cr, uid, quant, context=context)
return quant
def quants_get(self, cr, uid, location, product, qty, domain=None, prefered_order=False, reservedcontext=None, restrict_lot_id=False, restrict_partner_id=False, context=None):
@@ -317,19 +319,28 @@ class stock_quant(osv.osv):
move = m
return move
- def _reconcile_single_negative_quant(self, cr, uid, to_solve_quant, quant, quant_neg, qty, context=None):
- move = self._get_latest_move(cr, uid, to_solve_quant, context=context)
- self._quant_split(cr, uid, quant, qty, context=context)
- remaining_to_solve_quant = self._quant_split(cr, uid, to_solve_quant, qty, context=context)
- remaining_neg_quant = self._quant_split(cr, uid, quant_neg, -qty, context=context)
- #if the reconciliation was not complete, we need to link together the remaining parts
- if remaining_to_solve_quant and remaining_neg_quant:
- self.write(cr, uid, remaining_to_solve_quant.id, {'propagated_from_id': remaining_neg_quant.id}, context=context)
- #delete the reconciled quants, as it is replaced by the solving quant
- self.unlink(cr, SUPERUSER_ID, [quant_neg.id, to_solve_quant.id], context=context)
- #call move_single_quant to ensure recursivity if necessary and do the stock valuation
- self.move_single_quant(cr, uid, quant, qty, move, context=context)
- return remaining_to_solve_quant
+ #def _reconcile_single_negative_quant(self, cr, uid, to_solve_quant, quant, quant_neg, qty, context=None):
+ # move = self._get_latest_move(cr, uid, to_solve_quant, context=context)
+ # remaining_solving_quant = self._quant_split(cr, uid, quant, qty, context=context)
+ # remaining_to_solve_quant = self._quant_split(cr, uid, to_solve_quant, qty, context=context)
+ # remaining_neg_quant = self._quant_split(cr, uid, quant_neg, -qty, context=context)
+ # #if the reconciliation was not complete, we need to link together the remaining parts
+ # if remaining_to_solve_quant and remaining_neg_quant:
+ # self.write(cr, uid, remaining_to_solve_quant.id, {'propagated_from_id': remaining_neg_quant.id}, context=context)
+ # #delete the reconciled quants, as it is replaced by the solving quant
+ # if remaining_neg_quant:
+ # otherquant_ids = self.search(cr, uid, [('propagated_from_id', '=', quant_neg.id)], context=context)
+ # self.write(cr, uid, otherquant_ids, {'propagated_from_id': remaining_neg_quant.id}, context=context)
+ # self.unlink(cr, SUPERUSER_ID, [quant_neg.id, to_solve_quant.id], context=context)
+ # #call move_single_quant to ensure recursivity if necessary and do the stock valuation
+ # self.move_single_quant(cr, uid, quant, qty, move, context=context)
+ # return remaining_solving_quant, remaining_to_solve_quant
+
+ def _quants_merge(self, cr, uid, solved_quant_ids, solving_quant, context=None):
+ path = []
+ for move in solving_quant.history_ids:
+ path.append((4, move.id))
+ self.write(cr, uid, solved_quant_ids, {'history_ids': path}, context=context)
def _quant_reconcile_negative(self, cr, uid, quant, context=None):
"""
@@ -339,18 +350,42 @@ class stock_quant(osv.osv):
"""
if quant.location_id.usage != 'internal':
return False
+ solving_quant = quant
quants = self.quants_get(cr, uid, quant.location_id, quant.product_id, quant.qty, [('qty', '<', '0')], context=context)
for quant_neg, qty in quants:
if not quant_neg:
continue
- to_solve_quant = self.search(cr, uid, [('propagated_from_id', '=', quant_neg.id), ('id', '!=', quant.id)], context=context)
- if not to_solve_quant:
+ to_solve_quant_ids = self.search(cr, uid, [('propagated_from_id', '=', quant_neg.id)], context=context)
+ if not to_solve_quant_ids:
continue
- to_solve_quant = self.browse(cr, uid, to_solve_quant[0], context=context)
- self._reconcile_single_negative_quant(cr, uid, to_solve_quant, quant, quant_neg, qty, context=context)
+ solving_qty = qty
+ solved_quant_ids = []
+ for to_solve_quant in self.browse(cr, uid, to_solve_quant_ids, context=context):
+ if solving_qty <= 0:
+ continue
+ solved_quant_ids.append(to_solve_quant.id)
+ self._quant_split(cr, uid, to_solve_quant, min(solving_qty, to_solve_quant.qty), context=context)
+ solving_qty -= min(solving_qty, to_solve_quant.qty)
+ #merge history (and cost?)
+ self._quants_merge(cr, uid, solved_quant_ids, solving_quant, context=context)
+ remaining_solving_quant = self._quant_split(cr, uid, solving_quant, qty, context=context)
+ remaining_neg_quant = self._quant_split(cr, uid, quant_neg, -qty, context=context)
+ #if the reconciliation was not complete, we need to link together the remaining parts
+ if remaining_neg_quant:
+ remaining_to_solve_quant_ids = self.search(cr, uid, [('propagated_from_id', '=', quant_neg.id), ('id', 'not in', solved_quant_ids)], context=context)
+ if remaining_to_solve_quant_ids:
+ self.write(cr, uid, remaining_to_solve_quant_ids, {'propagated_from_id': remaining_neg_quant.id}, context=context)
+ quant_cost = solving_quant.cost
+ #delete the reconciled quants, as it is replaced by the solving quant
+ self.unlink(cr, SUPERUSER_ID, [quant_neg.id, solving_quant.id], context=context)
+ #price update + accounting entries adjustments
+ self._price_update(cr, uid, solved_quant_ids, quant_cost, context=context)
+ solving_quant = remaining_solving_quant
- def _price_update(self, cr, uid, quant, newprice, context=None):
- self.write(cr, uid, [quant.id], {'cost': newprice}, context=context)
+ #solving_quant, dummy = self._reconcile_single_negative_quant(cr, uid, to_solve_quant, solving_quant, quant_neg, qty, context=context)
+
+ def _price_update(self, cr, uid, ids, newprice, context=None):
+ self.write(cr, uid, ids, {'cost': newprice}, context=context)
def write(self, cr, uid, ids, vals, context=None):
#We want to trigger the move with nothing on reserved_quant_ids for the store of the remaining quantity
@@ -379,8 +414,6 @@ class stock_quant(osv.osv):
domain += [('product_id','=',product.id)] + domain
res = []
offset = 0
- #id is added at the end of the order to make sure the order is always the same for quants created at the same second
- orderby += ', id asc'
while quantity > 0:
quants = self.search(cr, uid, domain, order=orderby, limit=10, offset=offset, context=context)
if not quants:
@@ -542,7 +575,7 @@ class stock_picking(osv.osv):
* Cancelled: has been cancelled, can't be confirmed anymore"""
),
'min_date': fields.function(get_min_max_date, multi="min_max_date",
- store={'stock.move': (_get_pickings, ['state', 'date_expected'], 20)}, type='datetime', string='Scheduled Time', select=1, help="Scheduled time for the first part of the shipment to be processed"),
+ 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"),
'date': fields.datetime('Commitment Date', help="Date promised for the completion of the transfer order, usually set the time of the order and revised later on.", select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
@@ -808,14 +841,18 @@ class stock_picking(osv.osv):
def rereserve(self, cr, uid, picking_ids, create=False, context=None):
"""
This will unreserve all products and reserve the quants from the operations
- :return: tuple of dictionary with quantities of quant operation and product that can not be matched between ops and moves
+ :return: Tuple (res, res2)
+ res: dictionary of ops with quantity that could not be processed matching ops and moves
+ res2: dictionary of moves with quantity that could not be processed
+ resneg: the negative quants that should be created with ops and move (TODO)
+ tuple of dictionary with quantities of quant operation and product that can not be matched between ops and moves
and dictionary with remaining values on moves
"""
quant_obj = self.pool.get("stock.quant")
move_obj = self.pool.get("stock.move")
op_obj = self.pool.get("stock.pack.operation")
- res = {}
+ res = {} # Qty still to do from ops
res2 = {} #what is left from moves
for picking in self.browse(cr, uid, picking_ids, context=context):
# unreserve everything and initialize res2
@@ -825,14 +862,14 @@ class stock_picking(osv.osv):
# Resort pack_operation_ids
orderedpackops = picking.pack_operation_ids
- #Sort packing operations such that packing operations with most specific information
- orderedpackops.sort(key = lambda x: (x.package_id and -1 or 0) + (x.lot_id and -1 or 0))
+ #Sort packing operations such that only transferring packages happens first and then packing operations with most specific information
+ orderedpackops.sort(key = lambda x: ((x.package_id and not x.product_id) and -3 or 0) + (x.package_id and -1 or 0) + (x.lot_id and -1 or 0))
for ops in orderedpackops:
#Find moves that correspond
if ops.product_id:
#TODO: Should have order such that things with lots and packings are searched first
- move_ids = move_obj.search(cr, uid, [('picking_id','=',picking.id), ('product_id', '=', ops.product_id.id), ('remaining_qty', '>', 0.0)], context=context)
+ move_ids = move_obj.search(cr, uid, [('picking_id','=',picking.id), ('product_id', '=', ops.product_id.id), ('remaining_qty', '>', 0.0), ('state', '=', 'assigned')], context=context)
qty_to_do = ops.product_qty
while qty_to_do > 0 and move_ids:
move = move_obj.browse(cr, uid, move_ids.pop(), context=context)
@@ -862,8 +899,9 @@ class stock_picking(osv.osv):
else:
#Quants get
prefered_order = "reservation_id IS NOT NULL"
- domain = op_obj._get_domain(cr, uid, ops, context=context)
- quants = quant_obj.quants_get(cr, uid, move.location_id, move.product_id, qty, domain=domain, prefered_order=prefered_order, context=context)
+ dom = op_obj._get_domain(cr, uid, ops, context=context)
+ dom = dom + [('reservation_id', 'not in', [x.id for x in picking.move_lines])]
+ quants = quant_obj.quants_get(cr, uid, move.location_id, move.product_id, qty, domain=dom, prefered_order=prefered_order, context=context)
quant_obj.quants_reserve(cr, uid, quants, move, context=context)
#In the end, move quants in correct package
if create:
@@ -873,6 +911,7 @@ class stock_picking(osv.osv):
res[ops.id][ops.product_id.id] = qty_to_do
elif ops.package_id:
quants = ops.package_id.quant_ids #_get_package_lines
+
for quant in quants:
move_ids = move_obj.search(cr, uid, [('picking_id', '=', picking.id), ('product_id', '=', quant.product_id.id), ('remaining_qty', '>', 0.0)])
qty_to_do = quant.qty
@@ -908,6 +947,9 @@ class stock_picking(osv.osv):
#First thing that needs to happen is rereserving the quants
res = self.rereserve(cr, uid, [picking.id], create = True, context = context) #This time, quants need to be created
orig_moves = picking.move_lines
+ orig_qtys = {}
+ for orig in orig_moves:
+ orig_qtys[orig.id] = orig.product_qty
#Add moves that operations need extra
extra_moves = []
for ops in res[0].keys():
@@ -926,16 +968,19 @@ class stock_picking(osv.osv):
'location_dest_id': picking.location_dest_id.id,
'picking_id': picking.id,
'reserved_quant_ids': quant and [(4, quant.id)] or [],
- 'picking_type_id': picking.picking_type_id.id
+ 'picking_type_id': picking.picking_type_id.id,
+ 'group_id': picking.group_id.id,
}, context=context)
extra_moves.append(move_id)
res2 = res[1]
for move in res2.keys():
if res2[move] > 0:
mov = stock_move_obj.browse(cr, uid, move, context=context)
- stock_move_obj.split(cr, uid, mov, res2[move], context=context)
+ new_move = stock_move_obj.split(cr, uid, mov, res2[move], context=context)
+ #Assign move as it was assigned before
+ stock_move_obj.action_assign(cr, uid, [new_move])
todo = []
- orig_moves = [x for x in orig_moves if x.reserved_quant_ids]
+ orig_moves = [x for x in orig_moves if res[1][x.id] < orig_qtys[x.id]]
for move in orig_moves + stock_move_obj.browse(cr, uid, extra_moves, context=context):
if move.state == 'draft':
self.pool.get('stock.move').action_confirm(cr, uid, [move.id],
@@ -1533,7 +1578,6 @@ class stock_move(osv.osv):
"""
context = context or {}
quant_obj = self.pool.get("stock.quant")
- uom_obj = self.pool.get("product.uom")
done = []
for move in self.browse(cr, uid, ids, context=context):
if move.state not in ('confirmed', 'waiting'):
@@ -1548,7 +1592,7 @@ class stock_move(osv.osv):
for q in m2.quant_ids:
dp.append(str(q.id))
qty -= q.qty
- domain = ['|', ('reservation_id', '=', False), ('reservation_id', '=', move.id)]
+ domain = ['|', ('reservation_id', '=', False), ('reservation_id', '=', move.id), ('qty', '>', 0)]
quants = quant_obj.quants_get(cr, uid, move.location_id, move.product_id, qty, domain=domain, prefered_order = dp and ('id not in ('+','.join(dp)+')') or False, restrict_lot_id=move.restrict_lot_id.id, restrict_partner_id=move.restrict_partner_id.id, context=context)
#Will only reserve physical quants, no negative
quant_obj.quants_reserve(cr, uid, quants, move, context=context)
@@ -1802,7 +1846,7 @@ class stock_inventory(osv.osv):
_columns = {
'name': fields.char('Inventory Reference', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Inventory Name."),
- 'date': fields.datetime('Creation Date', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Inventory Create Date."),
+ 'date': fields.datetime('Inventory Date', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Inventory Create Date."),
'date_done': fields.datetime('Date done', help="Inventory Validation Date."),
'line_ids': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', readonly=False, states={'done': [('readonly', True)]}, help="Inventory Lines."),
'move_ids': fields.one2many('stock.move', 'inventory_id', 'Created Moves', help="Inventory Moves."),
@@ -1814,6 +1858,7 @@ class stock_inventory(osv.osv):
'partner_id': fields.many2one('res.partner', 'Owner', readonly=True, states={'draft': [('readonly', False)]}, help="Specify Owner to focus your inventory on a particular Owner."),
'lot_id': fields.many2one('stock.production.lot', 'Lot/Serial Number', readonly=True, states={'draft': [('readonly', False)]}, help="Specify Lot/Serial Number to focus your inventory on a particular Lot/Serial Number."),
'move_ids_exist': fields.function(_get_move_ids_exist, type='boolean', string=' Stock Move Exists?', help='technical field for attrs in view'),
+ 'filter': fields.selection([('product', 'Product'), ('owner', 'Owner'), ('product_owner','Product & Owner'), ('lot','Lot/Serial Number'), ('pack','Pack'), ('none', 'None')], 'Selection Filter'),
}
def _default_stock_location(self, cr, uid, context=None):
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index c098abd0593..95d7b1b702a 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -8,15 +8,14 @@
groups="group_stock_manager,group_stock_user"
sequence="70"/>
-
-
+
-
+
@@ -100,7 +99,7 @@
stock.inventory.formstock.inventory
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -158,7 +180,7 @@
- Physical Inventories
+ Inventories Adjustmentir.actions.act_windowstock.inventoryform
@@ -177,14 +199,6 @@
-
- Draft Physical Inventories
- ir.actions.act_window
- stock.inventory
- form
- [('state','=','draft')]
-
-
@@ -460,7 +474,7 @@
stock.move
- Location Structure
+ Inventory by Locationstock.locationir.actions.act_window[('location_id','=',False)]
@@ -489,11 +503,11 @@
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
stock.incoterms.tree
@@ -1166,47 +1167,6 @@
-
-
- Deliver Products
- stock.move
- ir.actions.act_window
- form
- tree,form
-
-
- {'search_default_future': True}
-
-
- Click to register a product delivery.
-
-
- You will find in this list all products you have to deliver to
- your customers. You can process the deliveries directly from
- this list using the buttons on the right of each line. You can
- filter the products to deliver by customer, products or sale
- order (using the Origin field).
-