openerp

Allowing each manager to see only the project he creates [duplicate]

大城市里の小女人 提交于 2019-12-01 12:56:30
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Tasks should show up only if the user has been assigned it I know I have to use access rules I am getting confused on how to use the globals here. I want each manager in projects to access only their project, phase and tasks. Cheers, Vishal 回答1: OpenERP has two kinds of security restrictions that can be assigned to a user group: Record Rules are filters applied on Create, Read, Write, Unlink operations, and

ERROR openerp.addons.website.models.ir_http: 500 Internal Server Error: after logout from odoo

泄露秘密 提交于 2019-12-01 12:54:42
I am using odoo v9 community in Ubuntu 14.04 installation is perfectly done after all works. but when i install website module of odoo and after i log out from odoo it show following error: "500: Internal Server Error" and my log: "Traceback (most recent call last): File "/opt/odoo96/addons/website/models/ir_http.py", line 242, in _handle_exception response = super(ir_http, self)._handle_exception(exception) File "/opt/odoo96/openerp/addons/base/ir/ir_http.py", line 147, in _handle_exception return request._handle_exception(exception) File "/opt/odoo96/openerp/http.py", line 738, in _handle

Many-to-many relation filter

核能气质少年 提交于 2019-12-01 11:57:26
I need to filter my query with categories table which has many2many relation with another table. Is it possible to filter query with many2many relation? Table res_partner has many2many field category_id relating to table res_partner_category.res_partner , or let's just say partners can have many categories. What I need is to filter res_partners table where it has category named 'business' or 'retail'. If it doesn't have any of these categories, it should not be shown. Also there is another field in res_partner which is category_value_ids and has one2many relation with res_partners_category

Many-to-many relation filter

江枫思渺然 提交于 2019-12-01 10:00:42
问题 I need to filter my query with categories table which has many2many relation with another table. Is it possible to filter query with many2many relation? Table res_partner has many2many field category_id relating to table res_partner_category.res_partner , or let's just say partners can have many categories. What I need is to filter res_partners table where it has category named 'business' or 'retail'. If it doesn't have any of these categories, it should not be shown. Also there is another

custom report through python odoo 9

给你一囗甜甜゛ 提交于 2019-12-01 09:23:27
How to pass multiple module data to a QWeb report? Is there something similar to passing dictionary in rendering html from controller? class account(model.Models): _name = 'account.main' name = fields.Char() class accountSub(model.Models): _name = 'account.sub' name = fields.Char() class PrintWizard(model.Models): _name = 'print.report' account = fields.Many2one('erp.account') @api.multi def print_report(self): ctx = self.env.context.copy() ctx.update({'domain':[('name','=',self.account.name)]}) self.with_context(ctx) return {'name': 'Report', 'type': 'ir.actions.report.xml', 'report_name':

OSV method's return statement

浪尽此生 提交于 2019-12-01 08:17:28
In OpenERP, an OSV object can return something which can open a new view or activate an action. For instance, sale.order has manual_invoice method which returns the following: return { 'name': _('Customer Invoices'), 'view_type': 'form', 'view_mode': 'form', 'view_id': [res_id], 'res_model': 'account.invoice', 'context': "{'type':'out_invoice'}", 'type': 'ir.actions.act_window', 'nodestroy': True, 'target': 'current', 'res_id': inv_ids and inv_ids[0] or False, } and it opens an invoice form view in the same window. I've seen 'view_id': [res_id], being changed to 'views': [(id2, 'form')], and

custom report through python odoo 9

眉间皱痕 提交于 2019-12-01 06:37:25
问题 How to pass multiple module data to a QWeb report? Is there something similar to passing dictionary in rendering html from controller? class account(model.Models): _name = 'account.main' name = fields.Char() class accountSub(model.Models): _name = 'account.sub' name = fields.Char() class PrintWizard(model.Models): _name = 'print.report' account = fields.Many2one('erp.account') @api.multi def print_report(self): ctx = self.env.context.copy() ctx.update({'domain':[('name','=',self.account.name)

Backup Odoo db from within odoo

允我心安 提交于 2019-12-01 03:48:47
I need to backup the current db while logged into odoo. I should be able to do it using a button, so that suppose I click on the button, it works the same way as odoo default backup in manage databases, but I should be able to do it from within while logged in. Is there any way to achieve this? I do know that this is possible from outside odoo using bash but thats not what I want. By using this module you can backup your database periodically https://www.odoo.com/apps/modules/7.0/crontab_config/ (v7) you can also test this module https://www.odoo.com/apps/modules/6.1/db_backup_ept/ (v6 it can

Odoo/OpenERP: hiding create button from treeview

强颜欢笑 提交于 2019-12-01 03:36:32
I have a situation here. I am using OpenERP 7. I am trying to hide Create button from tree view of my products. this can be done using <tree create="false" ..... but situation is like. i want to keep it when user opens the tree view directly from "Asset Management" Module. But hide it when i click on Reporting for treeview. I tried to use context like this from reporting button's function: context['prod1']='false' ctx = dict(context) print ctx['prod1'] return { 'type': 'ir.actions.act_window', 'res_model': 'product.product', 'view_type': 'form', 'view_mode': 'tree,form', 'target': 'current',

Taobao OpenERP Connector 简要说明

寵の児 提交于 2019-12-01 03:29:46
Taobao OpenERP Connector 项目托管地址: https://github.com/buke/openerp-taobao 作者: wangbuke@gmail.com 功能: 1. 接受淘宝主动通知,自动添加、确认订单、发货等。 2. 同步淘宝订单 3. 导入淘宝产品, 同步库存 4. 导入淘宝用户 5. 自动评价,中差评预警 6. 跟踪淘宝订单物流信息, 签收提醒 7. .... 等等等 (懒的写了,自己发现吧) 系统要求: OpenERP 6.1 beanstalkd pycurl 安装说明: 1. 安装beanstalkd 1.1 linux 系统 debian/ubuntu: # apt-get install beanstalkd redhat/centos: # yum install beanstalkd 安装完成之后,开启beanstalkd的持久化选项: # vi /etc/default/beanstalkd ## Defaults for the beanstalkd init script, /etc/init.d/beanstalkd on ## Debian systems. Append ``-b /var/lib/beanstalkd'' for persistent ## storage. BEANSTALKD_LISTEN