İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Link 2 fields together

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
one2manylink
2 Cevaplar
6732 Görünümler
Avatar
Selverine

Hi everybody,

I would like to know how is possible to get (or to link together) in a field another field save in other table?

To be more clear:

My first field (field1) is a one2many field. Table product.product. My second field (field2) is on the table sale.order.line.

The goal of this manipulation is to have the field1 for each product of the sale.order.line Need I to declare my field2 as a one2many too? or can in make the link to say: My field 2 is my field 1?

Thank you a lot,

Selverine

0
Avatar
Vazgeç
Avatar
René Schuster
En İyi Yanıt

I would make field2 many2one.
And then use an on_change method on field2 or make field1 a function field to get the products of the sale.order.line

Or better: Make field1 a relational field!

0
Avatar
Vazgeç
Avatar
Selverine
Üretici En İyi Yanıt

Hi René Schuster,

Thank your for your help.

So, I try to use a relational field. In the developer guide I saw this :

:City -> State -> Country, and you need to refer to the Country from a City, you can define a field as below in the City object: 'country_id': fields.related( 'state_id', 'country_id', type="many2one", relation="res.country", string="Country", store=False)

So I try to adapt to my projet.

I have

Sale.order.line <-> product -> BAT

It is why I try to do that:

class product_bat(osv.osv):
_name = 'product.bat'
_description = 'Product BAT'

_columns = {
    'name': fields.char('Name', size=64, required=False, translate=True),
    'name_id': fields.many2one('product.bat', 'Template'),
    'product_link_BAT': fields.many2one('product.template', 'Template Id'),
    'product_BAT' : fields.related('product_link_BAT', 'product_link_sale', string=" Product BAT", relation='sale.order.line', type='char', size=128, store=True, select=True),

}

product_bat()

class product_template(osv.osv): _name = "product.template" _description = "Product Template"

_columns = {
    'name': fields.char('Name', size=128, required=True, translate=True, select=True),
    'product_BAT': fields.one2many('product.bat', 'product_link_BAT', 'product BAT'),
    'product_link_sale': fields.many2one('sale.order.line', 'Product link sale'),

class sale_order_line(osv.osv):

_name = 'sale.order.line'
_description = 'Sales Order Line'
_columns = {
    'order_id': fields.many2one('sale.order', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, states={'draft':[('readonly',False)]}),
    'name': fields.text('Description', required=True, readonly=True, states={'draft': [('readonly', False)]}),
    'product_link' : fields.one2many('product.product', 'product_link_sale', 'test_aurel'),

But it don't works. Have you an idea please? Is it a problem of link object together?

My error:

AttributeError: 'NoneType' object has no attribute '_table'

Thanks

Aurelien

0
Avatar
Vazgeç
Enjoying the discussion? Don't just read, join in!

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

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
how pass value to on2many field from parent form via context
one2many
Avatar
Avatar
1
Oca 25
2763
Can I create new menu in the sales module and give alink to the odoo spreadsheet in V17 ent ?
link
Avatar
0
Eki 24
2030
Liens de texte dans une même page
link
Avatar
Avatar
1
Kas 23
3160
How to make tree view place last entered field on the top of tree view? What is the difference between editable="top" and editable="bottom"?
one2many
Avatar
Avatar
Avatar
2
Eyl 22
10465
How to configure one2many field inside a form with domain or filter Çözüldü
one2many
Avatar
Avatar
2
Nis 22
5320
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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