openerp

Javascript - call super on parents parent?

☆樱花仙子☆ 提交于 2020-01-04 05:30:31
问题 I have defined this extension of current custom javascript view in Odoo: openerp.account_move_journal_test = function(instance){ var _t = instance.web._t, _lt = instance.web._lt; var QWeb = instance.web.qweb; instance.web.account.QuickAddListView.include({ init: function(){ this._super.apply(this, arguments); console.log("QuickAddListView modified init") }, }); }; Now for better representation I added console log in QuickAddListView and in ListView , which are parents that are called using

how to use functional field in record rule?

懵懂的女人 提交于 2020-01-03 05:58:08
问题 I am trying to achieve that all the users that are Hr managers should be allowed to see the records. I have created a Functional Field: def list_HRM(self, cr, uid, ids, field_name, arg, context): attribute = {} hr_managers = self.pool.get('hr.employee').search(cr, uid, ['&', ('department_id.name', '=', 'Human Resources'), ('manager', '=', True)], context=context) hr_managers_uid = [] for record in hr_managers: hr_managers_uid.append(self.pool.get('hr.employee').browse(cr, uid, record, context

How to color a field in tree view with today as filter

戏子无情 提交于 2020-01-03 04:45:08
问题 I am new to openERP. I am working on changing the color in tree view for those record whose due_date is less then Today. Those record should be in red color. I am not able to get the current date as filter in tree view. xml what I need but not working : <tree colors="blue:Due_date < Today()" string="Invoice"> <field name="Due_date" /> <field name="date_invoice"/> <field name="state"/> </tree> Working code <tree colors="blue:state == 'open'" string="Invoice"> <field name="partner_id" groups=

Odoo : Acces a column from many2one

ぃ、小莉子 提交于 2020-01-03 03:59:06
问题 Here is my problem : I'm in model1 : class model1(osv.osv): _name = 'model1' _columns = { 'name': fields.many2one('res.partner', u'Person', domain=[('my_boolean', '=', False)], required=True, select=True), 'type' = fields.selection([('1', 'One'), ('2', 'Two'), u'Select', required=True), } @api.onchange('type') def onchange_type_model1(self) self.name.model3_id = 2 And I want to modify in this onchange the value of the id of model3_id in res.partner: -res.partner in this module: class res

Add the new Dynamic Field in Odoo

限于喜欢 提交于 2020-01-03 03:50:42
问题 Is it possible to add new field based on View in Postgresql in Odoo without using Odoo model class file. ? 回答1: You can get have a model getting it's data from a view. In fact that's widely used by reports. But the field list available needs to defined in the model. 回答2: for creating dynamic views in odoo, you better refer this link Here is the solution Specify the parameter _auto=False to the OpenERP object, so no table corresponding to the _columns dictionary is created automatically. Add a

installing Reportlab (error: command 'gcc' failed with exit status 1 )

馋奶兔 提交于 2020-01-02 00:48:18
问题 I'm trying to install ReportLab 2.4 on a 10.04.2 server with virtualenv. In the ReportLab_2_4 folder I use: python setup.py install and the error I get: error: command 'gcc' failed with exit status 1 回答1: As Skimantas said, I think you should install python-dev. sudo apt-get install python-dev and I was able to install reportlab into my home directory with command " pip install reportlab " without sudo as mentioned earlier answer. I need only root access to install python-dev. Shortly.. I

How can I raise a warning message in Odoo website

青春壹個敷衍的年華 提交于 2020-01-01 19:06:12
问题 In Odoo 8, I am using a custom module which checks that VAT is unique, using @api.constrains('vat', 'parent_id', 'company_id'), and raising a warning when vat already exists. But in the website purchase checkout form, I am making the customers enter the VAT. It happens that when a repeated VAT is entered I get a 500 internal server error, since the website does not provide a way to raise the warning. How should I implement a warning, a pop-up or similar in order to avoid those internal server

How can I raise a warning message in Odoo website

二次信任 提交于 2020-01-01 19:06:06
问题 In Odoo 8, I am using a custom module which checks that VAT is unique, using @api.constrains('vat', 'parent_id', 'company_id'), and raising a warning when vat already exists. But in the website purchase checkout form, I am making the customers enter the VAT. It happens that when a repeated VAT is entered I get a 500 internal server error, since the website does not provide a way to raise the warning. How should I implement a warning, a pop-up or similar in order to avoid those internal server

PostgreSQL won't start: “server.key” has group or world access

前提是你 提交于 2019-12-31 08:08:09
问题 Whenerver I start PostgreSQL using command: $ sudo /etc/init.d/postgresql start Pg doesn't start up. The error reported is: * Starting PostgreSQL 8.4 database server * The PostgreSQL server failed to start. Please check the log output: 2010-01-21 22:10:00 PST FATAL: private key file "server.key" has group or world access 2010-01-21 22:10:00 PST DETAIL: File must be owned by the database user or root, must have no write permission for "group", and must have no permissions for "other". ... and

PostgreSQL won't start: “server.key” has group or world access

ε祈祈猫儿з 提交于 2019-12-31 08:07:48
问题 Whenerver I start PostgreSQL using command: $ sudo /etc/init.d/postgresql start Pg doesn't start up. The error reported is: * Starting PostgreSQL 8.4 database server * The PostgreSQL server failed to start. Please check the log output: 2010-01-21 22:10:00 PST FATAL: private key file "server.key" has group or world access 2010-01-21 22:10:00 PST DETAIL: File must be owned by the database user or root, must have no write permission for "group", and must have no permissions for "other". ... and