Skip to content

Conversation

@arnaudlayec
Copy link
Contributor

@arnaudlayec arnaudlayec commented Nov 27, 2025

Hello,

UPDATE 2025-12-11: also add improvements on product_import_helper and move shared methods to base_import_helper

In short: this PR adds an XLSX template in partner_import_helper and product_import_helper that is ready to use from a wizard accessible in Settings/Technical menu.
The methods that read the template and load its data are designed to be inheritable.
The XLSX template itself is designed to be self-supportive, with a Tutorial sheet (ignored during import) for integrators and possibly customers.

In base_import_helper:

  • add a a menu "Import Helper" in Settings/Technical, that can be used by other import module
  • the template download action
  • the XLSX import/read logic methods. It call methods to be defined in [partner|product]_import_helper, which use a vals_list var corresponding to the Excel sheets
  • button and fields to the existing wizard, formerly only used for report of the import
  • a "AI Engine" selection field in the wizard
  • openpyxl dependency

In partner_import_helper:

  • XLSX template in data file with 3 sheets:
    • companies: to add companies, 1 bank account per company (optional), 1 invoice address (optional), 1 delivery address (optional)
    • contacts: to add other contacts in companies, using the type freely. It can also add non-company related contacts (1st level)
    • banks: to add other bank accounts to companies
  • add support of multi-company (fake company_ref field in vals) and tags (fake categories field)

In product_import_helper :

  • support of product tags
  • support of a supplier_code magic field, keeping support of supplier_id
  • the XLSX template has only 1 interpreted sheet products. It has a 2nd sheets (+Tutorial) which is not interpreted, the supplierinfo, which only is the template to use to import them from the menu "Purchase > Configuration > Vendor price list"

Copy link

@metaminux metaminux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Globally, I think the code is running without error

I really think the use of ChatGPT should be an option.
We need to make a choice here...
Mine would be to add a selection field on the wizard to use it or not (and in the future use other engines)

I also think providing the XLSX file as a template should be accessible from the UI.
Hosting the file in the "static" directory and making a button that returns an "ir.actions.act_url" should do that...

@arnaudlayec
Copy link
Contributor Author

Hello @metaminux, thank you for your review
I think those were great feedbacks, it's been updated in the new commits

@arnaudlayec arnaudlayec reopened this Nov 28, 2025
- move to `base_import_helper` : the XLSX import/read methods, the `file` field and the download buttons
- improve `product_import_helper` : support of product tags and `supplier_code` magic field. Add the wizard.
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

Successfully merging this pull request may close these issues.

2 participants