Incorrect discount amount applied on orders

Bug #1201590 reported by Brendan Clune (Logic Supply) on 2013-07-15
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenERP Connector - Magento

Bug Description

The field 'discount_amount' that is provided by the Magento API is based on the order line and not the product. The connector currently multiplies this discount by the quantity on the order line, which causes an incorrect discount to be applied in OpenERP. A patch is attached.

Related branches

Supplied patch was still incorrect. Will provide an updated patch soon.

With the discount we have to be very cautious with the different possible cases: price including taxes or not including them particularly.

information type: Embargoed → Public
affects: openerp-connector → openerp-connector-magento
Thomas Rehn (thomas-rehn) wrote :

I think the problem can be solved by the enclosed patch. At least it seems to work for a configuration of Magento and OpenERP where prices include tax.

Hi Thomas,

I have checked your patch. It seems to be working.
I have tested a SO in combination of a 10€ fixed total discount and 3% discount per line.

Can you please get the actual branch and make your changes and do a merge proposal? Thanks!

Thomas Rehn (thomas-rehn) wrote :

Jan-Philipp, thanks for testing! I opened a merge request for the new fix.

Changed in openerp-connector-magento:
status: New → In Progress
Landis (larnold) wrote :

Got it.

apt-get install bzrtools
then load the patches into the folders they actually work on
bzr patch patchname.patch

Somehow one had "self installed" - not sure how, but I epect this is how I was getting "some data in".

  I did learn something. Back in business too.

Sorry for all the posts and possible duplicate list- emails.

Landis (larnold) wrote :

sorry wrongbranch post. I was studying this one. Please delete #7 and this #8

Changed in openerp-connector-magento:
status: In Progress → Fix Committed
Changed in openerp-connector-magento:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers