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í
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • 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
    • Services for Partners
    • 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

Automated Action: 'Compute Price from BoM' when BOM is changed

Odebírat

Get notified when there's activity on this post

This question has been flagged
AutomatedActions
1 Odpovědět
5760 Zobrazení
Avatar
Lucas

Hi guys,


I have the following scenario:

- Each product we make is unique

- New products are based off a BoM template

- Each product is priced based off the BoM cost

I want to avoid having to click into the product and click the 'Compute Price from BoM' every time a new product is created.

How can I configure an Automated action to 'Compute Price from BoM' whenever a BoM is updated for a product?


Thanks,

Lucas

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

In the list view of your bom products. You can select all of them and then click on the action button. In that action button is the compute from BoM action. There you can trigger all at once.


product_template_obj = env['product.template'].search([('id', '=' , record.product_tmpl_id.id)])
product_template_obj.action_bom_cost()

0
Avatar
Zrušit
Lucas
Autor

Hi Nomad,

I am aware of that method.
The goal is to automatically compute from BoM each time a BoM is updated

thanks,
Lucas

Odoo4Life

I will try to create automated action for you to use

Zahra Naveed

odoo4Life are you able to make the automate action for this?

Odoo4Life

Yes Krakalien, the automated action is found in the answer.

Create an automated action on BoM model. which on BoM creation or update, will run the following python code:

#search the database for the product which is linked to the BoM:
product_template_obj = env['product.template'].search([('id', '=' , record.product_tmpl_id.id)])

#Trigger the BoM compute button on the product you just searched:
product_template_obj.action_bom_cost()

Of course this is maybe for an older version of Odoo than what you are currently using.

Zahra Naveed

odoo4life
i am getting this error
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
ValueError: <class 'AttributeError'>: "'product.template' object has no attribute 'product_tmpl_id'" while evaluating
"product_template_obj = env['product.template'].search([('id', '=' , record.product_tmpl_id.id)])\r\nproduct_template_obj.action_bom_cost()"

regards

Odoo4Life

Krakalien,

This automated action should be applied/implemented for model: mrp.bom.

Model: mrp.bom
Trigger: on creation and update
Action: Python code

for record in records:
product_template_obj = env['product.template'].search([('id', '=' , record.product_tmpl_id.id)])
product_template_obj.action_bom_cost()

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
Fix Automated Action Based on Time Condition, From Odoo AutoAction(Done), to Code(Not yet)
AutomatedActions
Avatar
Avatar
Avatar
3
lis 25
378
How to copy Transfer lines with an Automated Action
AutomatedActions
Avatar
0
zář 24
2148
Automated action sends notification
AutomatedActions
Avatar
0
kvě 24
27
Create a new record automation
AutomatedActions
Avatar
0
bře 24
2334
CRM Automated Action
AutomatedActions
Avatar
0
bře 24
2324
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