File tree 1 file changed +19
-0
lines changed
contract/migrations/13.0.1.0.0
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 6
6
7
7
@openupgrade .migrate ()
8
8
def migrate (env , version ):
9
+ openupgrade .logged_query (
10
+ env .cr ,
11
+ """
12
+ UPDATE account_move am
13
+ SET old_contract_id = ai.old_contract_id
14
+ FROM account_invoice ai
15
+ WHERE ai.id = am.old_invoice_id
16
+ AND ai.old_contract_id IS NOT NULL""" ,
17
+ )
18
+ openupgrade .logged_query (
19
+ env .cr ,
20
+ """
21
+ UPDATE account_move_line aml
22
+ SET contract_line_id = ail.contract_line_id
23
+ FROM account_invoice_line ail
24
+ WHERE ail.id = aml.old_invoice_line_id
25
+ AND ail.contract_line_id IS NOT NULL""" ,
26
+ )
9
27
openupgrade .load_data (
10
28
env .cr , "contract" , "migrations/13.0.1.0.0/noupdate_changes.xml"
11
29
)
30
+
12
31
# Don't alter line recurrence v12 behavior
13
32
contracts = env ["contract.contract" ].search ([])
14
33
contracts .write ({"line_recurrence" : True })
You can’t perform that action at this time.
0 commit comments