Sari la conținut
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
    • Artificial Intelligence
    • 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
    • Property Management
    • 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
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo course gettingstarted community database
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo course gettingstarted community database
Despre acest forum
  1. Getting Started
  2. Forum

POS stock negative – Automated action not triggered

Abonare

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

Această întrebare a fost marcată
Developmentcustom
1 Răspunde
475 Vizualizări
Imagine profil
Faidbrico Sarl

Hello,

I am trying to implement an automated workflow in Odoo, but I am facing an issue with the Point of Sale (POS).

My goal:

When a product stock becomes negative, I want to automatically trigger an action (create an activity or schedule a meeting).

What I did:

  • I created an automated action on the model product.product
  • Trigger: On update
  • Condition: qty_available < 0

The problem:

When I sell a product through the POS while it is not in stock:

  • The sale is completed successfully
  • The stock becomes negative
  • BUT the automated action is not triggered

My questions:

  1. Why is the automated action not triggered from POS sales?
  2. What is the correct model to use to detect negative stock in real time?
  3. Is there a recommended way to trigger an activity or meeting when stock goes below zero via POS?

Any guidance or best practices would be greatly appreciated.

Thank you!

0
Imagine profil
Abandonează
Imagine profil
Javier Garcia
Cel mai bun răspuns

Hi,

The reason your automated action isn't triggering is that qty_available is a computed field (store=False), so Odoo's "On update" trigger only fires on direct ORM write() calls; which never happen on product.product during a POS sale. POS processes stock through stock.move internally, completely bypassing your automation.

The cleanest solution without custom development is to create an automated action on the stock.move model instead, with trigger set to "On Creation & Update", and the following filter:

state = done
AND location_dest_id.usage = customer
AND product_id.qty_available < 0

Then set the action to schedule an activity on the related product_id. This fires as soon as the POS order is validated and the move is confirmed.

If you prefer a simpler approach, a scheduled action (cron) every few minutes on product.product works reliably:

records = env['product.product'].search([('qty_available', '<', 0)])
for rec in records:
    rec.activity_schedule('mail.mail_activity_data_todo', summary='Negative stock: ' + rec.name)

Hope this helps!

0
Imagine profil
Abandonează
Îți place discuția? Nu doar citi, alătură-te!

Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!

Înscrie-te
Postări similare Răspunsuri Vizualizări Activitate
Transferring data from ERPNEXT to OdooERPNEXT to Odoo
custom
Imagine profil
Imagine profil
Imagine profil
2
mai 26
393
How to clear Odoo will load as soon as you're back online.
Development technical
Imagine profil
Imagine profil
2
mai 25
8025
How to redirect to a view on a module installation? Rezolvat
Development technical community
Imagine profil
Imagine profil
1
mar. 24
8918
Generate PDF from custom app
16 saas custom development pdf
Imagine profil
Imagine profil
1
mar. 23
2664
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 Svenska ภาษาไทย 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