Skip to content
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

[FIX] *: no tracking for consumable product #31355

Closed

Conversation

Projects
None yet
4 participants
@svs-odoo
Copy link
Contributor

commented Feb 22, 2019

Before this commit, you can configure tracking for consumable type product.
Now, tracking and date settings are hidden when the product's type is set on consumable.
Also, resets tracking when change type on consumable.

Task #1938594

@robodoo robodoo added the seen 🙂 label Feb 22, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-no-tracking-for-consumable-svs branch Feb 22, 2019

@C3POdoo C3POdoo added the RD label Feb 22, 2019

@robodoo robodoo added the CI 🤖 label Feb 22, 2019

@svs-odoo

This comment has been minimized.

Copy link
Contributor Author

commented Feb 25, 2019

@sle-odoo for review, thanks !

@sle-odoo

This comment has been minimized.

Copy link
Contributor

commented Feb 25, 2019

you also have to adapt the domain of product_id in stock production lot.py in stock module

@sle-odoo

This comment has been minimized.

Copy link
Contributor

commented Feb 25, 2019

also add in the commit message

We chose to not enforce this constraint in the model because we consider it a bit overkill and we did not want to block migrations.

@svs-odoo svs-odoo force-pushed the odoo-dev:master-no-tracking-for-consumable-svs branch Feb 25, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Feb 25, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-no-tracking-for-consumable-svs branch Feb 25, 2019

@robodoo robodoo removed the CI 🤖 label Feb 25, 2019

@svs-odoo svs-odoo force-pushed the odoo-dev:master-no-tracking-for-consumable-svs branch Feb 25, 2019

addons/product/models/product_template.py Outdated
@api.onchange('type')
def _onchange_type(self):
# Do nothing but needed for inheritance
return

This comment has been minimized.

Copy link
@svs-odoo

svs-odoo Feb 25, 2019

Author Contributor

It seems to me a bit shitty to do that, do you confirm @sle-odoo ? But since I don't know what modules will be installed or not, I can't say what _onchange_type will be the first one except for this one here of course.
The best solution is maybe rename the stock.product.template _onchange_type ?

This comment has been minimized.

Copy link
@sle-odoo

sle-odoo Feb 25, 2019

Contributor

i gues it's the proper way but an onchange could return a direct, i would return {} here and properly return in the overrides

Show resolved Hide resolved addons/sale/models/product_template.py Outdated

@svs-odoo svs-odoo force-pushed the odoo-dev:master-no-tracking-for-consumable-svs branch Feb 25, 2019

@robodoo robodoo added the CI 🤖 label Feb 25, 2019

@svs-odoo svs-odoo changed the title [FIX] stock: no tracking for consumable product [FIX] *: no tracking for consumable product Feb 25, 2019

@sle-odoo

This comment has been minimized.

Copy link
Contributor

commented Mar 6, 2019

there's a _onchange_product_type in sale_purchase

@svs-odoo svs-odoo force-pushed the odoo-dev:master-no-tracking-for-consumable-svs branch Mar 8, 2019

@robodoo robodoo removed the CI 🤖 label Mar 8, 2019

[FIX] *: no tracking for consumable product
Before this commit, you can configure tracking for consumable type
product. Now, tracking and date settings are hidden when the product's
type is set on consumable.
Also, resets tracking when change type on consumable.

We chose to not enforce this constraint in the model because we consider
it a bit overkill and we did not want to block migrations.

Task #1938594

@svs-odoo svs-odoo force-pushed the odoo-dev:master-no-tracking-for-consumable-svs branch to 0bebe71 Mar 8, 2019

@svs-odoo

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2019

there's a _onchange_product_type in sale_purchase

It's done @sle-odoo (I renamed the method _onchange_type to be en raccord with the name used in other files)

@robodoo robodoo added the CI 🤖 label Mar 8, 2019

@sle-odoo

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2019

robodoo r+

@robodoo robodoo added the r+ 👌 label Mar 11, 2019

robodoo pushed a commit that referenced this pull request Mar 11, 2019

[FIX] *: no tracking for consumable product
Before this commit, you can configure tracking for consumable type
product. Now, tracking and date settings are hidden when the product's
type is set on consumable.
Also, resets tracking when change type on consumable.

We chose to not enforce this constraint in the model because we consider
it a bit overkill and we did not want to block migrations.

Task #1938594

closes #31355

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>

@robodoo robodoo added merged 🎉 and removed merging 👷 labels Mar 11, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.