bemade-addons/bemade_fsm/wizard/res_config_settings.py
Marc Durepos 5793351bbe g This is a combination of 2 commits.
[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.
2025-09-09 14:05:34 -04:00

22 lines
686 B
Python

from odoo import models, fields
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
company_id = fields.Many2one(
comodel_name="res.company",
default=lambda self: self.env.company or self.env.user.company_id,
)
separate_time_on_work_orders = fields.Boolean(
string="Separate Time from Materials on Work Order",
related="company_id.split_time_from_materials_on_service_work_orders",
readonly=False,
)
create_default_fsm_visit = fields.Boolean(
string="Create Default Visit for FSM Sales Orders",
related="company_id.create_default_fsm_visit",
readonly=False,
)