openerp

OpenERP Jasper Reports import external library

谁都会走 提交于 2021-02-17 05:15:47
问题 I use OpenERP with Jasper Report module. The problem is to get amount of generated pages in words. So I found the solution: import in iReport my own library in *.jar file and use some methods from it. But I get some problems. Аpparently, iReport's classpath to libraries didn't used in Jasper Reports in OpenERP and I always get 'Unable to resolve class' exception. I tryed to copy *.jar in 'jasper_reports/java/lib' folder, but it ineffectually. Maybe someone faced to this problem? And the

Set default values for One2many field

无人久伴 提交于 2021-02-08 10:18:23
问题 I have a class student_student which have a one2many field result_ids defined like the following: result_ids = fields.One2many("schoolresults.detail", "student_id", "School Results", default="_get_subjects") and def _get_subjects(self): cr = self.pool.cursor() self.env return self.pool.get('schoolresults.subject').search(cr, self.env.uid, []) in the other side I have a class schoolresults_subject : class schoolresults_subject(models.Model): _name = "schoolresults.subject" _description =

Odoo: ValueError: Invalid field 'user_id' in leaf

Deadly 提交于 2021-02-08 10:14:50
问题 I am trying to create rule, to limit users to see only their records in tree view in my module, but it gives me error that 'user_id' field doesn't exist... Heres my model: class help_desk(models.Model): _name = 'help_desk.help_desk' name = fields.Char(string="Title", required=True) number = fields.Char(string="Mobile", required=True) Here's the rule: <record model="ir.rule" id="per_user_rule"> <field name="name">User: see the individual Record</field> <field name="model_id" ref="model_help

OpenERP/Odoo: fields.datetime.now() show the date of the latest restart

懵懂的女人 提交于 2021-02-08 06:52:50
问题 I have a field datetime. This field should have by default the datetime of "now", the current time. However, the default date is the time of the lastest restart . Please find below my code: 'date_action': fields.datetime('Date current action', required=False, readonly=False, select=True), _defaults = { 'date_action': fields.datetime.now(), 回答1: You are setting the default value of date_action as the value returned by fields.datetime.now() , that is executed when odoo server is started. You

Login to Odoo from external php system

旧时模样 提交于 2021-02-07 10:15:45
问题 I have a requirement where I need to have a redirect from the external php system to Odoo, and the user should be logged in as well. I thought of the following two ways to get this done: A url redirection from the php side which calls a particular controller,and pass the credentials alongiwth the url, which is not a secure option for obvious reasons A call of method using xmlrpc from php, and pass the necessary arguments along from php, use the arguments to sign in and then in the method over

Login to Odoo from external php system

跟風遠走 提交于 2021-02-07 10:15:28
问题 I have a requirement where I need to have a redirect from the external php system to Odoo, and the user should be logged in as well. I thought of the following two ways to get this done: A url redirection from the php side which calls a particular controller,and pass the credentials alongiwth the url, which is not a secure option for obvious reasons A call of method using xmlrpc from php, and pass the necessary arguments along from php, use the arguments to sign in and then in the method over

ValueError: Expected singleton: - Odoo v8

ぃ、小莉子 提交于 2021-01-27 18:02:24
问题 I have this method, which should loop on a One2many object, but the actual loop isn't working, I mean, if I add just one line it works fine, but if I add more than one line, than it throws me the singleton error: @api.multi @api.depends('order_lines', 'order_lines.isbn') def checkit(self): for record in self: if self.order_lines.isbn: return self.order_lines.isbn else: raise Warning(('Enter​ ​at least​ ​1​ ​ISBN to produce')) These are the two objects on which this method is based upon: class

Apply Multiple filter in odoo at a time

白昼怎懂夜的黑 提交于 2021-01-27 05:58:06
问题 Currently I am using odoov8, my problem is that I have created many filters from xml code as per my requirement and all are working fine ,but I can select only one filter at a time . so for example I want to apply any 3 Filters in tree view , then I need to select first one , then system loads the data , then I select 2nd and then 3rd filter , so system is loading after applying each filter . I want to achieve that if I can select all my filters at once and then I can apply search , so system

Apply Multiple filter in odoo at a time

左心房为你撑大大i 提交于 2021-01-27 05:57:49
问题 Currently I am using odoov8, my problem is that I have created many filters from xml code as per my requirement and all are working fine ,but I can select only one filter at a time . so for example I want to apply any 3 Filters in tree view , then I need to select first one , then system loads the data , then I select 2nd and then 3rd filter , so system is loading after applying each filter . I want to achieve that if I can select all my filters at once and then I can apply search , so system

Custom module doesn't show up in the list of apps

别来无恙 提交于 2021-01-23 04:49:24
问题 I am trying to install module from odoo 8 to odoo 9. I just copied over the whole folder to the addons folder in odoo 9 and was expecting that I can somehow install the module in odoo 9 but it doesn't show up in the list of apps to install. Is there anything changed in the structure of odoo that I have to prepare the module to show up in the apps list? Thanks in advance. 回答1: You do not see your modules/apps because you must update list of modules. First what you need is restart server .