Merge lp:~openerp-dev/openobject-addons/trunk-wms-gdetest-jco into lp:~openerp-dev/openobject-addons/trunk-wms

Proposed by Josse Colpaert (OpenERP)
Status: Merged
Merged at revision: 9689
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-wms-gdetest-jco
Merge into: lp:~openerp-dev/openobject-addons/trunk-wms
Diff against target: 151 lines (+34/-8)
7 files modified
mrp/mrp.py (+9/-0)
mrp/mrp_view.xml (+1/-0)
mrp/stock.py (+2/-1)
purchase/stock.py (+2/-1)
stock/procurement.py (+0/-1)
stock/stock.py (+8/-5)
stock/stock_view.xml (+12/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-wms-gdetest-jco
Reviewer Review Type Date Requested Status
qdp (OpenERP) Pending
Review via email: mp+216924@code.launchpad.net

Description of the change

Inventory button on Location, remove supply move message in chatter of procurement, quants on serial number read only

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp/mrp.py'
2--- mrp/mrp.py 2014-04-23 15:05:03 +0000
3+++ mrp/mrp.py 2014-04-23 16:25:45 +0000
4@@ -1078,6 +1078,15 @@
5 production.write({'state': 'confirmed'}, context=context)
6 return 0
7
8+ def action_assign(self, cr, uid, ids, context=None):
9+ """
10+ Checks the availability on the consume lines of the production order
11+ """
12+ move_obj = self.pool.get("stock.move")
13+ for production in self.browse(cr, uid, ids, context=context):
14+ move_obj.action_assign(cr, uid, [x.id for x in production.move_lines], context=context)
15+
16+
17 def force_production(self, cr, uid, ids, *args):
18 """ Assigns products.
19 @param *args: Arguments
20
21=== modified file 'mrp/mrp_view.xml'
22--- mrp/mrp_view.xml 2014-04-22 09:28:15 +0000
23+++ mrp/mrp_view.xml 2014-04-23 16:25:45 +0000
24@@ -673,6 +673,7 @@
25 <header>
26 <button name="button_confirm" states="draft" string="Confirm Production" class="oe_highlight"/>
27 <button name="%(act_mrp_product_produce)d" states="ready,in_production" string="Produce" type="action" class="oe_highlight"/>
28+ <button name="action_assign" states="confirmed,picking_except" string="Check Availability" type="object" class="oe_highlight"/>
29 <button name="force_production" states="confirmed" string="Force Reservation" type="object"/>
30 <button name="force_production" states="picking_except" string="Force Reservation" type="object"/>
31 <button name="button_produce" states="ready" string="Mark as Started"/>
32
33=== modified file 'mrp/stock.py'
34--- mrp/stock.py 2014-02-14 15:03:30 +0000
35+++ mrp/stock.py 2014-04-23 16:25:45 +0000
36@@ -206,7 +206,8 @@
37 class stock_warehouse(osv.osv):
38 _inherit = 'stock.warehouse'
39 _columns = {
40- 'manufacture_to_resupply': fields.boolean('Manufacture in this Warehouse'),
41+ 'manufacture_to_resupply': fields.boolean('Manufacture in this Warehouse',
42+ help="When products are manufactured, they can be manufactured in this warehouse."),
43 'manufacture_pull_id': fields.many2one('procurement.rule', 'Manufacture Rule'),
44 }
45
46
47=== modified file 'purchase/stock.py'
48--- purchase/stock.py 2014-04-16 15:05:51 +0000
49+++ purchase/stock.py 2014-04-23 16:25:45 +0000
50@@ -92,7 +92,8 @@
51 class stock_warehouse(osv.osv):
52 _inherit = 'stock.warehouse'
53 _columns = {
54- 'buy_to_resupply': fields.boolean('Purchase to resupply this warehouse'),
55+ 'buy_to_resupply': fields.boolean('Purchase to resupply this warehouse',
56+ help="When products are bought, they can be delivered to this warehouse"),
57 'buy_pull_id': fields.many2one('procurement.rule', 'BUY rule'),
58 }
59 _defaults = {
60
61=== modified file 'stock/procurement.py'
62--- stock/procurement.py 2014-04-23 15:55:57 +0000
63+++ stock/procurement.py 2014-04-23 16:25:45 +0000
64@@ -202,7 +202,6 @@
65 move_dict = self._run_move_create(cr, uid, procurement, context=context)
66 #create the move as SUPERUSER because the current user may not have the rights to do it (mto product launched by a sale for example)
67 move_obj.create(cr, SUPERUSER_ID, move_dict, context=context)
68- self.message_post(cr, uid, [procurement.id], body=_("Supply Move created"), context=context)
69 return True
70 return super(procurement_order, self)._run(cr, uid, procurement, context=context)
71
72
73=== modified file 'stock/stock.py'
74--- stock/stock.py 2014-04-23 15:55:57 +0000
75+++ stock/stock.py 2014-04-23 16:25:45 +0000
76@@ -1427,7 +1427,7 @@
77 'name': fields.char('Serial Number', size=64, required=True, help="Unique Serial Number"),
78 'ref': fields.char('Internal Reference', size=256, help="Internal reference number in case it differs from the manufacturer's serial number"),
79 'product_id': fields.many2one('product.product', 'Product', required=True, domain=[('type', '<>', 'service')]),
80- 'quant_ids': fields.one2many('stock.quant', 'lot_id', 'Quants'),
81+ 'quant_ids': fields.one2many('stock.quant', 'lot_id', 'Quants', readonly=True),
82 'create_date': fields.datetime('Creation Date'),
83 }
84 _defaults = {
85@@ -2735,11 +2735,13 @@
86 'reception_steps': fields.selection([
87 ('one_step', 'Receive goods directly in stock (1 step)'),
88 ('two_steps', 'Unload in input location then go to stock (2 steps)'),
89- ('three_steps', 'Unload in input location, go through a quality control before being admitted in stock (3 steps)')], 'Incoming Shipments', required=True),
90+ ('three_steps', 'Unload in input location, go through a quality control before being admitted in stock (3 steps)')], 'Incoming Shipments',
91+ help="Default incoming route to follow", required=True),
92 'delivery_steps': fields.selection([
93 ('ship_only', 'Ship directly from stock (Ship only)'),
94 ('pick_ship', 'Bring goods to output location before shipping (Pick + Ship)'),
95- ('pick_pack_ship', 'Make packages into a dedicated location, then bring them to the output location for shipping (Pick + Pack + Ship)')], 'Outgoing Shippings', required=True),
96+ ('pick_pack_ship', 'Make packages into a dedicated location, then bring them to the output location for shipping (Pick + Pack + Ship)')], 'Outgoing Shippings',
97+ help="Default outgoing route to follow", required=True),
98 'wh_input_stock_loc_id': fields.many2one('stock.location', 'Input Location'),
99 'wh_qc_stock_loc_id': fields.many2one('stock.location', 'Quality Control Location'),
100 'wh_output_stock_loc_id': fields.many2one('stock.location', 'Output Location'),
101@@ -2755,8 +2757,9 @@
102 'delivery_route_id': fields.many2one('stock.location.route', 'Delivery Route'),
103 'resupply_from_wh': fields.boolean('Resupply From Other Warehouses'),
104 'resupply_wh_ids': fields.many2many('stock.warehouse', 'stock_wh_resupply_table', 'supplied_wh_id', 'supplier_wh_id', 'Resupply Warehouses'),
105- 'resupply_route_ids': fields.one2many('stock.location.route', 'supplied_wh_id', 'Resupply Routes'),
106- 'default_resupply_wh_id': fields.many2one('stock.warehouse', 'Default Resupply Warehouse'),
107+ 'resupply_route_ids': fields.one2many('stock.location.route', 'supplied_wh_id', 'Resupply Routes',
108+ help="Routes will be created for these resupply warehouses and you can select them on products and product categories"),
109+ 'default_resupply_wh_id': fields.many2one('stock.warehouse', 'Default Resupply Warehouse', help="Goods will always be resupplied from this warehouse"),
110 }
111
112 def onchange_filter_default_resupply_wh_id(self, cr, uid, ids, default_resupply_wh_id, resupply_wh_ids, context=None):
113
114=== modified file 'stock/stock_view.xml'
115--- stock/stock_view.xml 2014-04-22 09:20:18 +0000
116+++ stock/stock_view.xml 2014-04-23 16:25:45 +0000
117@@ -360,15 +360,26 @@
118 <field eval="'ir.actions.act_window,'+str(action5)" name="value"/>
119 </record>
120
121+ <record model="ir.actions.act_window" id="location_open_quants">
122+ <field name="context">{'search_default_productgroup': 1}</field>
123+ <field name="domain">[('location_id', 'child_of', active_ids)]</field>
124+ <field name="name">Quants</field>
125+ <field name="res_model">stock.quant</field>
126+ </record>
127+
128 <record id="view_location_form" model="ir.ui.view">
129 <field name="name">stock.location.form</field>
130 <field name="model">stock.location</field>
131 <field name="arch" type="xml">
132 <form string="Stock Location" version="7.0">
133+ <div class="oe_right oe_button_box" name="buttons">
134+ <button string="Inventory" name="%(location_open_quants)d" type="action"/>
135+ </div>
136 <label for="name" class="oe_edit_only"/>
137 <h1><field name="name"/></h1>
138 <label for="location_id" class="oe_edit_only"/>
139 <h2><field name="location_id"/></h2>
140+
141 <group>
142 <group string="Additional Information">
143 <field name="usage"/>
144@@ -1773,6 +1784,7 @@
145 <field name="name">Quants</field>
146 <field name="res_model">stock.quant</field>
147 </record>
148+
149 <!-->
150 <record model="ir.ui.view" id="product_template_form_view_procurement">
151 <field name="name">product.template.procurement</field>