Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

Dangerous Issue that needs addressing

By
tim diamond
on 5/26/15, 1:57 PM 545 views

Hi Community.  I recently found an issue that is present in Odoo version 7 and 8, that can be easily seen watching the below video:

https://www.youtube.com/watch?v=G4MH7wO7dfg&feature=youtu.be

The problem arises when we have a parent record with a one2many, and an object button.  When a one2many field is edited, and we hit the object button (without hitting save) the  process as I can see is:

1) parent object tries to save itself

2) this triggers the one2many record to be created on the server

3) this returns sucessfully

4) client issues the command to execute the object button

The problem here is, what happens when the object button returns an error?

When the object button returns an error, the client still thinks that the one2many record is NEW.  However, it has already created on the server side.  Thus, more and more clicks on the object button will create a new one2many record every single time (and the user only has the feedback of the warning / error, with NO knowledge of any actually writing taking place)

Another way I have reproduced this issue is the following:

Parent object has a one2many with an another object that itself has a one to many.

1) edit parent object

2) edit already created record on the one2many (must be a pop-up form view)

3) add new record to this object's one2many (can be inline)

4) hit save

5) BEFORE hitting save on parent record, hit an object button on the tree view of the one2many.  The button will be available for selection, because remember, we did not add a new record, we edited an existing one.

6) if all goes well, nothing is returned, and the client form is not updated

7) hit a few more times

8) save parent record

After those steps, the one2many of the object of the one2many on the parent will have been created multiple times (once for every button press that did not update the client form).

This issue was posted on github in early March.  Please, can the community help in making this issue heard?  I see it as a huge problem for the integrity of the system. 

https://github.com/odoo/odoo/issues/5629

This is really dangerous; it must be given priority

OdooTec, Hesham ELMAHDY
on 5/26/15, 7:41 PM
0
tim diamond
On 5/26/15, 7:56 PM

My team worked on a possible patch today:

http://pastebin.com/m896eGXB

Could someone from the core team take a look at this?

This is a USER to USER forum. Odoo participates on an ad-hoc and volunteer basis. Posting here is not a good way to get information to the developers. To get their attention (preferred method), fork the repository, sign the CLA and create a pull request for them to review. Forking: https://help.github.com/articles/fork-a-repo/ Signing the CLA: https://github.com/odoo/odoo/blob/8.0/doc/cla/sign-cla.md Pull request: https://help.github.com/articles/using-pull-requests/ (another method) report a bug - https://github.com/odoo/odoo/issues

Bista Solutions US, Ray Carnes
on 5/26/15, 10:45 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 5/26/15, 1:57 PM
Seen: 545 times
Last updated: 5/27/15, 2:09 AM