← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 745045] [NEW] base_sale_multichannels: base.sale.payment.type multiple matches

 

Public bug reported:

Hi,

This bug concerns the module base_sale_multichannels in extra-addons, so
I'm not sure if I better have to report the bug here or on openobject-
addons. Please tell me if I have to report on extra-addons next time.

The payment codes in base.sale.payment.type are a list of codes
separated by a ; like "ccsave;free".

There is a method payment_code_to_payment_settings in the sale.order
class which searches and returns the right object of
base.sale.payment.type according to the payment_code given by magento.

The search is basically a "ilike" on the name, that's efficient and
works perfect with most of cases.

But it can happen that you have one payment settings "bank" and one
"bankcr" for example (we have this issue).

The method returns the first found, so it can return the settings of
"bankcr" instead of "bank".

I just added a few lines in that method which search the exact match
when many rows are found with the "ilike".

The attached patch is for extra-addons V5. But if you agree with my fix,
I can give you a patch for V6 or apply them myself to both extra-addons
v5 and v6. Just confirm me that's ok for you.

Thanks
Guewen

** Affects: magentoerpconnect
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/745045

Title:
  base_sale_multichannels: base.sale.payment.type multiple matches

Status in Magento Open ERP Connector:
  New

Bug description:
  Hi,

  This bug concerns the module base_sale_multichannels in extra-addons,
  so I'm not sure if I better have to report the bug here or on
  openobject-addons. Please tell me if I have to report on extra-addons
  next time.

  The payment codes in base.sale.payment.type are a list of codes
  separated by a ; like "ccsave;free".

  There is a method payment_code_to_payment_settings in the sale.order
  class which searches and returns the right object of
  base.sale.payment.type according to the payment_code given by magento.

  The search is basically a "ilike" on the name, that's efficient and
  works perfect with most of cases.

  But it can happen that you have one payment settings "bank" and one
  "bankcr" for example (we have this issue).

  The method returns the first found, so it can return the settings of
  "bankcr" instead of "bank".

  I just added a few lines in that method which search the exact match
  when many rows are found with the "ilike".

  The attached patch is for extra-addons V5. But if you agree with my
  fix, I can give you a patch for V6 or apply them myself to both extra-
  addons v5 and v6. Just confirm me that's ok for you.

  Thanks
  Guewen



Follow ups

References