Merge lp:~openerp-dev/openobject-addons/7.0-opw-607347-rha into lp:openobject-addons/7.0

Proposed by Rifakat Husen (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-607347-rha
Merge into: lp:openobject-addons/7.0
Diff against target: 19 lines (+1/-2)
1 file modified
stock/stock.py (+1/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-607347-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+219636@code.launchpad.net

Description of the change

Changing product on the saved (draft)stock movement should also change the product description, while currently it changes the description on changing product for Unsaved stock movement only.

Problem:
- create a delivery/incoming order
- create new stock movement, choose any product, save.
- Description field is invisible on this view, so you gotta check it from Stock Moves menu
- checking this same stock movement from menu "Warehouse/Traceability/Stock Moves" would show right product and description for that.
- come back to draft delivery order, change the product, save.
- check the same stock movement from menu Stock Moves. The Description field would not be updated.

Solution:
Updated Description field for the product on_change.

To post a comment you must log in.

Unmerged revisions

10034. By Rifakat Husen (OpenERP)

[FIX] stock: product description should be updated on the saved stock movement too,
while currently it's only updated on the unsaved

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 2014-04-29 14:53:32 +0000
3+++ stock/stock.py 2014-05-15 05:48:25 +0000
4@@ -1948,14 +1948,13 @@
5 product = self.pool.get('product.product').browse(cr, uid, [prod_id], context=ctx)[0]
6 uos_id = product.uos_id and product.uos_id.id or False
7 result = {
8+ 'name': product.partner_ref,
9 'product_uom': product.uom_id.id,
10 'product_uos': uos_id,
11 'product_qty': 1.00,
12 'product_uos_qty' : self.pool.get('stock.move').onchange_quantity(cr, uid, ids, prod_id, 1.00, product.uom_id.id, uos_id)['value']['product_uos_qty'],
13 'prodlot_id' : False,
14 }
15- if not ids:
16- result['name'] = product.partner_ref
17 if loc_id:
18 result['location_id'] = loc_id
19 if loc_dest_id: