Merge lp:~openerp-dev/openobject-addons/trunk-bug-1122461-cha into lp:openobject-addons

Proposed by Ajay Chauhan(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1122461-cha
Merge into: lp:openobject-addons
Diff against target: 46 lines (+6/-6)
2 files modified
stock/stock.py (+3/-3)
stock/stock_view.xml (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1122461-cha
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+159815@code.launchpad.net

Description of the change

Hello,

  I have solved bug: https://bugs.launchpad.net/openobject-addons/+bug/1122461
The issue is that is is possible to edit packs even when stock move hase been done.

Thanks,
Ajay Chauhan(CHA)

To post a comment you must log in.

Unmerged revisions

8687. By Ajay Chauhan(OpenERP)

[FIX] stock: solve issue that packaging edition can be done when product is recieved

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2013-04-15 10:23:49 +0000
3+++ stock/stock.py 2013-04-19 12:55:30 +0000
4@@ -1588,7 +1588,7 @@
5 return True
6
7 _columns = {
8- 'name': fields.char('Description', required=True, select=True),
9+ 'name': fields.char('Description', required=True, select=True, states={'done': [('readonly', True)]}),
10 'priority': fields.selection([('0', 'Not urgent'), ('1', 'Urgent')], 'Priority'),
11 'create_date': fields.datetime('Creation Date', readonly=True, select=True),
12 'date': fields.datetime('Date', required=True, select=True, help="Move date: scheduled date until move is done, then date of actual move processing", states={'done': [('readonly', True)]}),
13@@ -1640,11 +1640,11 @@
14 'price_currency_id': fields.many2one('res.currency', 'Currency for average price', help="Technical field used to record the currency chosen by the user during a picking confirmation (when average price costing method is used)"),
15 'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
16 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Order of", select=True),
17- 'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Source", store=True),
18+ 'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Source", store=True, states={'done': [('readonly', True)]}),
19
20 # used for colors in tree views:
21 'scrapped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scrapped', readonly=True),
22- 'type': fields.related('picking_id', 'type', type='selection', selection=[('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], string='Shipping Type'),
23+ 'type': fields.related('picking_id', 'type', type='selection', selection=[('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], string='Shipping Type', states={'done': [('readonly', True)]}),
24 }
25
26 def _check_location(self, cr, uid, ids, context=None):
27
28=== modified file 'stock/stock_view.xml'
29--- stock/stock_view.xml 2013-03-21 09:37:16 +0000
30+++ stock/stock_view.xml 2013-04-19 12:55:30 +0000
31@@ -1151,12 +1151,12 @@
32 <field name="tracking_id" groups="stock.group_tracking_lot"/>
33 <button name="setlast_tracking" string="Put in current pack" type="object"
34 groups="product.group_stock_packaging"
35- icon="terp-accessories-archiver" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
36- states="draft,assigned,confirmed,done"/>
37+ icon="terp-accessories-archiver"
38+ states="draft,assigned,confirmed"/>
39 <button name="%(split_into)d" string="Put in a new pack" type="action"
40 groups="product.group_stock_packaging"
41 icon="terp-accessories-archiver+"
42- states="draft,assigned,confirmed,done"/>
43+ states="draft,assigned,confirmed"/>
44 <field name="location_id" groups="stock.group_locations"/>
45 <field name="location_dest_id" groups="stock.group_locations"/>
46 <field name="date" groups="base.group_no_one"/>

Subscribers

People subscribed via source and target branches

to all changes: