Merge lp:~camptocamp/e-commerce-addons/7.0-sale_payment_method-incompatible-args into lp:~extra-addons-commiter/e-commerce-addons/7.0

Proposed by Guewen Baconnier @ Camptocamp
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp
Approved revision: 289
Merged at revision: 289
Proposed branch: lp:~camptocamp/e-commerce-addons/7.0-sale_payment_method-incompatible-args
Merge into: lp:~extra-addons-commiter/e-commerce-addons/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
sale_payment_method/sale.py (+1/-1)
To merge this branch: bzr merge lp:~camptocamp/e-commerce-addons/7.0-sale_payment_method-incompatible-args
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp code review, no tests Approve
Nicolas Bessi - Camptocamp (community) no test, code review Approve
Leonardo Pistone code review Approve
Review via email: mp+201585@code.launchpad.net

Description of the change

The 'description' argument has been added [0] recently in the method and is optional in the body of the method (fallback to self._get_payment_move_name when not defined).
Thus, I propose to make it optional, avoiding errors in code using the previous version of the signature (without description).

The method "automatic_payment" itself in this module is broken because it does not give a description.

[0] <email address hidden>

To post a comment you must log in.
Revision history for this message
Leonardo Pistone (lepistone) wrote :

LGTM

review: Approve (code review)
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

LGTM

review: Approve (no test, code review)
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

LGTM

review: Approve (code review, no tests)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_payment_method/sale.py'
2--- sale_payment_method/sale.py 2013-09-01 16:28:01 +0000
3+++ sale_payment_method/sale.py 2014-01-14 12:57:29 +0000
4@@ -149,7 +149,7 @@
5 self._add_payment(cr, uid, sale, journal, amount, date, description, context=context)
6 return True
7
8- def _add_payment(self, cr, uid, sale, journal, amount, date, description, context=None):
9+ def _add_payment(self, cr, uid, sale, journal, amount, date, description=None, context=None):
10 """ Generate move lines entries to pay the sale order. """
11 move_obj = self.pool.get('account.move')
12 period_obj = self.pool.get('account.period')

Subscribers

People subscribed via source and target branches