odoo-11

How to call python function in jquery in odoo 11

懵懂的女人 提交于 2019-12-05 09:14:43
Python code: @api.model def test_method(self): a= 10 b = 20 c = a+b return c jQuery: var Model = require('web.Model'); $(document).ready(function() { var test_model = new Model("MyClass"); test_model.call("test_method").then(function(c) { console.log("res ult:" + JSON.stringify(result)); }); }); Error: Missing depends, The above code will is working in odoo 10 but not in odoo 11. I want to know how to call a python function from JS. in Odoo 11 you need to use var rpc = require('web.rpc'); instead of var Model = require('web.Model'); And later call a method using .query() method as below: rpc

How to connect or login with Odoo using c# code? And after connect with Odoo how to add custom field to Odoo database from c#?

时光总嘲笑我的痴心妄想 提交于 2019-12-04 14:31:44
I have to implement some code in c# for login with Odoo database and give the logged user id please have a look, [XmlRpcUrl("https://sample_db_name.dev.odoo.com")] public interface IOpenErpLogin : IXmlRpcProxy { [XmlRpcMethod("login")] int login(string dbName, string dbUser, string dbPwd); } But, it give error like "Bad Request". Also i'm not sure for XmlRpcUrl , have you any idea about what URL in to [XmlRpcUrl("")] ? 2) IOpenErpLogin.cs (Interface for login) [XmlRpcUrl("http://localhost:8069/xmlrpc/2/common")] public interface IOpenErpLogin : IXmlRpcProxy { [XmlRpcMethod("login")] int login

How to send an email from a button located in the action dropdown of an Odoo 11 form?

别说谁变了你拦得住时间么 提交于 2019-11-28 14:33:39
I am just a newbie in Odoo. I am creating a custom module for Odoo 11. I want to add a new link in hr.payslip in hr_payroll module . So when admin will navigate to an individual Payslip, in the action I want to add a new option called Email Payslip . When this is clicked, it will send an email to the employee. So to achieve this I have made my custom module named as email payslip. The code is like this: init .py from . import models manifest .py { 'name': 'Email Payslip', 'summary': """This module will send email with payslip""", 'version': '10.0.1.0.0', 'description': """This module will send

How to send an email from a button located in the action dropdown of an Odoo 11 form?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 08:45:08
问题 I am just a newbie in Odoo. I am creating a custom module for Odoo 11. I want to add a new link in hr.payslip in hr_payroll module . So when admin will navigate to an individual Payslip, in the action I want to add a new option called Email Payslip . When this is clicked, it will send an email to the employee. So to achieve this I have made my custom module named as email payslip. The code is like this: init .py from . import models manifest .py { 'name': 'Email Payslip', 'summary': """This