Files
partner-tools/partner_portal_extra_links/README.md
2026-06-22 21:41:49 +02:00

108 lines
3.2 KiB
Markdown

# Partner Portal Extra Links
Add extra links (visio room URL, wiki homepage URL) to the partner form and
display them in the portal user's home page.
## Description
### Extra Fields on Partner (Company)
The module adds two fields on the partner form, visible only for companies
(`is_company = True`):
| Field | Description |
|---|---|
| **Visio URL** | URL for the visio meeting room associated with the company |
| **Wiki Homepage URL** | URL for the wiki homepage associated with the company |
These fields appear in the backend partner form, right after the *Tags*
(`category_id`) field.
### Portal Display
When a portal user visits their home page (`/my`), the module displays in the
contact details sidebar:
**Conditional links** (from the user's parent company, if it exists and has URLs set):
- **Salle de visio** — clickable link to the company's visio room
- **Gare centrale** — clickable link to the company's wiki homepage
**Quick-action buttons** (always shown):
- **Accèder au e-learning** — links to `/slides`
- **Faire une demande support** — links to `/new/ticket`
- **Prendre RDV en visio** — links to `https://elabore.coop/rdv`
## How It Works
1. The module inherits `res.partner` and adds two `Char` fields: `visio_url`
and `wiki_homepage_url`.
2. The backend partner form view is extended to show these fields after the tags
field, hidden for individual contacts (non-company partners).
3. The portal template `portal.portal_contact` (sidebar contact section on
`/my/home`) is extended to inject:
- Conditional links from the portal user's parent company
(`user_id.partner_id.parent_id`). A `parent` variable is captured via
`t-set` to avoid repeated relation lookups.
- Three static quick-action buttons (e-learning, support, RDV).
## Dependencies
This module depends on:
- `portal`: Odoo portal module (provides the portal layout templates)
No external Python dependencies are required.
## Installation
Use the standard Odoo module installation procedure to install
`partner_portal_extra_links`.
## Configuration
1. Go to **Contacts** and open a company form.
2. Fill in the **Visio URL** and/or **Wiki Homepage URL** fields.
3. Portal users belonging to that company will see the links on their portal
home page.
No other configuration is required.
## Known Issues / Limitations
- The extra links are only displayed for portal users that have a parent company
(`parent_id`). Individual portal contacts without a parent company will not
see any links.
- The portal labels ("Salle de visio", "Gare centrale") are currently
hardcoded in French in the template.
## Bug Tracker
Bugs are tracked on
[Elabore Git Issues](https://git.elabore.coop/Elabore/partner-tools/issues).
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smash it by providing a detailed and welcomed
feedback.
## Credits
### Authors
- [Elabore](https://elabore.coop)
### Contributors
- Boris Gallet <boris.gallet@elabore.coop>
### Funders
The development of this module has been financially supported by:
- [Elabore](https://elabore.coop)
### Maintainer
This module is maintained by Elabore.