Skip to content

Commit

Permalink
[5077][IMP] sale_order_import (#153)
Browse files Browse the repository at this point in the history
[5077][IMP] sale_order_import
  • Loading branch information
kanda999 authored Dec 25, 2024
1 parent 422fcbc commit d8c4a0b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
18 changes: 6 additions & 12 deletions sale_order_import/i18n/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-25 10:04+0000\n"
"PO-Revision-Date: 2023-02-25 10:04+0000\n"
"POT-Creation-Date: 2024-12-25 05:41+0000\n"
"PO-Revision-Date: 2024-12-25 05:41+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -198,12 +198,6 @@ msgstr "支払登録する"
msgid "Product: "
msgstr "プロダクト: "

#. module: sale_order_import
#: code:addons/sale_order_import/wizards/sale_order_import.py:0
#, python-format
msgid "Quantity"
msgstr "数量"

#. module: sale_order_import
#: model:ir.model.fields,field_description:sale_order_import.field_data_import_log__sale_order_ids
msgid "Related Sale Orders"
Expand Down Expand Up @@ -255,14 +249,14 @@ msgstr "販売チャネル: "
#. module: sale_order_import
#: code:addons/sale_order_import/wizards/sale_order_import.py:0
#, python-format
msgid "Unit Price"
msgstr "単価"
msgid "Value must be 0 or greater: Unit Price"
msgstr "値は0以上でなければなりません: 単価"

#. module: sale_order_import
#: code:addons/sale_order_import/wizards/sale_order_import.py:0
#, python-format
msgid "Value must be greater than 0: %s"
msgstr "値は0より大きくなければなりません: %s"
msgid "Value must be greater than 0: Quantity"
msgstr "値は0より大きくなければなりません: 数量"

#. module: sale_order_import
#: code:addons/sale_order_import/wizards/sale_order_import.py:0
Expand Down
15 changes: 8 additions & 7 deletions sale_order_import/wizards/sale_order_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,14 @@ def _get_order_value(self, error_vals, taxes, taxes_id, price_unit, product_qty)
self._get_taxes(tax_from_chunk, taxes, error_vals)
price_unit = float(price_unit)
product_qty = float(product_qty)
for k, v in {_("Quantity"): product_qty, _("Unit Price"): price_unit}.items():
if v > 0:
continue
error_vals["error_message"] = (
error_vals["error_message"]
+ _("Value must be greater than 0: %s") % k
+ "\n"
if price_unit < 0:
error_vals["error_message"] += (
_("Value must be 0 or greater: Unit Price") + "\n"
)
error_vals["error"] = True
if product_qty <= 0:
error_vals["error_message"] += (
_("Value must be greater than 0: Quantity") + "\n"
)
error_vals["error"] = True
return product_qty, price_unit
Expand Down

0 comments on commit d8c4a0b

Please sign in to comment.