How To Set Colspan Value Dynamically In QWeb? - Odoo
Có thể bạn quan tâm
Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
How to set colspan value dynamically in qWeb?
Get notified when there's activity on this post
Subscribe FollowingThis question has been flagged
qweb 1 Reply 14636 ViewsHello there:
I am trying to make an HTML report using qWeb in Odoo. Table I have to print has variable columns, and those columns have variable colspan values, so I defined a method in Python in order to return the header and colspan of that columns. Method returns something like this:
OrderedDict({'header 1' : 6, 'header 2' : 6, 'header 3' : 2, 'resume' : 2})
In qWeb code I wrote this:
<td align="center" style="border:1px solid black;" colspan="<t t-esc='partial_value' />" ><b><t t-raw="partial" /></b></td>
The name of the column (the header) is printed successfully, but the colspan value is raising an exception (XMLSyntaxError: Unescaped '<' not allowed in attributes values). I also tried tag t using t-esc... It raised same error.
So, how to set colspan value dynamically?
Thanks.
-2 Add a comment DiscardTry this
<td align="center" style="border:1px solid black;" t-att-colspan="partial_value" />" ><b><t t-raw="partial" /></b></td>
4 Add a comment Discard@Sajin Aziz: Thank you very much, it worked!!!
Thank you very much Sajin Aziz, it help me in rowspan.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity |
---|---|---|---|
Tree line field shrinked/cut qweb | 0 Oct 24 | 141 | |
QWeb: use t-if to check birthday date Solved qweb | 1 Apr 24 | 993 | |
check if html.field is empty on Qweb report Solved qweb | 7 Sep 24 | 22544 | |
Strange behavior in QWeb template; content of <link> tag is added after the tag, not within qweb | 1 Mar 24 | 286 | |
Can I push my qweb template in one of my Odoo(Saas) qweb | 0 Feb 24 | 453 |
Odoo Experience on YouTube
1. Use the live chat to ask your questions. 2. The operator answers within a few minutes.
Watch nowTừ khóa » Html Colspan Dynamic
-
Dynamic Colspan - Php - Stack Overflow
-
ColSpan - Dynamic HTML: The Definitive Reference [Book] - O'Reilly
-
How To Deal With Table Colspans That May Change At Runtime - SitePoint
-
Dynamic Colspan / Colspan All Columns On Bootstrap Sample
-
How Can I Create Col Span Or Row Span On Dynamic Table.
-
Colspan On Dynamically Loaded Content — DataTables Forums
-
SO Qn: Create A Table With Colspan And An Dynamic ... - JSFiddle
-
Dynamic Colspan In Angular Code Example
-
Dynamic Colspans With Angular - CodePen
-
How To Dynamically Add Colspan To Different
In Table (Angular 4) How To Dynamically Add Colspan To Different Th In Table Angular 4
Js Method For Dynamically Modifying The Column Span Of Colspan ...
Building Dynamic Tables Cells And Specifying Colspan - Javascript
HTML DOM TableData ColSpan Property - W3Schools
Copyright © 2022 | Thiết Kế Truyền Hình Cáp Sông Thu