| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 17 |
| Technical Name |
an_company_default |
| License | LGPL-3 |
| Website | https://odoosa.net |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 17 |
| Technical Name |
an_company_default |
| License | LGPL-3 |
| Website | https://odoosa.net |
Company Default for Partner and Product
Auto-set default company from logged user for partners and products
Screenshot
Overview
This module automatically sets the default company field to the logged user's current company when creating new Partners and Products.
Use Case: In multi-company Odoo environments, users often forget to set the company when creating new partners or products, leading to data visibility issues. This module ensures that every new partner and product is automatically assigned to the user's current company, preventing cross-company data leaks and maintaining proper data isolation.
The Problem
In standard Odoo multi-company setup:
| ✘ Partners are created without a company by default (shared across all companies) |
| ✘ Products are created without a company by default (shared across all companies) |
| ✘ Users must remember to manually set the company every time |
| ✘ Forgotten company assignments cause data visibility issues |
The Solution
With this module installed:
| ✔ New Partners automatically get the user's current company |
| ✔ New Products automatically get the user's current company |
| ✔ No manual action required - works automatically |
| ✔ Proper data isolation between companies maintained |
Key Features
| ✔ Auto-Default on Partners - Company set automatically on res.partner |
| ✔ Auto-Default on Products - Company set automatically on product.template |
| ✔ Uses Current Company - Respects user's company switcher selection |
| ✔ Zero Configuration - Install and it works immediately |
| ✔ Lightweight - Minimal code, maximum impact |
| ✔ Override Friendly - Users can still change company if needed |
How It Works
| Step 1: User is logged in and has a current company selected |
| Step 2: User creates a new Partner or Product |
| Step 3: Company field is automatically filled with current company |
| Step 4: User can change it if needed, or save with the default |
Affected Models
| Model | Field | Effect |
|---|---|---|
res.partner |
company_id | Default = User's current company |
product.template |
company_id | Default = User's current company |
Technical Information
| Attribute | Value |
|---|---|
| Technical Name | an_company_default |
| Version | 18.0.1.0.0 |
| Dependencies | base, product |
| License | LGPL-3 |
| Models Extended | res.partner, product.template |
Contact & Support
$15 USD
Get professional support and customization services
| Developer: | Ahmed Nour |
| Email: | ahmednour@outlook.com |
| Website: | odoosa.net |
| WhatsApp: | +966 53 692 9391 |
Please log in to comment on this module