Contributors mailing list archives

contributors@odoo-community.org

Re: connector_ecommerce dependency in v9

by
Sodexis, Stephane Keller
- 21/03/2016 15:47:55
Guewen,
Personally I would be delighted if it could no longer be asynchronous :)
At the very origin of this addon, it was not and it had to be changed
due to some issues:

The reason for it to be asynchronous was only a workaround due to the
workflow and subworkflows which could not be stepped in the same
transaction:
https://github.com/OCA/sale-workflow/blob/1d28d0b146c874f3b0011634dbaedafaf22b3b97/sale_automatic_workflow/automatic_workflow_job.py#L31-L41

Regarding the exception handling, I think that an error would be
returned to the current user, as automated actions are executed
directly during the user's request.
I think asynchronous is somewhat better for the user experience, they don't have to wait, e.g. when processing credit cards it can take some time.  Coding might be easier too.
You are right about the exception handling  if done synchronously.  I was wondering what happen in the case the  option "based on timed condition" is used.
> Also once processed, you don't want the record to still be part of the
> original filter, because the system get all the record and then look at the
> time for each record.  So you don't want the number of records in the filter
> to grow over time.

It can probably be handled by the filter domains themselves (e.g.
ignore the 'draft' orders for the 'validate orders' action).
Yes, most of the time it is fine, but have to watch that one.  We are using it for sending emails, and you have to keep track of what email have been sent if you don't want to have that issue. 
I don't know if it happens in practice, nor if it can happen that
someone pays the amount partially.
I don't see that happening in practice.
Makes sense, that would do it for this use case I guess.
At this point we will start the work based on the suggestion I made, unless somebody object to it.
I think at the end the connector-ecommerce module would depend on sale_automatic_workflow and sale_exception and not sale_payment_method_automatic_workflow.  Hope it makes sense.

I have not heard back from Sebastien yet.

This is the right mailing list for this issue or should we submit somewhere else in your opinion?

Thanks,
Stephan.

--
Stephan Keller, Ph. D.
CEO Sodexis, Inc.
Orlando/Longwood, FL
www.sodexis.com
Odoo Certified Expert
http://www.linkedin.com/in/stephankellersodexis
Phone: (407) 278-4917
Cell: (407) 202-8998