[MIG] bemade_fsm to 18.0 Aside from fixing standard 17.0..18.0 stuff and fixing XML ID references: 1. **Remove `_get_closed_stage_by_project()`**: This method is obsolete - it was copied from base FSM but no longer exists in 18.0. Base system now uses `is_closed` field. 2. **Implement State Propagation**: Enhance the `write()` method to propagate done/cancelled states to child tasks using `is_closed` field logic. 3. **Test Task Creation**: Thoroughly test the custom task creation logic against base 18.0 All 56 tests are passing.
19 lines
480 B
Python
19 lines
480 B
Python
from odoo import fields, models
|
|
|
|
|
|
class ProductTemplate(models.Model):
|
|
_inherit = "product.template"
|
|
|
|
task_template_id = fields.Many2one(
|
|
comodel_name="project.task.template",
|
|
string="Task Template",
|
|
ondelete="restrict",
|
|
)
|
|
|
|
is_field_service = fields.Boolean(
|
|
string="Plan as field service",
|
|
help=(
|
|
"Products planned as field service will have travel time considered in"
|
|
" planning."
|
|
),
|
|
)
|