← Back to team overview

savoirfairelinux-openerp team mailing list archive

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

 

Guewen Baconnier @ Camptocamp has proposed merging lp:~camptocamp/e-commerce-addons/7.0-sale_payment_method-incompatible-args into lp:e-commerce-addons.

Requested reviews:
  extra-addons-commiter (extra-addons-commiter)

For more details, see:
https://code.launchpad.net/~camptocamp/e-commerce-addons/7.0-sale_payment_method-incompatible-args/+merge/201585

The 'description' argument has been added 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).
-- 
https://code.launchpad.net/~camptocamp/e-commerce-addons/7.0-sale_payment_method-incompatible-args/+merge/201585
Your team extra-addons-commiter is requested to review the proposed merge of lp:~camptocamp/e-commerce-addons/7.0-sale_payment_method-incompatible-args into lp:e-commerce-addons.
=== modified file 'sale_payment_method/sale.py'
--- sale_payment_method/sale.py	2013-09-01 16:28:01 +0000
+++ sale_payment_method/sale.py	2014-01-14 12:52:24 +0000
@@ -149,7 +149,7 @@
         self._add_payment(cr, uid, sale, journal, amount, date, description, context=context)
         return True
 
-    def _add_payment(self, cr, uid, sale, journal, amount, date, description, context=None):
+    def _add_payment(self, cr, uid, sale, journal, amount, date, description=None, context=None):
         """ Generate move lines entries to pay the sale order. """
         move_obj = self.pool.get('account.move')
         period_obj = self.pool.get('account.period')


Follow ups