← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 669545] Re: The connector import the blocked SO !

 

Hi,


I have worked hard on this one after talking with Sebastien Beau. According to our discussion, I change the patch to block not blocked SO from Magento to OpenERP, but canceled one instead.

Moreover, I also improve the "update_order" to allow the update status
in the 4 following cases:

a) A SO is made on the website, and set to "pending" because the payment
has not been made or validated

b) Importing the SO in OpenERP will result in a SO with the
need_to_update = True is the "Check if paid" checkbox is ticked on the
used payment method

Case 1:

The SO is update on the website and is canceled => It will cancel the SO
in OpenERP and remove the "need_to_update"

Case 2:

The SO is update on the website and is paid => It will run the process
as if the SO was just imported/created in OpenERP (creating the invoice
if asked for, making the payment if asked for, and so on..) and remove
the "need_to_update"

Case 3:

The SO is updated through OpeneRP and is canceld => It will canceled the
SO on the website

Case 4:

The SO is updated through OpeneRP and is confirmed => It will confirmed
the SO on the website and make it "processing"


So basically, we now have the possibility to completely handle the payment process from both side (openerp & magento) !

Pay also attention that I discover a bug with that in the OpenERP sales
workflow already reported here : https://bugs.launchpad.net/bugs/646224

This bug mark the SO as shipped in OpenERP when canceling a packing.
This result in an invoice generation if SO is set as "Invoice on Order
After Delivery". And then of course, the SO on magento will be invoiced
and that's not what we want, cause we probably cancel the packing to
cancel the SO !

If apply, this little patch make everything working fine according to my
tests cases. I'll be really happy to see this first interesting contribs
from me included in the connector.


Thanks for having a look,

Regards,

Joël

-- 
Blocked import on cancel SO and update SO status in OERP from magento and vis-versa
https://bugs.launchpad.net/bugs/669545
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in Magento Open ERP Connector: Confirmed

Bug description:
Hi,


When a SO is blocked because the payment process was cancel or because the credit card isn't valid, the SO is still imported trough the connector !!!

This is quite dangerous, cause nobody will see that. Even worst, if for your payment method you said validate the order, the order will be validated !

The result is a validated SO with delivery order that you'll ship, but you'll never receive the payment.

Here is a patch that allow to tic a box to ensure the blocked SO will never ever be imported into OpenERP. You will need to create a new SO. This SO, even if the state change, will remain only on the website.

The reason of this was that it is quite complexe to deal with state update between OERP & Magento, so I decided to do this this way.

By default, the comportement remain the same (box untic) so the blocked SO are imported !

Thanks to apply ASAP,

Regards,

Joël





References