Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

How to inherit sale.order into my custom module

Odebírat

Get notified when there's activity on this post

This question has been flagged
salesmodulecustomsale.order.formsale.order
2 Odpovědi
3890 Zobrazení
Avatar
Farzin

I have been trying to inherit sale.order into my student.certificate. they showing some errors like

TypeError: Many2many fields student.certificate.transaction_ids and sale.order.transaction_ids use the same table and columns


 and I want to show the sale.view_order_form into my custom module. 

from odoo import api, models, fields, _


class StudentCertificate(models.Model):
_name = 'student.certificate'
_inherit = 'sale.order'
_description = 'student ceritficate verification'


So the student.certificate is added to menu list.

xml version="1.0" encoding="utf-8" ?>


id="action_student_certificate" model="ir.actions.act_window">
name="name">Students
name="type">ir.actions.act_window
name="res_model">student.certificate
name="view_mode">tree,form

id="menu_student_ceritficate" name="Certificate Verification" sequence="10"
action="action_student_certificate"/>

id="action_student_certificate_inherit" model="ir.ui.view">
name="name">student.certificate.form
name="model">student.certificate
name="inherit_id" ref="sale.view_order_form"/>
name="arch" type="xml">
name="partner_id"/>



0
Avatar
Zrušit
Avatar
Niyas Raphy (Walnut Software Solutions)
Nejlepší odpověď

Hi,

You have redefine the transaction_ids in the newly created model with a different name for many2many table.

In sale order model:

transaction_ids = fields.Many2many('payment.transaction', 'sale_order_transaction_rel', 'sale_order_id', 'transaction_id',

string='Transactions', copy=False, readonly=True)


In your new model add this field:

transaction_ids = fields.Many2many('payment.transaction', 'student_certificate_transaction_rel', 'sale_order_id', 'transaction_id',

string='Transactions', copy=False, readonly=True)


Not sure what is the purpose of inheriting the sale.order model here, see if t is really needed.


Thanks

0
Avatar
Zrušit
Adil Akbar

Check following link to inherit and add a field in Odoo model

https://youtu.be/A-0uQnJr3QA

Best Regards & Thanks

Avatar
Savya Sachin
Nejlepší odpověď

Hi, 

transaction_ids is an existing field in sales, so please rename the transaction_ids field in student.certificate and try.

How To Inherit And Add Field To A Model

Thanks

0
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
How to add a specific column on sale.order table? Vyřešeno
module column sale.order.form sale.order
Avatar
Avatar
Avatar
Avatar
5
čvn 21
16746
How to Hide the (Create request Pricing button) after creating pricing on the sales screen
sales sale.order.form
Avatar
Avatar
1
pro 22
3228
Custom Module Not Populating in Apps List Vyřešeno
module custom
Avatar
Avatar
4
říj 20
10171
Custom Module not visible in Apps Menu Vyřešeno
sales custom
Avatar
Avatar
Avatar
4
srp 20
6024
[sale.order] how to stop changing quotation to sale order ?
sales sale.order
Avatar
0
dub 19
3475
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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