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

update products attributes and create attribute values #40

Merged
merged 6 commits into from
Nov 11, 2018

Conversation

bizzappdev
Copy link

following changes are done in this PR.

  1. Added a new cron job for updating the product attribute values when new version added. #38
  2. Fix the max version problem
  3. Solve the problem from Product page when no version is manually selected it was downloading latest version while the default selected version was olded. Now the selected version has been download
  4. search facility for explicitly on technical_name Cannot find module account_invoice_kanban #39

@bizzappdev
Copy link
Author

@oscarolar @RoelAdriaans @StephanRozendaal Can you please review.
cc @elicoidal @sbidoul

@pedrobaeza pedrobaeza added this to the 11.0 milestone Nov 3, 2018
Copy link

@elicoidal elicoidal left a 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(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add docstring

@sbidoul
Copy link
Member

sbidoul commented Nov 4, 2018

@bizzappdev would it make sense to merge the two crons (creation and update)? It would be easier to manage IMO.

Copy link

@StephanRozendaal StephanRozendaal left a 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),
'|', '|', '|', '|', '|', '|', '|', '|',

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)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bizzappdev
Copy link
Author

@bizzappdev would it make sense to merge the two crons (creation and update)? It would be easier to manage IMO.

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"

Copy link

@elicoidal elicoidal left a 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",

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']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prod_attr_val? (nitpicking)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable name changed.

@elicoidal
Copy link

@sbidoul could you have a quick look?

@sbidoul
Copy link
Member

sbidoul commented Nov 10, 2018

Hi all, I deployed this PR and launched the cron. It seems to work fine.

@elicoidal elicoidal merged commit 336af8d into OCA:11.0 Nov 11, 2018
victormmtorres pushed a commit to Tecnativa/apps-store that referenced this pull request Apr 10, 2019
* [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
victormmtorres pushed a commit to Tecnativa/apps-store that referenced this pull request Apr 22, 2019
* [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
victormmtorres pushed a commit to Tecnativa/apps-store that referenced this pull request Apr 30, 2019
* [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
victormmtorres pushed a commit to Tecnativa/apps-store that referenced this pull request May 2, 2019
* [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
victormmtorres pushed a commit to Tecnativa/apps-store that referenced this pull request May 6, 2019
* [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
CarlosRoca13 pushed a commit to Tecnativa/apps-store that referenced this pull request Jul 10, 2020
* [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
pedrobaeza pushed a commit to Tecnativa/apps-store that referenced this pull request Jul 17, 2020
* [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
Tardo pushed a commit to Tecnativa/apps-store that referenced this pull request Aug 5, 2020
* [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
Tardo pushed a commit to Tecnativa/apps-store that referenced this pull request Aug 5, 2020
* [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
pedrobaeza pushed a commit to Tecnativa/apps-store that referenced this pull request Aug 5, 2020
* 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
pedrobaeza pushed a commit to Tecnativa/apps-store that referenced this pull request Aug 12, 2020
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
ernestotejeda pushed a commit to Tecnativa/apps-store that referenced this pull request Aug 2, 2021
* [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
ernestotejeda pushed a commit to Tecnativa/apps-store that referenced this pull request Aug 11, 2021
* 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
ernestotejeda pushed a commit to Tecnativa/apps-store that referenced this pull request Aug 16, 2021
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
ernestotejeda pushed a commit to Tecnativa/apps-store that referenced this pull request Aug 24, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants