xml - 将 href 与 span 标签连接起来
问题描述
我想知道如何将 href 标签与 span 连接起来,因为要生成的链接是连接这两个标签的结果
<a href='first part of link&mount=&'>
<span t-field="Second part of link" t-field-options="{'widget':'False'}"/>Clic here
</a>
解决方案
您不需要为此使用跨度来构建属性值。您可以使用 QWeb 属性格式来生成如下输出:
<a t-attf-href="{{base_url}}?mount={{amount_value}}">Clic here</a>
您可以在以下位置阅读有关它的信息:
https://www.odoo.com/documentation/11.0/reference/qweb.html#attributes
推荐阅读
- amazon-web-services - Terraform 数据 aws_lambda_function.existing 抛出错误:获取 Lambda 函数(MyLambda)时出错:ResourceNotFoundException:找不到函数
- c - 从一个 fork 进程中获得 3 个 Pid?
- python - 针对此错误在 GOOGLE Colab 中安装软件包的最有效方法是什么?
- sql - Database.Log not logging appended SQL from interceptor in Entity Framework
- php - 如何双重加入sql查询?
- python - PyOpengl:更改 gluPerspective 变量会使立方体闪烁
- php - facebook/php-webdriver flickFromElement W3C 错误
- angular - 必须做什么才能在离开组件时销毁 ngAfterViewInit 初始化?
- python - 将货币格式的字符串转换为保持美分、点分隔数据框的浮点数
- python - Django如何将用户配置文件模型与评论模型连接以显示来自用户配置文件的数据?