Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged

In the customer portal, the Quotation panel only shows orders with the status 'sent' or 'cancel'. The sale Order panel also only shows orders with the status 'sale' or 'done'. I want to show 'draft' orders to customers as well. what should I do? I also changed the domain in the sale customer portal controller but it doesn't affect.

Avatar
Opusti

logically customers are allowed to see the sale orders that have been sent. Draft orders may be get canceled and to manage the price and other formalities internally.

Avtor

In there any way to show draft quotes in customer portal quotations ?

Best Answer

Hi,

If you are familiar with odoo customization you can use the following method.

You can override the following functions in the sales customer portal controller.Replace the following lines in the _prepare_home_portal_values function with,

quotation_count = SaleOrder.search_count([
('message_partner_ids', 'child_of', [partner.commercial_partner_id.id]),
('state', 'in', ['draft', 'sent', 'cancel'])
]) if SaleOrder.check_access_rights('read', raise_exception=False) else 0

also the inside the portal_my_quotes function with,

domain = [
('message_partner_ids', 'child_of', [partner.commercial_partner_id.id]),
('state', 'in', ['draft', 'sent', 'cancel'])
]

Regards

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
jul. 22
5001
1
avg. 21
2437
2
nov. 17
6088
1
jan. 25
2902
1
dec. 23
5875