Skip to content

Commit

Permalink
Merge pull request #1721 from OCA/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/server-tools (16.0)
  • Loading branch information
bt-admin authored Feb 6, 2025
2 parents 1a19211 + b3ab383 commit f676511
Show file tree
Hide file tree
Showing 19 changed files with 72 additions and 101 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ addon | version | maintainers | summary
[database_cleanup](database_cleanup/) | 16.0.1.2.1 | | Database cleanup
[datetime_formatter](datetime_formatter/) | 16.0.1.0.0 | | Helper functions to give correct format to date[time] fields
[dbfilter_from_header](dbfilter_from_header/) | 16.0.1.0.1 | | Filter databases with HTTP headers
[excel_import_export](excel_import_export/) | 16.0.1.3.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Base module for developing Excel import/export/report
[excel_import_export_demo](excel_import_export_demo/) | 16.0.1.0.1 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Excel Import/Export/Report Demo
[excel_import_export](excel_import_export/) | 16.0.1.3.1 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Base module for developing Excel import/export/report
[excel_import_export_demo](excel_import_export_demo/) | 16.0.1.1.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Excel Import/Export/Report Demo
[excel_import_export_unidecode](excel_import_export_unidecode/) | 16.0.1.0.1 | | Add unidecode option to excel import/export/report
[fetchmail_attach_from_folder](fetchmail_attach_from_folder/) | 16.0.1.5.0 | [![NL66278](https://github.com/NL66278.png?size=30px)](https://github.com/NL66278) | Attach mails in an IMAP folder to existing objects
[html_text](html_text/) | 16.0.1.0.1 | | Generate excerpts from any HTML field
Expand Down
8 changes: 7 additions & 1 deletion excel_import_export/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Excel Import/Export/Report
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:90fc204eb5ba2d2947c522bdc8e261026910c51a797320fc63b67f7891abda70
!! source digest: sha256:40c58b91ccaaaa2b5ead94e8975df9d77a9ae3d08e29f5647422c2a3e1dafd6b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -51,6 +51,12 @@ Then, simply install **excel_import_export**.

For demo, install **excel_import_export_demo**

Configuration
=============

If you have existing templates from the version 16.0.1.2.0 or earlier, you need to click 'REMOVE EXPORT ACTION'
and then click 'ADD EXPORT ACTION' in these templates for export actions to work as expected.

Usage
=====

Expand Down
2 changes: 1 addition & 1 deletion excel_import_export/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Excel Import/Export/Report",
"summary": "Base module for developing Excel import/export/report",
"version": "16.0.1.3.0",
"version": "16.0.1.3.1",
"author": "Ecosoft,Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/server-tools",
Expand Down
2 changes: 2 additions & 0 deletions excel_import_export/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
If you have existing templates from the version 16.0.1.2.0 or earlier, you need to click 'REMOVE EXPORT ACTION'
and then click 'ADD EXPORT ACTION' in these templates for export actions to work as expected.
48 changes: 27 additions & 21 deletions excel_import_export/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Excel Import/Export/Report</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:90fc204eb5ba2d2947c522bdc8e261026910c51a797320fc63b67f7891abda70
!! source digest: sha256:40c58b91ccaaaa2b5ead94e8975df9d77a9ae3d08e29f5647422c2a3e1dafd6b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-tools/tree/16.0/excel_import_export"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-excel_import_export"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-tools&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>The module provide pre-built functions and wizards for developer to build excel import / export / report with ease.</p>
Expand All @@ -382,18 +382,19 @@ <h1 class="title">Excel Import/Export/Report</h1>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a><ul>
<li><a class="reference internal" href="#concepts" id="toc-entry-3">Concepts</a></li>
<li><a class="reference internal" href="#use-cases" id="toc-entry-4">Use Cases</a></li>
<li><a class="reference internal" href="#easy-reporting-option" id="toc-entry-5">Easy Reporting Option</a></li>
<li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a><ul>
<li><a class="reference internal" href="#concepts" id="toc-entry-4">Concepts</a></li>
<li><a class="reference internal" href="#use-cases" id="toc-entry-5">Use Cases</a></li>
<li><a class="reference internal" href="#easy-reporting-option" id="toc-entry-6">Easy Reporting Option</a></li>
</ul>
</li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-6">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-7">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-11">Maintainers</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-7">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-8">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-9">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-10">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-11">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-12">Maintainers</a></li>
</ul>
</li>
</ul>
Expand All @@ -404,10 +405,15 @@ <h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
<p>Then, simply install <strong>excel_import_export</strong>.</p>
<p>For demo, install <strong>excel_import_export_demo</strong></p>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
<p>If you have existing templates from the version 16.0.1.2.0 or earlier, you need to click ‘REMOVE EXPORT ACTION’
and then click ‘ADD EXPORT ACTION’ in these templates for export actions to work as expected.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
<div class="section" id="concepts">
<h2><a class="toc-backref" href="#toc-entry-3">Concepts</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">Concepts</a></h2>
<p>This module contain pre-defined function and wizards to make exporting, importing and reporting easy.</p>
<p>At the heart of this module, there are 2 <cite>main methods</cite></p>
<ul class="simple">
Expand All @@ -422,7 +428,7 @@ <h2><a class="toc-backref" href="#toc-entry-3">Concepts</a></h2>
<p>As this module provide tools, it is best to explain as use cases. For example use cases, please install <strong>excel_import_export_demo</strong></p>
</div>
<div class="section" id="use-cases">
<h2><a class="toc-backref" href="#toc-entry-4">Use Cases</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Use Cases</a></h2>
<p><strong>Use Case 1:</strong> Export/Import Excel on existing document</p>
<p>This add export/import action menus in existing document (example - excel_import_export_demo/import_export_sale_order)</p>
<ol class="arabic simple">
Expand Down Expand Up @@ -466,7 +472,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Use Cases</a></h2>
</ol>
</div>
<div class="section" id="easy-reporting-option">
<h2><a class="toc-backref" href="#toc-entry-5">Easy Reporting Option</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">Easy Reporting Option</a></h2>
<p>Technically, this option is the same as “Create Excel Report” use case. But instead of having to write XML / Python code like normally do,
this option allow user to create a report based on a model or view, all by configuration only.</p>
<ol class="arabic simple">
Expand All @@ -491,36 +497,36 @@ <h2><a class="toc-backref" href="#toc-entry-5">Easy Reporting Option</a></h2>
</div>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-6">Known issues / Roadmap</a></h1>
<h1><a class="toc-backref" href="#toc-entry-7">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>Module extension e.g., excel_import_export_async, that add ability to execute as async process.</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-8">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20excel_import_export%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-9">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-10">Authors</a></h2>
<ul class="simple">
<li>Ecosoft</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-11">Contributors</a></h2>
<ul class="simple">
<li>Kitti Upariphutthiphong. &lt;<a class="reference external" href="mailto:kittiu&#64;gmail.com">kittiu&#64;gmail.com</a>&gt; (<a class="reference external" href="http://ecosoft.co.th">http://ecosoft.co.th</a>)</li>
<li>Saran Lim. &lt;<a class="reference external" href="mailto:saranl&#64;ecosoft.co.th">saranl&#64;ecosoft.co.th</a>&gt; (<a class="reference external" href="http://ecosoft.co.th">http://ecosoft.co.th</a>)</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-12">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand Down
2 changes: 1 addition & 1 deletion excel_import_export_demo/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Excel Import/Export/Report Demo
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:429e6681705b47f73d4f2920ab87b83bad0b7977035c794db570f46cb22b8b3c
!! source digest: sha256:5b14755bfe1fe3754bb28f1df6d7de5fad74c2b7ad73b8bb419ebf501b60985d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
1 change: 1 addition & 0 deletions excel_import_export_demo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
from . import report_sale_order
from . import report_crm_lead
from . import report_action
from .hooks import post_init_hook
3 changes: 2 additions & 1 deletion excel_import_export_demo/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Excel Import/Export/Report Demo",
"version": "16.0.1.0.1",
"version": "16.0.1.1.0",
"author": "Ecosoft,Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/server-tools",
Expand All @@ -30,6 +30,7 @@
"report_action/partner_list/report_partner_list.xml",
"report_action/partner_list/security/ir.model.access.csv",
],
"post_init_hook": "post_init_hook",
"installable": True,
"development_status": "Beta",
"maintainers": ["kittiu"],
Expand Down
11 changes: 11 additions & 0 deletions excel_import_export_demo/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2024 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import SUPERUSER_ID, api


def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
templates = env["xlsx.template"].search([("export_ids", "!=", False)])
for template in templates:
template.add_export_action()
6 changes: 0 additions & 6 deletions excel_import_export_demo/i18n/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,6 @@ msgstr ""
msgid "Execute"
msgstr ""

#. module: excel_import_export_demo
#: model:ir.actions.act_window,name:excel_import_export_demo.action_purchase_order_export_xlsx
#: model:ir.actions.act_window,name:excel_import_export_demo.action_sale_oder_export_xlsx
msgid "Export Excel"
msgstr ""

#. module: excel_import_export_demo
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_crm_lead__data
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__data
Expand Down
9 changes: 3 additions & 6 deletions excel_import_export_demo/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ msgstr "Mostrar Nombre"
msgid "Execute"
msgstr "Ejecutar"

#. module: excel_import_export_demo
#: model:ir.actions.act_window,name:excel_import_export_demo.action_purchase_order_export_xlsx
#: model:ir.actions.act_window,name:excel_import_export_demo.action_sale_oder_export_xlsx
msgid "Export Excel"
msgstr "Exportar Excel"

#. module: excel_import_export_demo
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_crm_lead__data
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__data
Expand Down Expand Up @@ -303,3 +297,6 @@ msgstr "Asistente para report.partner.list"
#: model:ir.model,name:excel_import_export_demo.model_report_sale_order
msgid "Wizard for report.sale.order"
msgstr "Asistente para report.sale.order"

#~ msgid "Export Excel"
#~ msgstr "Exportar Excel"
6 changes: 0 additions & 6 deletions excel_import_export_demo/i18n/excel_import_export_demo.pot
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ msgstr ""
msgid "Execute"
msgstr ""

#. module: excel_import_export_demo
#: model:ir.actions.act_window,name:excel_import_export_demo.action_purchase_order_export_xlsx
#: model:ir.actions.act_window,name:excel_import_export_demo.action_sale_oder_export_xlsx
msgid "Export Excel"
msgstr ""

#. module: excel_import_export_demo
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_crm_lead__data
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__data
Expand Down
9 changes: 3 additions & 6 deletions excel_import_export_demo/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ msgstr "Nome visualizzato"
msgid "Execute"
msgstr "Esegui"

#. module: excel_import_export_demo
#: model:ir.actions.act_window,name:excel_import_export_demo.action_purchase_order_export_xlsx
#: model:ir.actions.act_window,name:excel_import_export_demo.action_sale_oder_export_xlsx
msgid "Export Excel"
msgstr "Esporta Excel"

#. module: excel_import_export_demo
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_crm_lead__data
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__data
Expand Down Expand Up @@ -299,3 +293,6 @@ msgstr "Procedura guidata per report.partner.list"
#: model:ir.model,name:excel_import_export_demo.model_report_sale_order
msgid "Wizard for report.sale.order"
msgstr "Procedura guidata per report.sale.order"

#~ msgid "Export Excel"
#~ msgstr "Esporta Excel"
9 changes: 3 additions & 6 deletions excel_import_export_demo/i18n/zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,6 @@ msgstr "显示名称"
msgid "Execute"
msgstr "执行"

#. module: excel_import_export_demo
#: model:ir.actions.act_window,name:excel_import_export_demo.action_purchase_order_export_xlsx
#: model:ir.actions.act_window,name:excel_import_export_demo.action_sale_oder_export_xlsx
msgid "Export Excel"
msgstr "导出Excel"

#. module: excel_import_export_demo
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_crm_lead__data
#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__data
Expand Down Expand Up @@ -298,6 +292,9 @@ msgstr "业务伙伴名单报告向导"
msgid "Wizard for report.sale.order"
msgstr "销售订单报告向导"

#~ msgid "Export Excel"
#~ msgstr "导出Excel"

#~ msgid "Choose"
#~ msgstr "选择"

Expand Down
15 changes: 0 additions & 15 deletions excel_import_export_demo/import_export_purchase_order/actions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).-->
<odoo>

