Odoo Help


How can I add a new report? [Closed]

on 4/8/13, 6:39 AM 1,764 views

The Question has been closed

Sudhir Arya (ERP Harbor Consulting Services)
on 04/18/2013 05:26:30

I have written a new report named picking1 which is like picking but little different, the picking1.py like:

import time
from openerp.report import report_sxw
from openerp.osv import osv
from openerp import pooler

class picking1(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
    super(picking1, self).__init__(cr, uid, name, context=context)
        'time': time,
def get_product_desc(self,move_line):
    desc = move_line.product_id.name
    if move_line.product_id.default_code:
        desc = '[' + move_line.product_id.default_code + ']' + ' ' + desc
    return desc

(It's like picking.py, I just replace "picking" with "picking1") I put picking1.py ,picking1.rml in stock/report.

Then I add

<report auto="False" id="report_picking_list_out1" model="stock.picking.out" name="stock.picking.list" string="Delivery Slip11" rml="stock/report/picking1.rml"/>

in stock/stock_report.xml, so the "Delivery Slip11" will in "Print".

However,when I click the "Delivery Slip11",it print picking.rml instead of picking1.rml..I don't know what mistakes I make.....Is any place I have to change? Thanks....

I have written "improt picking1" in report/__init__.py

on 4/8/13, 6:41 AM

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 4/8/13, 6:49 AM

Try to change report service name in py and xml.

Change this report.stock.picking1.list name to something like this in py: report.stock.picking1.list.new.

Change this name="stock.picking1.list" name to something like this in py: name="stock.picking1.list.new".

On 4/8/13, 7:07 AM

Thanks~ I change "name" in the stock_report.xml :

 <report id="report_picking_list_out1" model="stock.picking.out" name="stock.picking1.list" string="Delivery Slip11" rml="stock/report/picking1.rml"/>

Maybe it should have different name ,because "stock.picking.list" is exist and I print the picking1.rml is failure~~

        <report id="report_picking_list_out" model="stock.picking.out" name="stock.picking.list" string="Delivery Slip" rml="stock/report/picking.rml"/>

Now it can work as I like~~

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/8/13, 6:39 AM
Seen: 1764 times
Last updated: 3/16/15, 8:10 AM