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

Create credit notes from returns

Odebírat

Get notified when there's activity on this post

This question has been flagged
inventoryreturnscreditnotesAutomatedActionsOdooThinking!
3 Odpovědi
7130 Zobrazení
Avatar
Ricardo Gross

Is it possible to automatically create credit notes when confirming returns of goods using automated actions?

2
Avatar
Zrušit
Avatar
CandidRoot Solutions Private Limited
Nejlepší odpověď

Hello Ricardo Gross

Yes, it is possible to create credit notes while returning goods.

when we returns product, system create stock.picking record with value of Reference = "Return of WH/OUT/00016". so we can create automatic action on create new record of stock.picking model to check reference value if it is start with "Return" keyword then get sale_id (default field in stock.picking)

Now sale order do have invoice_ids fiels to get invoice and we can call "reverse_move" of those invoice to crate credit notes.

please check automated action with python code 


# check if action trigger for return order and related sale order has invoice created with payment
if
record.origin.startswith('Return of') and record.sale_id.invoice_ids.filtered(lambda move: move.state == 'posted'):
invoice_ids = record.sale_id.invoice_ids.filtered(lambda move: move.state == 'posted')
# create refund wizard
move_reversal = env['account.move.reversal'].with_context(active_model="account.move", active_ids=invoice_ids.ids).create({
'date': datetime.datetime.today().strftime('%Y-%m-%d'),
'reason': 'no reason',
'refund_method': 'refund',
'journal_id': invoice_ids.journal_id.id,})
# create revese move
move_reversal.reverse_moves()
# get last invoice as credit note
invoice_refund = record.sale_id.invoice_ids.sorted(key=lambda inv: inv.id, reverse=False)[-1]
# post credit note invoice_refund.action_post()

Result:



Thanks & Regards,

​

CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat 380015
     

4
Avatar
Zrušit
Ricardo Gross
Autor

Thank you CandidRoot for your answer and the information provided, but trying to create the automated action, I must be making some mistake, could you please explain how to setup this, I am sure that other followers of this forum would also appreciate

CandidRoot Solutions Private Limited

Hello Ricardo Gross,
Based on your request i have provied automation action with python code.

please check my updated answer and mark as best answer if it is helpfull

NS

Thank you very much for detailed solution

Ricardo Gross
Autor

Thank you very much! there is still a small detail to correct, because in this way, the credit note is already being created before I confirm the return, and if I delivery 2 units and return only 1, the credit note should be only for 1, not 2 units

Avatar
Jose S. May
Nejlepší odpověď

I usually solve the problem of automatically generating credit notes after a confirmed return using Automated Actions combined with a small Python script. The key is to make sure that the credit note is only generated after a confirmed return and only for orders that have been invoiced. If you have time, check out https://unblockedgamespremium.io for more details.

0
Avatar
Zrušit
Avatar
Flavio Guzman
Nejlepší odpověď

Gracias amigo, me funcionó para V17 pero tuve que eliminar #'refund_method': 'refund' ya que ese campo no está disponible en el modelo account.move.reversal

0
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 manage Inventory Valuation and Credit note journal entries when doing a return? Vyřešeno
accounting inventory returns quickstart creditnotes
Avatar
1
pro 24
7538
Apply one credit note to multiple invoices
returns creditnotes
Avatar
Avatar
1
srp 24
2745
Can we have non-sellable locations? Odoo v14e Vyřešeno
inventory returns
Avatar
Avatar
2
úno 23
5498
How to associate two transfers(OUT & IN) to a Sales Order
sales inventory returns
Avatar
Avatar
2
čvc 18
5546
How to trigger (create) a delivery order for a rental order?
rental inventory deliveryorder AutomatedActions
Avatar
Avatar
Avatar
Avatar
3
říj 24
3314
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