What is a "product combination". At least a few words (in the docstring of the Python module product_combination.py) to explain this concept could be useful.
--
l.44-47, l.217ff. l.226ff (and other places, possibly on methods search, browse, read, create, unlink)
--
l.306-321:
suggestion (as you want): externalize the part which get the option value in another ConnectorUnit, allowing to customize the way the options values are get.
--
l.599
if len(combinations) == 0:
=>
if not combinations:
Good piece of work Arthur,
Some comments:
--
What is a "product combination". At least a few words (in the docstring of the Python module product_ combination. py) to explain this concept could be useful.
--
l.44-47, l.217ff. l.226ff (and other places, possibly on methods search, browse, read, create, unlink)
model = self.session. pool.get( 'product. product' ) self.session. cr, self.session.uid, [
('default_ code', '=', code)
product_ids = model.search(
])
A better idiom is:
product_ids = self.session. search( 'product. product' , [('default_code', '=', code)])
(side note on the alignment: "Arguments on first line forbidden when not using vertical alignment", source http:// www.python. org/dev/ peps/pep- 0008/#indentati on)
--
l.134 dependencies" in __openerp__.py
"unidecode" is to add in the "external_
--
l.212 (and each time you use the unwrap keyword argument of to_openerp())
Please use the keyword when calling a keyword argument, so instead of
attribute_id = option_ binder. to_openerp(
option_ value[' id_attribute_ group'] , True)
Use
attribute_id = option_ binder. to_openerp(
option_ value[' id_attribute_ group'] , unwrap=True)
--
l.264, l.302, l.453
Instead of:
type( main_product[ attribute] ) is list
Use:
isinstance( main_product[ attribute] , list)
--
l.306-321:
suggestion (as you want): externalize the part which get the option value in another ConnectorUnit, allowing to customize the way the options values are get.
--
l.599
if len(combinations) == 0:
=>
if not combinations:
--
Thanks!