Technical архів поштової розсилки

technical@mail.odoo.com

Аватар

Re: Call function method from code (odoo 11)

від
tarachand16
- 02.08.2019 22:30:10

Hi,


If you are creating new record or editing any existing record, in this case if you are hitting any button then first record will create or update, after than only than your method will execute, this is general behavior. You can trace the same by adding print statement inside your all methods.

I think error is something else.

If you share video of your issue, then I can solve your problem.

I hope my explanation is understandable.


On Sat, Aug 3, 2019 at 3:00 AM, Gastón Pablo Pérez
<gpperez@gmail.com> wrote:
Hi!

I have a button that calls a method, so I need to call this method from code but, when I click the button odoo saves the record before de method execution. When I execute the method directly from the code odoo not saves the record, so I get an error because the record is not saved.

How can I call the save funcion before a method execution? In both cases, create or write. Is there any "save" function? or... How can I execute a button click from code?

thanks!

_______________________________________________
Mailing-List: https://www.odoo.com/groups/technical-62
Post to: mailto:technical@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

Референс