-
-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[9.0][ADD][partner_multi_image] possibility to have multiple images for a partner #287
Conversation
partner_multi_image/README.rst
Outdated
Multiple Images in Partners | ||
=========================== | ||
|
||
This module implements the possibility to have multiple images for a product |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably Partner?
Thanks for your contribution ! looks promising :) |
partner_multi_image/README.rst
Outdated
#. Add a new image. | ||
#. Refresh the page. | ||
#. The first image in the collection is the main image for the product. | ||
#. Go to *Sales > Products > Product Variants* and choose a product variant. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong path
Hi, I just added a test that should fail until OCA/server-tools#485 is merged in 42a87ee |
image = fields.Binary( | ||
related='image_main', | ||
store=False, | ||
multi=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird that you don't get affected by odoo/odoo#10799. These fields are found in core Odoo, or they are new? If found in core, and they have multi
there, you'll probably have to declare them with v7 style to avoid failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fields are in core but they haven't a multi parameter here. So @yajo can you retest and approve this pr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In such case just 🔥 the multi
s
@sergio-teruel, can you finish this one? |
I already had done a review; besides, bots are ❌ |
de94316
to
a349693
Compare
@pedrobaeza @yajo changes made by @cubells please review thanks! |
partner_multi_image/hooks.py
Outdated
# © 2016 Sodexis | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openerp.addons.base_multi_image.hooks import pre_init_hook_for_submodules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are missing the uninstall hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yajo done!
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import res_partner | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💩
image_medium = fields.Binary( | ||
related='image_main_medium', | ||
store=False, | ||
multi=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
image_small = fields.Binary( | ||
related='image_main_small', | ||
store=False, | ||
multi=False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
ae42d84
to
ec61aa5
Compare
partner_multi_image/hooks.py
Outdated
|
||
|
||
def uninstall_hook(cr, registry): | ||
uninstall_hook_for_submodules(cr, registry, "res.partner") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you skip tests here (# pragma: no-cover
) you will get to 100% coverage for the patch!
32c0dd3
to
795db52
Compare
Perfect! 😋 Need more reviews! |
partner_multi_image/__openerp__.py
Outdated
"author": "Tecnativa, " | ||
"Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"website": "http://www.tecnativa.com", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https
partner_multi_image/__openerp__.py
Outdated
"license": "AGPL-3", | ||
"website": "http://www.tecnativa.com", | ||
"category": "Customer Relationship Management", | ||
"pre_init_hook": "pre_init_hook", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uninstall_hook is not included here
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
2009 Sharoon Thomas Open Labs | ||
2014 Serv. Tecnol. Avanzados Pedro M. Baeza |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tecnativa here
@@ -0,0 +1,30 @@ | |||
# -*- coding: utf-8 -*- | |||
# © 2009 Sharoon Thomas Open Labs Business Solutions | |||
# © 2014 Serv. Tecnol. Avanzados Pedro M. Baeza |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tecnativa
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
# © 2009 Sharoon Thomas Open Labs Business Solutions | |||
# © 2014 Serv. Tecnol. Avanzados Pedro M. Baeza |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tecnativa
partner_multi_image/hooks.py
Outdated
@@ -0,0 +1,17 @@ | |||
# -*- coding: utf-8 -*- | |||
# © 2009 Sharoon Thomas Open Labs Business Solutions | |||
# © 2014 Serv. Tecnol. Avanzados Pedro M. Baeza |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tecnativa
d8a4aff
to
8249c0c
Compare
No description provided.