Is your feature request related to a problem?
Currently, the server_action_navigate module adds the delete_last_line method to the ir.actions.server model through inheritance, then links that action to a button through a base.view_server_action_form view inheritance.
However, this causes a conflict with the base_automation Odoo module, and its base.automation model - indeed, the base.automation model inherits from ir.actions.server fields (through the delegated action_server_id field), which renders the later's fields accessible, but not its methods, incl. delete_last_linne.
This is problematic in regards to the view_base_automation_form view, which inherits from the view_action_server_form view - as such, when both modules are installed, the view_base_automation_form view won't pass the view validation, since base.automation doesn't have the delete_last_line required by the added button.
Describe the solution you'd like
To remediate this issue, we propose to add the following snippet of code, through a dedicated auto_install module when both server_action_navigate and base_automation are installed, which calls the same method through the action_server_id attribute - and since this relation delegates its fields to the base.automation object, the same modifications should be applied.
# models/base_automation.py
from odoo import models
class BaseAutomation(models.Model):
_inherit = "base.automation"
def delete_last_line(self):
self.action_server_id.delete_last_line()
Is your feature request related to a problem?
Currently, the
server_action_navigatemodule adds thedelete_last_linemethod to their.actions.servermodel through inheritance, then links that action to a button through abase.view_server_action_formview inheritance.However, this causes a conflict with the
base_automationOdoo module, and itsbase.automationmodel - indeed, thebase.automationmodel inherits fromir.actions.serverfields (through the delegatedaction_server_idfield), which renders the later's fields accessible, but not its methods, incl.delete_last_linne.This is problematic in regards to the
view_base_automation_formview, which inherits from theview_action_server_formview - as such, when both modules are installed, theview_base_automation_formview won't pass the view validation, sincebase.automationdoesn't have thedelete_last_linerequired by the added button.Describe the solution you'd like
To remediate this issue, we propose to add the following snippet of code, through a dedicated
auto_installmodule when bothserver_action_navigateandbase_automationare installed, which calls the same method through theaction_server_idattribute - and since this relation delegates its fields to thebase.automationobject, the same modifications should be applied.