Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

div tags must terminate

By
Elliot Mitchell
on 10/7/15, 11:52 AM 479 views

What I'm trying to achieve is having margin on my home page. 

What I've tried to do is have a module/theme input a <div class="wrapper"> and </div> in two different places with two different xpaths within one template. The wrapper class has a style.less file with some css in it which should add the margins for me. The problem/error I'm getting is that I can't have unclosed div tags in the xml as it causes an error in odoo. Is there a way around this or a better way of adding margins. 


# Came up with a solution:

Going in before any of the content and inserting a new div which is floating left. Do the same after your content but floating right. Set the sizes and backgrounds of these div's appropriately. Then go into the attributes of your the main content (I had oe_structure eo_empty) and give it a attribute of float middle. Its not ideal but it produces the same effect providing you can get the sizing right and responsive. 



2

Axel Mendoza

--Axel Mendoza--
10205
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 10/7/15, 1:11 PM

When you define an xpath is for select a node or a group of nodes, you don't select only the beginning or the end, it's the whole node. After a transformation is applied the new content is part of the view definition and need to be able to get parsed by lxml for others transformations on the nodes. So you need to provide the entire content of the new nodes to be a valid xml document. For add only attrs at the beginning of the tag there is a position attributes that solve this. For others situations positions inside, before, after or replace do the trick

0
Elliot Mitchell
On 10/8/15, 3:51 AM

ok, but the node that I would need to transform doesn't appear to exist as there is nothing wrapping or around the content. I can't even see a body tag on this page. 


If the node have content when is show in the page then there is a view that extends it for add the content and you could do the transformation in your node by extending the other view

Axel Mendoza
on 10/8/15, 11:12 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 10/7/15, 11:52 AM
Seen: 479 times
Last updated: 10/8/15, 7:55 AM