From 0370dd7c674ebec545f390144c06ac67edeb988a Mon Sep 17 00:00:00 2001 From: raph Date: Fri, 26 Feb 2016 14:35:09 +0100 Subject: [PATCH] Fix line length in readme Remove __openerp.py_.description Remove _name Remove unneeded contents in init --- pos_default_empty_image/README.rst | 24 +++++++++----- pos_default_empty_image/__init__.py | 1 - pos_default_empty_image/__openerp__.py | 44 -------------------------- pos_default_empty_image/product.py | 1 - 4 files changed, 16 insertions(+), 54 deletions(-) diff --git a/pos_default_empty_image/README.rst b/pos_default_empty_image/README.rst index 714be00f..abe091b5 100644 --- a/pos_default_empty_image/README.rst +++ b/pos_default_empty_image/README.rst @@ -6,11 +6,13 @@ POS Default Empty Image ======================= -In the point of sale, trying to load known inexistant images is a waste of time. +In the point of sale, trying to load known inexistant images +is a waste of time. -When you have 8000 products in your Point of Sale and most of them don't have images, -you are happy to save thousands of useless requests : the POS load way faster. +When you have 8000 products in your Point of Sale and most of them +don't have images, you are happy to save thousands of useless requests: +the POS load way faster. Technical information ===================== @@ -22,16 +24,21 @@ Each time the pos instantiate a product, it will add an The browser will trigger as many requests than there is different url. -If you have many products, the browser will soon reach his limit of network connections to Odoo server and -will wait for free slots instead of loading other valuable contents. Then the POS is then very slow to work with. +If you have many products, the browser will soon reach his limit of +network connections to Odoo server and will wait for free slots instead of +loading other valuable contents. Then the POS is then very slow to work with. -This module adds a field _has_image_ in product.template and will change the product image url to his default placeholder directly in the POS. +This module adds a field _has_image_ in product.template and will +change the product image url to his default placeholder directly in the POS. + +Because there is only one url for this placeholder, +you will have only one request for all the products with no images. -Because there is only one url for this placeholder, you will have only one request for all the products with no images. Indeed, if the product has an image, it will load normally. + Known issues ============ @@ -58,7 +65,8 @@ Contributors * Hparfr `Akretion `_ * Sylvain LE GAL -See also this module `pos_improve_images from GRAP `_ for OpenERP 7. +See also this module `pos_improve_images from GRAP +`_ for OpenERP 7. Maintainer diff --git a/pos_default_empty_image/__init__.py b/pos_default_empty_image/__init__.py index 40a96afc..e69de29b 100644 --- a/pos_default_empty_image/__init__.py +++ b/pos_default_empty_image/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/pos_default_empty_image/__openerp__.py b/pos_default_empty_image/__openerp__.py index 654e940b..b0fa5408 100644 --- a/pos_default_empty_image/__openerp__.py +++ b/pos_default_empty_image/__openerp__.py @@ -6,50 +6,6 @@ 'version': '8.0.0.1.0', 'category': 'Point Of Sale', 'summary': 'Optimise load time for products with no image', - 'description': """ -POS Default empty Image -======================= - -In the point of sale, trying to load known inexistant images is -a waste of time. - - -When you have 8000 products in your Point of Sale and most of them -don't have images, you are happy to save thousands of useless requests : -the POS load way faster. - - -Technical information -===================== - -Each time the pos instantiate a product, it will add an - to DOM. -The browser will trigger as many requests than there is different url. -If you have many products, the browser will soon reach his limit of -network connections to Odoo server and -will wait for free slots instead of loading other valuable contents. -The POS is then very slow to work with. - - -This module adds a field _has_image_ in product.template and will change -the product image url to his default placeholder directly in the POS. -Because there is only one url for this placeholder, you will have -only one request for all the products with no images. - - -Indeed, if the product has an image, it will load normally. - - -Other -===== - -See also this module: [pos_improve_images from GRAP] -(https://github.com/grap/odoo-addons-grap/tree/7.0/pos_improve_images) - for OpenERP 7 which emphasis the name of the product -instead of displaying the placeholder. - - - """, 'author': "Akretion, GRAP, Odoo Community Association (OCA)", 'website': "https://akretion.com", 'license': 'AGPL-3', diff --git a/pos_default_empty_image/product.py b/pos_default_empty_image/product.py index 09c7999d..44c1d09c 100644 --- a/pos_default_empty_image/product.py +++ b/pos_default_empty_image/product.py @@ -7,7 +7,6 @@ from openerp import models, fields, api class ProductTemplate(models.Model): _inherit = ['product.template'] - _name = 'product.template' @api.multi @api.depends('field.image')