[18.0] [MIG] ai_automation -> ai_server_action - #81
Conversation
6cfe6d3 to
622b6a2
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Additionally, regarding the commit order, it might be better to split it. We could first do the migration and adaptation work to version 18 relying on the connection, and then handle the name change in a separate, subsequent commit. This way, the actual changes between versions would be much easier to track and review. |
29ffca5 to
f5876eb
Compare
|
@etobella @pedrobaeza I have updated the PR and split the work into three clean commits: migration, refactoring, and module renaming. If we decide not to rename the module, I can easily revert to the previous commit. Ready for review. |
931c718 to
523e637
Compare
|
@angelmoya Rename is not handled this way. I requires to modify previous commits because, otherwise, on the next migration everything will be lost... |
etobella
left a comment
There was a problem hiding this comment.
Please, remake history and just leave a migration commit.
The code is something like:
git filter-branch -f --index-filter '
git ls-files --stage | \
sed "s:ai_automation/:ai_server_action/:" | \
GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
git update-index --index-info && \
mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"
' HEADAlso, there is some comments to be attended
89dbc9e to
2012e85
Compare
2012e85 to
71660cb
Compare
71660cb to
69bcfb1
Compare
|
ping @etobella |
| ai_connection_id = fields.Many2one( | ||
| "ai.connection", string="AI Connection", groups="base.group_system" | ||
| "ai.connection", | ||
| string="AI Connection", |
There was a problem hiding this comment.
I know I introduced it, however this string has no sense. Can you remove it 🙏 ?
| groups="base.group_system", | ||
| ) | ||
| ai_tool_ids = fields.Many2many( | ||
| "ai.tool", | ||
| string="AI Tools", | ||
| groups="base.group_system", | ||
| ) | ||
| ai_prompt = fields.Html(string="AI Prompt", sanitize=False) | ||
| mailing_model_real = fields.Char(compute="_compute_mailing_model_real") | ||
| ai_result_action = fields.Selection( | ||
| ai_prompt = fields.Html( | ||
| string="AI Prompt", |
| ) | ||
| ai_tool_ids = fields.Many2many( | ||
| "ai.tool", | ||
| string="AI Tools", |
|
|
||
| def _get_ai_oca_prompt(self, record): | ||
| ai_prompt = self.ai_prompt | ||
| def _get_ai_prompt(self, record): |
There was a problem hiding this comment.
Maintain the old function name please
| return html_to_text(etree.fromstring("<t>" + ai_prompt + "</t>")) | ||
| return html2plaintext(prompt) | ||
|
|
||
| def _post_run_action_ai_run(self, result, eval_context, record): |
There was a problem hiding this comment.
Why did you move the function? it is harder to see the changes.
| "name": "Ai Automation", | ||
| "summary": """Integrate `ai_tools` with server actions to automate tasks using AI.""", | ||
| "version": "16.0.1.0.0", | ||
| "summary": "Integrate `ai_tools` with server actions to automate tasks using AI.", |
There was a problem hiding this comment.
more than AI Tools, maybe AI Connection, isn't it?
[MIG] ai_automation -> ai_server_action: migration to 18.0
Depends on #77