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 137
    • Merge requests 137
  • 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
  • !172

Closed
Created Oct 03, 2016 by Jérome Perrin@jeromeOwner
  • Report abuse
Report abuse

Move erp5_budget to portal_components

  • Overview 7
  • Commits 2
  • Changes 25

Move document classes and tests from products to portal_components.

In order to have git recognized this as a move, I used that procedure:

for each document, for example with Budget.py:

  • in portal_components, add a new Document Component with id document.erp5.Budget and reference Budget. Leave text content empty for now.
  • in portal_templates, from Document Classes tab of erp5_budget business template, add document.erp5.Budget
  • click on the Git tab, this will populate the working copy.
  • from the command line, use git mv to move Budget.py from products to bt, something like:
   git rm bt5/erp5_budget/DocumentTemplateItem/portal_components/document.erp5.Budget.py # remove the empty "placeholder" file
   git mv product/ERP5/Budget.py  bt5/erp5_budget/DocumentTemplateItem/portal_components/document.erp5.Budget.py # actual move
  • ( at this point it is easier to make a commit that we'll squash together later)
  • Fix import paths, for example Products.ERP5.Document.Budget becomes erp5.component.document.Budget

for tests:

  • find out the test dependancies. In this case, it was all business templates defined in getBusinessTemplateList method of the test class and erp5_full_text_myisam_catalog that is a virtual dependancy and that we always have to specify.
  • list the test dependencies in Tests Dependencies from the business template View tab.
  • move the test using same git mv trick. This time adding a Test Component named test.erp5.testBudget.

Running test as live test does not seem to work when running from the instance, but the test passes when running on test nodes ( test results are OK, the 2 failures are same on master)

I did just a little development on the migrated products, so there might be severe usability problems, but as far as I saw it seems working for me. Also, for the records, note that I have locally disabled pylint and use a hack to just use pyflakes.

At the same time, I am pushing a trivial commit 488f557c of a simple mistakes that integrated python code checker revealed.

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