openerp

openerp context in act_window

坚强是说给别人听的谎言 提交于 2019-12-22 05:48:12
问题 In OpenERP 6.1 this act_window: <act_window domain="[('id', '=', student)]" id="act_schedule_student" name="Student" res_model="school.student" src_model="school.schedule"/> creates a Student button in the Schedule form which opens the student tree view showing only the appropriate student. My goal is to directly open the corresponding form view of the student instead of a tree view with the right filtered student. I tried adding a view_mode="form,tree" but it opens a new form instead of the

How to add button in tree view header near “Create” and “Import” buttons Odoo 8?

守給你的承諾、 提交于 2019-12-21 21:08:47
问题 I can successfully add buttons in form view header or in tree view rows, but I want to add a custom button in the treeview header near "Create" and "Import" buttons in Odoo 8. How can I do this? 回答1: I find the solution to my problem! I replace the create button if I use project.project model. 1) I create some js script ( static/src/js/task_list.js ) with click listener for my button : openerp.project = function (instance){ var QWeb = openerp.web.qweb; _t = instance.web._t; var self = this;

Can I inherit from a standard report in OpenERP?

Deadly 提交于 2019-12-21 20:36:01
问题 I want to make changes to the purchase order report in OpenERP 6.1. Do I have to go in and make changes to the purchase module, or can I create a new module that will inherit the standard report and override some details. 回答1: You can't exactly inherit another report and just override some details, but you can replace a standard report and make all existing links to it launch your new report instead. Our zaber_purchase module contains some changes to the purchase order report that our users

Performance Monitoring Openerp

冷暖自知 提交于 2019-12-21 06:26:19
问题 We are trying to implement new relic ( http://www.newrelic.com ) on a dev server to test openerp's performance . The below installation steps of newrelic asks us to to modify WSGI application file . I am new to openerp and I can't seem to figure this out. Any help will be highly appreciated. Within the same WSGI application file, you then need to add a wrapper around the actual WSGI application entry point. If the WSGI application entry point is a function declared in the file itself, then

Performance Monitoring Openerp

末鹿安然 提交于 2019-12-21 06:26:09
问题 We are trying to implement new relic ( http://www.newrelic.com ) on a dev server to test openerp's performance . The below installation steps of newrelic asks us to to modify WSGI application file . I am new to openerp and I can't seem to figure this out. Any help will be highly appreciated. Within the same WSGI application file, you then need to add a wrapper around the actual WSGI application entry point. If the WSGI application entry point is a function declared in the file itself, then

Can we able to inherit and change the noupdate=“1” in odoo?

六月ゝ 毕业季﹏ 提交于 2019-12-21 05:30:21
问题 Is it possible to inherit from one xml and to change its updatable. I tried to inherit "Check Action Rules" to change the "interval_number" from 4 to 1 hours. To make it run every single hour. I don't think it may work because of noupdate="1". Anyone have any idea about this? 回答1: Yes you can change the noupdate file by the help of hook. In the manifest file next to data add 'post_init_hook': 'post_init_hook', create hooks.py file def post_init_hook(cr, registry): env = api.Environment(cr,

List of dictionary in python as HTML Table format

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 02:44:31
问题 I have list of dictionary as the below format [{'duration': 0.7, 'project_id': 3, 'resource': u'Arya Stark', 'activity': u'Development'}, {'duration': 0.9, 'project_id': 4, 'resource': u'Ned Stark', 'activity': u'Development'}, {'duration': 2.88, 'project_id': 7, 'resource': u'Robb Stark', 'activity': u'Development'}, {'duration': 0.22, 'project_id': 9, 'resource': u'Jon Snow', 'activity': u'Support'}, {'duration': 0.3, 'project_id': 9, 'resource': u'Jon Snow', 'activity': u'Support'}, {

How to recompute stored functional field values in Odoo?

一世执手 提交于 2019-12-21 02:26:09
问题 Sometimes stored fields must be recomputed, but triggers can not be launched (e.g. in case of SQL injection). How to recompute them an easy way? 回答1: (Because I came here via google:) You can also do this from the Odoo Shell: # python odoo.py shell -c openerp-server.conf -d <database> >>> model = env['account.invoice'] >>> env.add_todo(model._fields['amount_total'], model.search([])) >>> model.recompute() >>> env.cr.commit() Odoo shell is available in 9, 10 and via an OCA module in 8. 回答2: In

odoo one2many default not set

风格不统一 提交于 2019-12-20 17:29:49
问题 I wrote a wizard which form view should show a one2many field with rows taken from context['active_ids']. I set the one2many default correctly, but when the form opens, no rows are showed. Did I miss anything? (I apologize for code bad indentation) class delivery_wizard(models.TransientModel): _name = 'as.delivery.wizard' address = fields.Many2one('res.partner') details = fields.One2many('as.delivery.detail.wizard', 'delivery') carrier = fields.Many2one('delivery.carrier') @api.model def

OpenERP specify multiple view references on “view_id”

大兔子大兔子 提交于 2019-12-20 09:38:35
问题 I extended "hr.employee" class. (Inherited and gave the same name to the new one). I defined two views (tree and form) and a menu: <record model="ir.ui.view" id="my_employee_tree"> <field name="name">hr.employee.tree</field> <field name="model">hr.employee</field> <field name="arch" type="xml"> ... </field> </record> <record id="view_my_hr_employee_form" model="ir.ui.view"> <field name="name">hr.employee.form</field> <field name="model">hr.employee</field> <field name="arch" type="xml"> ... <