Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

assing the value from custom field in products to other one custom field in the sale order form using custom modules

Naroči se

Get notified when there's activity on this post

This question has been flagged
valuesassigningcustomfield
1 Odgovori
4797 Prikazi
Avatar
Alfa y Omega Pachuca

Code for custom module for product.template:

# -*- coding: utf-8 -*-

from openerp import models, fields, api

class myfieldinproduct(models.Model):

_inherit = 'product.template'

#Add custom field "reg_model"

reg_model = fields.Char('Model', default='NL-XXXX-XXX')

....

My code for custom module for sale.order:

# -*- coding: utf-8 -*-

from openerp import models, fields, api

class myfieldinsaleorder(models.Model):

_inherit = 'sale.order'

#Add custom field "reg_model"

reg_modelinsaleorder = fields.Char('Model', default='NL-XXXX-XXX')

In this point how i can get the value of "reg_model" from product.template custom module (myfieldinproduct) and assing to reg_modelinsaleorder

....

Example:

in produc.template have a custom field "mycolor"

in sale.order have a custom field "hiscolor"

hiscolor = mycolor some thing like that.

Thank you.



0
Avatar
Opusti
Avatar
Qutechs, Ahmed M.Elmubarak
Best Answer

Hello,

I just don't understand something: that is the sale order can contains several lines with products ! it'll be more logical if you added your custom field to sale order line rather than the sale order.

Usually to fetch some values you can use onchange method, or make the fields related.

You can check how the system fetch the product's information in the sale order line in this method So most probably you'll need to override this function ...

Hope this could help

0
Avatar
Opusti
Alfa y Omega Pachuca
Avtor

for example i need know how many products in budgets (quotations) are pink, how many products are blue... For example in products for store values i add several custom fields for computers like product_ memory_capacity, product_cpu_speed, product_hdd_capacity because i need to see this values in listview(treeeview) like list prices... In the case of the sale order to store values i will add the same fields like salorder_memory_capacity, saleorder_cpu_speed, saleorder_hdd_capacity BECAUSE i need to make a filter in listview (treeview) to know how many computer in salorder_ memory_capacity = 8GB, or 4 GB... or saleorder_cpu_speed = 2.7GHz or 3.0 GHz... And also In this point when i create a new budgets (quotations) i need to fill this values with hand, and i will like to get default values from the current product in sale order line because maybe just the memory capacity was changed. And yes, i use just one product for every budgets (quotations) in sale order line, of course i do not sell computers.

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

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Task Assignment from the website
assigning
Avatar
0
jul. 22
2077
Import product attributes/values containing a comma
values importing
Avatar
Avatar
2
apr. 25
1972
Importing Leads into Odoo CRM
import assigning
Avatar
Avatar
2
feb. 24
2108
Missing context references on my crm
crm customfield
Avatar
0
feb. 24
1936
How to add Custom Boolean fields on the Product Page
product customfield
Avatar
Avatar
Avatar
2
okt. 23
3913
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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