Browse Source

Fix line length in readme

Remove __openerp.py_.description
Remove _name
Remove unneeded contents in init
pull/351/head
raph 9 years ago
committed by Sylvain LE GAL
parent
commit
0370dd7c67
  1. 24
      pos_default_empty_image/README.rst
  2. 1
      pos_default_empty_image/__init__.py
  3. 44
      pos_default_empty_image/__openerp__.py
  4. 1
      pos_default_empty_image/product.py

24
pos_default_empty_image/README.rst

@ -6,11 +6,13 @@
POS Default Empty Image 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 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. 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. Indeed, if the product has an image, it will load normally.
Known issues Known issues
============ ============
@ -58,7 +65,8 @@ Contributors
* Hparfr <https://github.com/hparfr> `Akretion <https://akretion.com>`_ * Hparfr <https://github.com/hparfr> `Akretion <https://akretion.com>`_
* Sylvain LE GAL <https://twitter.com/legalsylvain> * Sylvain LE GAL <https://twitter.com/legalsylvain>
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.
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.
Maintainer Maintainer

1
pos_default_empty_image/__init__.py

@ -1 +0,0 @@
# -*- coding: utf-8 -*-

44
pos_default_empty_image/__openerp__.py

@ -6,50 +6,6 @@
'version': '8.0.0.1.0', 'version': '8.0.0.1.0',
'category': 'Point Of Sale', 'category': 'Point Of Sale',
'summary': 'Optimise load time for products with no image', '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
<img src="/web/.... + imageId"> 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)", 'author': "Akretion, GRAP, Odoo Community Association (OCA)",
'website': "https://akretion.com", 'website': "https://akretion.com",
'license': 'AGPL-3', 'license': 'AGPL-3',

1
pos_default_empty_image/product.py

@ -7,7 +7,6 @@ from openerp import models, fields, api
class ProductTemplate(models.Model): class ProductTemplate(models.Model):
_inherit = ['product.template'] _inherit = ['product.template']
_name = 'product.template'
@api.multi @api.multi
@api.depends('field.image') @api.depends('field.image')

Loading…
Cancel
Save