تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
1425 أدوات العرض

Hi All,

I'm trying to inject a widget after the product price what i have done is 

1- adding the depends in the : __manifest__.py

'depends': ['base' , 'payment','website_sale'],

2- Register "template.xml"  inside the above file 

3- Adding the below code to the "template.xml"









This is the code














The  expected result: Seeing the widget under the price of the product 

The actual result: nothing is changing although the file is loaded successfully 

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

The code is already with the question, could you please check from the inspect, for some reason i can't post the code with normal text 


الصورة الرمزية
إهمال
الكاتب

<!--<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="payment_product_widget" inherit_id="website_sale.product_price" customize_show="True" >
<xpath expr="//div//h3[hasclass('css_editable_mode_hidden')]" position="after">
<div class="custom-widget">
<h1>Asma</h1>
</div>
</xpath>
</template>
</data>
</odoo>-->

الكاتب

Could you please check my comment and reply it's very urgent

أفضل إجابة

It seems like you’re on the right track with adding the dependencies in the __manifest__.py file and registering your template.xml file. However, without seeing the exact code you’ve added to template.xml, it’s a bit difficult to diagnose the issue.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
ديسمبر 22
22979
Qweb Inheritance تم الحل
3
نوفمبر 19
7826
0
أكتوبر 22
3462
2
ديسمبر 21
22480
1
سبتمبر 20
7549