Edi Project
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:
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:
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:
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"""
Table of contents
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
Silvio Gregorini <silvio.gregorini@camptocamp.com>
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
This module is part of the OCA/edi-framework project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Metadata
Release files for odoo-addon-edi-project-oca 17.0.1.0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| odoo_addon_edi_project_oca-17.0.1.0.0.12-py3-none-any.whl | Python 3 | none | any | Details |
Release files / odoo_addon_edi_project_oca-17.0.1.0.0.12-py3-none-any.whl
| Download URL | odoo_addon_edi_project_oca-17.0.1.0.0.12-py3-none-any.whl |
|---|---|
| Size | 26.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9149a91950c92eccbbebfcec3d22840e5269ee3cbf89eecb097f43870130cc59
|
|
BLAKE2b-256 checksum How to use checksums |
b6bc3978392a245ff2bc41f88906a3fde20ff6898a516507bd33ab2e059de279
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|