Merge lp:~alhashash/openobject-addons/7.0-alhashash-bug1179705 into lp:openobject-addons/7.0

Proposed by Mohammad Alhashash
Status: Needs review
Proposed branch: lp:~alhashash/openobject-addons/7.0-alhashash-bug1179705
Merge into: lp:openobject-addons/7.0
Diff against target: 19 lines (+2/-0)
1 file modified
stock/stock.py (+2/-0)
To merge this branch: bzr merge lp:~alhashash/openobject-addons/7.0-alhashash-bug1179705
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+163656@code.launchpad.net

Description of the change

Fix stock.move._create_account_move_line() to include UoM to the valuation entry.

To post a comment you must log in.
Revision history for this message
Mohammad Alhashash (alhashash) wrote :

I used the conditional and/or pattern to be consistent with the surrounding code but I do not know why it is used! Null many2one fields return browse_null object which returns False for id attribute and None for other attributes.

Unmerged revisions

9115. By Mohammad Alhashash

Add UoM to stock valuation move lines. Bug lp:1179705

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-25 12:49:33 +0000
3+++ stock/stock.py 2013-05-14 07:50:36 +0000
4@@ -2399,6 +2399,7 @@
5 debit_line_vals = {
6 'name': move.name,
7 'product_id': move.product_id and move.product_id.id or False,
8+ 'product_uom_id': move.product_uom and move.product_uom.id or False,
9 'quantity': move.product_qty,
10 'ref': move.picking_id and move.picking_id.name or False,
11 'date': time.strftime('%Y-%m-%d'),
12@@ -2409,6 +2410,7 @@
13 credit_line_vals = {
14 'name': move.name,
15 'product_id': move.product_id and move.product_id.id or False,
16+ 'product_uom_id': move.product_uom and move.product_uom.id or False,
17 'quantity': move.product_qty,
18 'ref': move.picking_id and move.picking_id.name or False,
19 'date': time.strftime('%Y-%m-%d'),