From e279ae215c93570e78fe123405b9db33943e5b24 Mon Sep 17 00:00:00 2001 From: Kitti U Date: Mon, 24 Aug 2020 17:58:31 +0700 Subject: [PATCH] [13.0][MIG] excel_import_export, excel_import_export_demo --- excel_import_export_demo/README.rst | 135 ------------------ excel_import_export_demo/__init__.py | 1 + excel_import_export_demo/__manifest__.py | 12 +- .../i18n/excel_import_export_demo.pot | 17 --- excel_import_export_demo/i18n/zh_CN.po | 21 +-- .../import_export_purchase_order/actions.xml | 34 +++++ .../purchase_order.xlsx | Bin 0 -> 19244 bytes .../templates.xml | 70 +++++++++ .../import_export_sale_order/actions.xml | 4 +- .../import_export_sale_order/templates.xml | 6 +- .../import_sale_orders/menu_action.xml | 2 +- excel_import_export_demo/readme/HISTORY.rst | 9 +- .../partner_list/report_partner_list.py | 15 +- .../partner_list/report_partner_list.xml | 4 +- .../report_crm_lead/__init__.py | 4 + .../report_crm_lead/report_crm_lead.py | 65 +++++++++ .../report_crm_lead/report_crm_lead.xlsx | Bin 0 -> 11597 bytes .../report_crm_lead/report_crm_lead.xml | 39 +++++ .../report_crm_lead/templates.xml | 45 ++++++ .../report_sale_order/report_sale_order.py | 7 +- .../report_sale_order/report_sale_order.xlsx | Bin 5337 -> 5337 bytes .../report_sale_order/report_sale_order.xml | 2 +- .../report_sale_order/templates.xml | 4 +- excel_import_export_demo/tests/test_common.py | 8 +- .../tests/test_xlsx_import_export.py | 20 ++- .../tests/test_xlsx_report.py | 2 +- .../tests/test_xlsx_template.py | 35 ++++- 27 files changed, 344 insertions(+), 217 deletions(-) delete mode 100644 excel_import_export_demo/README.rst create mode 100644 excel_import_export_demo/import_export_purchase_order/actions.xml create mode 100644 excel_import_export_demo/import_export_purchase_order/purchase_order.xlsx create mode 100644 excel_import_export_demo/import_export_purchase_order/templates.xml create mode 100644 excel_import_export_demo/report_crm_lead/__init__.py create mode 100644 excel_import_export_demo/report_crm_lead/report_crm_lead.py create mode 100644 excel_import_export_demo/report_crm_lead/report_crm_lead.xlsx create mode 100644 excel_import_export_demo/report_crm_lead/report_crm_lead.xml create mode 100644 excel_import_export_demo/report_crm_lead/templates.xml diff --git a/excel_import_export_demo/README.rst b/excel_import_export_demo/README.rst deleted file mode 100644 index b45d13a12..000000000 --- a/excel_import_export_demo/README.rst +++ /dev/null @@ -1,135 +0,0 @@ -=============================== -Excel Import/Export/Report Demo -=============================== - -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! This file is generated by oca-gen-addon-readme !! - !! changes will be overwritten. !! - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png - :target: https://odoo-community.org/page/development-status - :alt: Alpha -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github - :target: https://github.com/OCA/server-tools/tree/12.0/excel_import_export_demo - :alt: OCA/server-tools -.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-excel_import_export_demo - :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/12.0 - :alt: Try me on Runbot - -|badge1| |badge2| |badge3| |badge4| |badge5| - -This module provide some example use case for excel_import_export - -1. Import/Export Sales Order (import_export_sale_order) -2. Import New Sales Orders (import_sale_orders) -3. Sales Orders Report (report_sale_order) -4. Print Quoation / Order (.xlsx) (report_action/sale_order) -5. Run Partner List Report (report_action/partner_list) - -.. IMPORTANT:: - This is an alpha version, the data model and design can change at any time without warning. - Only for development or testing purpose, do not use in production. - `More details on development status `_ - -**Table of contents** - -.. contents:: - :local: - -Installation -============ - -To install this module, you need to install **excel_import_export** - -Then, simply install **excel_import_export_demo**. - -Usage -===== - -**Example 1:** Export/Import Excel on existing document - -To test this use case, go to any Sales Order and use Export Excel or Import Excel in action menu. - -**Example 2:** Import Excel Files - -To test this use case, go to Settings > Excel Import/Export > Sample Import Sales Order - -**Example 3:** Create Excel Report - -To test this use case, go to Settings > Excel Import/Export > Sample Sales Report - -**Example 4:** Printout Excel on existing document, using report action - -To test this use case, go to any Sales Order and click print "Quotation / Order (.xlsx)". - -**Example 5:** Run Partner List Report, using report action - -To test this use case, go to menu Sales > Reporting > Partner List Report - -Changelog -========= - -12.0.1.0.0 (2019-08-09) -~~~~~~~~~~~~~~~~~~~~~~~ - -* Add 2 new examples using report action, 1) sale_order 2) partner_list - -12.0.1.0.0 (2019-02-24) -~~~~~~~~~~~~~~~~~~~~~~~ - -* Start of the history - -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues `_. -In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. - -Do not contact contributors directly about support or help with technical issues. - -Credits -======= - -Authors -~~~~~~~ - -* Ecosoft - -Contributors -~~~~~~~~~~~~ - -* Kitti Upariphutthiphong. (http://ecosoft.co.th) - -Maintainers -~~~~~~~~~~~ - -This module is maintained by the OCA. - -.. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org - -OCA, or the Odoo Community Association, is a nonprofit organization whose -mission is to support the collaborative development of Odoo features and -promote its widespread use. - -.. |maintainer-kittiu| image:: https://github.com/kittiu.png?size=40px - :target: https://github.com/kittiu - :alt: kittiu - -Current `maintainer `__: - -|maintainer-kittiu| - -This module is part of the `OCA/server-tools `_ project on GitHub. - -You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/excel_import_export_demo/__init__.py b/excel_import_export_demo/__init__.py index c839a7771..d82c0f79c 100644 --- a/excel_import_export_demo/__init__.py +++ b/excel_import_export_demo/__init__.py @@ -3,4 +3,5 @@ from . import import_export_sale_order from . import report_sale_order +from . import report_crm_lead from . import report_action diff --git a/excel_import_export_demo/__manifest__.py b/excel_import_export_demo/__manifest__.py index 03b5f8412..1aceba923 100644 --- a/excel_import_export_demo/__manifest__.py +++ b/excel_import_export_demo/__manifest__.py @@ -3,17 +3,21 @@ { "name": "Excel Import/Export/Report Demo", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "author": "Ecosoft,Odoo Community Association (OCA)", "license": "AGPL-3", - "website": "https://github.com/OCA/server-tools/", + "website": "https://github.com/OCA/server-tools", "category": "Tools", - "depends": ["excel_import_export", "sale_management"], + "depends": ["excel_import_export", "sale_management", "purchase", "crm"], "data": [ "import_export_sale_order/actions.xml", "import_export_sale_order/templates.xml", + "import_export_purchase_order/actions.xml", + "import_export_purchase_order/templates.xml", "report_sale_order/report_sale_order.xml", "report_sale_order/templates.xml", + "report_crm_lead/report_crm_lead.xml", + "report_crm_lead/templates.xml", "import_sale_orders/menu_action.xml", "import_sale_orders/templates.xml", # Use report action @@ -24,6 +28,6 @@ "report_action/partner_list/report_partner_list.xml", ], "installable": True, - "development_status": "alpha", + "development_status": "Beta", "maintainers": ["kittiu"], } diff --git a/excel_import_export_demo/i18n/excel_import_export_demo.pot b/excel_import_export_demo/i18n/excel_import_export_demo.pot index 7736cd76c..6ab0b7f7f 100644 --- a/excel_import_export_demo/i18n/excel_import_export_demo.pot +++ b/excel_import_export_demo/i18n/excel_import_export_demo.pot @@ -24,12 +24,6 @@ msgstr "" msgid "Allow Choose Template" msgstr "" -#. module: excel_import_export_demo -#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_partner_list__attachment_ids -#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__attachment_ids -msgid "Attachments" -msgstr "" - #. module: excel_import_export_demo #: model_terms:ir.ui.view,arch_db:excel_import_export_demo.partner_list_wizard msgid "Cancel" @@ -52,11 +46,6 @@ msgstr "" msgid "Created on" msgstr "" -#. module: excel_import_export_demo -#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_partner_list__customer -msgid "Customer" -msgstr "" - #. module: excel_import_export_demo #: model:ir.model.fields,field_description:excel_import_export_demo.field_report_partner_list__display_name #: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__display_name @@ -162,11 +151,6 @@ msgstr "" msgid "State" msgstr "" -#. module: excel_import_export_demo -#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_partner_list__supplier -msgid "Supplier" -msgstr "" - #. module: excel_import_export_demo #: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__template_id msgid "Template" @@ -191,4 +175,3 @@ msgstr "" #: model:ir.model,name:excel_import_export_demo.model_report_sale_order msgid "Wizard for report.sale.order" msgstr "" - diff --git a/excel_import_export_demo/i18n/zh_CN.po b/excel_import_export_demo/i18n/zh_CN.po index 33aa01da1..77121fcd7 100644 --- a/excel_import_export_demo/i18n/zh_CN.po +++ b/excel_import_export_demo/i18n/zh_CN.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * excel_import_export_demo +# * excel_import_export_demo # msgid "" msgstr "" @@ -18,8 +18,7 @@ msgstr "" #. module: excel_import_export_demo #: model:ir.model.fields,help:excel_import_export_demo.field_report_sale_order__state -msgid "" -"* Choose: wizard show in user selection mode\n" +msgid "* Choose: wizard show in user selection mode\n" "* Get: wizard show results from user action" msgstr "" "* 选择:用户选择模式下的向导显示\n" @@ -30,12 +29,6 @@ msgstr "" msgid "Allow Choose Template" msgstr "添加表单部分" -#. module: excel_import_export_demo -#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_partner_list__attachment_ids -#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__attachment_ids -msgid "Attachments" -msgstr "" - #. module: excel_import_export_demo #: model_terms:ir.ui.view,arch_db:excel_import_export_demo.partner_list_wizard msgid "Cancel" @@ -58,11 +51,6 @@ msgstr "创建者" msgid "Created on" msgstr "创建时间" -#. module: excel_import_export_demo -#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_partner_list__customer -msgid "Customer" -msgstr "客户" - #. module: excel_import_export_demo #: model:ir.model.fields,field_description:excel_import_export_demo.field_report_partner_list__display_name #: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__display_name @@ -168,11 +156,6 @@ msgstr "销售报告样本" msgid "State" msgstr "状态" -#. module: excel_import_export_demo -#: model:ir.model.fields,field_description:excel_import_export_demo.field_report_partner_list__supplier -msgid "Supplier" -msgstr "供应商" - #. module: excel_import_export_demo #: model:ir.model.fields,field_description:excel_import_export_demo.field_report_sale_order__template_id msgid "Template" diff --git a/excel_import_export_demo/import_export_purchase_order/actions.xml b/excel_import_export_demo/import_export_purchase_order/actions.xml new file mode 100644 index 000000000..88f71ec0c --- /dev/null +++ b/excel_import_export_demo/import_export_purchase_order/actions.xml @@ -0,0 +1,34 @@ + + + + + + diff --git a/excel_import_export_demo/import_export_purchase_order/purchase_order.xlsx b/excel_import_export_demo/import_export_purchase_order/purchase_order.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..be8e2a785b9e06f1e83a1c5032271ec0ce25579d GIT binary patch literal 19244 zcmbTd1CVXavIf|;ZQHhO+qP}HPuo6i+dggEwrzLM`R~2+=FLpJ7ZbC0?1;5i)vBHO zRc2LILO~iB1O)&B0s^4HQ&bV)zkRU&UVGTk>pPj+IMch^J6Rjq+gsCl*xJzj^Q1d* z#%h28Cj7=1s_>)eJ^SewZ-e@*< zm@38auk=0u6{Nu-9FFSF*8lR~00aP_@IN91`)`DtT|8|}o&Q1RN_Q(Rivz*Gw->11 zerfAICH^qE=-ezzS-;}EBSnsD3m8%^2<>t--fq74`x6iZVjEVHEnQbb_0KO}=5Nno zJYdIg{MNwQPY{kr1f25W>KZD5>4b~EBZ;p&hOfd}D#Js8l{-WbVpnjXr-Rp4LyRk* zTVGItA_PbVobpNvt)FtsJs(gY@-9(p07&ydhh33FH2P+Tn81UuCZ%2Ll9~;zT@M9Z z_&u_8FvYUTIWRHeB`HZLeqYB(TQ_mlwl+woNJ@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;*3dYhtbQ6#pR-jfU0#w + + + + purchase.order + purchase_order.xlsx + Purchase Order Template (import/export) + Sample Purchase Order Template for testing + + + + { + '__EXPORT__': { + 'purchase': { + '_HEAD_': { + 'B1': 'partner_id.contact_address', + 'F4': 'display_name', + 'H4': 'date_order', + 'B8': 'user_id.display_name', + 'B10': 'company_id.name', + 'B12': '${"%s, %s, %s" % (object.company_id.street, object.company_id.city, object.company_id.state_id.name)}', + 'B15': 'company_id.phone', + 'B17': 'company_id.email', + 'E8': 'partner_id.name', + 'E10': 'partner_id.parent_id.name', + 'E15': 'partner_id.phone', + 'E17': 'partner_id.email', + 'H20': 'date_planned${value or ""}#{style=date}', + 'I37': 'amount_untaxed#{style=number}', + 'O38': 'amount_tax#{style=number}', + 'I39': 'amount_total#{style=number}', + }, + 'order_line': { + 'B22': 'product_id.default_code', + 'C22': 'name', + 'E22': 'product_qty${value or 0}#{style=number}', + 'F22': 'product_uom.name', + 'G22': 'price_unit${value or 0}#{style=number}', + 'H22': 'taxes_id.name', + } + } + }, + '__IMPORT__': { + 'purchase': { + 'order_line': { + 'B22': 'product_id', + 'C22': 'name', + 'E22': 'product_qty', + 'F22': 'product_uom', + 'G22': 'price_unit', + 'H22': 'taxes_id', + 'I22': 'date_planned${time.strftime("%Y-%m-%d %H:%M:%S")}', + } + } + }, + } + + + + + + diff --git a/excel_import_export_demo/import_export_sale_order/actions.xml b/excel_import_export_demo/import_export_sale_order/actions.xml index 8c67e720d..5f695ed4b 100644 --- a/excel_import_export_demo/import_export_sale_order/actions.xml +++ b/excel_import_export_demo/import_export_sale_order/actions.xml @@ -7,7 +7,7 @@ id="action_sale_oder_export_xlsx" name="Export Excel" res_model="export.xlsx.wizard" - src_model="sale.order" + binding_model="sale.order" view_mode="form" target="new" context="{ @@ -20,7 +20,7 @@ id="action_sale_oder_import_xlsx" name="Import Excel" res_model="import.xlsx.wizard" - src_model="sale.order" + binding_model="sale.order" view_mode="form" target="new" context="{ diff --git a/excel_import_export_demo/import_export_sale_order/templates.xml b/excel_import_export_demo/import_export_sale_order/templates.xml index eec0666d8..50f506c7f 100644 --- a/excel_import_export_demo/import_export_sale_order/templates.xml +++ b/excel_import_export_demo/import_export_sale_order/templates.xml @@ -6,8 +6,10 @@ sale.order sale_order.xlsx - Sale Order Template - Sample Sales Order Tempalte for testing + Sale Order Template (import/export) + Sample Sales Order Template for testing + + { '__EXPORT__': { diff --git a/excel_import_export_demo/import_sale_orders/menu_action.xml b/excel_import_export_demo/import_sale_orders/menu_action.xml index 4c0c0e994..e6f0d6fd9 100644 --- a/excel_import_export_demo/import_sale_orders/menu_action.xml +++ b/excel_import_export_demo/import_sale_orders/menu_action.xml @@ -6,7 +6,7 @@ Sample Import Sale Order import.xlsx.wizard - form + form form new { diff --git a/excel_import_export_demo/readme/HISTORY.rst b/excel_import_export_demo/readme/HISTORY.rst index 3b4b1bf79..1c7d49f63 100644 --- a/excel_import_export_demo/readme/HISTORY.rst +++ b/excel_import_export_demo/readme/HISTORY.rst @@ -1,9 +1,4 @@ -12.0.1.0.0 (2019-08-09) +13.0.1.0.0 (2020-08-23) ~~~~~~~~~~~~~~~~~~~~~~~ -* Add 2 new examples using report action, 1) sale_order 2) partner_list - -12.0.1.0.0 (2019-02-24) -~~~~~~~~~~~~~~~~~~~~~~~ - -* Start of the history +* Migration to Odoo 13 diff --git a/excel_import_export_demo/report_action/partner_list/report_partner_list.py b/excel_import_export_demo/report_action/partner_list/report_partner_list.py index c15e49942..871db7230 100644 --- a/excel_import_export_demo/report_action/partner_list/report_partner_list.py +++ b/excel_import_export_demo/report_action/partner_list/report_partner_list.py @@ -1,16 +1,14 @@ # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) -from odoo import api, fields, models +from odoo import fields, models class ReportPartnerList(models.TransientModel): _name = "report.partner.list" _description = "Wizard for report.partner.list" - partner_ids = fields.Many2many(comodel_name="res.partner",) - supplier = fields.Boolean(default=True,) - customer = fields.Boolean(default=True,) + partner_ids = fields.Many2many(comodel_name="res.partner") results = fields.Many2many( "res.partner", string="Results", @@ -18,17 +16,12 @@ class ReportPartnerList(models.TransientModel): help="Use compute fields, so there is nothing store in database", ) - @api.multi def _compute_results(self): - """ On the wizard, result will be computed and added to results line + """On the wizard, result will be computed and added to results line before export to excel by report_excel action """ self.ensure_one() - domain = [ - "|", - ("supplier", "=", self.supplier), - ("customer", "=", self.customer), - ] + domain = [] if self.partner_ids: domain.append(("id", "in", self.partner_ids.ids)) self.results = self.env["res.partner"].search(domain, order="id") diff --git a/excel_import_export_demo/report_action/partner_list/report_partner_list.xml b/excel_import_export_demo/report_action/partner_list/report_partner_list.xml index 15871159e..0c9861d53 100644 --- a/excel_import_export_demo/report_action/partner_list/report_partner_list.xml +++ b/excel_import_export_demo/report_action/partner_list/report_partner_list.xml @@ -10,8 +10,6 @@ - -