Been trying to get the content of an html field printed but it always has
tags included.
have tried several options including t-out, field etc
props.partner.comment" t-options='{"widget": "html"}'/>
Can anyone help?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Been trying to get the content of an html field printed but it always has
tags included.
have tried several options including t-out, field etc
props.partner.comment" t-options='{"widget": "html"}'/>
Can anyone help?
Hi,
Try like below
set const { markup } = owl;
set props.partner.comment = markup(props.partner.comment)
now using t-out will print content without the tags
Regards
Where or how do I add this?
I added it to my js files as follows but I'm not sure if I did it correctly as I'm still seeing the tags
/** @odoo-module */
import { PosGlobalState} from 'point_of_sale.models';
import Registries from 'point_of_sale.Registries';
const { markup } = owl;
const ACCPosGlobalState = (PosGlobalState) => class ACCPosGlobalState extends PosGlobalState {
async _processData(loadedData) {
await super._processData(...arguments);
this.x_studio_acc_num = loadedData['res.partner'];
console.log(this.x_studio_acc_num)
this.comment = loadedData['res.partner'];
this.comment = markup(this.comment);
console.log(this.comment)
}
}
Registries.Model.extend(PosGlobalState, ACCPosGlobalState);
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 3 17
|
6256 | ||
|
3
thg 5 25
|
1682 | ||
|
1
thg 4 25
|
1268 | ||
one2one relational field
Đã xử lý
|
|
3
thg 9 24
|
14153 | |
|
1
thg 9 24
|
4374 |
Forgot to mention this is for Odoo v 16