Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
3333 Tampilan

Hi all,

I am using Odoo 17 and I would like to change the text in the Pay Now button that appears on the Confirm Order Page during the checkout process. I have seen some solutions about using translations (This does not work for me) and changing QWeb views (I cannot find this). I need help to be able to solve this

Avatar
Buang
Jawaban Terbai

Hi,

To change the text you need to extend the actual XML template of the button


1. First you need to locate the actual template from the addons

2. Inherit the template in your custom module

3. Replace the text of the button.

4. Run the module


Please refer to the below blog to get an idea of the inheritance of the XML Template

https://www.cybrosys.com/blog/an-overview-of-template-inheritance-in-odoo-16


Regards

Avatar
Buang
Jawaban Terbai

In Odoo, changing the text of the "Pay Now" button on the Confirm Order Page involves customizing the corresponding QWeb view. Here are the steps you can follow:

  1. Enable Developer Mode: Make sure you are in Developer Mode in your Odoo instance. You can do this by adding /web?debug at the end of your URL or by going to Settings > Activate the Developer Mode.
  2. Locate the QWeb View: Navigate to the sales module and open the order form that contains the "Pay Now" button. Once you are on the form, click on the "Debug" menu and select "Manage Views." Find the view related to the Confirm Order Page.
  3. Edit the QWeb View: In the "Manage Views" window, locate the QWeb view responsible for the Confirm Order Page. QWeb views are typically named with a pattern like sale.order.form or similar. Once you find the relevant view, click on it to open the QWeb view editor.
  4. Modify the Button Text: Inside the QWeb view editor, locate the XML code that corresponds to the "Pay Now" button. It might look something like this:
    xmlCopy code
    
    Change the string attribute to the desired text:
    xmlCopy code
    
  5. Save Changes: After modifying the QWeb view, save your changes. You may need to refresh the page or restart the Odoo instance to see the updated button text.
  6. Clear Browser Cache: Sometimes, changes may not reflect immediately due to browser caching. Clear your browser cache and refresh the page to see the updated button text.

If you cannot find the specific QWeb view or encounter difficulties, it's possible that the view is defined in a custom module or an add-on module. In such cases, you might need to check those modules for the QWeb view.

Remember to make backups before making changes, especially if you're not familiar with the Odoo development environment, to avoid any unintentional issues.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Nov 19
4313
2
Jan 25
5550
2
Feb 24
2114
0
Feb 24
1127
2
Jan 19
3327