<record id="action_purchase_order_export_xlsx" model="ir.actions.act_window">
<field name="name">Export Excel</field>
<field name="res_model">export.xlsx.wizard</field>
<field name="binding_view_types">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">
{
'template_domain': [('res_model', '=', 'purchase.order'),
('fname', '=', 'purchase_order.xlsx'),
('gname', '=', False)],
}
</field>
</record>

<record id="action_purchase_order_import_xlsx" model="ir.actions.act_window">
<field name="name">Import Excel</field>
<field name="res_model">import.xlsx.wizard</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
name="import_action_id"
eval="ref('action_purchase_order_import_xlsx')"
/>
<field
name="export_action_id"
eval="ref('action_purchase_order_export_xlsx')"
/>
<field name="input_instruction">
{
'__EXPORT__': {
Expand Down
18 changes: 0 additions & 18 deletions excel_import_export_demo/import_export_sale_order/actions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@
Copyright 2019 Ecosoft Co., Ltd.
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).-->
<odoo>

<record id="action_sale_oder_export_xlsx" model="ir.actions.act_window">
<field name="name">Export Excel</field>
<field name="res_model">export.xlsx.wizard</field>
<field name="binding_view_types">list,form</field>
<field name="binding_model_id" ref="sale.model_sale_order" />
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">
{
'template_domain': [('res_model', '=', 'sale.order'),
('fname', '=', 'sale_order.xlsx'),
('gname', '=', False)],
}
</field>
</record>

<record id="action_sale_oder_import_xlsx" model="ir.actions.act_window">
<field name="name">Import Excel</field>
<field name="res_model">import.xlsx.wizard</field>
Expand All @@ -37,5 +20,4 @@
}
</field>
</record>

</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
<field name="fname">sale_order.xlsx</field>
<field name="name">Sale Order Template (import/export)</field>
<field name="description">Sample Sales Order Template for testing</field>
<field name="import_action_id" eval="ref('action_sale_oder_export_xlsx')" />
<field name="export_action_id" eval="ref('action_sale_oder_import_xlsx')" />
<field name="import_action_id" eval="ref('action_sale_oder_import_xlsx')" />
<field name="input_instruction">
{
'__EXPORT__': {
Expand Down
Loading

0 comments on commit f676511

Please sign in to comment.