openerp

Tasks should show up only if the user has been assigned it

杀马特。学长 韩版系。学妹 提交于 2019-12-17 19:09:58
问题 I only want the person who I have assigned the task to see the task in the project module. I don't want other users of the project to see this persons tasks. However currently any user who has user access rights can see all the tasks even if they were not assigned it. Is there a work around this ? 回答1: OpenERP has two kinds of security restrictions that can be assigned to a user group: Access Rights are CRUD yes/no flags (similar to Unix FS permissions), and allow per-model access control.

How to create a dynamic view on OpenERP

别来无恙 提交于 2019-12-17 18:43:53
问题 I need a help to create a dynamic view. Let me explain: I have Form1 and Form2 views. Form1 contains expression field and extract button. Form2 contains extracted elements of the expression from Form1. For example when you enter (a+b)*c-d*0,5 to Form1's expression field, Form2 should extract and display this: ( - open brace a - variable + - addition b - variable ) - close brace * - multiplication c - variable - - subtraction d - variable * - multiplication 0,5 - constant number Now, here is

Filling Many2many field (odoo 8)

两盒软妹~` 提交于 2019-12-17 10:33:10
问题 What I've done: I have a module with myfield = fields.Many2one('res.partner', string="Graduate", domain=[('is_graduated', '=', True)]) Then I have another class with _inherit = 'res.partner' is_graduated = fields.Boolean("Graduated before?", default=False) graduations = fields.Many2many('my_module.courses', string="Graduation courses") What I get: The myfield works good, but the graduations field is empty. If you edit user 1 profile you can add entries to graduation field using Add item , but

Filling Many2many field (odoo 8)

谁说我不能喝 提交于 2019-12-17 10:33:04
问题 What I've done: I have a module with myfield = fields.Many2one('res.partner', string="Graduate", domain=[('is_graduated', '=', True)]) Then I have another class with _inherit = 'res.partner' is_graduated = fields.Boolean("Graduated before?", default=False) graduations = fields.Many2many('my_module.courses', string="Graduation courses") What I get: The myfield works good, but the graduations field is empty. If you edit user 1 profile you can add entries to graduation field using Add item , but

OpenERP v6.1新特性解读 (一)整体易用性、界面、移动性

久未见 提交于 2019-12-15 15:47:01
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 就在OpenERP v6.1 来临之际。我们一起来看看V6.1 的Release-Notes。 更容易使用,更少配置 这个无疑是降低了OpenERP对于初学者的门槛,以前的版本已安装好了模块就会自动跳出很多的wizard配置窗口,用户需要一层层地配置。对于第一次安装的人来说,这就是很大的障碍,天啊,谁知道怎么配置呢? 新版本的配置向导大大减少了,基本上都是默认配置好了,特殊需要按需配置。不会再在创建新帐套的时候见到那些烦人的、无穷无尽的窗口。 新的many2one字段界面 可以直接在下拉列表里创建新对象,让弹窗尽量远离我们 ;) 更强大的Demo数据 例如当你安装了 hr_evaluation 模块,他的demo数据已经自带多份评估表格,直接就可以打印出来 第三方的数据导入 SugerCRM 您原来使用SugerCRM现在想转到OpenERP?没关系我们有现成的模块 import_sugarcrm 可以帮你轻松导入数据 Excel etc. “我原来的数据存在excel中,怎么办?” “没关系”我们现在有更清晰的导入数据界面,更直观的导入界面可以,直接看到要导入的数据,在界面上调整各个导入列映射到的字段,新的导出方法可以令你将系统数据导出后修改后导入,系统会识别到你的修改或者增加新数据。 其他 订单进度条

OpenERP v6.1新特性解读 (三) 技术

人盡茶涼 提交于 2019-12-15 15:41:24
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 内核优化 原来的osv_memory(现在名为TransientModel)做了很大改进,现在已经是一个特殊的普通osv(现在名为Model),这意味着它确实存在数据库里面,但是它会在使用过后自动删除(例如某个统计计算完毕或者某些记录已经创建了)。这个改进有以下好处: 底层代码只有一个,更容易维护。 具有相同的模型,这意味着约束(例如外键)都是可执行的 更好的性能,数据库几乎完全是无状态(仍然有一些缓存) 支持WSGI,可以在一个兼容WSGI的服务器上运行OpenERP server,再加上OpenERP几乎无态的特性。这意味着你可以在WSGI服务器上运行多个服务器进程:你终于可以用尽你的多核CPU!例如用 Gunicorn ,一切的维护都变得简单了,Gunicorn 将监控者进程。例如杀死一个已经挂起的进程,防止内存泄露影响系统。 还有几件缩短创建帐套时间的改进:能高效率使用框架加载翻译并写入。另一个改进就是(转存和恢复)的帐套时候的缓存。这些都在OpenERP online上实际使用过。 在销售订单上做过性能测试: 安装一个新的英文帐套 安装一个新的带有语言包的帐套 再创建另外一个新帐套 从web客户端读取一个合作伙伴 一次读1000个订单 读100x10个销售订单 计划任务的多线程处理

How to filter many2one res.parner field in odoo

南笙酒味 提交于 2019-12-14 03:56:54
问题 I have x_trainer_id = fields.Many2one('res.partner', string='Trainer') field, and I want to filter data in it by the value that is put in category_id tag field in partner form . I want to show just those records in it their category_id tag value is defined Trainer. 回答1: If i understand this correct, try to define you field in your view like: <field name="x_trainer_id" domain="[('category_id','=',category_id[0][2])]" /> The field category_id has to be defined in that view, too. But if you

how can I use a email template in the following function?

元气小坏坏 提交于 2019-12-14 02:05:18
问题 I am trying to send mail function using the following code: def button_confirm_mom(self,cr,uid,ids,context=None): sobj = self.browse(cr, uid, ids) msg_pool = self.pool.get('mail.mail') cc_text = '' msg_vals = { 'subject' : "MoM has been created", 'email_from' : "abc@gmail.com", 'reply_to' : False, 'state' : 'outgoing', 'model' : False, 'res_id' : False, 'auto_delete' : False, } if sobj.matp: for cc_obj in sobj.matp: if cc_obj.empname.work_email: cc_text += cc_obj.empname.work_email + ',' if

How to set a specific lines order in a one2many field in OpenERP7?

坚强是说给别人听的谎言 提交于 2019-12-13 20:14:17
问题 Is it possible to order lines in a one2many field by a specific column without modifying the original class order? Let's put an example: The model res.partner is ordered by the field name . So, if you open a res.partner view, the rows are going to be ordered by their name. Now, I'm in a view of other model. This model has a one2many field pointing to res.partner , this means that I'm seeing a list of partners, and they're ordered by name too. Can I always see this last list ordered by other

How to trigger an evenement on export Odoo

旧城冷巷雨未停 提交于 2019-12-13 19:44:20
问题 I have an ir.config_parameter I'd like to update when a specific field of my res_partner table is exported, for exemple if "age" is exported, I want the higgest ID in res_partner to be stored in my config_parameter named "last_age". How can I trigger a set_param(cr, uid, 'my_module.last_age', 'higgest_id') when age is exported? Do I have to overwrite the export if it's even possible? Thanks EDIT: I did this in my res.partner: def export_data(self, cr, uid, ids, fields_to_export, context=None)