Skip to Content
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
    • Aprobări
    • 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
    • Estate Managament
    • 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

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Automation for creating and sending invoices from CRM

Abonare

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

Această întrebare a fost marcată
crminvoicingautomation
1 Răspunde
875 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
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 🙏

Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

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
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Create opportunity each month based on pasts orders
crm automation
Imagine profil
Imagine profil
1
aug. 24
2696
How to automatically create activity on stage change in CRM?
crm automation
Imagine profil
Imagine profil
1
nov. 23
4543
CRM - bring leads back from archive automatically
crm automation
Imagine profil
0
mai 20
3664
CRM: automatically move an Opp when a quote is created?
crm stages automation
Imagine profil
Imagine profil
Imagine profil
2
aug. 25
2300
CRM: Create Automation to re-create a re-order/follow up Rezolvat
crm opportunity automation
Imagine profil
Imagine profil
2
dec. 24
2223
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 ภาษาไทย 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