Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UPG][17.0] viin_brand_mail: upgrade to version 17.0 #500

Open
wants to merge 4 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions viin_brand_mail/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
from . import models
from . import wizard
from odoo.tests.common import TransactionCase
setupTransactionCase = TransactionCase.setUp


def _setupTransactionCase_plus(self):
"""Odoo has some test cases to check the return value when the Odoo bot performs an action
Some tests like:
- test_manual_revaluation_statement
Therefore, it is necessary to check if the Odoo bot is being rebranded as the Viindoo bot
Change the name and email of the Odoo bot if necessary
"""
res = setupTransactionCase(self)
bot = self.env.ref('base.partner_root', raise_if_not_found=False)
if bot.name == 'ViindooBot' or bot.email == '[email protected]':
bot.write({
'name': 'OdooBot',
'email': '[email protected]'
})
return res


def _post_init_hook(env):
TransactionCase.setUp = _setupTransactionCase_plus
29 changes: 13 additions & 16 deletions viin_brand_mail/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,29 @@
# always loaded
'data': [
'data/res_partner_data.xml',
'data/mail_channel_data.xml',
'views/mail_data.xml',
'data/discuss_channel_data.xml',
'data/mail_templates_email_layouts.xml',
'data/mail_groups.xml',
'views/res_config_settings_views.xml',
'views/discuss_public_templates.xml',
'wizard/mail_compose_message_views.xml',
],
'demo': [
'data/mail_channel_demo.xml',
'data/discuss_channel_demo.xml',
],
'assets': {
'web.assets_backend': [
# mail branding
('after', 'mail/static/src/components/chat_window/chat_window.scss', 'viin_brand_mail/static/src/components/chat_window/chat_window.scss'),
('after', 'mail/static/src/components/chat_window_header/chat_window_header.scss', 'viin_brand_mail/static/src/components/chat_window_header/chat_window_header.scss'),
('after', 'mail/static/src/components/discuss_sidebar/discuss_sidebar.scss', 'viin_brand_mail/static/src/components/discuss_sidebar/discuss_sidebar.scss'),
('after', 'mail/static/src/components/discuss_sidebar_category_item/discuss_sidebar_category_item.scss', 'viin_brand_mail/static/src/components/discuss_sidebar_category_item/discuss_sidebar_category_item.scss'),
('after', 'mail/static/src/components/message/message.scss', 'viin_brand_mail/static/src/components/message/message.scss'),
('after', 'mail/static/src/components/message/message.xml', 'viin_brand_mail/static/src/components/message/message.xml'),
('after', 'mail/static/src/components/persona_im_status_icon/persona_im_status_icon.scss', 'viin_brand_mail/static/src/components/partner_im_status_icon/partner_im_status_icon.scss'),
('after', 'mail/static/src/components/thread_view/thread_view.scss', 'viin_brand_mail/static/src/components/thread_view/thread_view.scss'),
('after', 'mail/static/src/components/thread_icon/thread_icon.scss', 'viin_brand_mail/static/src/components/thread_icon/thread_icon.scss'),
('after', 'mail/static/src/components/chatter_topbar/chatter_topbar.scss', 'viin_brand_mail/static/src/components/chatter_topbar/chatter_topbar.scss'),
('after', 'mail/static/src/components/composer/composer.scss', 'viin_brand_mail/static/src/components/composer/composer.scss'),
('after', 'mail/static/src/components/thread_view_topbar/thread_view_topbar.scss', 'viin_brand_mail/static/src/components/thread_view_topbar/thread_view_topbar.scss'),
('after', 'mail/static/src/core/common/chat_window.scss', 'viin_brand_mail/static/src/core/common/chat_window.scss'),
('after', 'mail/static/src/core/common/core.scss', 'viin_brand_mail/static/src/core/common/core.scss'),
('after', 'mail/static/src/core/common/im_status.scss', 'viin_brand_mail/static/src/core/common/im_status.scss'),
('after', 'mail/static/src/core/web/discuss_sidebar.scss', 'viin_brand_mail/static/src/core/web/discuss_sidebar.scss'),
('after', 'mail/static/src/discuss/core/web/discuss_sidebar_categories.scss', 'viin_brand_mail/static/src/discuss/core/web/discuss_sidebar_categories.scss'),
],
},
'installable': False, # set auto_install True after upgrading for v17 after upgrading for v17
'installable': True,
'auto_install': True,
'post_init_hook': '_post_init_hook',
'price': 9.9,
'currency': 'EUR',
'license': 'OPL-1',
Expand Down
5 changes: 5 additions & 0 deletions viin_brand_mail/data/discuss_channel_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<odoo>
<record id="mail.module_install_notification" model="mail.message">
<field name="subject">Welcome to Viindoo!</field>
</record>
</odoo>
18 changes: 18 additions & 0 deletions viin_brand_mail/data/discuss_channel_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<odoo>
<record id="mail.mail_message_channel_whole_1" model="mail.message">
<field name="body">
<![CDATA[
<p>
Great news!<br/>
Our company has received the Deloitte Fast 50 award. We are the fastest
growing company of the country, with a growth of 1549% over the past 5
years. You can get more information <a href="https://viindoo.com/blog">on our blog</a>.
</p>
]]>
</field>
</record>

