odoo-13

How to create a custom template for the website navigation odoo 13

蓝咒 提交于 2020-08-09 07:20:05
问题 How to create a custom odoo walker for the website navbar Similar to what Wordpress allows to create a html template which them odoo uses to add the menus so I can design the navigation <nav> <div class="logo"></div> <ul> <!-- odoo menu items---> <!-- formatting---> <!-- <li class="nav-item"><a href="$link"> $name </a></li>---> </ul> <div> <ul> <li><a href="$myaccount_link">$name</a></li> <li><a href="$logout_link"> $name</a></li> </ul> </div> </nav> Is there a similar function in odoo if not

how to display binary field data in website using a controller odoo 13

99封情书 提交于 2020-07-23 06:45:29
问题 I was creating a controller to gets information from custom module and wonted to display the pdf or image on the website how to get the url. I was able to download it using this return http.send_file(maybefiel, filename='sdsdds', as_attachment=False) but I wonted to display it can you please help 回答1: You can access a binary field using the following path: your_url/web/content/model_name/id/field_name For example, the field name of a user's profile picture is called " image ", so, the URL

how to display binary field data in website using a controller odoo 13

半城伤御伤魂 提交于 2020-07-23 06:43:48
问题 I was creating a controller to gets information from custom module and wonted to display the pdf or image on the website how to get the url. I was able to download it using this return http.send_file(maybefiel, filename='sdsdds', as_attachment=False) but I wonted to display it can you please help 回答1: You can access a binary field using the following path: your_url/web/content/model_name/id/field_name For example, the field name of a user's profile picture is called " image ", so, the URL

How to load css based on group odoo 13

落花浮王杯 提交于 2020-06-28 05:32:09
问题 I want to load a different stylesheet based on user group (or if possible user selected company company) This is my code <odoo> <template id="id" name="your name" inherit_id="website.assets_backend"> <xpath expr="." position="inside"> <attribute name="attrs">{'invisible': 1}</attribute> <link href="/n_hesaby_subscription_manager/static/src/css/style.css" rel="stylesheet" type="text/css"/> </xpath> </template> </odoo> Thank you for your help can the file be scss 来源: https://stackoverflow.com

About dbfilter not catching the correct database on Odoo 13

瘦欲@ 提交于 2020-04-30 10:08:19
问题 I have example.com site that is now subdomain.example.com (had been renamed to that subdomain) On my odoo config file I have: dbfilter = ^%d$ The database name is example . As far as I know, that should still catch the database but seems that I can't access the site. Not sure if it's an odoo issue or if I'm missing something on my nginx configuration wich is this: https://pastebin.com/KJxbJPKz (this used to work when the site was named example.com, I made the corresponding changes) I'm

About dbfilter not catching the correct database on Odoo 13

穿精又带淫゛_ 提交于 2020-04-30 10:07:19
问题 I have example.com site that is now subdomain.example.com (had been renamed to that subdomain) On my odoo config file I have: dbfilter = ^%d$ The database name is example . As far as I know, that should still catch the database but seems that I can't access the site. Not sure if it's an odoo issue or if I'm missing something on my nginx configuration wich is this: https://pastebin.com/KJxbJPKz (this used to work when the site was named example.com, I made the corresponding changes) I'm

Validation on export data for one2many field column in Odoo 13

自闭症网瘾萝莉.ら 提交于 2020-04-15 22:43:57
问题 I want to show validation error when the user export records for state='draft'(in one2many field). I have done code for it and it's working fine. but when I put this code for one2many table then I unable to get a validation message. My code is below: class DailyTransaction(models.Model): _name = 'daily.transaction' _rec_name = 'batch_id' date = fields.Date() batch_id = fields.Char() daily_transaction = fields.One2many('transaction.log', 'daily_trans_log', string='Daily Transaction') class

Validation on export data for one2many field column in Odoo 13

非 Y 不嫁゛ 提交于 2020-04-15 22:41:28
问题 I want to show validation error when the user export records for state='draft'(in one2many field). I have done code for it and it's working fine. but when I put this code for one2many table then I unable to get a validation message. My code is below: class DailyTransaction(models.Model): _name = 'daily.transaction' _rec_name = 'batch_id' date = fields.Date() batch_id = fields.Char() daily_transaction = fields.One2many('transaction.log', 'daily_trans_log', string='Daily Transaction') class