You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.5 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :alt: AGPLv3 License
  3. POS Ticket logo
  4. ===============
  5. Add company logo in POS ticket
  6. Motivation
  7. ==========
  8. ```XmlReceipt``` Qweb report is used when ```iface_print_via_proxy``` config is **True**:
  9. https://github.com/odoo/odoo/blob/8.0/addons/point_of_sale/static/src/js/screens.js#L1341
  10. But in the case ```iface_print_via_proxy``` config is **False**, ```PosTicket```
  11. Qweb report is used, and company_logo is not used:
  12. https://github.com/odoo/odoo/blob/8.0/addons/point_of_sale/static/src/js/screens.js#L984
  13. In other hand, company_logo is loaded using ```/web/binary/company_logo``` controller that returns a 150px wide logo:
  14. https://github.com/odoo/odoo/blob/8.0/addons/point_of_sale/static/src/js/models.js#L371
  15. but after that logo is resized to 300px width, so a pixelled logo appears even
  16. original logo is 300px wide.
  17. That's why we override how company_logo is loaded. We also resized it to 260px
  18. (not 300px) wide because appears cut in PDF:
  19. Credits
  20. =======
  21. Contributors
  22. ------------
  23. * Antonio Espinosa <antonioea@antiun.com>
  24. * Endika Iglesias <endikaig@antiun.com>
  25. Maintainer
  26. ----------
  27. .. image:: http://odoo-community.org/logo.png
  28. :alt: Odoo Community Association
  29. :target: http://odoo-community.org
  30. This module is maintained by the OCA.
  31. OCA, or the Odoo Community Association, is a nonprofit organization whose
  32. mission is to support the collaborative development of Odoo features and
  33. promote its widespread use.
  34. To contribute to this module, please visit http://odoo-community.org.