<record id="mail.mail_message_channel_1_2_1" model="mail.message">
<field name="body"><![CDATA[<p>When I have too much opportunities in the pipe, I start communicating with prospects more by email than phonecalls.</p><p>I send an email to create a sense of emergency, like <i>"can I call you this week about our quote?"</i> and I call only those that answer this email.</p><p>You can use the email template feature of Viindoo to automate email composition.</p>]]></field>
</record>
</odoo>
7 changes: 0 additions & 7 deletions viin_brand_mail/data/mail_channel_data.xml

This file was deleted.

13 changes: 0 additions & 13 deletions viin_brand_mail/data/mail_channel_demo.xml

This file was deleted.

7 changes: 7 additions & 0 deletions viin_brand_mail/data/mail_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<odoo>

<record id="mail.group_mail_notification_type_inbox" model="res.groups">
<field name="name">Receive notifications in Viindoo</field>
</record>

</odoo>
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="mail_notification_light" inherit_id="mail.mail_notification_light">
<xpath expr="//a[@href='https://www.odoo.com?utm_source=db&amp;utm_medium=email']" position="replace" mode="inner">
Viindoo
</xpath>
<xpath expr="//a[@href='https://www.odoo.com?utm_source=db&amp;utm_medium=email']" position="attributes">
<attribute name="style">color: #66C8D3;</attribute>
<attribute name="href">https://viindoo.com?utm_source=db&amp;utm_medium=email</attribute>
<attribute name="href">https://viindoo.com?utm_source=db&amp;utm_medium=email</attribute>
<attribute name="t-att-style">'color: ' + (company.email_secondary_color or '#66C8D3') + ';'</attribute>
</xpath>
</template>
<template id="mail_notification_layout" inherit_id="mail.mail_notification_layout">
<xpath expr="//a[@href='https://www.odoo.com?utm_source=db&amp;utm_medium=email']" position="replace" mode="inner">
Viindoo
Viindoo
</xpath>
<xpath expr="//a[@href='https://www.odoo.com?utm_source=db&amp;utm_medium=email']" position="attributes">
<attribute name="style">color: #66C8D3;</attribute>
<attribute name="href">https://viindoo.com?utm_source=db&amp;utm_medium=email</attribute>
<attribute name="href">https://viindoo.com?utm_source=db&amp;utm_medium=email</attribute>
<attribute name="t-att-style">'color: ' + (company.email_secondary_color or '#66C8D3') + ';'</attribute>
</xpath>
</template>
</odoo>
2 changes: 1 addition & 1 deletion viin_brand_mail/data/res_partner_data.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="base.partner_root" model="res.partner">
<field name="name">ViindooBot</field>
<field name="image_1920" type="base64" file="viin_brand/static/img/viindoobot.png"/>
<field name="email">[email protected]</field>
</record>
</odoo>
175 changes: 170 additions & 5 deletions viin_brand_mail/i18n/vi_VN.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,109 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-31 01:50+0000\n"
"PO-Revision-Date: 2022-04-24 09:44+0000\n"
"POT-Creation-Date: 2024-07-08 09:05+0000\n"
"PO-Revision-Date: 2024-07-08 09:05+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: viin_brand_mail
#. odoo-python
#: code:addons/viin_brand_mail/models/mail_gateway_allowed.py:0
#, python-format
msgid ""
"\n"
" <p class=\"o_view_nocontent_smiling_face\">\n"
" Add addresses to the Allowed List\n"
" </p><p>\n"
" To protect you from spam and reply loops, Viindoo automatically blocks emails\n"
" coming to your gateway past a threshold of <b>%(threshold)i</b> emails every <b>%(minutes)i</b>\n"
" minutes. If there are some addresses from which you need to receive very frequent\n"
" updates, you can however add them below and Viindoo will let them go through.\n"
" </p>"
msgstr ""
"\n"
" <p class=\"o_view_nocontent_smiling_face\">\n"
" Thêm địa chỉ vào Danh sách Cho phép\n"
" </p><p>\n"
" Để bảo vệ bạn khỏi thư rác và vòng lặp trả lời, Viindoo tự động chặn thư\n"
" đến cổng của bạn sau khoảng <b>%(threshold)i</b> thư mỗi <b>%(minutes)i</b>\n"
" phút. Nếu có một số địa chỉ mà bạn cần nhận cập nhật rất thường xuyên\n"
" bạn có thể thêm chúng dưới đây và Viindoo sẽ cho phép chúng đi qua.\n"
" </p>"

