Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilitat
- Inventari
- PoS
- Project
- MRP
This question has been flagged
Hi,
Link a specific service product (e.g., "10-Session Personal Training Package") to a contact (e.g., a personal trainer) in Odoo using a Many2one field.
Steps to Implement:
1. Create the Service Product
Go to Sales > Products.
Click Create.
Set:
Name: 10-Session Personal Training Package
Product Type: Service
Add other details (price, invoice policy, etc.)
Save the product.
2. Add a Many2one Field to Contacts (res.partner)
Use custom code or Odoo Studio.
Field details:
Name: training_package_id
Type: Many2one
Related Model: product.product
Domain: [('type', '=', 'service')] - so only service products appear.
3. Code Example (if using Python code)
class ResPartner(models.Model):
_inherit = 'res.partner'
training_package_id = fields.Many2one(
'product.product',
string='Assigned Training Package',
domain=[('type', '=', 'service')],
)
4. Use It in Contacts
Go to Contacts > Open a Trainer's Profile.
You’ll see the new dropdown field.
Select the desired service product (e.g., the 10-session package).
5. Result
Each trainer/contact can be linked to one specific training service.
Can be used for filtering, reporting, or invoicing logic later.
Hope it helps.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-se