Here I want inherit and replace a inherited template in a separate folder and its located in addons/survey/views/survey_templates.xml, In the inherited code I want to replace the "Start Survey" -----> ""
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
Hello Anyayuu,
Hope you are doing well.
You can inherit the survey template like below.
Also you can inherit other template like this where 'id' is your id,'inherit_id' is your template id which you want inherit, where you need to mention 'module_name.template_id'.
Your xpath path should be the ref which you want to replace the position with, here in our ref code the button with start is replaced with the other custom code.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
Here is the code :-
<template id="survey_fill_form_start_inherit" inherit_id="survey.survey_fill_form_start"
name="Survey Fill Form Start Inherit">
<xpath expr="//div[hasclass('o_survey_start')]//div//button[@value='start']" position="replace">
<button type="submit" value="start" class="btn btn-primary btn-md" >
<t t-if="survey.certification">
Start Certification
</t>
<t t-else="">
Start your_survey_name
</t>
</button>
</xpath>
</template>
Hello Anyauu
Please check this link will help you odoo.com/forum/help-1/odoo10-how-to-inherit-templates-of-web-module-119140
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
2
ต.ค. 24
|
697 | ||
|
1
ส.ค. 24
|
1241 | ||
|
1
มี.ค. 24
|
993 | ||
|
18
ธ.ค. 22
|
36154 | ||
|
2
ธ.ค. 22
|
31545 |