Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 140
    • Merge requests 140
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !260

Merged
Created Apr 13, 2017 by Jérome Perrin@jeromeOwner

BT : Fix template_keep_path_list for CatalogMethodTemplateItem

  • Overview 4
  • Commits 3
  • Changes 3

For years, erp5_calendar was keeping a duplicated copy of z_catalog_stock_list. In a79ca4c1, the functionality was merged in erp5_mysql_innodb and the duplicated copy was removed from erp5_calendar.

Problem is that when we update erp5_calendar, z_catalog_stock_list is removed.

We discussed in a79ca4c1 (comment 15577) and suggested to use Path of objects that should be kept like we already did in some other business templates.

I tried, but it did not work, because CatalogMethod.preinstall overwrites the returned value of ObjectTemplateItem.preinstall (which supports template_keep_path_list) with the returned value of BaseTemplateItem.preinstall which does not support it.

My understanding is that the former is necessary to install the z sql methods and later to install the configuration on the catalog ( see efe5294e ), but the order does not really mater, so it's safe to give priority to ObjectTemplateItem.preinstall.

I also add some tests for template_keep_path_list, I think it was not tested, and modified erp5_calendar as suggested.

/cc @seb @kazuhiko @aurel @tiwariayush @gabriel

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix/template_keep_path_list_catalog_method_template_item
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7