4

I am new to odoo, know only how to create and update modules and apps but have no idea about theming my modules

I have create my own app from scratch (depends on base only) and now I need to customize its look, something like changing colors, fonts and menus positions and behavior, all I have found while searching is to create a module based on website module and customize it, and frankly I have no idea how my module will get the changes I can made on the theme module?

I need step by step tutorial about this which is suite to what I know in Odoo

Mohamed Yousof
  • 725
  • 1
  • 9
  • 38

1 Answers1

3

For theme reference you can visit these Links:

This may help in your case.

Edited

Regarding : "how to get my normal menus and its elements represented in the website"

Below i am posting the code snippet for adding the menu in website:

<?xml version="1.0" encoding="utf-8"?> <openerp> <data noupdate="1"> <record id="menu_my_menu" model="website.menu"> <field name="name">MyMenu</field> <field name="url">/MyMenuControllerUrl</field> <field name="parent_id" ref="website.main_menu"/> <field name="sequence" type="int">20</field> </record> </data> </openerp>

Here /MyMenuControllerUrl is the url of controller which render your template .

I hope this may help you.

Prakash Kumar
  • 2,554
  • 2
  • 18
  • 28
  • I read the official doc but still wonder how to get my normal menus and its elements represented in the website? does the snippets will? how? – Mohamed Yousof Apr 18 '16 at 15:14
  • hi @Yousof i have posted the code snippet for adding menu – Prakash Kumar Apr 19 '16 at 04:54
  • @Parkash so far so good, but I meant with menu the menu item which opens a form view, so my question is how to link product menu item for example in the website so I can open it there?, remember that goal with this is just theming my module not to create a website, just style the module view and make it good looking – Mohamed Yousof Apr 19 '16 at 11:50
  • from the 'product menu item' you mean 'product category' ?? please explore your query (if possible share a image link also) – Prakash Kumar Apr 19 '16 at 12:04
  • https://i.imgsafe.org/14576e7.png in this pic you can find my module which has many menus with default theme I want to change its positions, colors, fonts, etc..., something like restyle it again and change its look according to my needs. – Mohamed Yousof Apr 19 '16 at 12:17
  • try these links: https://www.odoo.com/forum/help-1/question/how-to-change-existing-css-creating-a-new-module-46099 and http://stackoverflow.com/questions/32846826/how-to-add-css-files-to-a-custom-module-in-odoo-8 – Prakash Kumar Apr 19 '16 at 14:55
  • I am very glad with your efforts with me, actually I tried the links and server isn't open and generate error saying "ValueError: malformed string", I think it is because of different versions links are for v 8 and I am using v 9, if you can style your work thanks to give me guide how did you accomplish this – Mohamed Yousof Apr 19 '16 at 15:34
  • @Yousof the stack overflow link that i have shared is the working link ,In sort #1 Create a css file ,#2 Override the default class or define your custom class , #3 Place this style link in your xml (inherit_id="web.assets_backend") and #4 add the xml in __openerp__ – Prakash Kumar Apr 19 '16 at 15:55
  • 1- css created in static/src/css/spogaze.css, 2- css content is " .openerp .custom_style{ margin: 12px 0px 12px 0px; }" , 3- created xml file in views folder with the content according to link with the inherit statement and added to openerp file but still the same error – Mohamed Yousof Apr 19 '16 at 16:05
  • also used the class in form view this way "
    "
    – Mohamed Yousof Apr 19 '16 at 16:14
  • error is in your __openerp_.py file ,refer this link http://odoo-docs.readthedocs.org/en/latest/03_module_dev_01.html#manifest-file-openerp-py h – Prakash Kumar Apr 19 '16 at 16:54