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í
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • 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
    • Služby pro partnery
    • 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

Autofill done qty when receiving products in purchase app

Odebírat

Get notified when there's activity on this post

This question has been flagged
stock.move
3 Odpovědi
3936 Zobrazení
Avatar
Bernard

Hi everybody, I hope that you are doing well,

I'm coming to you because i need your help. We are losing a lot of time fullfiling manually the done quantity in our purchase module when clicking on "receive products"

So what i tried to do (with my really really basic skills about Odoo) is to create a button related to an action that would take the value of the "demand" field and copy it to the "done" filed so we would just have to modify the done field for the products that didnt arrived and not for all of the products.

What I did to try it is first create a server action that is obviously not working, then I created a button  : 

I didnt found the proper way to set the action, so when i click on the button named "remplissage" a code error appears.

I have tried two different things to make the action work :

First it was with the update record. I settled it this way : 


model = stock.move                                        action to do = update the record

data to write 

Field = quantity_done             Evaluation type = Value or Python expression 


then value or python code = record.product_uom_qty


Please don't laugh about what I have done, i started to work on Odoo in setpember and i'm learning by myself.

The second thing i have tried is to try the python code I had found on this topic : 

"@api.onchange('')

def onchange_func(self):

if self.:

self.   = self."


so I replaced field whose value need to be taken by field.

and field to wich you need value by field.

It wasn't working.

If any of you could help me thank you a lot for reading.

I really hope that it is understandable, do not hesitate if it's not I will try to make it clearer.

Have a nice day
0
Avatar
Zrušit
Avatar
Josep Anton Belchi Riera
Nejlepší odpověď

No need to develop anything. 

Simply, click on button "validate" WITHOUT FILLING ANY "DONE" QUANTITY. You will see the warning "You have not recorded done quantities yet, by clicking on apply Odoo will process all the quantities." Just click on "apply". 

1
Avatar
Zrušit
Avatar
Ray Carnes (ray)
Nejlepší odpověď

This is a feature of v15.

You can see the code we wrote for it at https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_move.py#L1835 


Based on that code, you can create a Server Action that does the same thing at v14:


When you click CREATE CONTEXTUAL ACTION, Users can access the Server Action from the Actions Menu once they have selected or opened a Transfer:


You can use the DATABASE ID of this Server Action if you would rather present it as a BUTTON to the User.


Note: As Josep Anton Belchi Riera mentions, this is not necessary unless you need to edit the Done Quantity on the lines. If all lines are being received in full, just click VALIDATE. Setting the Done Quantity like this is only needed if you have 50 lines and 48 of them are being received in full (so you run this) then the other two you would edit to change because they are the only 2 lines not being received in full.

0
Avatar
Zrušit
Avatar
Bernard
Autor Nejlepší odpověď

The problem is that when you click on validate it automatically validate every value.

Here imagine if one of the value isn't correct, I can't click validate because i need to change some of them, if it is the case, which happens often, I need to fullfill everything manually and it is in this occasion that I would like with an action that I created to fullfill automatically and only change what needs to be changed.


-2
Avatar
Zrušit
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
How to move stock from one location to another
stock.move
Avatar
Avatar
Avatar
Avatar
4
dub 25
10845
Transfer stock between different serial number of same Item
stock.move
Avatar
0
říj 24
2182
Action after stock.move
stock.move
Avatar
0
dub 21
4023
How to show moves and their details from picking
stock.move stock.picking
Avatar
Avatar
Avatar
2
kvě 25
7037
Delivery Order disappears when adding a new delivery order line
stock.move delivery_order
Avatar
Avatar
1
led 25
5413
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