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

[Odoo 8 CE] How can I have a custom PO view without modifying the original view as well ?

Odebírat

Get notified when there's activity on this post

This question has been flagged
viewspurchase_order
4 Odpovědi
3622 Zobrazení
Avatar
Paraita Wohler

I've added a second Purchase Orders view in my left-side menu. The first Purchase Orders view is the default one bundled in Odoo 8. The second Purchase Orders view should have different columns. This is the xml of the second view:

<record id="view_purchase_order_with_core_product" model="ir.ui.view">
<field
name="name">my.custom.PO.view</field>
<field
name="model">purchase.order</field>
<field
name="type">tree</field>
<field
name="priority">1</field>
<field
name="arch" type="xml">
<tree>
<field
name="product_id"/>
<field
name="message_unread"/>
</tree>
</field>
</record>

<record
id="act_purchase_order_with_core_product" model="ir.actions.act_window">
<field
name="name">Second PO view</field>
<field
name="type">ir.actions.act_window</field>
<field
name="res_model">purchase.order</field>
<field
name="view_mode">tree,form</field>
<field
name="context">{}</field>
<field
name="domain">[('has_core_articles', '=', True)]</field>
<field
name="view_id" ref="view_purchase_order_with_core_product"/>
</record>


<menuitem id="menu_purchase_order_with_core_product" name="Second PO view"
parent="purchase.menu_procurement_management"
action="act_purchase_order_with_core_product" sequence="14"/>

The purpose of that second view is to display only orders which contains certain articles, display differents columns than the original view.

I've managed to do the filter using the domain field (I didn't want to use the search filter for that).

My problem is that when I modify the columns of my second views, the original view (the first view) is also modified and display the extra columns.

What am I doing wrong ?


EDIT: I've removed the priority field but I still have the same error after upgrading my module

0
Avatar
Zrušit
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Nejlepší odpověď

Hi,

Can you remove the below line from the code and check the same:-     <field name="priority">1</field>

<record id="view_purchase_order_with_core_product" model="ir.ui.view">
<field name="name">my.custom.PO.view</field>
<field name="model">purchase.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree>
<field name="product_id"/>
<field name="message_unread"/>
</tree>
</field>
</record>

Thanks

1
Avatar
Zrušit
Avatar
Paraita Wohler
Autor Nejlepší odpověď

Thanks guys for the answers, I've removed the priority field, modified the name of the view and updated the module in my Odoo instance. However I still see the product_id and the message_unread columns in both PO views instead of just the second one. The name of the second view has been impacted as expected though.

What's strange to me is that I didn't inherit the original PO view so I don't understand how my changes on my second view is even impacting the original PO view. Is the view deduced from the model itself ?

I did try to inherit from the original PO view also, but I end up with the same results: changes in my second view are impacted in the original PO view as well...


EDIT: restarting my Odoo instance + updating the installed module didn't seem to change anything but I've retried with a brand new DB and it works as expected !

To prevent myself from running from this kind of error in the future, is there a foolproof method to update an installed module without having to restart everything from a clean DB ?

0
Avatar
Zrušit
Avatar
subbarao
Nejlepší odpověď

Hello Paraita,

You have done well but the mistake is priority, so remove priority and then upgrade it will work.

<field name="priority">1</field>
0
Avatar
Zrušit
Cybrosys Techno Solutions Pvt.Ltd

We have mentioned the same in the above answer.

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
importing Purchase Order shown as a RFQ Vyřešeno
purchase_order
Avatar
Avatar
Avatar
2
kvě 25
3067
Create a PO without adding products to stock
purchase_order
Avatar
Avatar
Avatar
Avatar
3
pro 24
9054
Select multiple elements with XPath Vyřešeno
views
Avatar
Avatar
Avatar
Avatar
Avatar
5
srp 24
48626
How do I replace the default Purchase Order number? Vyřešeno
purchase_order
Avatar
Avatar
1
čvc 24
4617
Purchase Product Description Incorrect Vyřešeno
purchase_order
Avatar
Avatar
1
čvn 24
2859
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