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

Pythonic Inheritance issue in Shop by brand module. #105

Closed
ghost opened this issue Apr 12, 2016 · 5 comments
Closed

Pythonic Inheritance issue in Shop by brand module. #105

ghost opened this issue Apr 12, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 12, 2016

Hello Community,

I am facing the issue in importing website_sale class of website_sale module.

The Issue is raised because of the pythonic override of website_sale class.

Here you will find the reference.

https://github.com/OCA/e-commerce/blob/9.0/website_sale_product_brand/controllers/main.py#L59

Can anybody please help me to fix this issue ?

Regards.
#103

@ghost
Copy link
Author

ghost commented Apr 12, 2016

CCing @pedrobaeza @yajo Can you please help me out to overcome this situation ?

I am migrating website_sale_recently_viewed_products in v9.

I need to import the class website_sale and because of this pythonic override, I am not able to import the class.

Thanks in advance.

@pedrobaeza
Copy link
Member

This is not pythonic, it's monkeypatching. You have to remove that and use inheritance.

@ghost
Copy link
Author

ghost commented Apr 12, 2016

@pedrobaeza Thanks for your prompt response.

Looking for the solution.

👍

@oscarolar
Copy link
Contributor

Yeah, just remove that line and you are done. (if there is no other monkey patch.)

@pedrobaeza
Copy link
Member

Closing as done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants