openerp

How to get field lists using the OpenERP Report Designer Addon for OpenOffice / LibreOffice

最后都变了- 提交于 2019-12-05 18:46:57
I want to add fields to the reports and use them in python functions and do some coding inside the reports. I am using version 6.0.3 of OpenERP, I keep getting an empty field list. This is what the "add field" command on the addon should look like: I am using the "OpenERP Report Designer" addon for OpenOffice / LibreOffice. The "Add a field" command in the OpenOffice addon does not work for me. It shows an empty field list. I tried in 6.0.3 on a linux and a windows server and also 6.0.2 on a windows server. I believe all other commands of the report designer do work. Is there a way to make it

Changing the Filename of a Uploaded Binary File Field

荒凉一梦 提交于 2019-12-05 12:31:50
I'm using Odoo8 I have a question I used the fields.binary to upload a file/s in Odoo. But when I try to download it the filename of the uploaded file is the model name. Is it possible to change the filename of the file? And second the filters attribute in fields does not work. Black and White My Solution to this matter/problem, create first a compute field and its function .py filename = fields.Char('file name', readonly = True,store = False,compute ='legacy_doc1_getFilename') @api.one def legacy_doc1_getFilename(self): if len(self.employee_number) > 0: self.filename = str(self.employee

different view form for edit and create in odoo

瘦欲@ 提交于 2019-12-05 08:08:20
问题 I'd like to know is it possible to have different form views for edit mode and create mode in odoo ? Actually I just want to hide some elements in create mode and show it in edit mode. I've tried to using attrs like : <button name="%(print_invoice)d" string="Cetak Struk" type="action" attrs="{'invisible':[('id', '!=', False)]}" /> But when i open the form it gives me error like this : Uncaught Error: Unknown field id in domain [["id","!=",false]] Any help would be appreciated. Thank you 回答1:

openerp context in act_window

主宰稳场 提交于 2019-12-05 07:56:55
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 one I want. I'm guessing this can possibly be achieved by adding context to the act_window ? Maybe a

Adding default filter on tree view - OpenErp Custom module

一曲冷凌霜 提交于 2019-12-05 07:28:06
问题 I need to add a default filter, for the tree view of my module. I saw some code example in openerp, like this one: <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}" /> This one in the purchase module, grouped by partner_id , as an example. Now, I have a custom module, which I need to have a 'default' filter when you click on its menu. And this filter must show all the records which aren't 'expired', or that hasn't passed the actual date when I'm

One2many field on_change function can't change its own value?

若如初见. 提交于 2019-12-05 07:12:52
问题 I have these two fields. 'name' : fields.char('Name'), 'addresses' : fields.one2many('res.partner.address', 'partner','Addresses'), This function: def addresses_change(self, cr, uid, ids, name, addresses, context=None): value = {} new_addresses = [] address_pool = self.pool.get('res.partner.address') for address in address_pool.browse(cr, uid, addresses[0][2], context=context): new_addresses.append((1,address.id,{'street':'wall street','zip':'7777','partner': ids[0],'active':True})) value

How to install openERP in ubuntu 13.04 desktop?

笑着哭i 提交于 2019-12-05 06:39:14
问题 Is there any better and easy way to install openERP in ubuntu 13.04 I tried so many time but I was unable to set it up? Help me how to install OPENERP on Ubuntu 13.04? 回答1: postgresql: a.Install postgresql sudo apt-get install postgresql b.create a user in postgresql, same name as your login name sudo su postgres createuser <login_name> -P or su - postgres -c "createuser -s <login_name>" Download openerp a. Go to openerp download page and select correct repository or b. wget http://nightly

Parent left and Parent Right in openerp

梦想与她 提交于 2019-12-05 04:53:55
问题 What is Parent left and Parent right? How it works in Openerp ? Thanks 回答1: As Raphael Collet explains in his answer about OpenERP Server: parent_left and parent_right are special fields that are related to the parent_id field. The purpose of those fields is to make queries within the hierarchy execute efficiently: with parent_left and parent_right, you can retrieve all the descendants of a node without making recursive queries. Consider two nodes A and B in the hierarchy. A and B can be

Remove or hide a menu item in Odoo

雨燕双飞 提交于 2019-12-05 03:44:11
问题 I have this menu item, and I want to hide or remove it. 回答1: First create a dummy group with no users in it <record id="make_invisible" model="res.groups"> <field name="name">Invisible</field> </record> Replace all users in the group. The eval statement here means, replace all ids in the groups_id field with the id for group make_invisible . <record model="ir.ui.menu" id="module.menu_name"> <field name="groups_id" eval="[(6,0,[ref('make_invisible')])]"/> </record> You can find more

<pageCount/> not rendering in OpenERP 7

守給你的承諾、 提交于 2019-12-05 02:05:02
I am working with OpenERP 7 I want to modify my invoice report footer to show the current page and the total number of pages like this : page:1/2 in the first page and page:2/2 in the second page... this is my code: <place x="1.3cm" y="0cm" height="1.55cm" width="19.0cm"> <para style="main_footer">[[ company.rml_footer ]]</para> <para style="main_footer">Page: <pageNumber/>/<pageCount/></para> </place> but pageCount don't return any number. What's wrong ? Hello everybody and thank you all for your answers. In fact, after a deep and hard search I discovered that <pageCount /> tag will not