Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5120 มุมมอง

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 16
5882
1
มี.ค. 24
1413
2
พ.ค. 21
9451
2
ก.ค. 20
4180
1
ม.ค. 20
2690