Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    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
    Výroba
    • 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
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Help

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Image from related field :'Could not display the selected image' this message appear when I save the record

Odoberať

Get notified when there's activity on this post

This question has been flagged
developmentmany2onerelated_fieldsv15
3 Replies
5822 Zobrazenia
Avatar
Ali Ammar

I have Many2one field linked to 'res.partner' 

I also have related field to this many2one field and catch the image from this customer record to display it on  the form 

at first it appear but when I click save or reopen this record image don't appear and this message don't display
any help

name_id = fields.Many2one('res.partner', required=True, string='Customer Name', ondelete='restrict',store=True)
image_id = fields.Image(related='name_id.image_1920')


0
Avatar
Zrušiť
Avatar
Muddasir
Best Answer

Add attachment =True , it should work

0
Avatar
Zrušiť
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

In default odoo you can not define many2one field with field name "name" with image field in a same form view because it generate error in addons to avoid this situation follow odoo name field rules.

Regards

0
Avatar
Zrušiť
Hetul Himatlal

Hi, is there a workaround for this situation?

Avatar
Waleed Ali Mohsen
Best Answer

As I can see in your code your related field is point to name and it should be related to name_id

image_id = fields.Image(related='name_id.image_1920')


I have tested it in sale order and its working. I have added the below field in sale order:

image_1920 = fields.Image(related='partner_id.image_1920')

In Sale order form view before the title I have added it:

<xpath expr="//div[hasclass('oe_title')]"  position="before">
<field name="image_1920" widget="image" class="oe_avatar" options="{&quot;zoom&quot;: true}"/>
</xpath>


If its not work, to add compute_sudo= True to the field.


0
Avatar
Zrušiť
Ali Ammar
Autor

I edit it
but it still not appear after save the record

Waleed Ali Mohsen

Try to add compute_sudo=True as in my updated answer, If still not working add readonly= False

Ali Ammar
Autor

I try both of your attribute but it is still not appear

Waleed Ali Mohsen

It's working with me in Odoo 15. You need to update your Odoo to the latest.

Ali Ammar
Autor

I have odoo 15 and it's not work
I don't dare you but it still doesn't work on my App

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

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
Relate fields
related_fields v15
Avatar
Avatar
Avatar
Avatar
3
jan 24
2097
how to make user see only his a signed default warehouse Returns & Delivery Orders & Receipts in overview backend
development v15
Avatar
0
máj 23
2135
(Solved) v15: wrong view after change view_id Solved
development v15
Avatar
Avatar
1
sep 22
3982
why my many2one field can not work properly? Solved
many2one v15
Avatar
Avatar
1
dec 21
6325
Write to Record in Related Field of Many2One Relationship
many2one related_fields
Avatar
0
máj 15
7252
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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