diff options
| author | Jigar Patel <jat@openerp.com> | 2018-07-17 18:49:05 +0530 |
|---|---|---|
| committer | xmo-odoo <xmo@odoo.com> | 2018-07-17 15:19:05 +0200 |
| commit | b60de0db41bbe4af3c2f6e2369eda5d483702d76 (patch) | |
| tree | 5b41a3654948efb6f758d63f7676f3a040d2d7d2 /addons/product/models/product_template.py | |
| parent | 57676dc7d10b50bee44d122d48863586b18e4593 (diff) | |
[IMP] import/export UIs
Task 40692
Various changes to import/export (mainly) UIs:
* default to excel & "full" (non-import-compatible) export
* auto-detect encoding of CSV using chardet
* remember column -> field mapping after having imported a file (useful
for repeated imports where auto-matching failed)
* better handle localised booleans & column names
* automatically select source list view's fields when exporting
* better integrate import templates feature and add a number of templates
Diffstat (limited to 'addons/product/models/product_template.py')
| -rw-r--r-- | addons/product/models/product_template.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index 9629a1f111e..9d13d1ba228 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -483,3 +483,10 @@ class ProductTemplate(models.Model): empty_list_help_document_name=_("product"), ) return super(ProductTemplate, self).get_empty_list_help(help) + + @api.model + def get_import_templates(self): + return [{ + 'label': _('Import Template for Products'), + 'template': '/product/static/xls/product_template.xls' + }] |
