Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] partner_event: Migration to version 16.0 #345

Merged
merged 27 commits into from
Oct 7, 2023

Commits on Oct 5, 2023

  1. Configuration menu
    Copy the full SHA
    6c424b0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6651d96 View commit details
    Browse the repository at this point in the history
  3. Auto create partners in event registrations

    Javier Iniesta authored and carolinafernandez-tecnativa committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    d28b615 View commit details
    Browse the repository at this point in the history
  4. Do not store registration counts.

    These fields were stored. That usually is good, but if you add partners to an event from the wizard, it means each `res.partner` record gets its `registration_count` field updated.
    
    When you update any record, fields `write_uid` and `write_date` are updated too.
    
    Now imagine you want to add 4000 partners to an event. That would take time. If in the mean time any other user updates the `res.partner` record (along with their `write_UID` and `WRITE_DATE` fields), you would get this error:
    
    ```
    openerp.sql_db: bad query: UPDATE "res_partner" SET "registration_count"=3,"write_uid"=5,"write_date"=(now() at time zone 'UTC') WHERE id IN (25578)
    Traceback (most recent call last):
      File "/opt/odoo/common/openerp/v8/openerp/sql_db.py", line 234, in execute
        res = self._obj.execute(query, params)
    TransactionRollbackError: could not serialize access due to concurrent update
    CONTEXT:  SQL statement "SELECT 1 FROM ONLY "public"."res_users" x WHERE "id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x"
    ```
    
    By removing the `store=True` parameter, you simply avoid those concurrent updates and do not block other users.
    
    But this changes the database structure, so remember to update your database!
    yajo authored and carolinafernandez-tecnativa committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    00acbf1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    83ec513 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a67229c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    04100ee View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b0ede65 View commit details
    Browse the repository at this point in the history
  9. [IMP] partner_event: Do single browse

    If adding 1000 partners, we save now 999 queries.
    
    (cherry picked from commit 89853ef)
    yajo authored and carolinafernandez-tecnativa committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    acb9450 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c6ee741 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    35ab033 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    79f22d1 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e541c90 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    88e57e3 View commit details
    Browse the repository at this point in the history
  15. Translated using Weblate (Spanish)

    Currently translated at 100.0% (24 of 24 strings)
    
    Translation: event-12.0/event-12.0-partner_event
    Translate-URL: https://translation.odoo-community.org/projects/event-12-0/event-12-0-partner_event/es/
    Jairo Llopis authored and carolinafernandez-tecnativa committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    cda7f95 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    51b2dde View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    81d886a View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    acb743f View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    80799e7 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    4e2bb39 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    496b572 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2023

  1. Configuration menu
    Copy the full SHA
    65d02c2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db671e9 View commit details
    Browse the repository at this point in the history
  3. [IMP] partner_event: Do registration creation in batch + remove savep…

    …oint
    
    For speeding up the process. Specially the removal of the savepoints
    makes that Postgres don't go slow as hell. Check
    https://www.cybertec-postgresql.com/en/subtransactions-and-performance-in-postgresql/
    for some rationale. The problem happens even releasing the previous
    savepoints.
    
    As this module is very old, the reason for doing it this way and skip
    registrations with error is not fully known, but the view mentions about
    registration duplication, so let's avoid it and handle later other
    possible exceptions.
    
    TT26694
    pedrobaeza authored and carolinafernandez-tecnativa committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    a884ed7 View commit details
    Browse the repository at this point in the history
  4. [FIX] partner_event: compatibility with event_sale

    When we confirm a sale order, the registrations are precreated without
    the email info, so we were missing the chance to get the info for the
    partner attendant.
    
    Now we compute it on the write as well.
    
    TT45149
    chienandalu authored and carolinafernandez-tecnativa committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    5ea6b46 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5196a4e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4410baa View commit details
    Browse the repository at this point in the history