콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2471 화면

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?

아바타
취소
작성자

Forgot to mention this is for Odoo v 16

베스트 답변

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);

관련 게시물 답글 화면 활동
2
3월 17
6317
3
5월 25
1902
1
4월 25
1434
3
9월 24
14398
1
9월 24
4490