-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
update products attributes and create attribute values #40
Conversation
…f the version is not selected manually then the default(with less sequence) will be downloaded
@oscarolar @RoelAdriaans @StephanRozendaal Can you please review. |
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.
Please update the version number,
LGTM
@@ -72,6 +76,44 @@ def _create_product(self): | |||
products |= new_product | |||
return products | |||
|
|||
@api.multi | |||
def _update_product(self): | |||
attribute = self.env.ref( |
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.
please add docstring
@bizzappdev would it make sense to merge the two crons (creation and update)? It would be easier to manage IMO. |
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 general LGTM, just one question.
@@ -23,7 +23,9 @@ def _get_search_domain(self, search, category, attrib_values): | |||
if search: | |||
for srch in search.split(" "): | |||
domain += [ | |||
'|', '|', '|', '|', '|', '|', '|', ('name', 'ilike', srch), | |||
'|', '|', '|', '|', '|', '|', '|', '|', |
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.
Related to a security reason: Isn't it better to use expression.AND in this case since it santizes the 'srch' input (which comes from the internet)?
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.
@StephanRozendaal we have just overridden the core method and enhance it https://github.com/odoo/odoo/blob/11.0/addons/website_sale/controllers/main.py#L176
Changes are done and added call for update product method from create cron, remove the extra update cron and rename the original cron with "Create / Update" |
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.
Please review the version number.
@@ -3,7 +3,7 @@ | |||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | |||
{ | |||
"name": "Product Download for Appstore", | |||
"version": "11.0.1.0.1", | |||
"version": "11.0.2.0.1", |
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.
11.0.2.0.0
def _update_series_product_attribute_values(self): | ||
attribute = self.env.ref( | ||
'apps_product_creator.attribute_odoo_version') | ||
pro_att_val = self.env['product.attribute.value'] |
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.
prod_attr_val? (nitpicking)
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.
variable name changed.
@sbidoul could you have a quick look? |
Hi all, I deployed this PR and launched the cron. It seems to work fine. |
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* Download file name Fix (OCA#18) * update products attributes and create attribute values (OCA#40) * [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * [IMP]Merged create and update product cron job * [FIX]fix variable names * 11.0 issue OCA#50 add the module technical name in front page (OCA#52) * [FIX][49] solve pager with search parameter * [IMP]website_apps_store : add technical name in front page * [IMP]website_apps_store : add website tour to search technical name * [FIX]website_apps_store : add demo/product_template_demo.xml in menifest.py
update products attributes and create attribute values (OCA#40) * [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names Fix Bad rendering of links inside README (OCA#42) * [FIX][OCA#37]fix rendering from README * [ADD]added CONTRIBUTORS * [FIX] Sorting problem. sorted(for getting default version) as similar as it is sorted from website view [FIX]visibility for the selected options and filters improvements (OCA#43) * [FIX]visibility for the selection options and do not loss the selection option when we change filter from maturity to version etc. * [VER]Added Version number [FIX]CSS module description [FIX]website_apps_store: fix the shop pager [FIX][49] solve pager with search parameter (OCA#51) Sort by Download and rating (OCA#46) * [WIP] added initial support for Google recaptcha * [WIP]added dependencies * [IMP]Added google captcha with download functionality with reset and validation * [IMP]added download count fields and increament it when donwloaded * [ADD]added missing files * [IMP]website_apps_store: add sort by download count on website * remove console and not extra space * [VER]changed version number * [FIX]website_apps_store: fix test case error * [FIX]reset only if google recaptcha is initiated 11.0 issue OCA#50 add the module technical name in front page (OCA#52) * [FIX][49] solve pager with search parameter * [IMP]website_apps_store : add technical name in front page * [IMP]website_apps_store : add website tour to search technical name * [FIX]website_apps_store : add demo/product_template_demo.xml in menifest.py [FIX] website product page event not define problem [FIX]fix 403 public user error [FIX]website_apps_store: attribute value change was not changing the href for the repository. OCA#56
* [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names
* Download file name Fix (OCA#18) * update products attributes and create attribute values (OCA#40) * [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * [IMP]Merged create and update product cron job * [FIX]fix variable names * 11.0 issue OCA#50 add the module technical name in front page (OCA#52) * [FIX][49] solve pager with search parameter * [IMP]website_apps_store : add technical name in front page * [IMP]website_apps_store : add website tour to search technical name * [FIX]website_apps_store : add demo/product_template_demo.xml in menifest.py
update products attributes and create attribute values (OCA#40) * [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names Fix Bad rendering of links inside README (OCA#42) * [FIX][OCA#37]fix rendering from README * [ADD]added CONTRIBUTORS * [FIX] Sorting problem. sorted(for getting default version) as similar as it is sorted from website view [FIX]visibility for the selected options and filters improvements (OCA#43) * [FIX]visibility for the selection options and do not loss the selection option when we change filter from maturity to version etc. * [VER]Added Version number [FIX]CSS module description [FIX]website_apps_store: fix the shop pager [FIX][49] solve pager with search parameter (OCA#51) Sort by Download and rating (OCA#46) * [WIP] added initial support for Google recaptcha * [WIP]added dependencies * [IMP]Added google captcha with download functionality with reset and validation * [IMP]added download count fields and increament it when donwloaded * [ADD]added missing files * [IMP]website_apps_store: add sort by download count on website * remove console and not extra space * [VER]changed version number * [FIX]website_apps_store: fix test case error * [FIX]reset only if google recaptcha is initiated 11.0 issue OCA#50 add the module technical name in front page (OCA#52) * [FIX][49] solve pager with search parameter * [IMP]website_apps_store : add technical name in front page * [IMP]website_apps_store : add website tour to search technical name * [FIX]website_apps_store : add demo/product_template_demo.xml in menifest.py [FIX] website product page event not define problem [FIX]fix 403 public user error [FIX]website_apps_store: attribute value change was not changing the href for the repository. OCA#56
update products attributes and create attribute values (OCA#40) * [FIX]update the product for the new version * [FIX]max version problem and also rewrite logic so the from fronend if the version is not selected manually then the default(with less sequence) will be downloaded * [IMP]added technical name search functionality * change version number * [IMP]Merged create and update product cron job * [FIX]fix variable names Fix Bad rendering of links inside README (OCA#42) * [FIX][OCA#37]fix rendering from README * [ADD]added CONTRIBUTORS * [FIX] Sorting problem. sorted(for getting default version) as similar as it is sorted from website view [FIX]visibility for the selected options and filters improvements (OCA#43) * [FIX]visibility for the selection options and do not loss the selection option when we change filter from maturity to version etc. * [VER]Added Version number [FIX]CSS module description [FIX]website_apps_store: fix the shop pager [FIX][49] solve pager with search parameter (OCA#51) Sort by Download and rating (OCA#46) * [WIP] added initial support for Google recaptcha * [WIP]added dependencies * [IMP]Added google captcha with download functionality with reset and validation * [IMP]added download count fields and increament it when donwloaded * [ADD]added missing files * [IMP]website_apps_store: add sort by download count on website * remove console and not extra space * [VER]changed version number * [FIX]website_apps_store: fix test case error * [FIX]reset only if google recaptcha is initiated 11.0 issue OCA#50 add the module technical name in front page (OCA#52) * [FIX][49] solve pager with search parameter * [IMP]website_apps_store : add technical name in front page * [IMP]website_apps_store : add website tour to search technical name * [FIX]website_apps_store : add demo/product_template_demo.xml in menifest.py [FIX] website product page event not define problem [FIX]fix 403 public user error [FIX]website_apps_store: attribute value change was not changing the href for the repository. OCA#56
following changes are done in this PR.
technical_name
Cannot find module account_invoice_kanban #39