Skip to content

Commit d12bdbf

Browse files
[18.0][MIG] stock_account_operating_unit
1 parent add4c6f commit d12bdbf

6 files changed

Lines changed: 286 additions & 38 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
2-
from . import model
2+
from . import models

stock_account_operating_unit/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"name": "Stock account moves with Operating Unit",
88
"summary": "Create journal entries in moves between internal locations "
99
"with different operating units.",
10-
"version": "15.0.1.0.0",
10+
"version": "18.0.1.0.0",
1111
"category": "Generic Modules/Sales & Purchases",
1212
"author": "ForgeFlow, "
1313
"Serpent Consulting Services Pvt. Ltd.,"
File renamed without changes.

stock_account_operating_unit/model/stock_move.py renamed to stock_account_operating_unit/models/stock_move.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ def _generate_valuation_lines_data(
1616
credit_value,
1717
debit_account_id,
1818
credit_account_id,
19+
svl_id,
1920
description,
2021
):
21-
res = super(StockMove, self)._generate_valuation_lines_data(
22+
res = super()._generate_valuation_lines_data(
2223
partner_id,
2324
qty,
2425
debit_value,
2526
credit_value,
2627
debit_account_id,
2728
credit_account_id,
29+
svl_id,
2830
description,
2931
)
3032
if res:
@@ -79,9 +81,8 @@ def _action_done(self, cancel_backorder=False):
7981
a transit location or is outside of the company or the source or
8082
destination locations belong to different operating units.
8183
"""
82-
res = super(StockMove, self)._action_done(cancel_backorder)
84+
res = super()._action_done(cancel_backorder)
8385
for move in self:
84-
8586
if move.product_id.valuation == "real_time":
8687
# Inter-operating unit moves do not accept to
8788
# from/to non-internal location
@@ -102,6 +103,7 @@ def _action_done(self, cancel_backorder=False):
102103
move.product_id.standard_price,
103104
acc_valuation,
104105
acc_valuation,
106+
False,
105107
_("%s - OU Move") % move.product_id.display_name,
106108
)
107109
am = (
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"

0 commit comments

Comments
 (0)