Skip to content

Commit b03e17b

Browse files
stefanoriganoqsm-odoo
authored andcommitted
[FIX] theme_odoo_experts: fix "references" snippet paddings
The snippet was switched to grid mode in this theme but the padding classes on columns were not removed. Related to task-4373543 Part-of: #1054 Related: odoo/odoo#189299 Signed-off-by: Quentin Smetz (qsm) <[email protected]>
1 parent b2beaaf commit b03e17b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

test_themes/tests/test_new_page_templates.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def test_render_templates(self):
155155
self.assertGreater(len(view_ids), 1250, "Test should have encountered a lot of views")
156156
self.assertFalse(errors, "No error should have been collected")
157157

158+
# TODO should handle the fact that grid items can't have padding classes
158159
def test_render_applied_templates(self):
159160
View = self.env['ir.ui.view']
160161
errors = []

theme_odoo_experts/views/snippets/s_references.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,27 @@
1919

2020
<!-- Items -->
2121
<xpath expr="//div[hasclass('col-lg-2')]" position="attributes">
22-
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" separator=" "/>
22+
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" remove="pt16 pb16" separator=" "/>
2323
<attribute name="style" add="grid-area: 1 / 1 / 3 / 3; z-index: 1;" separator=";"/>
2424
</xpath>
2525
<xpath expr="(//div[hasclass('col-lg-2')])[2]" position="attributes">
26-
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" separator=" "/>
26+
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" remove="pt16 pb16" separator=" "/>
2727
<attribute name="style" add="grid-area: 1 / 3 / 3 / 5; z-index: 2;" separator=";"/>
2828
</xpath>
2929
<xpath expr="(//div[hasclass('col-lg-2')])[3]" position="attributes">
30-
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" separator=" "/>
30+
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" remove="pt16 pb16" separator=" "/>
3131
<attribute name="style" add="grid-area: 1 / 5 / 3 / 7; z-index: 3;" separator=";"/>
3232
</xpath>
3333
<xpath expr="(//div[hasclass('col-lg-2')])[4]" position="attributes">
34-
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" separator=" "/>
34+
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" remove="pt16 pb16" separator=" "/>
3535
<attribute name="style" add="grid-area: 1 / 7 / 3 / 9; z-index: 4;" separator=";"/>
3636
</xpath>
3737
<xpath expr="(//div[hasclass('col-lg-2')])[5]" position="attributes">
38-
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" separator=" "/>
38+
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" remove="pt16 pb16" separator=" "/>
3939
<attribute name="style" add="grid-area: 1 / 9 / 3 / 11; z-index: 5;" separator=";"/>
4040
</xpath>
4141
<xpath expr="(//div[hasclass('col-lg-2')])[6]" position="attributes">
42-
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" separator=" "/>
42+
<attribute name="class" add="o_grid_item g-col-lg-2 g-height-2 o_grid_item_image o_cc o_cc2" remove="pt16 pb16" separator=" "/>
4343
<attribute name="style" add="grid-area: 1 / 11 / 3 / 13; z-index: 6;" separator=";"/>
4444
</xpath>
4545
</template>

0 commit comments

Comments
 (0)