File tree Expand file tree Collapse file tree 3 files changed +48
-1
lines changed
openupgrade_scripts/scripts/stock_account/16.0.1.1 Expand file tree Collapse file tree 3 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -770,7 +770,7 @@ Module coverage 15.0 -> 16.0
770
770
+-------------------------------------------------+----------------------+-------------------------------------------------+
771
771
| stock | Done | |
772
772
+-------------------------------------------------+----------------------+-------------------------------------------------+
773
- | stock_account | | |
773
+ | stock_account | Done | |
774
774
+-------------------------------------------------+----------------------+-------------------------------------------------+
775
775
| stock_dropshipping | | |
776
776
+-------------------------------------------------+----------------------+-------------------------------------------------+
Original file line number Diff line number Diff line change
1
+ # Copyright 2023 Coop IT Easy - Robin Keunen
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+
4
+ from openupgradelib import openupgrade
5
+
6
+
7
+ def _account_move_line_fill_cogs_display_type (env ):
8
+ """
9
+ Fill the display type for journal items corresponding to Cost of Good Sold
10
+ lines (COGS) for customer invoices.
11
+ In v15, the lines were set to is_anglo_saxon_line == True, in v16
12
+ field display_display is used.
13
+
14
+ openupgrade account migration script already sets display_type
15
+ in _account_move_fast_fill_display_type (pre-migration)
16
+
17
+ cf _stock_account_prepare_anglo_saxon_out_lines_vals
18
+ :param env:
19
+ :return:
20
+ """
21
+ openupgrade .logged_query (
22
+ env .cr ,
23
+ """
24
+ UPDATE account_move_line
25
+ SET display_type = 'cogs'
26
+ WHERE is_anglo_saxon_line;
27
+ """ ,
28
+ )
29
+
30
+
31
+ @openupgrade .migrate ()
32
+ def migrate (env , version ):
33
+ _account_move_line_fill_cogs_display_type (env )
Original file line number Diff line number Diff line change
1
+ ---Models in module 'stock_account'---
2
+ ---Fields in module 'stock_account'---
3
+ stock_account / account.move.line / is_anglo_saxon_line (boolean) : DEL
4
+ stock_account / account.move.line / stock_valuation_layer_ids (one2many): NEW relation: stock.valuation.layer
5
+ stock_account / stock.valuation.layer / account_move_line_id (many2one): NEW relation: account.move.line
6
+ stock_account / stock.valuation.layer / price_diff_value (float) : NEW
7
+ # NOTHING TO DO: new feature
8
+
9
+ ---XML records in module 'stock_account'---
10
+ NEW ir.actions.act_window: stock_account.stock_valuation_layer_report_action
11
+ NEW ir.ui.view: stock_account.product_product_stock_tree_inherit_stock_account
12
+ NEW ir.ui.view: stock_account.stock_valuation_layer_report_tree
13
+ NEW ir.ui.view: stock_account.view_stock_quantity_history_inherit_stock_account
14
+ # NOTHING TO DO: noupdate="0"
You can’t perform that action at this time.
0 commit comments