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

Some modules provide extra configuration options in the Settings -> Configuration panel.For example sale_stock provides a checkbox to allow the use of separate shipping and invoice addresses, but it is not checked by default.

When I create and install a custom module that depends on sale_stock I would also like the multiple addresses feature to be automatically enabled without needing to go to the configuration page to check the checkbox. Is it possible to do this from my own module?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Try to add next code in one xml:

        <record model="sale.config.settings" id="sale_config_settings_mymodule">

            <field name="group_sale_delivery_address" eval="1"/>

        </record>

        <function model="sale.config.settings" name="execute">

            <!-- ids = -->        <value eval="[ref('sale_config_settings_mymodule')]"/>

            <!-- context = -->    <value eval="{}"/>

        </function>

อวตาร
ละทิ้ง

Someone have to accept this answer, it's awesome !

Yes it works - very useful. I'd convert this to an answer if I had enough karma

Thanks, it's working.

ray carnes update res.config.settings

คำตอบที่ดีที่สุด

Dear Timo, https://github.com/cmorisse/base_module_record-for-OpenERP-7/ Is this the one that you are looking for ?

อวตาร
ละทิ้ง
ผู้เขียน

Thank you, that module provided some interesting information that will be useful later on. However it did not solve the original issue - it did successfully record some XML data to a new module, but installing this new module did not enable the required setting inside OpenERP.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ต.ค. 25
196
0
ต.ค. 25
270
3
ต.ค. 25
419
0
ต.ค. 25
260
0
ต.ค. 25
273