#. module: viin_brand_mail
#: model:ir.model.fields,field_description:viin_brand_mail.field_res_config_settings__alias_domain_id
msgid "Alias Domain"
msgstr ""

#. module: viin_brand_mail
#: model:ir.model.fields,field_description:viin_brand_mail.field_mail_alias__alias_name
#: model:ir.model.fields,field_description:viin_brand_mail.field_mail_alias_mixin__alias_name
msgid "Alias Name"
msgstr "Tên bí danh"

#. module: viin_brand_mail
#: model:ir.model.fields,field_description:viin_brand_mail.field_mail_alias__alias_model_id
msgid "Aliased Model"
msgstr ""

#. module: viin_brand_mail
#: model:ir.model.fields,field_description:viin_brand_mail.field_mail_mail__auto_delete
#: model:ir.model.fields,field_description:viin_brand_mail.field_mail_template__auto_delete
msgid "Auto Delete"
msgstr ""

#. module: viin_brand_mail
#: model:ir.model.fields,field_description:viin_brand_mail.field_mail_partner_device__keys
msgid "Browser keys"
msgstr ""

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: viin_brand_mail
#: model:ir.model.fields,field_description:viin_brand_mail.field_mail_compose_message__auto_delete
msgid "Delete Emails"
msgstr ""

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_mail_alias
msgid "Email Aliases"
msgstr "Bí danh Email"

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_mail_alias_domain
msgid "Email Domain"
msgstr "Miền email"

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_mail_template
msgid "Email Templates"
msgstr "Mẫu Email"

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_mail_thread
msgid "Email Thread"
msgstr "Luồng Email"

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_mail_compose_message
msgid "Email composition wizard"
msgstr "Đồ thuật soạn thảo email"

#. module: viin_brand_mail
#: model:ir.model.fields,help:viin_brand_mail.field_mail_alias_domain__name
msgid "Email domain e.g. 'example.com' in '[email protected]'"
msgstr "Miền email ví dụ: 'example.com' trong '[email protected]'"

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_ir_http
msgid "HTTP Routing"
Expand All @@ -35,11 +117,53 @@ msgstr "Định tuyến HTTP"
msgid "Handle in Viindoo"
msgstr "Xử lý trong hệ thống"

#. module: viin_brand_mail
#: model:ir.model.fields,help:viin_brand_mail.field_res_config_settings__alias_domain_id
msgid ""
"If you have setup a catch-all email domain redirected to the Viindoo server,"
" enter the domain name here."
msgstr ""
"Nếu bạn đã thiết lập một miền email catch-all được chuyển hướng đến máy chủ "
"Viindoo, hãy nhập tên miền ở đây."

#. module: viin_brand_mail
#: model:ir.model.fields,help:viin_brand_mail.field_mail_partner_device__keys
msgid ""
"It's refer to browser keys used by the notification: \n"
"- p256dh: It's the subscription public key generated by the browser. The browser will \n"
" keep the private key secret and use it for decrypting the payload\n"
"- auth: The auth value should be treated as a secret and not shared outside of Viindoo"
msgstr ""
"Nó liên quan đến các khóa trình duyệt được sử dụng bởi thông báo: \n"
"- p256dh: Đây là khóa công khai đăng ký được trình duyệt tạo ra. Trình duyệt sẽ \n"
" giữ bí mật khóa riêng và sử dụng nó để giải mã dữ liệu\n"
"- auth: Giá trị auth nên được xem xét như một bí mật và không được chia sẻ bên ngoài Viindoo"

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_mail_gateway_allowed
msgid "Mail Gateway Allowed"
msgstr "Cổng email được cho phép"

