Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
2990 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
kwi 20
3379
3
paź 15
5900
0
gru 24
1073
0
wrz 24
1086
1
lip 23
2031