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
  • #11980
Closed
Open
Created Jan 02, 2023 by Cédric Krier@cedOwner

Migration must create history record

When we manipulate data with raw SQL query, we must ensure to also update the history table if there is one (we can not rely on _history attribute as it can be set in another module).

For that we may use ModelSQL._insert_history but it may be missing some fields that are added in other modules so we should adapt the method to use common columns between both tables.

The PaymentTermLineRelativeDelta migration from 3.4 is an example which create trouble when used with account_invoice_history because the ORM is always reading value from the history table which is not available.

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