diff --git a/learning_base/__manifest__.py b/learning_base/__manifest__.py index 208e952..1adbcbf 100644 --- a/learning_base/__manifest__.py +++ b/learning_base/__manifest__.py @@ -24,7 +24,6 @@ 'security/ir.model.access.csv', 'ir_actions_act_window_records.xml', 'ir_ui_menu_records.xml', - 'ir_module_category_records.xml', 'views/product_template.xml', 'views/event_event.xml', 'views/res_company.xml', diff --git a/learning_base/ir_module_category_records.xml b/learning_base/ir_module_category_records.xml deleted file mode 100644 index a0c3866..0000000 --- a/learning_base/ir_module_category_records.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Formation - - - diff --git a/learning_base/models/product_template.py b/learning_base/models/product_template.py index 4ebed90..5802b15 100644 --- a/learning_base/models/product_template.py +++ b/learning_base/models/product_template.py @@ -17,11 +17,7 @@ class learningFinancialProgram(models.Model): class ProductTemplate(models.Model): _inherit = ['product.template'] - is_learning = fields.Boolean(compute='_compute_is_learning', store=True) - detailed_type = fields.Selection(selection_add=[ - ('learning', 'Training'), - ], ondelete={'learning': 'set service'}) - + is_learning = fields.Boolean(string='is learning') goal = fields.Html(string='Goal', translate=True) duration_html = fields.Html(string='Duration', translate=True) @@ -56,11 +52,6 @@ class ProductTemplate(models.Model): for record in self: record.count_session = len(self.env['event.event'].search([('learning_id', '=', record.id)])) - @api.depends('detailed_type') - def _compute_is_learning(self): - for record in self: - record.is_learning = record.detailed_type == 'learning' - def _detailed_type_mapping(self): type_mapping = super()._detailed_type_mapping() type_mapping['learning'] = 'service' diff --git a/learning_base/views/product_template.xml b/learning_base/views/product_template.xml index 5d644cb..5067210 100644 --- a/learning_base/views/product_template.xml +++ b/learning_base/views/product_template.xml @@ -3,98 +3,103 @@ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> - - product.template.learning.form.inherit - product.template - - - -
- -
+ + product.template.learning.form.inherit + product.template + + - - - - - - - - - - - - - - - - - - - - +
+ +
-
- -