diff options
Diffstat (limited to 'addons/product')
| -rw-r--r-- | addons/product/__manifest__.py | 1 | ||||
| -rw-r--r-- | addons/product/models/product.py | 7 | ||||
| -rw-r--r-- | addons/product/models/product_pricelist.py | 8 | ||||
| -rw-r--r-- | addons/product/models/product_template.py | 7 | ||||
| -rw-r--r-- | addons/product/static/csv/product.template.csv | 4 | ||||
| -rw-r--r-- | addons/product/static/src/js/product_template_import.js | 19 | ||||
| -rw-r--r-- | addons/product/static/xls/product_pricelist.xls | bin | 0 -> 33280 bytes | |||
| -rw-r--r-- | addons/product/static/xls/product_supplierinfo.xls | bin | 0 -> 32768 bytes | |||
| -rw-r--r-- | addons/product/static/xls/product_template.xls | bin | 0 -> 36864 bytes | |||
| -rw-r--r-- | addons/product/views/product_template_import_templates.xml | 8 |
10 files changed, 21 insertions, 33 deletions
diff --git a/addons/product/__manifest__.py b/addons/product/__manifest__.py index dc3328591b3..51280c2d3a9 100644 --- a/addons/product/__manifest__.py +++ b/addons/product/__manifest__.py @@ -37,7 +37,6 @@ Print product labels with barcode. 'views/product_template_views.xml', 'views/product_pricelist_views.xml', 'views/res_partner_views.xml', - 'views/product_template_import_templates.xml', 'views/res_users_views.xml', 'report/product_reports.xml', 'report/product_pricelist_templates.xml', diff --git a/addons/product/models/product.py b/addons/product/models/product.py index 51b450cba2b..17d6f29c9b1 100644 --- a/addons/product/models/product.py +++ b/addons/product/models/product.py @@ -630,3 +630,10 @@ class SupplierInfo(models.Model): delay = fields.Integer( 'Delivery Lead Time', default=1, required=True, help="Lead time in days between the confirmation of the purchase order and the receipt of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning.") + + @api.model + def get_import_templates(self): + return [{ + 'label': _('Import Template for Vendor Pricelists'), + 'template': '/product/static/xls/product_supplierinfo.xls' + }] diff --git a/addons/product/models/product_pricelist.py b/addons/product/models/product_pricelist.py index 4f14d6394bb..42ceee46dfb 100644 --- a/addons/product/models/product_pricelist.py +++ b/addons/product/models/product_pricelist.py @@ -333,6 +333,13 @@ class Pricelist(models.Model): return pl + @api.model + def get_import_templates(self): + return [{ + 'label': _('Import Template for Pricelists'), + 'template': '/product/static/xls/product_pricelist.xls' + }] + class ResCountryGroup(models.Model): _inherit = 'res.country.group' @@ -470,4 +477,3 @@ class PricelistItem(models.Model): 'price_min_margin': 0.0, 'price_max_margin': 0.0, }) - 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' + }] diff --git a/addons/product/static/csv/product.template.csv b/addons/product/static/csv/product.template.csv deleted file mode 100644 index bb47b9c4fae..00000000000 --- a/addons/product/static/csv/product.template.csv +++ /dev/null @@ -1,4 +0,0 @@ -ID,Name,Product Type,Internal Reference,Barcode,Sales Price,Cost,Weight,Sale Description -product_template_1,Pedal Bin,Consumable,AK789,,29.99,12,, -product_template_2,Dell Inspiron Laptop without OS,Consumable,DELL15,,2499,1643,,2 years warranty -product_template_3,Prepaid Consulting,Service,,,90,40,, diff --git a/addons/product/static/src/js/product_template_import.js b/addons/product/static/src/js/product_template_import.js deleted file mode 100644 index c00a6d983e1..00000000000 --- a/addons/product/static/src/js/product_template_import.js +++ /dev/null @@ -1,19 +0,0 @@ -odoo.define('product_template_import.import', function (require) { -"use strict"; - -var core = require('web.core'); -var BaseImport = require('base_import.import'); - -var _t = core._t; - -BaseImport.DataImport.include({ - renderImportLink: function() { - this._super(); - if (this.res_model == 'product.template') { - this.$(".import-link").prop({"text": _t(" Import Template for Products"), "href": "/product/static/csv/product.template.csv"}); - this.$(".template-import").removeClass("hidden"); - } - }, -}); - -}); diff --git a/addons/product/static/xls/product_pricelist.xls b/addons/product/static/xls/product_pricelist.xls Binary files differnew file mode 100644 index 00000000000..308534d88e7 --- /dev/null +++ b/addons/product/static/xls/product_pricelist.xls diff --git a/addons/product/static/xls/product_supplierinfo.xls b/addons/product/static/xls/product_supplierinfo.xls Binary files differnew file mode 100644 index 00000000000..75a07730980 --- /dev/null +++ b/addons/product/static/xls/product_supplierinfo.xls diff --git a/addons/product/static/xls/product_template.xls b/addons/product/static/xls/product_template.xls Binary files differnew file mode 100644 index 00000000000..f74e7064ba6 --- /dev/null +++ b/addons/product/static/xls/product_template.xls diff --git a/addons/product/views/product_template_import_templates.xml b/addons/product/views/product_template_import_templates.xml deleted file mode 100644 index eba0f8327ed..00000000000 --- a/addons/product/views/product_template_import_templates.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<odoo> - <template id="assets_backend" name="product_template_import assets" inherit_id="web.assets_backend"> - <xpath expr="." position="inside"> - <script type="text/javascript" src="/product/static/src/js/product_template_import.js"></script> - </xpath> - </template> -</odoo> |
