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
  • !751

Closed
Created Sep 20, 2018 by Arnaud Fontaine@arnauDeveloper
  • Report abuse
Report abuse

simulation: The parent SM may have several BLs as 'causality'.

  • Overview 3
  • Commits 1
  • Changes 1

Necessary for a customer project using Real Time Inventory Accounting. No Unit Test yet as I wanted to know if this really should be done this way before going forward. No related Unit Tests failures: https://nexedi.erp5.net/test_result_module/20180920-5E024FF4

Simulation Tree:

  • SM_PPL
    • AR(Inventory Accounting Transaction)
      • SM_IAT(ledger=A)
      • SM_IAT(ledger=B)

Where SM_IAT.isBuildable() returns True iff:

  • SM_IAT(ledger=A): SM_PPL delivery state == 'started' (Shipped).
  • SM_IAT(ledger=B): SM_PPL delivery state == 'stopped' (Received).

Defining this in a single BP lead to the following Business Links:

  • BL_PPL_started:

    • predecessor=trade/ordered
    • successor=trade/delivery_started
    • completed_state_list=['started']
    • trade_phase=trade/delivery
  • BL_IAT_ledger_A:

    • predecessor=trade/delivery_started
    • successor=trade/inventory_accounted
    • trade_phase=trade/inventory_accounting
    • predicate: ledger == A
  • BL_PPL_delivered:

    • predecessor=trade/ordered
    • successor=trade/delivered
    • completed_state_list=['stopped', 'delivered']
    • trade_phase=trade/delivery
  • BL_IAT_ledger_B:

    • predecessor=trade/delivered
    • successor=trade/inventory_accounted
    • trade_phase=trade/inventory_accounting
    • predicate: ledger == B

This means that SM_PPL will have both BL_PPL_started and BBL_PPL_delivered Business Links as causality which was not handled by isBuildable.

Another solution would have been to add this logic on the Builder 'Simulation Select Method' but IMO this should not be done there.

@nexedi

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