odoo-addon-openupgrade-scripts 18.0.1.0.0.424__py3-none-any.whl → 18.0.1.0.0.425__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/openupgrade_scripts/scripts/account/18.0.1.3/post-migration.py +24 -0
 - {odoo_addon_openupgrade_scripts-18.0.1.0.0.424.dist-info → odoo_addon_openupgrade_scripts-18.0.1.0.0.425.dist-info}/METADATA +1 -1
 - {odoo_addon_openupgrade_scripts-18.0.1.0.0.424.dist-info → odoo_addon_openupgrade_scripts-18.0.1.0.0.425.dist-info}/RECORD +5 -5
 - {odoo_addon_openupgrade_scripts-18.0.1.0.0.424.dist-info → odoo_addon_openupgrade_scripts-18.0.1.0.0.425.dist-info}/WHEEL +0 -0
 - {odoo_addon_openupgrade_scripts-18.0.1.0.0.424.dist-info → odoo_addon_openupgrade_scripts-18.0.1.0.0.425.dist-info}/top_level.txt +0 -0
 
| 
         @@ -159,6 +159,11 @@ def _handle_outstanding_accounts(env): 
     | 
|
| 
       159 
159 
     | 
    
         | 
| 
       160 
160 
     | 
    
         
             
                Now, they are handled putting specific XML-IDs on them, so we should create that
         
     | 
| 
       161 
161 
     | 
    
         
             
                identifiers on the previous referenced accounts.
         
     | 
| 
      
 162 
     | 
    
         
            +
             
     | 
| 
      
 163 
     | 
    
         
            +
                Besides, now Odoo doesn't generate journal entries by default, unless there's an
         
     | 
| 
      
 164 
     | 
    
         
            +
                outstanding account put on the payment method line on the journals, so let's keep
         
     | 
| 
      
 165 
     | 
    
         
            +
                the previous behavior setting the same outstanding accounts on the lines that have
         
     | 
| 
      
 166 
     | 
    
         
            +
                it empty.
         
     | 
| 
       162 
167 
     | 
    
         
             
                """
         
     | 
| 
       163 
168 
     | 
    
         
             
                IMD = env["ir.model.data"]
         
     | 
| 
       164 
169 
     | 
    
         
             
                for column in [
         
     | 
| 
         @@ -180,6 +185,25 @@ def _handle_outstanding_accounts(env): 
     | 
|
| 
       180 
185 
     | 
    
         
             
                                    "noupdate": True,
         
     | 
| 
       181 
186 
     | 
    
         
             
                                }
         
     | 
| 
       182 
187 
     | 
    
         
             
                            )
         
     | 
| 
      
 188 
     | 
    
         
            +
                        # Fill the outstanding account on journals
         
     | 
| 
      
 189 
     | 
    
         
            +
                        payment_type = (
         
     | 
| 
      
 190 
     | 
    
         
            +
                            "inbound"
         
     | 
| 
      
 191 
     | 
    
         
            +
                            if column == "account_journal_payment_debit_account_id"
         
     | 
| 
      
 192 
     | 
    
         
            +
                            else "outbound"
         
     | 
| 
      
 193 
     | 
    
         
            +
                        )
         
     | 
| 
      
 194 
     | 
    
         
            +
                        openupgrade.logged_query(
         
     | 
| 
      
 195 
     | 
    
         
            +
                            env.cr,
         
     | 
| 
      
 196 
     | 
    
         
            +
                            f"""UPDATE account_payment_method_line apml
         
     | 
| 
      
 197 
     | 
    
         
            +
                            SET payment_account_id = {account_id}
         
     | 
| 
      
 198 
     | 
    
         
            +
                            FROM account_journal aj, account_payment_method apm
         
     | 
| 
      
 199 
     | 
    
         
            +
                            WHERE aj.id = apml.journal_id
         
     | 
| 
      
 200 
     | 
    
         
            +
                                AND apm.id = apml.payment_method_id
         
     | 
| 
      
 201 
     | 
    
         
            +
                                AND aj.type IN ('bank', 'cash')
         
     | 
| 
      
 202 
     | 
    
         
            +
                                AND apm.payment_type = '{payment_type}'
         
     | 
| 
      
 203 
     | 
    
         
            +
                                AND apml.payment_account_id IS NULL
         
     | 
| 
      
 204 
     | 
    
         
            +
                                AND aj.company_id = {company_id}
         
     | 
