Skip to content

Conversation

@maisim
Copy link

@maisim maisim commented Nov 26, 2025

New modules: Sale Contact Management

This PR introduces two complementary modules for managing sale contacts across the sales workflow:

sale_partner_sale_contact

  • Adds a sale_contact_partner_id field to sales orders and invoices
  • Allows selecting a specific contact person from the customer's organization
  • Automatically propagates the contact from order to invoice
  • Optional display on PDF reports (configurable in settings)
  • Auto-switches customer to parent company when a contact person is selected

sale_partner_sale_contact_on_project

  • Extends the contact management to projects
  • Automatically copies the sale contact when creating projects from sales orders
  • Maintains contact information throughout the project lifecycle

Use case

In B2B scenarios, you often deal with specific contacts within a customer organization (procurement managers, project leads, etc.). While the invoice must go to the company, you need to track who you're actually working with for follow-ups, communication, and relationship management.

Design choices

  • Uses child contact hierarchy (existing Odoo pattern)
  • Auto-switch behavior prevents accidental invoicing to individuals while preserving contact info
  • Optional restriction modules available via settings for stricter enforcement
  • No modification of core partner/invoice logic - purely additive

Benefits

  • Better contact tracking across sales → invoice → project workflow
  • Cleaner reports with relevant contact information
  • Improve global consistncy and avoid to get stuffs like Analytic Account linked to a person
  • Respects commercial entity relationships while maintaining operational contacts
  • All features are backward compatible and don't affect existing workflows. 🤞

Related PRs

You can optionally use this module to limit partner_id selection to companies

@maisim maisim changed the title [16.0][ADD] sale_partner_sale_contact: Add sale contact to orders and invoices [16.0][ADD] sale_partner_sale_contact[_on_project]: Add sale contact to orders, invoices and projects Nov 26, 2025
@maisim maisim marked this pull request as draft December 2, 2025 13:52
… invoices

This module adds the ability to specify a contact person for sale orders
and invoices, separate from the main customer.

Features:
* Add Sale Contact field on sale orders and invoices
* Propagate sale contact from sale order to invoice
* Display sale contact on PDF reports (configurable)
* Configuration option in Settings > Sales to enable/disable display
* Domain restriction: only child contacts of the customer can be selected
* OnChange logic to clear incompatible contacts when customer changes

Technical implementation:
* New field sale_contact_partner_id on sale.order and account.move
* Company-level configuration field sale_display_contact_on_reports
* Report template inheritance for sale orders and invoices
* French translations included
…act to projects

This module extends sale_partner_sale_contact to automatically propagate
the sale contact from sale orders to the projects created from those orders.

Features:
* Propagate sale contact from sale order to project
* Display sale contact field on project form view
* Automatic propagation when project is created from sale order line

Technical implementation:
* Override _timesheet_create_project_prepare_values on sale.order.line
* Add sale_contact_partner_id field on project.project
* Tree and form view customization for projects
* French translations included

Depends on: sale_partner_sale_contact (in this PR)
@maisim maisim force-pushed the 16.0-add-sale_partner_sale_contact branch from 3d8b2e9 to 27c72b2 Compare December 3, 2025 10:14
@maisim maisim marked this pull request as ready for review December 3, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant