Skip to content

[IMP]: knowledge tour added via script#7

Open
aycha-odoo wants to merge 1 commit into
saas-18.4-industry-automation-scriptfrom
saas-18.4-industry-automation-script-knowledge-tour
Open

[IMP]: knowledge tour added via script#7
aycha-odoo wants to merge 1 commit into
saas-18.4-industry-automation-scriptfrom
saas-18.4-industry-automation-script-knowledge-tour

Conversation

@aycha-odoo
Copy link
Copy Markdown

Added knowledge tour XML generation in cleanup script

Copy link
Copy Markdown

@chga-odoo chga-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aycha-odoo just one suggetion.
Thanks!

Comment on lines +643 to +657
knowledge_tour_path = Path(destination_module_path + '/data/knowledge_tour.xml')
knowledge_tour_path.parent.mkdir(parents=True, exist_ok=True)

knowledge_tour_content = f"""<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="knowledge_tour" model="web_tour.tour">
<field name="name">{self.ind_name}_knowledge_tour</field>
<field name="sequence">2</field>
<field name="rainbow_man_message">Welcome! Happy exploring.</field>
</record>
</odoo>
"""

knowledge_tour_path.write_text(knowledge_tour_content, encoding="utf-8")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wrap this logic into a separate function to improve modularity, code readability, and maintainability. It will also make the flow easier for developers to understand.
suggest same changes for only_cleanup_script.py file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants