odoo-8

How to auto login in Odoo's Web-module for res.user, not for res.partner?

北战南征 提交于 2020-05-12 07:18:10
问题 I am trying to login using token-based Auth, because we are using Odoo-web module in mobile-app. currently using GET-method url-passing approach which is "UNSECURE" on websites without SSL certificates and localhost-websites, as myurl.com?username=foo&password=bar How can I do that using Token based approach or passing credentials in POST-method, in Odoo-12? Edit 1: I found this authenticate() method in core-modules of odoo in http-controllers file and I am calling that only now, as: request

Disable a button based on CONDITION in Odoo?

二次信任 提交于 2020-04-11 13:56:28
问题 How can i add disabled class with attributes to field based on CONDITION? I tried as below methods, 1) <t t-if="product.qty_available <= 0"> <attribute name="class">btn btn-primary btn-lg mt8 js_check_product a-submit disabled</attribute> </t> 2) <attribute name="class" t-if="product.qty_available > 0">btn btn-primary btn-lg mt8 js_check_product a-submit disabled</attribute> 3) <attribute name="class" >product.qty_available > 0 and 'btn btn-primary btn-lg mt8 js_check_product a-submit' or

Disable a button based on CONDITION in Odoo?

倖福魔咒の 提交于 2020-04-11 13:55:36
问题 How can i add disabled class with attributes to field based on CONDITION? I tried as below methods, 1) <t t-if="product.qty_available <= 0"> <attribute name="class">btn btn-primary btn-lg mt8 js_check_product a-submit disabled</attribute> </t> 2) <attribute name="class" t-if="product.qty_available > 0">btn btn-primary btn-lg mt8 js_check_product a-submit disabled</attribute> 3) <attribute name="class" >product.qty_available > 0 and 'btn btn-primary btn-lg mt8 js_check_product a-submit' or

Disable a button based on CONDITION in Odoo?

霸气de小男生 提交于 2020-04-11 13:55:01
问题 How can i add disabled class with attributes to field based on CONDITION? I tried as below methods, 1) <t t-if="product.qty_available <= 0"> <attribute name="class">btn btn-primary btn-lg mt8 js_check_product a-submit disabled</attribute> </t> 2) <attribute name="class" t-if="product.qty_available > 0">btn btn-primary btn-lg mt8 js_check_product a-submit disabled</attribute> 3) <attribute name="class" >product.qty_available > 0 and 'btn btn-primary btn-lg mt8 js_check_product a-submit' or

How do I hide navbar and root-menu at sidebar from Odoo's web-backend module?

a 夏天 提交于 2020-02-29 10:09:09
问题 I am working on POS Point of sales module, I am opening an Iframe in mobile device to show POS screen but I wanted to hide navbar and sidebar of root-menu items, so normal users can use only POS dashboard. I have installed POS_Mobile snippet to make it responsive on mobile phones and there I tried writting JS code to hide it. but it's opening only when I start any POS-session by clicking on resume . I tried as: In file pos_mobile_template.xml , adding JQuery as: if ($(window).width() < 768) {

How do I hide navbar and root-menu at sidebar from Odoo's web-backend module?

拥有回忆 提交于 2020-02-29 10:08:07
问题 I am working on POS Point of sales module, I am opening an Iframe in mobile device to show POS screen but I wanted to hide navbar and sidebar of root-menu items, so normal users can use only POS dashboard. I have installed POS_Mobile snippet to make it responsive on mobile phones and there I tried writting JS code to hide it. but it's opening only when I start any POS-session by clicking on resume . I tried as: In file pos_mobile_template.xml , adding JQuery as: if ($(window).width() < 768) {

How do I hide navbar and root-menu at sidebar from Odoo's web-backend module?

戏子无情 提交于 2020-02-29 10:06:09
问题 I am working on POS Point of sales module, I am opening an Iframe in mobile device to show POS screen but I wanted to hide navbar and sidebar of root-menu items, so normal users can use only POS dashboard. I have installed POS_Mobile snippet to make it responsive on mobile phones and there I tried writting JS code to hide it. but it's opening only when I start any POS-session by clicking on resume . I tried as: In file pos_mobile_template.xml , adding JQuery as: if ($(window).width() < 768) {

Are Odoo rules working OK actually?

女生的网名这么多〃 提交于 2020-02-15 18:01:53
问题 MY PURPOSE I'm trying to use security rules to achieve the following purpose: I need to add in users model a field which will set which warehouses each user can modify. This is because I want to hide the stock moves you aren't allowed to see (stock moves of other warehouses). WHAT I DID I've created a Many2many field named allowed_warehouses in res.users model. From here, the administrator can select which warehouses can be used by each user. Then, I took advantage of the existing fields of