Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

Automation for creating and sending invoices from CRM

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
crminvoicingautomation
1 Antworten
879 Ansichten
Avatar
Otto

Hey, I'm new to Odoo. I need to send 100s of invoices that are either for product A or product A+B to 100s of customers. I was hoping I could make an automation in the CRM module so that when I change an opportunity to stage X in the CRM -> create and send invoice to customer associated with the opportunity. If my custom property checkbox is left unchecked, then invoice with item A should be sent, and if checked, invoice with products A+B should be sent. Prices are constant for both products so the outgoing invoices are always one of two amounts (no customisation needed). 


How might I go about doing this? In Automation Rules, the Trigger seems straight forward, but the Action not so much...


Thank you

0
Avatar
Verwerfen
Otto
Autor

You have no idea how much time this has saved me. Thank you so very much! I made a few adjustments: I added logic to link to an existing invoice if one already matches (so it won’t create duplicates), built product lines dynamically based on a selection and quantity, added a small discount for extra units, wrapped everything in error handling with chatter feedback, and made the email sending a bit more robust. Works perfectly now!

Thanks again 🙏

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste Antwort

Hi,

Steps:

Go to Settings → Technical → Automation → Automated Actions.

Create a new one:

Model = CRM Lead

Trigger = On Update

Condition = stage_id == 'X'

Action to do: Execute Python Code.

Code:

# This runs in the context of crm.lead record(s)

for lead in records:

    partner = lead.partner_id

    if not partner:

        continue


    # Decide which products to add

    product_ids = []

    if lead.x_my_checkbox:  # your custom field

        product_ids = [env.ref('your_module.product_a').id,

                       env.ref('your_module.product_b').id]

    else:

        product_ids = [env.ref('your_module.product_a').id]


    # Create invoice (draft)

    invoice = env['account.move'].create({

        'move_type': 'out_invoice',

        'partner_id': partner.id,

        'invoice_line_ids': [

            (0, 0, {

                'product_id': pid,

                'quantity': 1,

                'price_unit': env['product.product'].browse(pid).lst_price,

            }) for pid in product_ids

        ]

    })


    # Post and send by email

    invoice.action_post()

    template = env.ref('account.email_template_edi_invoice')

    invoice.message_post_with_template(template.id)


Hope it helps.

0
Avatar
Verwerfen
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
Create opportunity each month based on pasts orders
crm automation
Avatar
Avatar
1
Aug. 24
2698
How to automatically create activity on stage change in CRM?
crm automation
Avatar
Avatar
1
Nov. 23
4548
CRM - bring leads back from archive automatically
crm automation
Avatar
0
Mai 20
3667
CRM: automatically move an Opp when a quote is created?
crm stages automation
Avatar
Avatar
Avatar
2
Aug. 25
2306
CRM: Create Automation to re-create a re-order/follow up Gelöst
crm opportunity automation
Avatar
Avatar
2
Dez. 24
2224
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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