Skip to Content
Menu
This question has been flagged
2 Replies
5103 Views

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
Discard
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.


Best Answer

Hi CHUNG WAI YAO,

You can use the unlink method.

Thanks.

Avatar
Discard
Related Posts Replies Views Activity
2
Aug 17
2804
12
Sep 22
43003
15
Sep 21
39713
2
Feb 21
2043
1
May 19
3308