Hello,
i want to edit the names / breadcrumbs of the checkout steps of the e-commerce modul.
So far i found that the actual name for the display-name is from website_sale in the website.py file in line 606 with _lt('Delivery') but when i overwrite the Delivery translation with the .po file, it only changes the text displayed in the summary box on the checkout page.
Best regards
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
So the workaround was the following:
#imports
from odoo import models
from odoo.tools.translate import LazyTranslate
#make LazyTranslate callable as _lt
_lt = LazyTranslate(__name__)
#add functions
class Website(models.Model):
_inherit = 'website'
#overload functions
def _get_checkout_step_list(self):
#get the original data witih super
steps = super()._get_checkout_step_list()
for _, data in steps:
#Check Booking - Buchung Überprüfen
if 'name' in data and str(data['current_href']) == '/shop/cart':
data['name'] = _lt('Check Booking')
#Address - Adresse
if 'name' in data and str(data['current_href']) == '/shop/checkout':
data['name'] = _lt('Address')
# if 'name' in data and str(data['current_href']) == '/shop/payment':
# data['name'] = _lt('Check Booking')
return steps
with this and your own translations in the i18n folder you can rename the labels at the top