Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
6295 Vistas

Hi, i am writing the delete/remove procurement_rules method of a warehouse in a custom module. I want to remove the existing/default values in my method. How can i do that. I seen the created method, will it be similar to turn them in remove? Thanks !

Avatar
Descartar
Hi Avinash Nk,

May you have a great day,

Thank you for your answer :)
Sorry about that I sent email to you here, it is because my Odoo not enough karma to write comment on your answer.

Wanna ask about your answer "You can use the unlink method.
I just learn to create value for an module, we logging.info in to the module, and then get session, then we define objective, then

    config = {}
    config['name'] = 'Warehouse A'
    config['sequence'] = 5
    wh_route_obj.create(config)

I tried to replace create to unlink, it seen like not working.
I think could be about must using query to do select first then only can do unlink method, do you know how to select the particular value to do unlink method? 

Sorry again because Im still newbie in Odoo system. 

Thanks and Regards,
Chung Wai Yao
"High curiosity boy without expect program developer skill"  

On 31 July 2017 at 11:37, Avinash Nk <avinashnk916@gmail.com> wrote:

A new answer on How to remove the values of an object in the method remove/delete ? has been posted. Click here to access the post :

See post

--
Avinash Nk


Sent by Odoo S.A. using Odoo.


Mejor respuesta

Hi CHUNG WAI YAO,

You can use the unlink method.

Thanks.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
ago 17
4138
1
feb 25
1265
12
sept 22
45030
15
sept 21
41980
2
feb 21
3081