odoo-12

Odoo 12 Mail notification

十年热恋 提交于 2020-06-29 04:09:25
问题 In Odoo 12 I am trying to get a mail 90 days prior (before) to expiry of subscription and automatically I have created a email template and function for this but iam not receiving any mails In py file: license_renewal_date = fields.Date("Renewal Date",track_visibility='onchange') def exp_date1(self): before_90_days = datetime.datetime.now().date()- datetime.timedelta(days = 90) exp_90days = self.env['(crm.lead.extended)'].search([('(license_renewal_date)','=',before_90_days)]) template = self

Odoo 12 Mail notification

时光总嘲笑我的痴心妄想 提交于 2020-06-29 04:09:05
问题 In Odoo 12 I am trying to get a mail 90 days prior (before) to expiry of subscription and automatically I have created a email template and function for this but iam not receiving any mails In py file: license_renewal_date = fields.Date("Renewal Date",track_visibility='onchange') def exp_date1(self): before_90_days = datetime.datetime.now().date()- datetime.timedelta(days = 90) exp_90days = self.env['(crm.lead.extended)'].search([('(license_renewal_date)','=',before_90_days)]) template = self

Odoo 12 can't start Custom Module - TypeError: unsupported operand type(s) for -: 'tuple' and 'datetime.timedelta'

拜拜、爱过 提交于 2020-06-17 13:12:06
问题 iam new to odoo what iam trying to do is , i want to minus datetime.timedelta(days = 90) that is 90 days from the license_renewal_date = (2021,6,6) how to do it , but when i try iam getting this below error before_90_days = datetime.datetime.now().date() - datetime.timedelta(days = 90) datetime.date(2020, 3, 11) license_renewal_date = (2021,6,6) exp_90_days = license_renewal_date - datetime.timedelta(days = 90) Error: Traceback (most recent call last): File "<stdin>", line 1, in <module>

problem accessing odoo from ubuntu terminal 18

独自空忆成欢 提交于 2020-05-28 04:50:27
问题 I'm trying to access odoo through commands but I get critical errors one is odoo.modules.module: Couldn't load module web odoo.modules.module: The 'odoo.addons.web' package was not installed in a way that PackageLoader understands. ERROR? odoo.service.server: Failed to load server-wide module web . so I can't access odoo with the command ./odoo-bin Do you know how I can solve the problem? 回答1: You must uninstall jinja2 and reinstalling with this version Jinja2==2.10.1 pip3 uninstall jinja2

fields does not exist error (working with odoo 12)

人走茶凉 提交于 2020-05-17 07:45:30
问题 i was trying to install a module but each time there is an error like this : Erreur: Odoo Server Error Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 12.0\server\odoo\models.py", line 1126, in _validate_fields check(self) File "c:\program files (x86)\odoo 12.0\server\odoo\addons\base\models\ir_ui_view.py", line 351, in _check_xml self.postprocess_and_fields(view.model, view_doc, view.id) File "c:\program files (x86)\odoo 12.0\server\odoo\addons\base\models\ir_ui_view.py"

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

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) {

How do i fix ValueError: dictionary update sequence element #0 has length 1; 2 is required odoo 12?

≯℡__Kan透↙ 提交于 2020-02-25 06:47:49
问题 I am trying to build a custom module and i have run into the following error, i added the models to 'depends':[] and ended up with KeyError: 'ir.actions.views' when i remove the models from the 'depends':[] , i get the error below: 2020-02-15 06:58:28,956 8372 ERROR mask_agro odoo.modules.registry: Failed to load registry Traceback (most recent call last): File "/opt/odoo/odoo/odoo/modules/registry.py", line 60, in __new__ return cls.registries[db_name] File "/opt/odoo/odoo/odoo/tools/func.py