Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Tryton Tryton
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 792
    • Issues 792
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 86
    • Merge requests 86
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Tryton
  • TrytonTryton
  • Issues
  • #8950
Closed
Open
Created Dec 23, 2019 by Raimon Esteve@resteve

Break when match product price supplier

Break when find a price by supplier [1].

A. Example price lines:

Quantity / Price /sequence

"10,0", "10,0000", 1
"10 000,0", "0,0524", 2
"1,0", "1,0000", 3

Add qty 24:

for price in prices:
10.0 -> match: 10.0
10000.0 -> no match
1.0 -> match: 1.0

Return price from quantity 1 (last match).


B. Expected price lines (order by sequence like product_price_list):

Quantity / Price /sequence

"10 000,0", "0,0524", 1
"10,0", "10,0000", 2
"1,0", "1,0000", 3

Add qty 24:

for price in prices:
10000.0 -> no match
10.0 -> match: 10.0 and break


Return price from quantity 10 and not continue.


[1] https://hg.tryton.org/modules/purchase/file/tip/product.py#l177

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking