OCA / vertical-association

Odoo addons for membership related tasks
GNU Affero General Public License v3.0
38 stars 112 forks source link

[10.0] membership_variable_period #89

Closed baimont closed 4 years ago

baimont commented 4 years ago

This: https://github.com/OCA/vertical-association/blob/81e51d8cae307e94a893d217b7abdf9c79209276/membership_variable_period/models/product_template.py#L67 is bad. If self contains more than one record it raises a ValueError.

pedrobaeza commented 4 years ago

Right, are you proposing a PR fixing it?

baimont commented 4 years ago

Right, are you proposing a PR fixing it?

At the moment no. A loop calling multiple times the function wouldn't fix adequately the problem since vals would result to be the vals of the last iteration. So from my perspective, a bit of analysis is in order here.

pedrobaeza commented 4 years ago

It will require to check each one independently and call super with that isolated record if needs to be written a specific value.

baimont commented 4 years ago

It will require to check each one independently and call super with that isolated record if needs to be written a specific value.

Thanks for your fast answer. Tell me what you think: https://github.com/OCA/vertical-association/pull/90