-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aaea7d7
commit f93defd
Showing
35 changed files
with
572 additions
and
225 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
setup/stock_product_shelfinfo/odoo/addons/stock_product_shelfinfo
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_product_shelfinfo |
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,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2023 Quartile Limited | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Stock Product Shelf Information", | ||
"version": "16.0.1.0.0", | ||
"author": "Quartile Limited", | ||
"website": "https://www.quartile.co", | ||
"category": "Warehouse", | ||
"license": "AGPL-3", | ||
"depends": ["stock"], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"security/product_shelfinfo_security.xml", | ||
"reports/report_stockpicking_operations.xml", | ||
"views/product_shelfinfo_views.xml", | ||
"views/product_template_views.xml", | ||
"views/stock_picking_views.xml", | ||
], | ||
"installable": True, | ||
} |
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,163 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_product_shelfinfo | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2023-03-20 05:24+0000\n" | ||
"PO-Revision-Date: 2023-03-20 05:24+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_product_shelfinfo | ||
#. odoo-python | ||
#: code:addons/stock_product_shelfinfo/models/product_shelfinfo.py:0 | ||
#, python-format | ||
msgid "" | ||
"Another record already exists for the given combination of product, location" | ||
" and company." | ||
msgstr "そのプロダクト、ロケーション、会社の組み合わせに対するレコードは既に存在しています。" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__bucket | ||
msgid "Bucket" | ||
msgstr "引出" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__company_id | ||
msgid "Company" | ||
msgstr "会社" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__create_uid | ||
msgid "Created by" | ||
msgstr "作成者" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__create_date | ||
msgid "Created on" | ||
msgstr "作成日" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__display_name | ||
msgid "Display Name" | ||
msgstr "表示名" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__name | ||
msgid "Generated ID" | ||
msgstr "生成されたID" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_shelfinfo_search_view | ||
msgid "Group By" | ||
msgstr "グループ化" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__id | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__ref | ||
msgid "Internal Reference" | ||
msgstr "内部参照" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo____last_update | ||
msgid "Last Modified on" | ||
msgstr "最終更新日" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__write_uid | ||
msgid "Last Updated by" | ||
msgstr "最終更新者" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__write_date | ||
msgid "Last Updated on" | ||
msgstr "最終更新日" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__location_id | ||
#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_shelfinfo_search_view | ||
msgid "Location" | ||
msgstr "ロケーション" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__memo | ||
msgid "Memo" | ||
msgstr "メモ" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__position | ||
msgid "Position" | ||
msgstr "位置" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model,name:stock_product_shelfinfo.model_product_template | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__product_id | ||
#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_shelfinfo_search_view | ||
msgid "Product" | ||
msgstr "プロダクト" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.actions.act_window,name:stock_product_shelfinfo.action_product_shelfinfo_view | ||
#: model:ir.ui.menu,name:stock_product_shelfinfo.menu_product_shelfinfo | ||
#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.view_product_shelfinfo_form | ||
msgid "Product Shelf Information" | ||
msgstr "棚情報" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model,name:stock_product_shelfinfo.model_product_shelfinfo | ||
#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_shelfinfo_search_view | ||
msgid "Product Shelfinfo" | ||
msgstr "棚情報" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__product_tmpl_id | ||
msgid "Product Template" | ||
msgstr "プロダクトテンプレート" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model,name:stock_product_shelfinfo.model_product_product | ||
msgid "Product Variant" | ||
msgstr "プロダクトバリアント" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__sequence | ||
msgid "Sequence" | ||
msgstr "シークエンス" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__shelf | ||
msgid "Shelf" | ||
msgstr "棚" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_stock_move__shelfinfo_src_id | ||
msgid "Shelf Info. (From)" | ||
msgstr "棚情報(移動元)" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_stock_move__shelfinfo_dest_id | ||
msgid "Shelf Info. (To)" | ||
msgstr "棚情報(移動先)" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_product__shelfinfo_ids | ||
#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_template__shelfinfo_ids | ||
#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_template_form_view | ||
msgid "Shelf Information" | ||
msgstr "棚情報" | ||
|
||
#. module: stock_product_shelfinfo | ||
#: model:ir.model,name:stock_product_shelfinfo.model_stock_move | ||
msgid "Stock Move" | ||
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from . import product_product | ||
from . import product_shelfinfo | ||
from . import product_template | ||
from . import stock_move |
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,14 @@ | ||
# Copyright 2023 Quartile Limited | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ProductProduct(models.Model): | ||
_inherit = "product.product" | ||
|
||
shelfinfo_ids = fields.One2many( | ||
"product.shelfinfo", | ||
"product_id", | ||
string="Shelf Information", | ||
) |
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,67 @@ | ||
# Copyright 2023 Quartile Limited | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import _, api, fields, models | ||
from odoo.exceptions import ValidationError | ||
|
||
|
||
class ProductShelfinfo(models.Model): | ||
_name = "product.shelfinfo" | ||
_description = "Product Shelfinfo" | ||
_order = "sequence" | ||
|
||
name = fields.Char("Generated ID", compute="_compute_name") | ||
product_id = fields.Many2one( | ||
"product.product", | ||
required=True, | ||
domain="[('detailed_type', '!=', 'service')]", | ||
) | ||
product_tmpl_id = fields.Many2one( | ||
"product.template", | ||
related="product_id.product_tmpl_id", | ||
store=True, | ||
) | ||
location_id = fields.Many2one( | ||
"stock.location", | ||
required=True, | ||
domain="[('usage', '=', 'internal')]", | ||
) | ||
company_id = fields.Many2one( | ||
"res.company", | ||
default=lambda self: self.env.company, | ||
required=True, | ||
) | ||
shelf = fields.Char(required=True) | ||
bucket = fields.Char() | ||
position = fields.Char() | ||
memo = fields.Char() | ||
ref = fields.Char("Internal Reference") | ||
sequence = fields.Integer(default=1) | ||
|
||
@api.constrains("product_id", "location_id", "company_id") | ||
def _check_product_location_unique(self): | ||
for record in self: | ||
existing_rec = self.search( | ||
[ | ||
("product_id", "=", record.product_id.id), | ||
("location_id", "=", record.location_id.id), | ||
("company_id", "=", record.company_id.id), | ||
("id", "!=", self.id), | ||
] | ||
) | ||
if existing_rec: | ||
raise ValidationError( | ||
_( | ||
"Another record already exists for the given combination of " | ||
"product, location and company." | ||
) | ||
) | ||
|
||
@api.depends("shelf", "bucket", "position") | ||
def _compute_name(self): | ||
for record in self: | ||
record.name = record.shelf | ||
if record.bucket: | ||
record.name += "-" + record.bucket | ||
if record.position: | ||
record.name += "-" + record.position |
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,14 @@ | ||
# Copyright 2023 Quartile Limited | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ProductTemplate(models.Model): | ||
_inherit = "product.template" | ||
|
||
shelfinfo_ids = fields.One2many( | ||
"product.shelfinfo", | ||
"product_tmpl_id", | ||
string="Shelf Information", | ||
) |
Oops, something went wrong.