Skip to content

Commit

Permalink
[ADD] electronic_store: adapted the new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrs-odoo committed Apr 26, 2024
1 parent 234b851 commit 19be013
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion electronic_store/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
'data/sale_order_template_line.xml',
'data/knowledge_cover.xml',
'data/knowledge_article.xml',
'data/knowledge_article_favorite.xml',
'data/mail_message.xml',
'data/ir_model_data.xml',
],
'demo': [
Expand Down Expand Up @@ -75,5 +77,4 @@
],
'license': 'OPL-1',
'images': ['images/main.png'],
'maintenance_loc': 0,
}
7 changes: 7 additions & 0 deletions electronic_store/data/knowledge_article_favorite.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="knowledge_favorite" model="knowledge.article.favorite">
<field name="article_id" ref="knowledge_article_8"/>
<field name="user_id" ref="base.user_admin"/>
</record>
</odoo>
16 changes: 16 additions & 0 deletions electronic_store/data/mail_message.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record model="mail.message" id="notification_knowledge">
<field name="model">discuss.channel</field>
<field name="res_id" ref="mail.channel_all_employees"/>
<field name="message_type">email</field>
<field name="author_id" ref="base.partner_root"/>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="subject">Knowledge article</field>
<field name="body" model="knowledge.article" eval="
'&lt;br>Hey! Need help?&lt;/br>
&lt;br>Checkout this &lt;a href=\''
+ obj().env.ref('electronic_store.knowledge_article_8').article_url.replace(obj().get_base_url(), '')
+ '\'>article&lt;/a>&lt;/br>'"/>
</record>
</odoo>
2 changes: 1 addition & 1 deletion electronic_store/demo/sale_order_post.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
</function>

<function name="action_post" model="account.move">
<value model="sale.order" eval="(obj().env.ref('electronic_store.sale_order_2')).invoice_ids.ids"/>
<value model="account.move" eval="(obj().env.ref('electronic_store.sale_order_2')).invoice_ids.ids"/>
</function>
</odoo>

0 comments on commit 19be013

Please sign in to comment.