Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

How can i replace the Report sale_order.rml with a custom version?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
v7customreports
1 Răspunde
8788 Vizualizări
Imagine profil
herbert6453

My Modul for OpenERP 6.1 do not work with OpenERP 7.0 .

I believe the problem is the declaration 'report_name': 'sale.order' in the print_quotation method. (Report name instead of report id)

I used for my report the same name, as quick fix. This works, but i have problems with the translation (my po file is not used).

I want replace the "print" button with my own version and call my own "print_quotation_new" method, but i can not evaluate the consequences (for workflows or whatever).

2
Imagine profil
Abandonează
Imagine profil
Sajad KK
Cel mai bun răspuns

You can override the default report like below

1) Create a xml file in your module custom_report.xml with following content

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <report auto="False" id="sale.report_sale_order" model="sale.order" name="sale.order"
                rml="your_module/report/sale_order.rml" string="New Quotation / Order"
                usage="default"/>
    </data>
</openerp>

2) Copy your custom rml file to your_module/report/sale_order.rml

3) Create your custom parser your_module/report/sale_order.py

import time
from sale.report import sale_order
from openerp.report import report_sxw

class order(sale_order.order):
    def __init__(self, cr, uid, name, context):
        super(order, self).__init__(cr, uid, name, context=context)

from netsvc import Service
del Service._services['report.sale.order']

report_sxw.report_sxw('report.sale.order', 'sale.order', 'your_module/report/sale_order.rml', parser=order, header='external')

4) create your_module/report/__init__.py

import sale_order

5)update your __openerp__.py file

'data': ['custom_report.xml',]

6) Restart your server and update your module

1
Imagine profil
Abandonează
NSC

I have already wondered what is the right way to replace reports... Does this mean in v6, report name has to be changed and in v7, not name but id?

Sajad KK

Report name should be same and the id should be changed to 'module.id' format.

NSC

Okay, thank you for that information. Very often, I read that name should be changed, but when doing like that, my module could not be fully uninstalled again. Maybe, this depends on OpenERP version. What I still do not understand is the think with the id changed to 'module.id' - is it really important that id is called like that? I thought id only has to be unique. What if you override same report twice? Then you need another id, anyway...

Sajad KK

report name should be same and the id should be changed :-)

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Custom reports for different companies
custom reports
Imagine profil
0
apr. 22
2623
Report not showing up
v7 reports
Imagine profil
1
mar. 15
6735
Strip string from a field with defined separator in invoice report
invoice custom reports
Imagine profil
0
mar. 22
2
OpenERP 7 Reports to Excel
v7 reports excel
Imagine profil
Imagine profil
1
mar. 15
8523
how to set 0 margins in webkit reports in v7?
v7 webkit reports
Imagine profil
Imagine profil
Imagine profil
2
mar. 15
6960
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now