Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1702 มุมมอง

Odoo 17

What I'd like to do is to set up portal users with a a Many2one field of other portal users so that when logged into the portal, they can see the Sales Order, Invoices of those other portal users.

These need to be separate portal users, and not Contacts belonging to the Portal User.

Two options are acceptable:

1) Logged in as Portal User A, user can see all Sales Orders and Invoices from themselves (Portal User A) as well as Portal User B and Portal User C.

2) Logged in as Portal User A, user can see all Sales Orders and Invoices from themselves (Portal User A), and then have a dropdown menu of other allowed users (Portal User B and Portal User C) to be able to see Sales Orders and Invoices for them.

I've tried even hacking the Query object to include additional partner_ids but it doesn't seem to work.  Too many security protections, I assume.

I tried changing the standard:

Query: 'SELECT "sale_order"."id" FROM "sale_order" WHERE
(((("sale_order"."partner_id" = %s) AND
"sale_order"."pricelist_id" IS NULL) AND
("sale_order"."website_id" = %s)) AND
("sale_order"."state" = %s)) ORDER BY
"sale_order"."write_date" DESC  LIMIT %s' with params:
[828, 1, 'draft', 1]
To this:

Query: 'SELECT "sale_order"."id" FROM "sale_order" WHERE
(((("sale_order"."partner_id" in %s) AND
"sale_order"."pricelist_id" IS NULL) AND
("sale_order"."website_id" = %s)) AND
("sale_order"."state" = %s)) ORDER BY
"sale_order"."write_date" DESC  LIMIT %s' with params:
[(828,829,830), 1, 'draft', 1]

But nothing seems to allow this.

Any suggestions?  Third party apps that do this?


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

One standard solution is available: if the end user adds the portal user as a follower, they can see the orders. 

No need any customization.

อวตาร
ละทิ้ง
ผู้เขียน

How does the portal user do that? I don't see anywhere in the portal to do that?

ผู้เขียน

OH, OK. I see what you mean. It does give me a place to start!

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.พ. 24
1431
0
ธ.ค. 23
737
0
เม.ย. 23
1002
6
ก.พ. 23
17396
1
พ.ย. 22
4108