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

New addons "xlsx_imexprt" (allow import, export, reporting), seek for advice. #273

Closed
kittiu opened this issue Feb 13, 2019 · 7 comments
Closed

Comments

@kittiu
Copy link
Sponsor Member

kittiu commented Feb 13, 2019

Hi, based on previous issue #268 . I have migrate the module from v8 now to v11 now. In brief here is how it works,

  • It works as pre-build functions and wizards for further export data with excel.
  • User will define template (xlsx.template, as dictionary), and it will generate excel as output
  • Instead of using code to create an excel file, it write data in to predefined xlsx.template without touching the format or formulas in excel.
  • We can also use it to export out excel from an object, and import back the file to object.

To test following sample, you can install xlsx_imexprt, xlsx_imexrpt_sample,
https://github.com/ecosoft-odoo/reporting-engine/tree/11-xlsx_imexrpt

Sample: creating sales order report

We first create report template (template excel with any format) and define how data will be mapped to excel cells in dictionary EXPORT section in xlsx.template

00335
By little coding, we create menu and inherit wizard, add some search criteria logic, and we can product the report as following,

00336

00338

Sample: use it as Export/Import to a sales order

Similarly, create report template, this time with both EXPORT and IMPORT section.

00339

Then on Sales Order, we can have menu to Import and Export this Sales Order in excel.

00340
00341
00342

@kittiu
Copy link
Sponsor Member Author

kittiu commented Feb 13, 2019

I would love to have suggestion, whether this kind of module can be in OCA repo, and which repo is sutible. (also the naming of this module).

@NL66278
Copy link

NL66278 commented Feb 13, 2019

I would think it should got to server-tools, here are a lot of modules for connecting Odoo with external data. There is also the connector repository, but that is based around a very particular framework. I would call your module excel_import_export as that seems to best encompass what your module does. It is definitely more encompassing then reporting.

@elicoidal
Copy link

@kittiu thanks for the proposal. Interesting feature that can be helpful for functional end users.
One question: for the order lines, somehow you should indicate the cell of the first row and indicates that this is a loop over multiple lines. It is not clear in your example above.

@kittiu
Copy link
Sponsor Member Author

kittiu commented Feb 13, 2019

@elicoidal , the order_line is one2many so it will always be looping to multiple lines. But we can limit the number of rows as to, i.e., 'order_line[5]' means 5 lines only.
There are also taging allow user to do something like, subtotal, total for last row, group by...

@kittiu
Copy link
Sponsor Member Author

kittiu commented Feb 13, 2019

@NL66278 Thank you for your suggestion. Yes, may be server-tools is better.

@kittiu kittiu changed the title New addons "report_imexprt" (allow import, export, reporting), seek for advice. New addons "xlsx_imexprt" (allow import, export, reporting), seek for advice. Feb 13, 2019
@kittiu
Copy link
Sponsor Member Author

kittiu commented Feb 15, 2019

Start working on PR OCA/server-tools#1512

@kittiu
Copy link
Sponsor Member Author

kittiu commented Mar 8, 2019

Close as redundant.

@kittiu kittiu closed this as completed Mar 8, 2019
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

No branches or pull requests

3 participants