openerp

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

我只是一个虾纸丫 提交于 2019-12-04 23:42:10
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 Eino Mäkitalo 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 installed virtualenv sudo apt-get install python-setuptools sudo easy_install virtualenv

how to set name of multiple textbox in openerp using qweb template engine?

夙愿已清 提交于 2019-12-04 22:25:52
Here is my code: <tr t-foreach="keyword" t-as="item"><td><t t-esc="item_value"/></td><td><input type="text" name=""/></td></tr> So here, Textbox are generated dynamically. Now I want to set textbox name to the value that is generated on <t t-esc="item_value"/> To set the text box name to item_value you need to use the t-att attribute: <input type="text" t-att-name="item_value"/> Hope this helps! 来源: https://stackoverflow.com/questions/21778744/how-to-set-name-of-multiple-textbox-in-openerp-using-qweb-template-engine

The best way to export openerp data to csv file using python [closed]

删除回忆录丶 提交于 2019-12-04 21:38:46
Which is the best to way to export openerp data to csv/xls file using python so that i can schedule it in openerp( i cant use the client side exporting)? using csv python package using xlwt python package or any other package? And also how can I dynamically provide the path and name to save this newly created csv file ifixthat Well their are certain ways like using csv python package In this case you can take advantage of the export_data service which will automatically produce csv for you, you can use with Scheduler(cron job ) or even you can write script for it. using xlwt python package

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

拜拜、爱过 提交于 2019-12-04 20:33:55
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.product','price', string="Precio", readonly=True) class StockMove(models.Model): _inherit = 'stock.move'

Related type field not showing value

亡梦爱人 提交于 2019-12-04 19:23:49
I have a related field 'region_id' that get the value from a many2one field in another class like this class activity_summary(osv.osv): _name = "budget.activity_summary" _rec_name = "activity_summarycode" _columns = { 'activity_summarycode' : fields.many2one("budget.activity_year", "Activity Summary Code", ondelete= "no action", required=True ), 'region_id' : fields.related("activity_summarycode", "mgmt_code", type="char", string = "Management Code", size=64, store = True), } But it's not giving the right value, instead when i save, it gives me this: browse_record(budget.org_table, 12). Why is

How to install new module in OpenERP 8.0?

爱⌒轻易说出口 提交于 2019-12-04 19:09:27
I copied directory (module) nk_test into /opt/odoo/odoo/addons directory, but when I go to OpenERP Settings/Local Modules (no filter) I can not find the module to install it. I don't know what am I missing. Thanks for your help. You need to: Choose "Users" from the menu Click the current user, and edit it by checking "Technical features" Refresh the page Click the "Update module list" menu item. If you are using Odoo8. First in odoo login and do the following: 1.Go to settings Choose "Users" from the menu Click the current user, and edit it by checking "Technical features" 2.Refresh the page 3

Odoo validate invoice from code

自闭症网瘾萝莉.ら 提交于 2019-12-04 18:52:36
I creating an invoice from another model, and want to get validated not draft But internal number and total are not generated with my code. invoice_id = self.pool.get('account.invoice').create(cr, uid,{ 'partner_id':self.supplier.id, 'name' : 'Faltante mercaderia', 'journal_id': journal_id, 'account_id':account_id, 'type': 'in_refund', }) self.pool.get('account.invoice.line').create(cr, uid,{ 'invoice_id' : invoice_id, 'name' : 'Faltante mercaderia %s: %s' %(self.type,self.number), 'quantity' : self.dif_final, 'price_unit':self.tarifa_dif / 1000, }) a = self.env['account.invoice'].browse(

linux 下使用supervisor管理源码启动的openerp

我与影子孤独终老i 提交于 2019-12-04 17:45:34
从源码启动openerp,简单的做法是添加启动脚本到/etc/init.d/rc.local等,让openerp 随系统启动而运行。此类方法只在系统启动时运行,但万一程序在运行中崩溃,您可能要等到用户发现不能使用了,才去重启服务器。下面请出今天的主角: supervisor (http://supervisord.org/) Supervisor 是什么? Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. Supervisor 是一个客户端/服务器系统,允许用户监控和控制类 Unix 操作系统上的进程数。 1、安装 debian/ubuntu apt-get install supervisor redhat/centos yum install supervisor 2、建立openerp 的配置文件 # touch /etc/supervisor/conf.d/openerp.conf # vi /etc/supervisor/conf.d/openerp.conf openerp.conf 内容 [program:openerp] ; openerp

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

前提是你 提交于 2019-12-04 16:56:48
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 write a module that creates menu items. After a bunch of digging, I found the cause of the error. There's

OpenERP ir.rule records in security.xml

Deadly 提交于 2019-12-04 16:16:49
<record model="ir.rule" id="stock_inventory_comp_rule"> <field name="name">Inventory multi-company</field> <field name="model_id" ref="model_stock_inventory" /> <field name="global" eval="True" /> <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] </field> </record> I'm confused with above code fragment in security.xml files which is mean by below tags.? id="stock_inventory_comp_rule" means of this line and where its tag with.or is it only for save & keep for identify records by id purpose.? <field name="name">Inventory multi-company</field