Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
2987 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
dub 20
3379
3
říj 15
5900
0
pro 24
1072
0
zář 24
1086
1
čvc 23
2030