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
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    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 display products vendor only in custom field

Abonare

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

Această întrebare a fost marcată
productsale.order.linevendorrelated_fields
3 Răspunsuri
7577 Vizualizări
Imagine profil
Kunjal Popat

I have added Vendor dropdown using custom field on Sale Order Line form, now there dispay all vendors but actually want to display product wise Vendors in dropdown


For Example

Product 1

    - Vendor1

    - Vendor2

    - Vendor3


Product 2

    - Vendor4

    - Vendor5


So when we place order for product1 then show only Vendor 1,2 and 3 not all all 5 vendors, currently showing all 5 vendors,


can anyone help me regarding this how can we filter vendor product wise when we place new order.


Thanks a lot

0
Imagine profil
Abandonează
Sehrish

you can use domain filtering on your many2one field or drop down field: http://learnopenerp.blogspot.com/2016/10/onchange-many2one-filed-in-odoo.html

Kunjal Popat
Autor

Hello Everyone,

Thanks for your answers but can i know how can i add this code in custom field, I have followed below steps,

1) Added custom field x_vendors_id on sale order line using Settings -> Database Structure -> Models

2) Added below code in EditView on Sale Order for page.

<label for="x_vendors_id" string="Choose Vendor"/>

<div>

<field name="x_vendors_id" context="{'search_default_supplier':1, 'default_supplier':1, 'default_customer':0}" domain="[('supplier','=',True)]"/>

</div>

3) added custom code (your answers) on 1st step custom field page in "compute" field but not working.

can you please let me know it right way or do i need add it on another way?

Again Thank you much all of you.

NIKHIL KRISHNAN

api.onchange('product_id')

def onchange_project(self):

partner_ids = []

if self.product_id:

partner_ids = self.product_id.sellers_ids

return {'domain': {'tag_ids': [('id', 'in', partner_ids)]}}

Sudhir Aarya

@api.onchange('product_id')

def onchange_product(self):

if self.product_id:

return {'domain': {'x_vendors_id': [('id', 'in', [seller.name.id for seller in self.product_id.seller_ids])]}}`

Imagine profil
Sudhir Arya (ERP Harbor Consulting Services)
Cel mai bun răspuns

You can return a vendor domain from product onchange method.

Try following code:

@api.onchange('product_id')
def onchange_product(self):
if self.product_id:
    return {'domain': {'your_partner_id_field': [('id', 'in', [seller.name.id for seller in self.product_id.seller_ids])]}}

See related question Project Tags Domain

2
Imagine profil
Abandonează
Imagine profil
Nikhil Krishnan
Cel mai bun răspuns

Hi Kunjal Popat,
Just try this code.

api.onchange('product_id')
def onchange_project(self):
partner_ids = []
if self.product_id:
partner_ids = self.product_id.sellers_ids
return {'domain': {'tag_ids': [('id', 'in', partner_ids)]}}

Thanks

0
Imagine profil
Abandonează
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
V13 - How to see the products that a vendor sell to us, from the vendor view. Rezolvat
product vendor
Imagine profil
Imagine profil
1
dec. 22
3087
Change Sale Quotation Form so Product is Not Required?
product sale.order.line
Imagine profil
Imagine profil
Imagine profil
2
mar. 18
4156
Product: Manufacturer vs Vendor
product manufacturer vendor
Imagine profil
Imagine profil
2
oct. 25
3887
product sales relation
product sale.order.line boolean
Imagine profil
0
ian. 23
1648
How to create product odoo V15 sale.order
product sale sale.order.line
Imagine profil
0
dec. 21
2401
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