I have an html field, and I want to set a default value this filed with in view
this is the python code:
payment_terms = fields.Html('Terms of Payment')
and this is the xml code
<field name=" payment_terms "/>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have an html field, and I want to set a default value this filed with in view
this is the python code:
payment_terms = fields.Html('Terms of Payment')
and this is the xml code
<field name=" payment_terms "/>
Hope it will be work
def _get_default_note(self):
result = """
<div>
<p class="terms">Payment terms are</p>
<ul><li>15% in advance</li><ul/>
</div>"""
return result
note = fields.Html(string='Description', required=True, default=_get_default_note)
what I need is to set the below html code as default:
<div>
<p class="terms">Payment terms are</p>
<ul><li>15% in advance</li><ul/>
</div>
Did you get any solution?
| 관련 게시물 | 답글 | 화면 | 활동 | |
|---|---|---|---|---|
|
1
2월 24
|
3227 | |||
|
7
7월 16
|
6917 | |||
|
0
11월 25
|
3283 | |||
|
0
10월 25
|
315 | |||
|
2
8월 25
|
1824 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.