Project Post-sale Automation

project_crm_postsale_automation
REPOSITORY
REPOSITORYOCA/project
GIT
GIThttps://github.com/OCA/project.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/project/tree/17.0/project_crm_postsale_automation
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), APSL-Nagarro
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), APSL-Nagarro
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Patryk Pyczko
WEBSITE
WEBSITEhttps://github.com/OCA/project
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-09 07:19:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - project
    - analytic
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - rating
    - resource
    - digest
    - crm
    - sales_team
    - calendar
    - onboarding
    - utm
    - contacts
    - phone_validation
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module automates the creation of recurring post-sale sales opportunities directly from your projects. 

It allows account managers to set up automated schedules for customer follow-ups. Based on the selected timeline, the system automatically creates the corresponding leads in the CRM, pre-fills the responsible salesperson, assigns the customer, and formats the opportunity name dynamically based on the current period.

The scheduling engine supports multiple recurrence levels to adapt to any business cycle:
- **Short-term tracking**: Set up schedules based on a specific number of days or weeks.
- **Calendar-aligned tracking**: Schedule follow-ups by months, quarters, semesters, or years.
- **Smart date adjustment**: For monthly or annual cycles, you can pick a specific day of the month (1-31). If a month is shorter than your chosen day (like February or a 30-day month), the system automatically realigns and schedules it for the very last day of that month.

Internal instructions or specific notes written on the project are automatically copied into the description of every new lead. Additionally, seasonal tags are assigned to each opportunity to make pipeline filtering and sales reporting easier. 

The automated generation process is designed to handle errors safely. If a single project has a configuration issue, the system logs the error and immediately skips to the next project, ensuring the daily routine for all other active projects finishes successfully.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_project_postsale_form project.project.postsale.form project.project form Inherits project.edit_project
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (2)

New fields (3)
  • is_postsale Boolean
    default=False help='Technical field to identify leads generated automatically by the post-sale automation.' string='Is a Post-sale Lead'
  • postsale_cycle_date Date
    help='The logical date of the post-sale cycle this lead belongs to. Used to prevent duplicates.' string='Post-sale Cycle Date'
  • project_id Many2one → project.project
    comodel_name='project.project' index=True string='Project'
Public methods (0)

No public methods.

New fields (13)
  • postsale_active Boolean
    string='Activate Post-sale' tracking=True
  • postsale_day_of_month Integer
    default=1 help='Day of the month to generate the opportunity (1-31). If the month has fewer days, the last day of that month will be used.' string='Day of Month'
  • postsale_generate_tags Boolean
    default=True help="Automatically create and assign a tag like 'Q2 2026 - Postsale' to the lead." string='Generate CRM Tags'
  • postsale_interval Integer
    default=1 string='Interval'
  • postsale_last_date Date
    string='Last Generation Date'
  • postsale_lead_count Integer
    compute='_compute_postsale_lead_count' string='Post-sale Leads'
  • postsale_name_template Char
    default='{period_label} {year} - {project_name}' help='Allowed variables: {project_name}, {period_label}, {year}' string='Name Template'
  • postsale_next_date Date
    string='Next Generation Date'
  • postsale_next_executions Html
    compute='_compute_postsale_next_executions' string='Next Executions Preview'
  • postsale_notes Html
    help='Internal notes or description that will propagate directly into the generated CRM Lead description.' string='Internal Notes'
  • postsale_partner_id Many2one → res.partner
    comodel_name='res.partner' help='Customer assigned to the generated leads. Defaults to the project customer.' string='Post-sale Customer'
  • postsale_rule Selection
    default='months' string='Unit' args: [('days', _('Days')), ('weeks', _('Weeks')), ('months', _('Months')), ('quarters', _('Quarters')), ('semesters', _('Semesters')), ('years', _('Years'))]
  • postsale_user_id Many2one → res.users
    comodel_name='res.users' domain="[('share', '=', False), ('sale_team_id', '!=', False)]" help='Internal user responsible for the generated post-sale leads (must have a Sales Team assigned).' ondelete='restrict' string='Post-sale Responsible'
Public methods (3)
  • action_generate_postsale_opportunity(self)
    Creates the opportunity. Called by Cron and Debug button.
  • action_view_postsale_leads(self)
  • write(self, vals)
    Override to log in chatter when activated/deactivated
STATUS
STATUSOpen migration PR - not merged yet for this version
CI STATUS
CI STATUS no CI data
OPEN SINCE
OPEN SINCEunknown
REPOSITORY
REPOSITORYOCA/project
PULL REQUEST
PULL REQUEST18.0 mig project crm postsale automation (#1769)