#. module: viin_brand_mail
#: model:ir.model.fields,field_description:viin_brand_mail.field_mail_alias_domain__name
msgid "Name"
msgstr ""

#. module: viin_brand_mail
#: model:ir.model.fields,field_description:viin_brand_mail.field_res_users__notification_type
msgid "Notification"
msgstr "Thông báo"

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_mail_mail
msgid "Outgoing Mails"
msgstr "Thư gửi đi"

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_mail_partner_device
msgid "Partner Web Push Device"
msgstr "Thiết bị đẩy web đối tác"

#. module: viin_brand_mail
#: model:ir.model.fields,help:viin_brand_mail.field_res_users__notification_type
msgid ""
Expand All @@ -51,15 +175,50 @@ msgstr ""
"- Xử lý bằng Email: các thông báo sẽ xuất hiện trong hộp thư đến của hệ thống và đồng thời được gửi đến địa chỉ email của bạn\n"
"- Xử lý trong Hệ thống: các thông báo xuất hiện trong Hộp thư đến trong hệ thống"

#. module: viin_brand_mail
#: model:ir.model.fields,help:viin_brand_mail.field_mail_alias__alias_model_id
msgid ""
"The model (Viindoo Document Kind) to which this alias corresponds. Any "
"incoming email that does not reply to an existing record will cause the "
"creation of a new record of this model (e.g. a Project Task)"
msgstr ""
"Mô hình (Loại tài liệu Viindoo) mà tương ứng với bí danh này. Bất kỳ email đến "
"nào không trả lời một bản ghi hiện có sẽ tạo ra một bản ghi mới "
"của mô hình này (vd: một Nhiệm vụ)"

#. module: viin_brand_mail
#: model:ir.model.fields,help:viin_brand_mail.field_mail_alias__alias_name
#: model:ir.model.fields,help:viin_brand_mail.field_mail_alias_mixin__alias_name
msgid ""
"The name of the email alias, e.g. 'jobs' if you want to catch emails for "
"<[email protected]>"
msgstr ""
"Tên của bí danh email, vd 'vieclam' nếu bạn muốn bắt thông điệp gửi đến địa "
"chỉ email <[email protected]>"

#. module: viin_brand_mail
#: model:ir.model.fields,help:viin_brand_mail.field_mail_mail__auto_delete
#: model:ir.model.fields,help:viin_brand_mail.field_mail_template__auto_delete
msgid ""
"This option permanently removes any track of email after it's been sent, "
"including from the Technical menu in the Settings, in order to preserve "
"storage space of your Viindoo database."
msgstr ""
"Lựa chọn này sẽ xóa vĩnh viễn mọi dấu vết của email sau khi nó được gửi, "
"bao gồm cả từ menu Kỹ thuật trong Cài đặt, để bảo quản không gian lưu trữ "
"của cơ sở dữ liệu Viindoo của bạn."

#. module: viin_brand_mail
#: model:ir.model.fields,help:viin_brand_mail.field_mail_compose_message__auto_delete
msgid ""
"This option permanently removes any track of email after it's been "
"sent,including from the Technical menu in the Settings, in order to preserve"
" storage space of your Viindoo database."
msgstr ""
"Lựa chọn này sẽ xóa vĩnh viễn mọi dấu vết của email sau khi nó được gửi, "
"bao gồm cả từ menu Kỹ thuật trong Cài đặt, để bảo quản không gian lưu trữ "
"của cơ sở dữ liệu Viindoo của bạn."

#. module: viin_brand_mail
#: model:ir.model,name:viin_brand_mail.model_res_users
msgid "User"
Expand Down Expand Up @@ -94,6 +253,12 @@ msgstr ""
"duyệt để kích hoạt."

#. module: viin_brand_mail
#: model_terms:ir.ui.view,arch_db:viin_brand_mail.res_config_settings_view_form
msgid "mycompany.viindoo.com"
#: model_terms:ir.ui.view,arch_db:viin_brand_mail.email_compose_message_wizard_form
msgid "e.g: \"[email protected]\""
msgstr ""

#. module: viin_brand_mail
#: model_terms:ir.ui.view,arch_db:viin_brand_mail.mail_notification_layout
#: model_terms:ir.ui.view,arch_db:viin_brand_mail.mail_notification_light
msgid "https://viindoo.com?utm_source=db&amp;utm_medium=email"
msgstr ""
Loading