Better discount coupons handling

Bug #687253 reported by Guewen Baconnier @ Camptocamp
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
Fix Released
Medium
Unassigned

Bug Description

Hello,

Currently to manage the discount coupons, the connector adds a discount on each order line to have the same discount distributed between each lines.
I figure this is not the best solution because it skews the average product price, it's strange on the invoice, and maybe it can lead to rounding errors.

Sharoon Thomas has developed a improved discount coupons management (branch lp:~openlabs-akretion-consortium/magentoerpconnect/improved_discount_n_address) but it has never been merged with the main.

Technically, it adds a new line in the order with the amount of the discount coupon (the same way as the shipping).

I hope this could be merged with the main branch, also I have created a patch (v.5) with the discount coupons enhancements of Sharoon Thomas with small corrections (a discount line was created with a 0.0 price when no discount).

Thanks
Guewen

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Sorry, here is the good version of the patch.

Changed in magentoerpconnect:
importance: Undecided → Medium
Revision history for this message
Kyle Waid (midwest) wrote :

Is the patch integrated? If so please close this bug

Changed in magentoerpconnect:
status: New → Fix Released
Revision history for this message
Thierry (tboulogne) wrote :

Hello,

Concerning this, the connector add :

1/ A discount on each line
Note : there is a rounding problem. A discount of 5.30 % in magento become 5.28 % into Openerp
Then the total amount is now false.

2/ A coupon code line with amount of reduction.
Note : adding a line using a product 'DISCOUNT MAGENTO' make a problem in french accounting.
Usually, discount is not registred in french accounting, only net price after discount (discount on each line).
This supplementary line introduce needing of accounting record... if someone get

The total amount false again because (minus the amount of discount also applying on product)

Did someone get a patch ?

Thanks for help.

Regards,

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hello,

For the point 1), it seems that the discount mapping is missing in the merge because the discount should not be applied at line level

The mapping should be "mag_erp_soline_disc","magento1324","sale.model_sale_order_line","discount_amount","in","str","result=[('discount', 0.0)]",

I corrected the mapping.

What do you propose for the accounting part ?

Revision history for this message
Thierry (tboulogne) wrote :

Hello,

Accounting register net price, so the way of the point 1 seems the best for french accounting.

I try to find a way to apply a discount with a product like discount magento... noway without an account movement... :-(

Revision history for this message
Thierry (tboulogne) wrote :

Note :

I update to the new revision with you modif. It's same for point 1 :
A 5.30% in magento become, 5.28% in openerp
=> 1 cent more on the total amount = accounting problem for 1 cent :-).

Revision history for this message
Thierry (tboulogne) wrote :

Hello,

Concerning point 1, it was a rounding problem into magento. Some hack on the code solve the problem. reduction are equal into magento and openerp. BUT....

i get +1 cent on taxes into openerp.

Product price are ok, shipping ok.

Could someone help to solve this please.

Thanks :-).

Revision history for this message
Thierry (tboulogne) wrote :

Hello,

Rounding problem wasn't really solved into magento. Now it is, and prices (reduction and taxes) are correct into magento.

Regards,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.