odoo-8

How to write “write” function without effecting inherited class in Odoo 8?

a 夏天 提交于 2019-12-11 07:29:21
问题 The situation is as follows: This is my .py file class mom_meeting(osv.osv): _name = "mom.meeting" _rec_name = 'meet_ref' _inherit = ['mail.thread'] and I had added the mail followers or openchatter in my custom module, now when I tried writing a "write" function as follows: def write(self, cr, uid, ids, vals, context=None): user_ids = [] sobj = self.pool.get('mom.meeting').browse(cr, uid, ids, context=None) if rec.ch_prsn.user_id.id == uid or rec.min_prp.id == uid: return super(mom_meeting,

trying to show chessboard js in odoo form widget, no error no pieces

牧云@^-^@ 提交于 2019-12-11 06:55:29
问题 Hi i´m trying to show chessboardjs on a form view in odoo backend, I finally make the widget to show the board, but the pieces are hidden, I don´t know why because seems to work fine, except for the pieces. If I use dragable : true in the options and move a hidden piece then the board is rendered with all the pieces. do I´m missing something, on my code that the chessboard its not rendered well?? here is mi widget code: (function (instance) { var _t = instance.web._t, _lt = instance.web._lt;

How to increase the default memory usage in odoo?

一世执手 提交于 2019-12-11 06:35:31
问题 I'm using ubuntu server and configure the odoo project. it has 8GB of ram and available memory is arround 6GB so i need to increase the odoo default memory. So please let me know how to increase? 回答1: Have you tried playing with some of Odoo's Advanced and Multiprocessing options? odoo.py --help Advanced options: --osv-memory-count-limit=OSV_MEMORY_COUNT_LIMIT Force a limit on the maximum number of records kept in the virtual osv_memory tables. The default is False, which means no count-based

How to use PHP7 Ripcord library to get Odoo data?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 06:11:34
问题 I am trying to get some data from Odoo through XMLRPC, and I am working with PHP and its Ripcord library (recommended on https://www.odoo.com/documentation/8.0/api_integration.html). So I am following the steps written on that page. Firstly, I downloaded the Ripcord files from https://github.com/poef/ripcord.git. I saved them in a folder named ripcord , located at the index directory of my PHP page. Secondly, I enabled the OpenSSL and XMLRPC extensions for PHP7. I think I did it well because

How to remove “save&new” button from popup in odoo?

大兔子大兔子 提交于 2019-12-11 05:49:14
问题 I have a one2many field, and when I click to create a new record, I have 2 buttons. I want to remove the "Save & New" button and keep the "Save & Close" button. 回答1: I hope you do not mind sleazy hacks. In your form view you can try this. You may need to clear your cache before it works for you. This is only sensible if you do not want it to appear but its not really a security thing just for looks and process. You may need to ensure the class selector is correct for your version. I tested

How to Dynamic change paper format margins (Left, Right, Top, Bottom)?

百般思念 提交于 2019-12-11 05:26:39
问题 I want to change my report paper size dynamically while printing pdf report. Like I have type in my object. When type change then, I want to change my report margin(top, bottom, left, right) which value configure as per margin. Thanks for your valuable help 回答1: You can override the method that calls wkhtmltopdf and manipulate the parameters passed there. See odoo.addons.report.models.report.get_pdf function. You can override this, check your variable and call _run_wkhtmltopdf with different

How to change settings on module installation?

爷,独闯天下 提交于 2019-12-11 05:03:51
问题 I want to change a value in the settings of sale.config.settings . I found this way to do it. But I would like to use the api of Odoo v8. Is that possible? All the examples I found in the source code are using osv.osv_memory 回答1: xml =================== <?xml version="1.0"?> <openerp> <data> <function model="my.model.init" name="_init_settings" /> </data> </openerp> python ====================== from openerp import api, models class my_model_init(models.TransientModel): _name = ''my.model

Why the title is showing the record ID number when I edit a form in Odoo 8?

社会主义新天地 提交于 2019-12-11 04:35:02
问题 I have been using Odoo for developing modules. I need to ask that when I try to edit a form after saving, I see a form id num with the model name on top of the form. Like the one shown in the screenshot. "hr.visa.request,1" is being shown on top which is the name of the model. I cant do anything with the model name because it has to be given in the form view. I dont know what I am doing wrong here. PLz guide me on this. Thanks n Regards 回答1: Maybe you have a table without a name field. You

How to Create Filter for a User group in Odoo

拥有回忆 提交于 2019-12-11 03:38:42
问题 I want to create filters for a certain group of users. Basically only they should be able to view that filter in the filter area. I tried something like this, <filter icon="terp-check" domain="[('state','=','Current')]" string="Current Bills" groups="my_module.group_sales_manager" /> Its not working. According to this only group_sales_manager should be able to use this filter, Any idea? 回答1: Try with this <filter icon="terp-check" domain="[('state','=','Current')]" string="Current Bills"

How to use the dot notation in a kanban view in Odoo?

爱⌒轻易说出口 提交于 2019-12-11 03:29:51
问题 I have a model customer and another model company . The model customer has a field named company_id , which is a Many2one pointing to company . Besides, company has a field of type Char named trade_name . Now, I'm creating the kanban view of customer , using Qweb . What I want is to show the trade name of the company of each customer. <t t-field="company_id.trade_name"/> That line is not working, I get a blank space in the kanban view where the field should be. I also tried with t-esc , and