跳至內容
選單
此問題已被標幟
1 回覆
5143 瀏覽次數

I have two custom modules, module_one and module_two

In module_one, I have a py file and xml which is inherit the res.confi.settings , I add a boolean field name: install_module in module_one which I will use to install and uninstall the module_two, 


The field is viewed in inventory>setting>operations(stock), I used odoo12


How can I achieve this? I saw that some of them use uninstall_hook or post_init_hook in the __init__ and also in manifest BUT i don't understand how to use these? any hints or guides?

頭像
捨棄
最佳答案

Hello,

Change your field name to module_your_module_name

Py

module_your_module_name = fields.Boolean(string='Your Module Name')

XML

<field name="module_your_module_name" widget="upgrade_boolean"/>


Thanks & Regards

Avinash N K

頭像
捨棄
作者

Dear Avinash NK,

Sir, you're a life savior, the problem has been solved. Thank u so much.

Instead of posting your thanks as a comment, please upvote the answer and check it as answered.

作者

How can I upvote it? Need a karma? I only have little on it.

相關帖文 回覆 瀏覽次數 活動
2
3月 16
5898
1
3月 24
1421
2
5月 21
9458
2
7月 20
4186
1
1月 20
2697