Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
2989 Tampilan

Hello everyone!

I'm new to Odoo. I am trying out Odoo Community v15 on a local machine for my enterprise. With the CRM and Sales modules, I have learnt that Sales Quotes can be created directly from the Opportunity details screen. However, when creating a quotation, the expected revenue does not change to it's final price, and my employees have to change it manually.

I can't seem to find a way to have that field update automatically, based on the total sum of costs from both quotes and confirmed orders. Is there a configuration I may have missed? Or should I implement that function with code? If so, how would I do that?

Thanks in advance.

Avatar
Buang
Jawaban Terbai

You can totally do it, with automatization rules. Im using this rule in Odoo v17 Entrepice.

1. Model: Sale Order
2. Activate: When saving
3. Match: all.
4. Apply: in all.
5. Update: non.

*Acctions*

Execute code:

today = datetime.datetime.today()

quotation_domain = [('state', 'not in', ('cancel',))]

for so in records:

    company_currency = so.opportunity_id.company_currency or env.company.currency_id

    lead = so.opportunity_id

    sale_orders = lead.order_ids.filtered_domain(quotation_domain)

    sale_amount_total = sum(

        order.currency_id._convert(

            order.amount_untaxed, company_currency, order.company_id, order.date_order or today

        )

        for order in sale_orders

    )

    lead.write({'expected_revenue':sale_amount_total})



Let me know if you need further explanation.

Avatar
Buang
Jawaban Terbai

Hello, 

No, There is no any kind of setting or configuration that based on quote amount, It will update the Expected Revenue field.

You have to manually put the Expected Revenue into Opportunity.

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Apr 20
3379
3
Okt 15
5900
0
Des 24
1073
0
Sep 24
1086
1
Jul 23
2031