openerp

OpenERP PyChart 中文报表模块(支持CJK语言)

↘锁芯ラ 提交于 2020-03-01 07:20:45
OpenERP PyChart Unicode Report (Support CJK Font) 作者:wangbuke@gmail.com 源码托管地址: https://github.com/buke/openerp-pychart-unicode-report OpenERP 官方APP下载地址: http://apps.openerp.com/addon/8009 支持pychart中文报表,如“库存预测”、“工作中心负载” 等报表。 模块原理 让pychart 生成svg 文件,然后用cairosvg 模块生成PDF报表。 依赖模块 python-cairo python-cairosvg Debian/Ubuntu安装方法: $ su apt-get install python-cairo python-cairosvg 安装与设置 1、安装字体 复制您所用的字体文件,如simsun.ttc 到系统目录下。 debian/ubuntu: $ sudo cp simsun.ttc /usr/share/fonts windows : C:\> copy simsun.ttc c:/windows/fonts 2、配置pychart 报表字体 默认使用宋体 修改openerp 配置文件 openerp-server.conf , 添加以下参数: pychart

Are Odoo rules working OK actually?

女生的网名这么多〃 提交于 2020-02-15 18:01:53
问题 MY PURPOSE I'm trying to use security rules to achieve the following purpose: I need to add in users model a field which will set which warehouses each user can modify. This is because I want to hide the stock moves you aren't allowed to see (stock moves of other warehouses). WHAT I DID I've created a Many2many field named allowed_warehouses in res.users model. From here, the administrator can select which warehouses can be used by each user. Then, I took advantage of the existing fields of

Inherit field from one model to another model - Odoo v9 Community

独自空忆成欢 提交于 2020-02-01 09:18:26
问题 I'm trying to add a field from a table, into another table, through a module. Specifically, trying to inherit a field from product.product , the price field, to add it into stock.move model. So, I've created a model into this new module I'm making. Like this: # -*- coding: utf-8 -*- from openerp import models, fields, api import openerp.addons.decimal_precision as dp class product(models.Model): _inherit = 'product.product' _rec_name = 'price_unidad' price_unidad = fields.One2many('product

Is it possible to make a one2many relation without specifying the target model's “foreign key field”?

给你一囗甜甜゛ 提交于 2020-01-24 00:54:06
问题 I want to make a superclass that have a one2many relation with says dummy.one . So that every subclass that inherit the superclass will have a one2many relation with dummy.one . The problem is declaring a one2many relation forces me to specify the foreign key which link dummy.one to the superclass . Thus I need to create many2one relation (foreign key) in dummy.one for every subclass that I create. The only trick that works is that I create a many2many relation instead of one2many . Here's an

Operation prohibited by access rules when creating menu item in OpenERP 6.1

元气小坏坏 提交于 2020-01-23 02:40:06
问题 When I try to create a new menu item to open a window in OpenERP 6.1, I get the following error: AccessError Operation prohibited by access rules, or performed on an already deleted document (Operation: create, Document type: ir.values). I can always use the magic admin account that bypasses all the security checks, but I'd rather have finer control if possible. Why is this failing, and how can I allow some administrators to create menu items? I'm particularly interested, because I want to

Set default value of field depends on other field in odoo

拜拜、爱过 提交于 2020-01-17 06:32:38
问题 I am setting up default value of analytics_id in account.move.line by below code class account_move_line(models.Model): _inherit = 'account.move.line' _name = "account.move.line" def _get_default_account(self, cr, uid, context=None): obj = self.pool.get('account.move') value = obj.browse(cr, uid, uid) if value.move_id.debit>0 or value.move_id.credit<0: res = self.pool.get('account.analytic.plan.instance').search(cr, uid, [('code','=','LAL')], context=context) return res and res[0] or False

Set default value of field depends on other field in odoo

馋奶兔 提交于 2020-01-17 06:32:08
问题 I am setting up default value of analytics_id in account.move.line by below code class account_move_line(models.Model): _inherit = 'account.move.line' _name = "account.move.line" def _get_default_account(self, cr, uid, context=None): obj = self.pool.get('account.move') value = obj.browse(cr, uid, uid) if value.move_id.debit>0 or value.move_id.credit<0: res = self.pool.get('account.analytic.plan.instance').search(cr, uid, [('code','=','LAL')], context=context) return res and res[0] or False

How to set store trigger for computed fields in Odoo 8?

房东的猫 提交于 2020-01-16 12:09:05
问题 I started using the new API of Odoo v8.0 but I cannot find useful information about store trigger in computed fields like this (for v7.0 and v6.1): Store Parameter in Odoo v6 In Odoo v8.0, I tried to use the same syntax of v7.0 but I couldn't get it to work because the JSON response cannot be returned back to the web client: <function _store_trigger> is not JSON serializable. I read then that store parameter had been converted to Boolean only field (no dict for triggers): Odoo store function:

Can I deploy OpenERP on Heroku?

China☆狼群 提交于 2020-01-16 04:12:10
问题 Just wondering can I deploy OpenERP(Odoo) on Heroku and use postgres as its dbms? Have any body done this before. Looking forward to response. 回答1: Well, actually no, but may be. Here is why: openerp requires access to filesystem, and heroku (as far as I know) doesn't provide storage Postgresql provided as addon to heroku application doesn't provide you with ability to create databases (and openerp creates one database for each company instance) But I think that you can install it on heroku

How to fix error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

拈花ヽ惹草 提交于 2020-01-16 01:53:09
问题 I'm trying to install odoo on a fresh installation of Linux on a VirtualBox machine. I have entered in the commands found here as is: Odoo Development Read the Docs. The following command is what prompts the error: command 'x86_64-linux-gnu-gcc' failed with exit status 1: sudo pip install -r requirements.txt So now I'm trying to solve the problem. I have gone to error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1,error: command 'gcc' failed with