-
-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] stock_quant_cost_info: Migration to 15.0
- Module renamed from stock_inventory_cost_info to stock_quant_cost_info - Add changes to allow show the cost difference when changing qty from stock.quants TT36551
- Loading branch information
1 parent
fb0e5d1
commit 5c10e83
Showing
14 changed files
with
120 additions
and
144 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
setup/stock_inventory_cost_info/odoo/addons/stock_inventory_cost_info
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../stock_quant_cost_info |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_quant_cost_info | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-01-16 09:20+0000\n" | ||
"PO-Revision-Date: 2023-01-16 09:20+0000\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: stock_quant_cost_info | ||
#: model_terms:ir.ui.view,arch_db:stock_quant_cost_info.report_inventory_cost_info | ||
msgid "<strong>Adjustment cost</strong>" | ||
msgstr "" | ||
|
||
#. module: stock_quant_cost_info | ||
#: model:ir.model.fields,field_description:stock_quant_cost_info.field_stock_quant__adjustment_cost | ||
msgid "Adjustment cost" | ||
msgstr "" | ||
|
||
#. module: stock_quant_cost_info | ||
#: model:ir.model.fields,field_description:stock_quant_cost_info.field_stock_quant__currency_id | ||
msgid "Currency" | ||
msgstr "" | ||
|
||
#. module: stock_quant_cost_info | ||
#: model:ir.model,name:stock_quant_cost_info.model_stock_quant | ||
msgid "Quants" | ||
msgstr "" | ||
|
||
#. module: stock_quant_cost_info | ||
#: model_terms:ir.ui.view,arch_db:stock_quant_cost_info.view_stock_quant_tree_inventory_editable | ||
msgid "Total" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import stock_inventory | ||
from . import stock_quant |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2019 Tecnativa - Ernesto Tejeda | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class StockQuant(models.Model): | ||
_inherit = "stock.quant" | ||
|
||
currency_id = fields.Many2one( | ||
comodel_name="res.currency", string="Currency", related="company_id.currency_id" | ||
) | ||
adjustment_cost = fields.Monetary( | ||
string="Adjustment cost", compute="_compute_adjustment_cost", store=True | ||
) | ||
|
||
@api.depends("inventory_diff_quantity", "product_id.standard_price") | ||
def _compute_adjustment_cost(self): | ||
for record in self: | ||
record.adjustment_cost = False | ||
if record.inventory_diff_quantity: | ||
record.adjustment_cost = ( | ||
record.inventory_diff_quantity * record.product_id.standard_price | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters