Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
6292 Zobrazení

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
Zrušit
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.


Nejlepší odpověď

Hi CHUNG WAI YAO,

You can use the unlink method.

Thanks.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
srp 17
4127
1
úno 25
1261
12
zář 22
45019
15
zář 21
41969
2
úno 21
3076