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.

31 lines
808 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2009 Sharoon Thomas Open Labs Business Solutions
  3. # Copyright 2014 Tecnativa - Pedro M. Baeza
  4. # Copyright 2015 Antiun Ingeniería S.L. - Jairo Llopis
  5. # Copyright 2016 Sodexis
  6. # Copyright 2017 Tecnativa - Sergio Teruel
  7. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  8. """Reference core image fields to multi-image variants."""
  9. from openerp import fields, models
  10. class ResPartner(models.Model):
  11. _name = "res.partner"
  12. _inherit = [_name, "base_multi_image.owner"]
  13. image = fields.Binary(
  14. related='image_main',
  15. store=False,
  16. )
  17. image_medium = fields.Binary(
  18. related='image_main_medium',
  19. store=False,
  20. )
  21. image_small = fields.Binary(
  22. related='image_main_small',
  23. store=False,
  24. )