| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/edi-framework |
| GIT | |
| GIT | https://github.com/OCA/edi-framework.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/edi-framework/tree/17.0/edi_project_oca |
| VERSION | |
| VERSION | 1.0.0 |
| CATEGORY | |
| CATEGORY | Uncategorized |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | No |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Camptocamp |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Camptocamp |
| COMMITTERS | |
| COMMITTERS | Weblate, OCA-git-bot, SilvioC2C, oca-ci |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/edi-framework |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 19:20:05 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
OCA/connector: - component_event - component OCA/edi: - base_edi OCA/edi-framework: - edi_oca OCA/queue: - queue_job odoo/odoo: - project - analytic - base - base_setup - web - bus - web_tour - uom - portal - web_editor - http_routing - auth_signup - rating - resource - digest - base_sparse_field |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES |
cachetools PyYAML requests |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | This module intends to create a base to be extended by local EDI rules
for project management.
In order to add customizations for projects, create a listener:
```python
from odoo.addons.component.core import Component
class ProjectEventListenerExample(Component):
_name = "project.project.event.listener.example"
_inherit = "base.event.listener"
_apply_on = ["project.project"]
def on_record_create(self, record, fields=None):
"""Do stuff after the project has been created"""
def on_record_write(self, record, fields=None):
"""Do stuff after the project has been updated"""
def on_record_unlink(self, record):
"""Do stuff before the project gets deleted"""
```
In order to add customizations for tasks, create a listener:
```python
from odoo.addons.component.core import Component
class ProjectTaskEventListenerExample(Component):
_name = "project.task.event.listener.example"
_inherit = "base.event.listener"
_apply_on = ["project.task"]
def on_record_create(self, record, fields=None):
"""Do stuff after the task has been created"""
def on_record_write(self, record, fields=None):
"""Do stuff after the task has been updated"""
def on_record_unlink(self, record):
"""Do stuff before the task gets deleted"""
```
Use ``@skip_if()`` decorator to avoid triggering a listener's method if necessary:
```python
from odoo.addons.component.core import Component
from odoo.addons.component_event import skip_if
class ProjectTaskEventListenerExample(Component):
_name = "project.task.event.listener.example"
_inherit = "base.event.listener"
_apply_on = ["project.task"]
@skip_if(lambda self, task: not task.stage_id) # Do nothing if the task has no stage
def on_record_update(self, record, fields=None):
"""Do stuff after the task has been created"""
``` |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
edit_project_inherit |
project.project | xpath | Inherits project.edit_project | |
project_project_view_form_simplified_inherit |
project.project | xpath | Inherits project.project_project_view_form_simplified | |
quick_create_task_form_inherit |
project.task | xpath | Inherits project.quick_create_task_form | |
view_task_form2_inherit |
project.task | xpath | Inherits project.view_task_form2 |
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.