openerp

How to create RML Report?

懵懂的女人 提交于 2019-12-06 16:22:12
I'm going to create reports using my module (custom analytic account module). I heard that RML is the easiest way to generate reports. Please give me the required files list to create reports. ex:- __openerp__.py __init__.py ------what are the other files need to create It's easy when you mention sample module (purchase/stock) and give me file names from that, then I can browse them and by the use of that create my own reports for my modules. _ openerp _.py for rml location _ init _.py for initialization of a class( import reportclass) .py for business logic of report or methods of class which

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

梦想的初衷 提交于 2019-12-06 15:39:40
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . 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

How add a function in openERP 7?

梦想与她 提交于 2019-12-06 15:33:59
问题 I was trying create a new module in openERP version 7. In my class I have this code : _columns = { 'hour_from' : fields.float('Work from', required=True), 'hour_to' : fields.float("Work to", required=True), 'totalhour': fields.function(_total, method=True, string='Total Attendance', multi="_total"), } I don't find any solution to add a function in my class. The function which I need it return the sum of hour_from and hour_to . Can anyone help? I try this code before declaring my _columns :

Odoo javascript onclick event

旧城冷巷雨未停 提交于 2019-12-06 15:30:44
Is it possible create my own button and this button click call javascript function? Like simple onclick javascript method? If the answer is yes, how can I do that? I want to use "Add an item" button or create my own button that calls the same function like I click on "Add an item" button. First Create button where ever you want to create with some modifications. <button string="Click" custom="click"/> Then create one JS file that will contain following code. odoo.define('YOUR_MODULE.FILENAME', function (require) { "use strict"; var form_widget = require('web.form_widgets'); var core = require(

Related type field not showing value

99封情书 提交于 2019-12-06 15:16:15
问题 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

How to install new module in OpenERP 8.0?

不问归期 提交于 2019-12-06 14:40:50
问题 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. 回答1: 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. 回答2: If you are using Odoo8. First in odoo login and do the following: 1.Go to settings

Get images from db by fields.function on QWeb report - Odoo 8

余生长醉 提交于 2019-12-06 14:37:33
I want to print an image getting it by a fields.function for any image in my database. I am trying the following: def _get_image(self, cr, uid, ids, name, args, context=None): res = dict.fromkeys(ids) for record_browse in self.browse(cr, uid, ids): partner = self.pool.get('res.partner').browse(cr,uid,6,context=None).image res[record_browse.id] = base64.encodestring(partner) return res _columns = { 'image': fields.function(_get_image, string="Image", type="binary"), } but in qweb report I got: File "/opt/*/openerp/addons/base/ir/ir_qweb.py", line 791, in value_to_html raise ValueError("Non

Odoo validate invoice from code

筅森魡賤 提交于 2019-12-06 14:08:09
问题 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'

openerp override onchange behavior without affecting base

喜欢而已 提交于 2019-12-06 14:07:14
I have inherited from purchase.order.line. I have added a bunch of related fields. They are all related to fields in product.product via product_id in order_line. What I want to achieve is that when a user selects or changes a product in the purchase order line form, the related fields should get refreshed/updated/populated with values of the selected product. I have written the onchange method for this but I'm not sure how to invoke it from the inherited view? The product_id field was already there in the (parent) order_line view and it already has an onchange defined. How do I get the system

OpenERP - Report Creation

大城市里の小女人 提交于 2019-12-06 13:54:24
问题 I am trying to create a new report with report plugin and openoffice but I don't know how to assign it in the OpenERP system. Is there someone who can give me exact steps for creation of new report and integration with openerp? Thanks in advance! 回答1: Here are the steps to create the OpenERP RML report. open open-office.org tools menu extension manager go to - base_report_designer plugin →openerp_report_designer.zip restart open-office open a new report add a loop ( select your DB) add loop