Merge lp:~pedro.baeza/ocb-addons/7.0-fix-1258237 into lp:ocb-addons

Proposed by Pedro Manuel Baeza
Status: Merged
Approved by: Holger Brunn (Therp)
Approved revision: no longer in the source branch.
Merged at revision: 9956
Proposed branch: lp:~pedro.baeza/ocb-addons/7.0-fix-1258237
Merge into: lp:ocb-addons
Diff against target: 23 lines (+2/-3)
1 file modified
account_asset/account_asset.py (+2/-3)
To merge this branch: bzr merge lp:~pedro.baeza/ocb-addons/7.0-fix-1258237
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Stefan Rijnhart (Opener) Approve
xavi (community) Approve
Guewen Baconnier @ Camptocamp Needs Information
Review via email: mp+197939@code.launchpad.net

Description of the change

Fix for the bug #1258237. All the details in the bug.

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Has a similar merge been proposed upstream? I can't find one.

review: Needs Information
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

No, it hasn't, because I suppose that OpenERP is going to reject it (due to bug policy).

Revision history for this message
xavi (xgilest) :
review: Approve
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

@Pedro, I think Guewen means: proposed to trunk, not 7.0. This should not be limited by the bug policy. Or does the issue not apply to trunk anymore?

review: Needs Information
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Well, I put the corresponding patch in the bug report, because OpenERP never use foreign branches for MPs, and they get older very soon, so I think that it's the best way to get the fix patched on trunk/v7, don't you think?

Regards.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Oh I see, there is a patch. Still, I have the impression that MPs are the preferred format and it's an explicit requirement of OCB that such a branch be submitted to upstream OpenERP. Setting to 'Needs fixing' for that reason.

And they do merge branches sometimes, just not often enough (otherwise we would not be here).

review: Needs Fixing
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Stefan, I have made then two MPs: one for v7 and another for trunk.

Regards.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks! You don't actually need to make two proposals, especially because the one on 7.0 will likely merge cleanly on trunk.

review: Approve
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_asset/account_asset.py'
2--- account_asset/account_asset.py 2012-10-23 16:05:04 +0000
3+++ account_asset/account_asset.py 2013-12-05 17:54:55 +0000
4@@ -181,7 +181,7 @@
5 'amount': amount,
6 'asset_id': asset.id,
7 'sequence': i,
8- 'name': str(asset.id) +'/' + str(i),
9+ 'name': "%s/%s" %(i, undone_dotation_number),
10 'remaining_value': residual_amount,
11 'depreciated_value': (asset.purchase_value - asset.salvage_value) - (residual_amount + amount),
12 'depreciation_date': depreciation_date.strftime('%Y-%m-%d'),
13@@ -410,9 +410,8 @@
14 asset_name = line.asset_id.name
15 reference = line.name
16 move_vals = {
17- 'name': asset_name,
18 'date': depreciation_date,
19- 'ref': reference,
20+ 'ref': "%s %s" %(line.asset_id.code or line.asset_id.name, line.name),
21 'period_id': period_ids and period_ids[0] or False,
22 'journal_id': line.asset_id.category_id.journal_id.id,
23 }