odoo-8

how to integrate Odoo with MySQL

混江龙づ霸主 提交于 2020-01-02 06:13:29
问题 I am trying to integrate Odoo(openerp-8) with MySQL on ubuntu server, to get the database access instead of postgresql. But I am unable to figure out the correct way to do that. I tried this link, but it didn't help me http://openerp-team.blogspot.de/2009/08/open-erp-server-with-mysql.html Any better ideas on configuring odoo with MySQL? 回答1: In Odoo apps Store One Free module Available name is "External Database Sources" This module allows you to define connections to foreign databases using

How to set PDF name in qWeb report, Odoo?

和自甴很熟 提交于 2019-12-30 08:40:10
问题 I'm making reports using qWeb in Odoo 8. Those generated PDF files are saved with a "default" name. I would like to set a specific name to every generated file (not after file was saved, but in "generation" time). Is that possible? If it is, how to do it? Thanks in advance. 回答1: In Odoo 8 you can patch the method report_download of addons/report/controllers/main.py like below (between FIX START and END). It will then use the code for the attachment attribute in the report action definition.

Report formatting not working in Odoo 8 Qweb Reports

别说谁变了你拦得住时间么 提交于 2019-12-25 03:38:07
问题 All the default reports and the new reports that I am generating are being printed towards the left of the page. This only happens when the report is generated in PDF format. In HTML format the report is displayed fine. I did some research and found that downgrading the wkhtmltox to version 0.21.1 would solve this problem. I did that, but the problem still persists. 回答1: There is one small configuration Go to settings --> Technical --> Parameters --> System Parameters --> Click on Create and

Change a field value within an If statement in Odoo 8

微笑、不失礼 提交于 2019-12-25 01:33:18
问题 I have been using Odoo 8 with Ubuntu 14.04. I have an onchange function and under that an If statement in which I am trying to change a field value but it does not get change . All I need is to assign the null value or 0.0 to the field but failed. My Python code is below: def _proposed_total(self): print self.emp_propose_allowance self.emp_propose_total = self.emp_propose_basic + self.emp_propose_allowance cr=self._cr uid=self._uid ids=self._ids val=int(self.employee_name) if(val): cr.execute

browse() method in odoo 8

坚强是说给别人听的谎言 提交于 2019-12-24 16:46:29
问题 In OperERP 7, There is a statement as context = dict(context or {}) data = self.read(cr, uid, ids, [], context=context)[0] In Odoo 8, I want to write this statement in new style. I tried the below, but it wont work. context = dict(self._context or {}) data = self.browse([], context)[0] Here how do I pass the context value ? 回答1: you can use with_context to change current environment's context. i.e. ctx = dict(self._context or {}) rec = self.with_context(ctx).browse() 来源: https://stackoverflow

How to pass value with onchange one2many variable in odoo?

爱⌒轻易说出口 提交于 2019-12-24 08:47:08
问题 <field name="salary_month"/> <field name="earning_type_id"> <tree editable="bottom"> <field name="earnings_type" /> <field name="based_on" on_change="calc_amount(based_on,salary_month)" /> <field name="amount" /> <field name="total" /> </tree> </field> In the above condition I have two variables one is salary_month another one is one2many variable earning_type_id . While on change inside earning_type_id I need to pass the value of salary_month . Its shows undefined variable salary_month .

Odoo : inputing employee based on department_id, one2many domain

99封情书 提交于 2019-12-24 06:37:39
问题 from this picture here when i click on the add new item, i want employee list that show up is only employees from the selected department, in the pict case is "IT" department. iam using odoo v8 ive tried this in my o2m field : class overtime(models.Model): _name = 'overtime.overtime' department_id = fields.Many2one('hr.department', string='Department', readonly=True, states={'draft': [('readonly', False)]}) employee_ids = fields.One2many('overtime.overtime_details', 'overtime_id', string=

Odoo API web service doesn't return anything

蓝咒 提交于 2019-12-24 06:34:45
问题 I am beginner for knowing API web service in Odoo for Android. I follow this documentation https://www.odoo.com/documentation/8.0/api_integration.html. , so I make this code: <?php require_once('ripcord-master/ripcord.php'); $url = "http://100.100.1.148:8069"; //local IP $db = "UAT_DISTRICT"; $username = "openpg"; $password = "serving"; $info = ripcord::client('https://demo.odoo.com/start')->start(); $common = ripcord::client("$url/xmlrpc/2/common"); $common->version(); //Authenticate the

Domain Filter is not working on many2many field in OpenERP 7.0

被刻印的时光 ゝ 提交于 2019-12-24 04:30:05
问题 I have added new many2many fields into the wizard view and also put invoice filed of many2many fields Field on py file : 'sup_inv_entries':fields.many2many('account.invoice', 'sup_inv_rel', 'sup_inv_id1', 'sup_new_inv_id', 'Invoice Entries'), Field on XML view file: <field name="sup_inv_entries" nolabel="1" domain="['|',('period_id','in',period_ids),('&',('date_invoice','>',date_from),('date_invoice','<',date_to)),'&',('type','=','in_invoice'),('state','=','open')]"> I want to make the filter

How to create email notification function in Odoo?

房东的猫 提交于 2019-12-24 01:44:48
问题 I have calender.event module. In that I have one date field ending_date . I wanted to create function when ending date exceeds current date it should send notification to all employees. This function at calender.event inherited file def send_birthday_email(self, cr, uid, ids=None, context=None): sobj = self.pool.get('calendar.event').browse(cr,uid,ids,context=context) ir_model_data = self.pool.get('ir.model.data') template_obj = self.pool.get('email.template') cc_text = '' if sobj.attendee