| 
      
 205 
     | 
    
         
            +
                            """,
         
     | 
| 
      
 206 
     | 
    
         
            +
                        )
         
     | 
| 
       183 
207 
     | 
    
         | 
| 
       184 
208 
     | 
    
         | 
| 
       185 
209 
     | 
    
         
             
            @openupgrade.migrate()
         
     | 
| 
         @@ -6,7 +6,7 @@ odoo/addons/openupgrade_scripts/readme/CONFIGURE.md,sha256=rnx8ADTYzVUB93PIG3Lib 
     | 
|
| 
       6 
6 
     | 
    
         
             
            odoo/addons/openupgrade_scripts/readme/DESCRIPTION.md,sha256=6hwHccovmE9cfaV7PQPvKUvNJa-f_Uc1wgXyL_SrYck,86
         
     | 
| 
       7 
7 
     | 
    
         
             
            odoo/addons/openupgrade_scripts/readme/INSTALL.md,sha256=NDKVZRv0J8BTqcSTD7JwUXL_AY-cDJoegn5IUTbEOFk,113
         
     | 
| 
       8 
8 
     | 
    
         
             
            odoo/addons/openupgrade_scripts/scripts/account/18.0.1.3/noupdate_changes.xml,sha256=givzahE7VAv9gM1TkNDHs3qhNh3AZacox5q-hDuDjIU,4078
         
     | 
| 
       9 
     | 
    
         
            -
            odoo/addons/openupgrade_scripts/scripts/account/18.0.1.3/post-migration.py,sha256= 
     | 
| 
      
 9 
     | 
    
         
            +
            odoo/addons/openupgrade_scripts/scripts/account/18.0.1.3/post-migration.py,sha256=y2KOPiLlVI2qaLnM6V4QnzWt-xPQr70DsiB90FrM-Z4,8747
         
     | 
| 
       10 
10 
     | 
    
         
             
            odoo/addons/openupgrade_scripts/scripts/account/18.0.1.3/pre-migration.py,sha256=8lgeeCdLEQtK2FfTqhJV8gKvlZEC5YWyTEKtuLPrbhw,8420
         
     | 
| 
       11 
11 
     | 
    
         
             
            odoo/addons/openupgrade_scripts/scripts/account/18.0.1.3/upgrade_analysis.txt,sha256=xpQwQxWn0ktacfLBgmRuRMjvSY9R4ClAQlfLJRs35Tg,21369
         
     | 
| 
       12 
12 
     | 
    
         
             
            odoo/addons/openupgrade_scripts/scripts/account/18.0.1.3/upgrade_analysis_work.txt,sha256=wxQD3CdbMhJ1Ch23FEh49rYmGT4sX9Q6rCAX0G90LT4,25352
         
     | 
| 
         @@ -797,7 +797,7 @@ odoo/addons/openupgrade_scripts/scripts/website_slides_survey/18.0.1.0/upgrade_a 
     | 
|
| 
       797 
797 
     | 
    
         
             
            odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
         
     | 
| 
       798 
798 
     | 
    
         
             
            odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
         
     | 
| 
       799 
799 
     | 
    
         
             
            odoo/addons/openupgrade_scripts/static/description/index.html,sha256=Jc0qAThlH5WnoSq6vPamjC8WyMkdo_9zkhDuU1qW1VI,12722
         
     | 
| 
       800 
     | 
    
         
            -
            odoo_addon_openupgrade_scripts-18.0.1.0.0. 
     | 
| 
       801 
     | 
    
         
            -
            odoo_addon_openupgrade_scripts-18.0.1.0.0. 
     | 
| 
       802 
     | 
    
         
            -
            odoo_addon_openupgrade_scripts-18.0.1.0.0. 
     | 
| 
       803 
     | 
    
         
            -
            odoo_addon_openupgrade_scripts-18.0.1.0.0. 
     | 
| 
      
 800 
     | 
    
         
            +
            odoo_addon_openupgrade_scripts-18.0.1.0.0.425.dist-info/METADATA,sha256=Lm0WQ2ytl_4sdiQ6u2P03xf36W8-PmhITiCvNrO4znc,3812
         
     | 
| 
      
 801 
     | 
    
         
            +
            odoo_addon_openupgrade_scripts-18.0.1.0.0.425.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
         
     | 
| 
      
 802 
     | 
    
         
            +
            odoo_addon_openupgrade_scripts-18.0.1.0.0.425.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
         
     | 
| 
      
 803 
     | 
    
         
            +
            odoo_addon_openupgrade_scripts-18.0.1.0.0.425.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     |