Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Inventory Moves with MES Integration

Subscriure's

Get notified when there's activity on this post

This question has been flagged
manufacturingintegration
3 Respostes
3059 Vistes
Avatar
David Schultz

I am working on an MES integration with Odoo for a control system. I am able to select a manufacturing order, start production, modify produced and consumed quantities, and end production. However, while inventory moves are registered, they are not updated in inventory (quantity available). 

I execute read/write methods on the following models for the integration: 

​mrp.production

​stock.move

​stock.move.line

​product.template

I also create a stock.valuation.layer record for all of the material. 

Everything executes as expected, except when the production is complete. none of the inventory quantities adjust.

Thoughts?

0
Avatar
Descartar
Avatar
Lars Aam
Best Answer

I would think to process as it would have been done with manual entry.

In settings for manufacturing you must have flagged "Unlock manufacturing orders" to allow flexible consumption.

Be sure that you have set Flexible Consumption to Allowed in the BOM, and Manual consumption is flagged for the components.  (I assume you do not.

You must make sure you have filled the field qty_done in the stock move line for the components, which is the actual consumed qty.  Else you will only post what is planned.  

For produce fill the field qty_producing in mrp.production.

The result should be that the order get status = To close (field state in mrp.production).

Use the action "button_mark_done" and (of course) select only the actual manufacturing order.  You will use the standard Odoo processing. It will do several posting in the background: Material movements, Accounting entries, and product valuation.  So you should not need to send anything to stock valuation layer or stock.move.

But for Button Mark done action I have configured an automatic action, that run when field state is changed into "To Close". 

model.search([('state', '=', 'to_close')]).button_mark_done()

Why do you update in product.template? Product template is masterdata, and it is not logic to update when processing confirmation of manufacturing?

Hope this helps you.


0
Avatar
Descartar
David Schultz
Autor

Lars,

Thank you for your help. I did not have the "Unlock Manufacturing Orders" checked. It appears this was the missing piece. I have outline additional steps needed.

Flexible Consumption was Allowed.

There is not a field "qty_done" in stock.move.line model. In stock.move the field "quantity" is updated to reflect material in actuals. This will create/edit lines in stock.move.line model.

I need to set the field "picked" to True in stock.move model. Otherwise materials in will not be consumed.

In mrp.production model, "qty_producing" is updated with the material out actual quantity. As you note, this will update field "state" in the same model.

Executing the "button_mark_done" method on mrp.production model outside of Odoo will result in an error, but it appears this is due to the forms that are generated in the method, but cannot be.

The product.template model was only used to create the stock.valuation.layer for materials. Only read method was used, and is no longer required.

Thank you, again, for your help. It is truly appreciated.

Avatar
David Schultz
Autor Best Answer

Rajesh,

Thank you for your help. The "action_confirm" will set the state of a MO to Confirmed. I have tried using the "button_mark_done", but this only consumes material request (BOM) quantities, not material actual quantities. For example, if a MO requests 25 units of a product, but 26 are consumed, this method will only consume 25 in production inventory.

Please note I edited my original post as the stock.move and stock.move.line models were incorrect.

David

0
Avatar
Descartar
Avatar
Rajesh R
Best Answer

Hello David,

Assuming that you are calling xml-rpc calls for your MES integration,
and in that if you are marking your M-order done via rpc call to 'action_confirm' (like odoo UI does the thing) then it should take care of all the stock effects


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

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

Registrar-se
Related Posts Respostes Vistes Activitat
[$$ LATAM $Book Your Journey$] ¿Cómo se llama LAN ahora?
manufacturing
Avatar
0
de nov. 25
5
Is it possible to integrate Webflow into Odoo? If yes, is there any documentation on this?
integration
Avatar
Avatar
1
de nov. 25
7237
How to make Odoo schedule manufacturing in parallel?
manufacturing
Avatar
0
d’oct. 25
485
Change in Work Center Productivity Accounting
manufacturing
Avatar
Avatar
1
de set. 25
1308
How to disable form view if there are not registers?
manufacturing
Avatar
Avatar
2
de set. 25
988
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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