diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..35410cac --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 00000000..b245076c --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +__manifest__.py \ No newline at end of file diff --git a/.idea/jikimo_sf.iml b/.idea/jikimo_sf.iml new file mode 100644 index 00000000..735af015 --- /dev/null +++ b/.idea/jikimo_sf.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..74e50a18 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..94a25f7f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/mrp_workorder_expiry/__init__.py b/mrp_workorder_expiry/__init__.py deleted file mode 100644 index dc5e6b69..00000000 --- a/mrp_workorder_expiry/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from . import models diff --git a/mrp_workorder_expiry/__manifest__.py b/mrp_workorder_expiry/__manifest__.py deleted file mode 100644 index a65b3ac7..00000000 --- a/mrp_workorder_expiry/__manifest__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -{ - 'name': 'MRP II - Expiry', - 'version': '1.0', - 'category': 'Manufacturing/Manufacturing', - 'summary': 'MRP Workorder Expiry', - 'description': """ -Technical module. - """, - 'depends': ['mrp_workorder', 'product_expiry'], - 'data': [ - 'views/quality_views.xml', - 'wizard/confirm_expiry_view.xml', - ], - 'installable': True, - 'auto_install': True, - 'assets': { - 'web.assets_backend': [ - 'mrp_workorder_expiry/static/**/*', - ], - }, - 'license': 'OEEL-1', -} diff --git a/mrp_workorder_expiry/i18n/ar.po b/mrp_workorder_expiry/i18n/ar.po deleted file mode 100644 index 95241c36..00000000 --- a/mrp_workorder_expiry/i18n/ar.po +++ /dev/null @@ -1,41 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Arabic (https://www.transifex.com/odoo/teams/41243/ar/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ar\n" -"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" -" لقد انتهت صلاحية هذه الدفعة. " - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "تنبيه انتهاء صلاحية المنتج" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "فحص الجودة" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "تم الوصول إلى تاريخ انتهاء الصلاحية. " diff --git a/mrp_workorder_expiry/i18n/az.po b/mrp_workorder_expiry/i18n/az.po deleted file mode 100644 index c7face15..00000000 --- a/mrp_workorder_expiry/i18n/az.po +++ /dev/null @@ -1,36 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Language-Team: Azerbaijani (https://www.transifex.com/odoo/teams/41243/az/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: az\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "" diff --git a/mrp_workorder_expiry/i18n/ca.po b/mrp_workorder_expiry/i18n/ca.po deleted file mode 100644 index 117f19fa..00000000 --- a/mrp_workorder_expiry/i18n/ca.po +++ /dev/null @@ -1,41 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Arnau Ros, 2022 -# marcescu, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: marcescu, 2022\n" -"Language-Team: Catalan (https://www.transifex.com/odoo/teams/41243/ca/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ca\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "Aquest lot ha caducat. " - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Alerta de caducitat del producte" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Comprovació de qualitat" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "S'ha assolit la data de caducitat." diff --git a/mrp_workorder_expiry/i18n/cs.po b/mrp_workorder_expiry/i18n/cs.po deleted file mode 100644 index a77ccdf1..00000000 --- a/mrp_workorder_expiry/i18n/cs.po +++ /dev/null @@ -1,42 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# trendspotter , 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: trendspotter , 2022\n" -"Language-Team: Czech (https://www.transifex.com/odoo/teams/41243/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" -" Tomuto produktovému číslu " -"vypršela platnost" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Kontrola kvality" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "" diff --git a/mrp_workorder_expiry/i18n/de.po b/mrp_workorder_expiry/i18n/de.po deleted file mode 100644 index 9e847b42..00000000 --- a/mrp_workorder_expiry/i18n/de.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: German (https://www.transifex.com/odoo/teams/41243/de/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: de\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " Diese Charge ist abgelaufen." - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Produkt Ablaufmeldung" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Qualitätskontrolle" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "Das Ablaufdatum wurde erreicht." diff --git a/mrp_workorder_expiry/i18n/es.po b/mrp_workorder_expiry/i18n/es.po deleted file mode 100644 index 12ed3923..00000000 --- a/mrp_workorder_expiry/i18n/es.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Spanish (https://www.transifex.com/odoo/teams/41243/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: es\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " Este lote ha caducado." - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Alerta de caducidad del producto" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Control de calidad" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "Se llegó a la fecha de caducidad." diff --git a/mrp_workorder_expiry/i18n/es_MX.po b/mrp_workorder_expiry/i18n/es_MX.po deleted file mode 100644 index d9b59ed6..00000000 --- a/mrp_workorder_expiry/i18n/es_MX.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Braulio D. López Vázquez , 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Braulio D. López Vázquez , 2022\n" -"Language-Team: Spanish (Mexico) (https://www.transifex.com/odoo/teams/41243/es_MX/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: es_MX\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " Este lote expiró." - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Alerta de expiración del producto" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Control de calidad" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "Se llegó a la fecha de expiración." diff --git a/mrp_workorder_expiry/i18n/fr.po b/mrp_workorder_expiry/i18n/fr.po deleted file mode 100644 index e518cb44..00000000 --- a/mrp_workorder_expiry/i18n/fr.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: French (https://www.transifex.com/odoo/teams/41243/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: fr\n" -"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " Ce lot est expiré." - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Alerte d'expiration de produit" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Contrôle qualité" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "La date d'expiration a été atteinte." diff --git a/mrp_workorder_expiry/i18n/he.po b/mrp_workorder_expiry/i18n/he.po deleted file mode 100644 index a8e1f6c1..00000000 --- a/mrp_workorder_expiry/i18n/he.po +++ /dev/null @@ -1,41 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# ZVI BLONDER , 2022 -# דודי מלכה , 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: דודי מלכה , 2022\n" -"Language-Team: Hebrew (https://www.transifex.com/odoo/teams/41243/he/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: he\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "התראת פקיעת תוקף מוצר" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "בדיקת איכות" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "" diff --git a/mrp_workorder_expiry/i18n/id.po b/mrp_workorder_expiry/i18n/id.po deleted file mode 100644 index d6507928..00000000 --- a/mrp_workorder_expiry/i18n/id.po +++ /dev/null @@ -1,36 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Language-Team: Indonesian (https://www.transifex.com/odoo/teams/41243/id/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: id\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "" diff --git a/mrp_workorder_expiry/i18n/it.po b/mrp_workorder_expiry/i18n/it.po deleted file mode 100644 index 2a117cb8..00000000 --- a/mrp_workorder_expiry/i18n/it.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Italian (https://www.transifex.com/odoo/teams/41243/it/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: it\n" -"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " Il lotto è scaduto." - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Avviso scadenza prodotto" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Controllo qualità" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "È stata raggiunta la data di scadenza." diff --git a/mrp_workorder_expiry/i18n/ja.po b/mrp_workorder_expiry/i18n/ja.po deleted file mode 100644 index f0439f21..00000000 --- a/mrp_workorder_expiry/i18n/ja.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Japanese (https://www.transifex.com/odoo/teams/41243/ja/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ja\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "品質検査" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "" diff --git a/mrp_workorder_expiry/i18n/ko.po b/mrp_workorder_expiry/i18n/ko.po deleted file mode 100644 index 86380f8d..00000000 --- a/mrp_workorder_expiry/i18n/ko.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Korean (https://www.transifex.com/odoo/teams/41243/ko/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ko\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "품목 만료 경고" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "품질 검사" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "유통기한이 임박했습니다." diff --git a/mrp_workorder_expiry/i18n/nb.po b/mrp_workorder_expiry/i18n/nb.po deleted file mode 100644 index c075fd28..00000000 --- a/mrp_workorder_expiry/i18n/nb.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Norwegian Bokmål (https://www.transifex.com/odoo/teams/41243/nb/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: nb\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Utløpsvarsel for produkt" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Kvalitetskontroll" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "" diff --git a/mrp_workorder_expiry/i18n/nl.po b/mrp_workorder_expiry/i18n/nl.po deleted file mode 100644 index 4980fe1f..00000000 --- a/mrp_workorder_expiry/i18n/nl.po +++ /dev/null @@ -1,41 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# Erwin van der Ploeg , 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Erwin van der Ploeg , 2022\n" -"Language-Team: Dutch (https://www.transifex.com/odoo/teams/41243/nl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: nl\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " Deze partij is vervallen." - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Product vervalwaarschuwing" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Kwaliteitscontrole" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "De vervaldatum is bereikt." diff --git a/mrp_workorder_expiry/i18n/ro.po b/mrp_workorder_expiry/i18n/ro.po deleted file mode 100644 index 63ec4973..00000000 --- a/mrp_workorder_expiry/i18n/ro.po +++ /dev/null @@ -1,41 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Foldi Robert , 2022 -# Hongu Cosmin , 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Hongu Cosmin , 2022\n" -"Language-Team: Romanian (https://www.transifex.com/odoo/teams/41243/ro/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ro\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Verificare Calitate" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "Data de expirare a fost atinsă." diff --git a/mrp_workorder_expiry/i18n/ru.po b/mrp_workorder_expiry/i18n/ru.po deleted file mode 100644 index 185f4f0c..00000000 --- a/mrp_workorder_expiry/i18n/ru.po +++ /dev/null @@ -1,41 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Ivan Kropotkin , 2022 -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Russian (https://www.transifex.com/odoo/teams/41243/ru/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ru\n" -"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Оповещения об окончании срока действия товара" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Проверка качества" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "" diff --git a/mrp_workorder_expiry/i18n/th.po b/mrp_workorder_expiry/i18n/th.po deleted file mode 100644 index c4fb1d82..00000000 --- a/mrp_workorder_expiry/i18n/th.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Wichanon Jamwutthipreecha, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Wichanon Jamwutthipreecha, 2022\n" -"Language-Team: Thai (https://www.transifex.com/odoo/teams/41243/th/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: th\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " ล็อตนี้หมดอายุแล้ว" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "การแจ้งเตือนการหมดอายุของสินค้า" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "การตรวจสอบคุณภาพ" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "ถึงวันที่หมดอายุแล้ว" diff --git a/mrp_workorder_expiry/i18n/tr.po b/mrp_workorder_expiry/i18n/tr.po deleted file mode 100644 index 32375263..00000000 --- a/mrp_workorder_expiry/i18n/tr.po +++ /dev/null @@ -1,43 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Tugay Hatıl , 2022 -# Umur Akın , 2022 -# Murat Kaplan , 2022 -# abc Def , 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: abc Def , 2022\n" -"Language-Team: Turkish (https://www.transifex.com/odoo/teams/41243/tr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: tr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " Bu lotun süresi doldu." - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Ürün Son Kullanım Uyarısı" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Kalite Kontrol" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "Süresi Dolma Tarihine ulaşıldı." diff --git a/mrp_workorder_expiry/i18n/uk.po b/mrp_workorder_expiry/i18n/uk.po deleted file mode 100644 index c052fb72..00000000 --- a/mrp_workorder_expiry/i18n/uk.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Ukrainian (https://www.transifex.com/odoo/teams/41243/uk/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: uk\n" -"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " Ця партія протермінована." - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Попередження про закінчення терміну дії товару" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Перевірка якості" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "Термін дії завершився." diff --git a/mrp_workorder_expiry/i18n/vi.po b/mrp_workorder_expiry/i18n/vi.po deleted file mode 100644 index 0d106355..00000000 --- a/mrp_workorder_expiry/i18n/vi.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Vietnamese (https://www.transifex.com/odoo/teams/41243/vi/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: vi\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " Lô hàng đã hết hạn. " - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "Cảnh báo hết hạn sản phẩm" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "Đánh giá chất lượng" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "The Expiration Date has been reached." diff --git a/mrp_workorder_expiry/i18n/zh_CN.po b/mrp_workorder_expiry/i18n/zh_CN.po deleted file mode 100644 index 953d0479..00000000 --- a/mrp_workorder_expiry/i18n/zh_CN.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Chinese (China) (https://www.transifex.com/odoo/teams/41243/zh_CN/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: zh_CN\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr " 这批货过期了。" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "过期警报" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "质量检查" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "已到达过期日期。" diff --git a/mrp_workorder_expiry/i18n/zh_TW.po b/mrp_workorder_expiry/i18n/zh_TW.po deleted file mode 100644 index d80778ad..00000000 --- a/mrp_workorder_expiry/i18n/zh_TW.po +++ /dev/null @@ -1,40 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_expiry -# -# Translators: -# Martin Trigaux, 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Martin Trigaux, 2022\n" -"Language-Team: Chinese (Taiwan) (https://www.transifex.com/odoo/teams/41243/zh_TW/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: zh_TW\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: mrp_workorder_expiry -#: model_terms:ir.ui.view,arch_db:mrp_workorder_expiry.quality_check_view_form_tablet_inherit_expiry -msgid " This lot is expired." -msgstr "" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,field_description:mrp_workorder_expiry.field_quality_check__is_expired -msgid "Product Expiry Alert" -msgstr "產品過期警告" - -#. module: mrp_workorder_expiry -#: model:ir.model,name:mrp_workorder_expiry.model_quality_check -msgid "Quality Check" -msgstr "品質檢查" - -#. module: mrp_workorder_expiry -#: model:ir.model.fields,help:mrp_workorder_expiry.field_quality_check__is_expired -msgid "The Expiration Date has been reached." -msgstr "已到到期日。" diff --git a/mrp_workorder_expiry/models/__init__.py b/mrp_workorder_expiry/models/__init__.py deleted file mode 100644 index c62a7b4e..00000000 --- a/mrp_workorder_expiry/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from . import quality diff --git a/mrp_workorder_expiry/models/quality.py b/mrp_workorder_expiry/models/quality.py deleted file mode 100644 index 8d31fbed..00000000 --- a/mrp_workorder_expiry/models/quality.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from odoo import fields, models - - -class QualityCheck(models.Model): - _inherit = 'quality.check' - - is_expired = fields.Boolean(related='lot_id.product_expiry_alert') diff --git a/mrp_workorder_expiry/static/src/scss/expired_alert.scss b/mrp_workorder_expiry/static/src/scss/expired_alert.scss deleted file mode 100644 index 2385d18a..00000000 --- a/mrp_workorder_expiry/static/src/scss/expired_alert.scss +++ /dev/null @@ -1,5 +0,0 @@ -.o_expired_alert { - padding-left: 20px; - text-align: right; - color: orangered; -} diff --git a/mrp_workorder_expiry/views/quality_views.xml b/mrp_workorder_expiry/views/quality_views.xml deleted file mode 100644 index 5dcefea9..00000000 --- a/mrp_workorder_expiry/views/quality_views.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - quality.check.tablet.view.form.inherit.expiry - quality.check - - - - -
- This lot is expired. -
-
-
-
- -
diff --git a/mrp_workorder_expiry/wizard/confirm_expiry_view.xml b/mrp_workorder_expiry/wizard/confirm_expiry_view.xml deleted file mode 100644 index 0d051e52..00000000 --- a/mrp_workorder_expiry/wizard/confirm_expiry_view.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - mrp.workorder.tablet.view.expiry.inherit - mrp.workorder - - - - {'skip_expired': True} - - - {'skip_expired': True} - - - - diff --git a/mrp_workorder_hr/__init__.py b/mrp_workorder_hr/__init__.py deleted file mode 100644 index de9509a6..00000000 --- a/mrp_workorder_hr/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import models -from . import report -from . import wizard diff --git a/mrp_workorder_hr/__manifest__.py b/mrp_workorder_hr/__manifest__.py deleted file mode 100644 index 077992c8..00000000 --- a/mrp_workorder_hr/__manifest__.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -{ - 'name': "Employees time registration on Work Orders", - 'category': "Hidden", - 'summary': 'Link module between Mrp II and HR employees', - - 'description': """ -This module allows Employees (and not users) to log in to a workorder using a barcode, a PIN number or both. -The actual till still requires one user but an unlimited number of employees can log on to that till and complete manufacturing tasks. - """, - - 'depends': ['mrp_workorder', 'hr_hourly_cost', 'hr'], - - 'data': [ - 'views/hr_employee_views.xml', - 'views/mrp_workorder_views.xml', - 'views/mrp_workcenter_views.xml', - 'views/mrp_operation_views.xml', - ], - 'installable': True, - 'auto_install': ['mrp_workorder', 'hr'], - 'assets': { - 'web.assets_backend': [ - 'mrp_workorder_hr/static/src/**/*.js', - 'mrp_workorder_hr/static/src/**/*.scss', - 'mrp_workorder_hr/static/src/**/*.xml', - ], - 'web.assets_tests': [ - 'mrp_workorder_hr/static/tests/tours/**/*', - ], - }, - 'license': 'OEEL-1', -} diff --git a/mrp_workorder_hr/i18n/ar.po b/mrp_workorder_hr/i18n/ar.po deleted file mode 100644 index 90fa4e6b..00000000 --- a/mrp_workorder_hr/i18n/ar.po +++ /dev/null @@ -1,235 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mrp_workorder_hr -# -# Translators: -# Martin Trigaux, 2022 -# Malaz Abuidris , 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: Malaz Abuidris , 2022\n" -"Language-Team: Arabic (https://www.transifex.com/odoo/teams/41243/ar/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: ar\n" -"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" - -#. module: mrp_workorder_hr -#. openerp-web -#: code:addons/mrp_workorder_hr/static/src/components/working_employee_popup.xml:0 -#, python-format -msgid "+ New Operator" -msgstr "" - -#. module: mrp_workorder_hr -#: model_terms:ir.ui.view,arch_db:mrp_workorder_hr.mrp_workorder_view_tablet_form_inherit_workorder_hr -msgid "" -", 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: trendspotter , 2022\n" -"Language-Team: Czech (https://www.transifex.com/odoo/teams/41243/cs/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: cs\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" - -#. module: mrp_workorder_hr -#. openerp-web -#: code:addons/mrp_workorder_hr/static/src/components/working_employee_popup.xml:0 -#, python-format -msgid "+ New Operator" -msgstr "" - -#. module: mrp_workorder_hr -#: model_terms:ir.ui.view,arch_db:mrp_workorder_hr.mrp_workorder_view_tablet_form_inherit_workorder_hr -msgid "" -", 2022 -# ExcaliberX , 2022 -# Martin Trigaux, 2022 -# hed shefer , 2022 -# שהאב חוסיין , 2022 -# Yihya Hugirat , 2022 -# דודי מלכה , 2022 -# ZVI BLONDER , 2022 -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.5alpha1+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-09-20 09:49+0000\n" -"PO-Revision-Date: 2022-09-22 05:47+0000\n" -"Last-Translator: ZVI BLONDER , 2022\n" -"Language-Team: Hebrew (https://www.transifex.com/odoo/teams/41243/he/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: he\n" -"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;\n" - -#. module: mrp_workorder_hr -#. openerp-web -#: code:addons/mrp_workorder_hr/static/src/components/working_employee_popup.xml:0 -#, python-format -msgid "+ New Operator" -msgstr "" - -#. module: mrp_workorder_hr -#: model_terms:ir.ui.view,arch_db:mrp_workorder_hr.mrp_workorder_view_tablet_form_inherit_workorder_hr -msgid "" -" - - -
- -
-
-
diff --git a/mrp_workorder_hr/static/src/components/popup.js b/mrp_workorder_hr/static/src/components/popup.js deleted file mode 100644 index 44b92f61..00000000 --- a/mrp_workorder_hr/static/src/components/popup.js +++ /dev/null @@ -1,25 +0,0 @@ -/** @odoo-module **/ - -const { Component } = owl; - -export class SelectionPopup extends Component { - - get title() { - return this.props.popupData.title; - } - - get list() { - return this.props.popupData.list; - } - - cancel() { - this.props.onClosePopup('SelectionPopup', true); - } - - async selectItem(id) { - await this.props.onSelectEmployee(id); - this.props.onClosePopup('SelectionPopup'); - } -} - -SelectionPopup.template = 'mrp_workorder_hr.SelectionPopup'; diff --git a/mrp_workorder_hr/static/src/components/popup.xml b/mrp_workorder_hr/static/src/components/popup.xml deleted file mode 100644 index 7bac9a0e..00000000 --- a/mrp_workorder_hr/static/src/components/popup.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/mrp_workorder_hr/static/src/components/tablet.js b/mrp_workorder_hr/static/src/components/tablet.js deleted file mode 100644 index a129c0b8..00000000 --- a/mrp_workorder_hr/static/src/components/tablet.js +++ /dev/null @@ -1,156 +0,0 @@ -/** @odoo-module **/ - -import { useBus, useService } from "@web/core/utils/hooks"; -import Tablet from '@mrp_workorder/components/tablet'; -import { SelectionPopup } from '@mrp_workorder_hr/components/popup'; -import { WorkingEmployeePopup } from '@mrp_workorder_hr/components/working_employee_popup'; -import { patch } from 'web.utils'; -import { PinPopup } from '@mrp_workorder_hr/components/pin_popup'; - -const { onMounted } = owl; - -patch(Tablet.prototype, 'mrp_workorder_hr', { - setup() { - this._super(); - this.notification = useService("notification"); - this.popup.SelectionPopup = { - isShown: false, - data: {}, - }; - this.popup.PinPopup = { - isShown: false, - data: {}, - }; - this.popup.WorkingEmployeePopup = { - isShown: false, - data: {}, - }; - this.state.tabletEmployeeIds = []; - this.employee = this.props.action.context.employee_id; - this.actionRedirect = false; - useBus(this.workorderBus, "popupEmployeeManagement", this.popupEmployeeManagement); - onMounted(() => this.checkEmployeeLogged()); - }, - - checkEmployeeLogged() { - if (this.data.employee_list.length && !this.data.employee && !this.employee) { - this.popupAddEmployee(); - } - }, - // Popup Menu Actions - - popupEmployeeManagement() { - this.showPopup({ workorderId: this.workorderId }, 'WorkingEmployeePopup'); - }, - - popupAddEmployee() { - const list = this.data.employee_list.filter(e => ! this.data.employee_ids.includes(e.id)).map((employee) => { - return { - id: employee.id, - item: employee, - label: employee.name, - isSelected: false, - }; - }); - const title = this.env._t('Change Worker'); - this.showPopup({ title, list }, 'SelectionPopup'); - }, - - popupEmployeePin(employeeId) { - const employee = this.data.employee_list.find(e => e.id === employeeId); - this.showPopup({ employee }, 'PinPopup'); - }, - - // Buisness method - - async lockEmployee(employeeId, pin) { - const pinValid = await this._checkPin(employeeId, pin); - if (! pinValid) { - this.actionRedirect = this.lockEmployee; - return; - } - this.render(); - }, - - async startEmployee(employeeId, pin) { - const pinValid = await this._checkPin(employeeId, pin); - if (! pinValid) { - this.actionRedirect = this.startEmployee; - return; - } - this.state.tabletEmployeeIds.push(employeeId); - await this.orm.call( - 'mrp.workorder', - 'start_employee', - [this.workorderId, employeeId], - ); - await this.getState(); - this.render(); - }, - - async stopEmployee(employeeId, pin) { - const pinValid = await this._checkPin(employeeId, pin, false); - if (! pinValid) { - this.actionRedirect = this.stopEmployee; - return; - } - const index = this.state.tabletEmployeeIds.indexOf(employeeId); - this.state.tabletEmployeeIds.slice(index, 1); - await this.orm.call( - 'mrp.workorder', - 'stop_employee', - [this.workorderId, employeeId], - ); - await this.getState(); - this.render(); - }, - - redirectToAction(employeeId, pin) { - this.actionRedirect(employeeId, pin); - this.actionRedirect = false; - }, - - get isBlocked() { - let isBlocked = this._super(); - if (this.data.employee_list.length !== 0 && ! this.data.employee_id) { - isBlocked = true; - } - return isBlocked; - }, - - // Private - - async _checkPin(employeeId, pin, sessionSave = true) { - const pinValid = await this.orm.call('hr.employee', 'login', [employeeId, pin, sessionSave]); - if (!pinValid) { - this.popupEmployeePin(employeeId); - return; - } - return true; - }, - - _onBarcodeScanned(barcode) { - const employee = this.data.employee_list.find(e => e.barcode === barcode); - if (employee) { - this.startEmployee(employee.id); - } else { - return this._super(barcode); - } - }, - - async _onWillStart() { - const superMethod = this._super; - const employeeId = this.props.action.context.employee_id; - if (employeeId) { - await this.startEmployee(employeeId); - } - await superMethod(); - if (employeeId) { - await this.getState(); - } - }, -}); - -Tablet.components.SelectionPopup = SelectionPopup; -Tablet.components.PinPopup = PinPopup; -Tablet.components.WorkingEmployeePopup = WorkingEmployeePopup; diff --git a/mrp_workorder_hr/static/src/components/tablet.xml b/mrp_workorder_hr/static/src/components/tablet.xml deleted file mode 100644 index 67d6a18a..00000000 --- a/mrp_workorder_hr/static/src/components/tablet.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - -
- -
-
- -
-
- -
-
-
-
diff --git a/mrp_workorder_hr/static/src/components/working_employee_popup.js b/mrp_workorder_hr/static/src/components/working_employee_popup.js deleted file mode 100644 index 4f8dbeb2..00000000 --- a/mrp_workorder_hr/static/src/components/working_employee_popup.js +++ /dev/null @@ -1,80 +0,0 @@ -/** @odoo-module **/ - -import { MrpTimer } from "@mrp/widgets/timer"; -import { useService } from "@web/core/utils/hooks"; -import time from 'web.time'; - -const { Component, onWillStart } = owl; - -export class WorkingEmployeePopup extends Component { - setup() { - super.setup(); - this.orm = useService('orm'); - this.workorderId = this.props.popupData.workorderId; - - onWillStart(() => this._getState()) - } - - addEmployee() { - this.props.onAddEmployee(); - this.close(); - } - - lockEmployee(employeeId) { - this.startEmployee(employeeId); - this.props.onLockEmployee(employeeId); - this.close(); - } - - async stopEmployee(employeeId) { - this.props.onStopEmployee(employeeId); - this.lines.map(l => { - if (l.employee_id === employeeId) { - l.ongoing = false; - } - }); - this.render(); - } - - startEmployee(employeeId) { - this.props.onStartEmployee(employeeId); - this.lines.map(l => { - if (l.employee_id === employeeId) { - l.ongoing = true; - } - }); - this.render(); - } - - close() { - this.props.onClosePopup('WorkingEmployeePopup', true); - } - - async _getState() { - const productivityLines = await this.orm.call('mrp.workcenter.productivity', 'read_group', [ - [ - ['workorder_id', '=', this.workorderId], - ['employee_id', '!=', false], - ], - ['duration', 'date_start:array_agg', 'date_end:array_agg'], - ['employee_id'] - ]); - this.lines = productivityLines.map((pl) => { - let duration = pl.duration * 60; - const ongoingTimerIndex = pl.date_end.indexOf(null); - if ( ongoingTimerIndex != -1 ){ - const additionalDuration = moment(new Date()).diff(moment(time.auto_str_to_date(pl.date_start[ongoingTimerIndex])), 'seconds'); - duration += additionalDuration; - } - return { - 'employee_id': pl.employee_id[0], - 'employee_name': pl.employee_id[1], - 'duration': duration, - 'ongoing': pl.date_end.some(d => !d), - } - }) - } -} - -WorkingEmployeePopup.components = { MrpTimer }; -WorkingEmployeePopup.template = 'mrp_workorder_hr.WorkingEmployeePopup'; diff --git a/mrp_workorder_hr/static/src/components/working_employee_popup.scss b/mrp_workorder_hr/static/src/components/working_employee_popup.scss deleted file mode 100644 index db4914d1..00000000 --- a/mrp_workorder_hr/static/src/components/working_employee_popup.scss +++ /dev/null @@ -1,13 +0,0 @@ -.o_popup_employee_selection { - display: flex; - flex-direction: row; - justify-content: space-between; - line-height: 50px; - color: black; - div { - flex-basis: 25%; - } - .o_popup_employee_name { - flex-basis: 50%; - } -} diff --git a/mrp_workorder_hr/static/src/components/working_employee_popup.xml b/mrp_workorder_hr/static/src/components/working_employee_popup.xml deleted file mode 100644 index c7674160..00000000 --- a/mrp_workorder_hr/static/src/components/working_employee_popup.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - -
- -
-
-
diff --git a/mrp_workorder_hr/static/src/views/kanban/mrp_workorder_kanban_controller.js b/mrp_workorder_hr/static/src/views/kanban/mrp_workorder_kanban_controller.js deleted file mode 100644 index b67367d8..00000000 --- a/mrp_workorder_hr/static/src/views/kanban/mrp_workorder_kanban_controller.js +++ /dev/null @@ -1,152 +0,0 @@ -/** @odoo-module */ - -import { SelectionPopup } from '@mrp_workorder_hr/components/popup'; -import { PinPopup } from '@mrp_workorder_hr/components/pin_popup'; -import { useBus, useService } from "@web/core/utils/hooks"; -import { patch } from "@web/core/utils/patch"; -import {MrpWorkorderKanbanController} from '@mrp_workorder/views/kanban/mrp_workorder_kanban_controller'; - -const {onWillStart, useState, onMounted} = owl; - -MrpWorkorderKanbanController.components.SelectionPopup = SelectionPopup; -MrpWorkorderKanbanController.components.PinPopup = PinPopup; - -patch(MrpWorkorderKanbanController.prototype, 'mrp_workorder_hr', { - setup() { - this._super(); - this.popup = useState({ - PinPopup: { - isShown: false, - data: {}, - }, - SelectionPopup: { - isShown: false, - data: {}, - } - }); - this.notification = useService('notification'); - this.barcode = useService("barcode"); - useBus(this.barcode.bus, 'barcode_scanned', (event) => this._onBarcodeScanned(event.detail.barcode)); - this.workcenterId = this.props.context.default_workcenter_id; - this.workcenter = false; - this.employee = useState({ - name: false || this.props.context.employee_name, - id: 0 || this.props.context.employee_id, - }); - onWillStart(async () => { - await this.onWillStart(); - }); - onMounted(() => { - this.onMount(); - }); - }, - - async onWillStart() { - if (!this.workcenterId) { - return; - } - const workcenter = await this.orm.read( - "mrp.workcenter", [this.workcenterId], ['allow_employee', 'employee_ids'] - ); - this.workcenter = workcenter[0]; - if (!this.workcenter.allow_employee) { - return; - } - const fieldsToRead = ['id', 'name', 'barcode']; - const employees_domain = []; - if (this.workcenter.employee_ids.length) { - employees_domain.push(['id', 'in', this.workcenter.employee_ids]); - } - this.employees = await this.orm.searchRead( - "hr.employee", employees_domain, fieldsToRead, - ); - }, - - onMount() { - if (this.employeeId) { - this.selectEmployee(this.employeeId); - } - }, - - // destroy: function () { - // core.bus.off('barcode_scanned', this, this._onBarcodeScanned); - // this._super(); - // }, - - openEmployeeSelection() { - const employeeList = this.employees.map(employee => Object.create({ - id: employee.id, - item: employee, - label: employee.name, - isSelected: employee === this.employee.id, - })); - this.popup.SelectionPopup = { - data: { title: this.env._t('Select Employee'), list: employeeList }, - isShown: true, - }; - }, - - async selectEmployee(employeeId, pin) { - const employee = this.employees.find(e => e.id === employeeId); - const employee_function = this.employee.name && this.employee.id === employeeId ? 'logout' : 'login'; - const pinValid = await this.orm.call( - "hr.employee", employee_function, [employeeId, pin], - ); - if (!pinValid && this.popup.PinPopup.isShown) { - this.notification.add(this.env._t('Wrong password !'), {type: 'danger'}); - return; - } - if (!pinValid) { - this._askPin(employee); - return; - } - - if (employee_function === 'login') { - this.notification.add(this.env._t('Logged in!'), {type: 'success'}); - this.employee = { - name: employee.name, - id: employee.id, - }; - if (this.context.openRecord) { - this.openRecord(...this.context.openRecord); - - } - } else { - this.employee = { - name: false, - id: 0, - }; - } - }, - - closePopup(popupName) { - this.popup[popupName].isShown = false; - }, - - _askPin(employee) { - this.popup.PinPopup = { - data: {employee: employee}, - isShown: true, - }; - }, - - _onBarcodeScanned(barcode) { - const employee = this.employees.find(e => e.barcode === barcode); - if (employee) { - this.selectEmployee(employee.id); - } else { - this.notification.add(this.env._t('This employee is not allowed on this workcenter'), {type: 'danger'}); - } - }, - - async openRecord(record, mode) { - if (this.employees && !this.employee.name) { - this.context.openRecord = [record, mode]; - this.openEmployeeSelection(); - return; - } - delete this.context.openRecord; - Object.assign(this.context, {employee_id: this.employee.id}); - this._super(...arguments); - }, -}); diff --git a/mrp_workorder_hr/static/src/views/list/mrp_workorder_list_controller.js b/mrp_workorder_hr/static/src/views/list/mrp_workorder_list_controller.js deleted file mode 100644 index fa43f183..00000000 --- a/mrp_workorder_hr/static/src/views/list/mrp_workorder_list_controller.js +++ /dev/null @@ -1,152 +0,0 @@ -/** @odoo-module */ - -import { SelectionPopup } from "@mrp_workorder_hr/components/popup"; -import { PinPopup } from "@mrp_workorder_hr/components/pin_popup"; -import core from "web.core"; -import { useService } from "@web/core/utils/hooks"; -import { patch } from "@web/core/utils/patch"; -import {MrpWorkorderListController} from "@mrp_workorder/views/list/mrp_workorder_list_controller"; - -const {onWillStart, useState, onMounted} = owl; - -MrpWorkorderListController.components.SelectionPopup = SelectionPopup; -MrpWorkorderListController.components.PinPopup = PinPopup; - -patch(MrpWorkorderListController.prototype, "mrp_workorder_hr", { - setup() { - this._super(); - this.popup = useState({ - PinPopup: { - isShown: false, - data: {}, - }, - SelectionPopup: { - isShown: false, - data: {}, - } - }); - this.notification = useService("notification"); - this.orm = useService("orm"); - this.workcenterId = this.props.context.default_workcenter_id; - this.workcenter = false; - this.employee = useState({ - name: false || this.props.context.employee_name, - id: 0 || this.props.context.employee_id, - }); - onWillStart(async () => { - await this.onWillStart(); - }); - onMounted(() => { - this.onMount(); - }); - }, - - async onWillStart() { - if (!this.workcenterId) { - return; - } - const workcenter = await this.orm.read( - "mrp.workcenter", [this.workcenterId], ["allow_employee", "employee_ids"] - ); - this.workcenter = workcenter[0]; - if (!this.workcenter.allow_employee) { - return; - } - const fieldsToRead = ["id", "name", "barcode"]; - const employees_domain = []; - if (this.workcenter.employee_ids.length) { - employees_domain.push(["id", "in", this.workcenter.employee_ids]); - } - this.employees = await this.orm.searchRead( - "hr.employee", employees_domain, fieldsToRead, - ); - }, - - onMount() { - if (this.employeeId) { - this.selectEmployee(this.employeeId); - } - core.bus.on("barcode_scanned", this, this._onBarcodeScanned); - }, - - // destroy: function () { - // core.bus.off("barcode_scanned", this, this._onBarcodeScanned); - // this._super(); - // }, - - openEmployeeSelection() { - const employeeList = this.employees.map(employee => Object.create({ - id: employee.id, - item: employee, - label: employee.name, - isSelected: employee === this.employee.id, - })); - this.popup.SelectionPopup = { - data: { title: this.env._t("Select Employee"), list: employeeList }, - isShown: true, - }; - }, - - async selectEmployee(employeeId, pin) { - const employee = this.employees.find(e => e.id === employeeId); - const employee_function = this.employee.name && this.employee.id === employeeId ? "logout" : "login"; - const pinValid = await this.orm.call( - "hr.employee", employee_function, [employeeId, pin], - ); - if (!pinValid && this.popup.PinPopup.isShown) { - this.notification.add(this.env._t("Wrong password !"), {type: "danger"}); - return; - } - if (!pinValid) { - this._askPin(employee); - return; - } - - if (employee_function === "login") { - this.notification.add(this.env._t("Logged in!"), {type: "success"}); - this.employee = { - name: employee.name, - id: employee.id, - }; - if (this.context.openRecord) { - this.openRecord(...this.context.openRecord); - } - } else { - this.employee = { - name: false, - id: 0, - }; - } - }, - - closePopup(popupName) { - this.popup[popupName].isShown = false; - }, - - _askPin(employee) { - this.popup.PinPopup = { - data: {employee: employee}, - isShown: true, - }; - }, - - _onBarcodeScanned: function (barcode) { - const employee = this.employees.find(e => e.barcode === barcode); - if (employee) { - this.selectEmployee(employee.id); - } else { - this.notification.add(this.env._t("This employee is not allowed on this workcenter"), {type: "danger"}); - } - }, - - async openRecord(record, mode) { - if (this.employees && !this.employee.name) { - this.context.openRecord = [record, mode]; - this.openEmployeeSelection(); - return; - } - delete this.context.openRecord; - Object.assign(this.context, {employee_id: this.employee.id}); - this._super(...arguments); - }, -}); diff --git a/mrp_workorder_hr/static/src/views/xml/mrp_workorder_buttons.xml b/mrp_workorder_hr/static/src/views/xml/mrp_workorder_buttons.xml deleted file mode 100644 index ab77ce2e..00000000 --- a/mrp_workorder_hr/static/src/views/xml/mrp_workorder_buttons.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - -
- -
-
- -
-
-
-
diff --git a/mrp_workorder_hr/static/tests/tours/tour_test_workorder.js b/mrp_workorder_hr/static/tests/tours/tour_test_workorder.js deleted file mode 100644 index 086c703a..00000000 --- a/mrp_workorder_hr/static/tests/tours/tour_test_workorder.js +++ /dev/null @@ -1,94 +0,0 @@ -/** @odoo-module **/ - -import tour from 'web_tour.tour'; -import helper from 'mrp_workorder.tourHelper'; - -tour.register('test_production_with_employee', {test: true}, [ - {trigger: 'div.popup'}, - {trigger: 'h3:contains("Change Worker")'}, - {trigger: 'div.selection-item:contains("Arthur")'}, - {trigger: 'div.popup-numpad'}, - {trigger: '.popup-numpad button:contains("1")'}, - {trigger: 'span.highlight:contains("•")'}, - {trigger: '.popup-numpad button:contains("2")'}, - {trigger: 'span.highlight:contains("••")'}, - {trigger: '.popup-numpad button:contains("3")'}, - {trigger: 'span.highlight:contains("•••")'}, - {trigger: '.popup-numpad button:contains("4")'}, - {trigger: 'span.highlight:contains("••••")'}, - {trigger: 'button.confirm'}, - { - trigger: 'span[title="Arthur Fu"]', - run: function () { - helper.assertCheckLength(3); - helper.assertValidatedCheckLength(0); - helper.assertQtyToProduce(2, 2); - helper.assertCurrentCheck('Instruction 1'); - } - }, - {trigger: 'div[name=employee_name]'}, - {trigger: 'button.btn-link:contains("New")'}, - {trigger: 'h3:contains("Change Worker")'}, - {trigger: 'div.selection-item:contains("Thomas")'}, - {trigger: 'div.popup-numpad'}, - {trigger: '.popup-numpad button:contains("5")'}, - {trigger: 'span.highlight:contains("•")'}, - {trigger: '.popup-numpad button:contains("6")'}, - {trigger: 'span.highlight:contains("••")'}, - {trigger: '.popup-numpad button:contains("7")'}, - {trigger: 'span.highlight:contains("•••")'}, - {trigger: '.popup-numpad button:contains("8")'}, - {trigger: 'span.highlight:contains("••••")'}, - {trigger: 'button.confirm'}, - { - trigger: 'span[title="Thomas Nific"]', - run: function () { - helper.assertCheckLength(3); - helper.assertValidatedCheckLength(0); - helper.assertQtyToProduce(2, 2); - helper.assertCurrentCheck('Instruction 1'); - } - }, - {trigger: 'div[name=employee_name]'}, - {trigger: 'button.btn_employee:contains("Thomas")'}, - {trigger: 'button[name="action_next"]'}, - {trigger: 'div[name=qty_producing]:contains("2")'}, //field become readonly - { - trigger: '.o_tablet_step_ok', - run: function () { - helper.assertCheckLength(3); - helper.assertValidatedCheckLength(1); - helper.assertQtyToProduce(2, 2); - helper.assertCurrentCheck('Instruction 2'); - } - }, - {trigger: 'button[name="action_next"]'}, - { - trigger: 'p:contains("third")', - run: function () { - helper.assertCheckLength(3); - helper.assertValidatedCheckLength(2); - helper.assertQtyToProduce(2, 2); - helper.assertCurrentCheck('Instruction 3'); - } - }, - {trigger: 'button[name=openMenuPopup]'}, - {trigger: '.o_tablet_popups'}, - {trigger: '.btn:contains("Update Instruction")'}, - {trigger: '.modal-title:contains("Update Instruction")'}, - // { - // trigger: "div[name=note] p", - // position: 'bottom', - // run: 'text my new instruction', - // }, { - { - trigger: "input#comment", - position: 'bottom', - run: 'text my reason', - }, - {trigger: '.btn-primary[name="process"]'}, - {trigger: '.o_tablet_client_action'}, - {trigger: '.btn-primary[name="action_next"]'}, - {trigger: '.btn[name=do_finish]'}, - {trigger: '.o_searchview_input'}, -]); diff --git a/mrp_workorder_hr/tests/__init__.py b/mrp_workorder_hr/tests/__init__.py deleted file mode 100644 index 02da47bf..00000000 --- a/mrp_workorder_hr/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import test_tablet_client_action diff --git a/mrp_workorder_hr/tests/test_tablet_client_action.py b/mrp_workorder_hr/tests/test_tablet_client_action.py deleted file mode 100644 index ef89d6aa..00000000 --- a/mrp_workorder_hr/tests/test_tablet_client_action.py +++ /dev/null @@ -1,83 +0,0 @@ -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from odoo.tests import Form, HttpCase, tagged -from odoo import Command - -from odoo.addons.mrp.tests.common import TestMrpCommon - - -@tagged('post_install', '-at_install') -class TestTabletWorkorderHr(TestMrpCommon, HttpCase): - def _get_client_action_url(self, workorder_id): - action = self.env["ir.actions.actions"]._for_xml_id("mrp_workorder.tablet_client_action") - return '/web?debug=assets#action=%s&active_id=%s' % (action['id'], workorder_id) - - def test_production_with_employee(self): - self.env['mrp.workcenter'].search([]).write({ - 'allow_employee': True, - 'employee_ids': [ - Command.create({ - 'name': 'Arthur Fu', - 'pin': '1234', - }), - Command.create({ - 'name': 'Thomas Nific', - 'pin': '5678', - }) - ] - }) - self.env['stock.lot'].create([{ - 'product_id': self.product_6.id, - 'name': 'sn1', - 'company_id': self.env.company.id, - }]) - picking_type = self.env.ref('stock.warehouse0').manu_type_id - self.bom_3.operation_ids[0].quality_point_ids = [ - Command.create({ - 'product_ids': self.product_6.ids, - 'picking_type_ids': picking_type.ids, - 'operation_id': self.bom_3.operation_ids[0], - 'test_type_id': self.env.ref('quality.test_type_instructions').id, - 'note': "this is the first note", - 'title': "Instruction 1", - }), - Command.create({ - 'product_ids': self.product_6.ids, - 'picking_type_ids': picking_type.ids, - 'operation_id': self.bom_3.operation_ids[0], - 'test_type_id': self.env.ref('quality.test_type_instructions').id, - 'note': "this is the second note", - 'title': "Instruction 2", - }), - Command.create({ - 'product_ids': self.product_6.ids, - 'picking_type_ids': picking_type.ids, - 'operation_id': self.bom_3.operation_ids[0], - 'test_type_id': self.env.ref('quality.test_type_instructions').id, - 'note': "this is the third note", - 'title': "Instruction 3", - }), - ] - - mrp_order_form = Form(self.env['mrp.production']) - mrp_order_form.product_id = self.product_6 - production = mrp_order_form.save() - production.action_confirm() - production.action_assign() - production.button_plan() - production.qty_producing = 2 - self.assertEqual(len(production.workorder_ids.check_ids), 3) - wo = production.workorder_ids[0] - wo.button_start() - url = self._get_client_action_url(wo.id) - - self.start_tour(url, 'test_production_with_employee', login='admin', timeout=20) - employee1 = self.env['hr.employee'].search([ - ('name', '=', 'Arthur Fu'), - ]) - employee2 = self.env['hr.employee'].search([ - ('name', '=', 'Thomas Nific'), - ]) - self.assertEqual(len(wo.time_ids), 2) - self.assertTrue(wo.time_ids[0].employee_id, employee1) - self.assertTrue(wo.time_ids[1].employee_id, employee2) diff --git a/mrp_workorder_hr/views/hr_employee_views.xml b/mrp_workorder_hr/views/hr_employee_views.xml deleted file mode 100644 index c7b3e283..00000000 --- a/mrp_workorder_hr/views/hr_employee_views.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - hr.employee.view.form.inherit.mrp.workorder.hr - hr.employee - - - - - - - - - diff --git a/mrp_workorder_hr/views/mrp_operation_views.xml b/mrp_workorder_hr/views/mrp_operation_views.xml deleted file mode 100644 index bf32d9d6..00000000 --- a/mrp_workorder_hr/views/mrp_operation_views.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - mrp.routing.workcenter.form.view - mrp.routing.workcenter - - - - - - - - diff --git a/mrp_workorder_hr/views/mrp_workcenter_views.xml b/mrp_workorder_hr/views/mrp_workcenter_views.xml deleted file mode 100644 index da7bbed0..00000000 --- a/mrp_workorder_hr/views/mrp_workcenter_views.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - mrp.workcenter.tree.view.inherit - mrp.workcenter - - - - - - - - - mrp.workcenter.form.view.inherit - mrp.workcenter - - - - - -
- Allowed Employees - -
-
-
- - -
-
-
diff --git a/mrp_workorder_hr/views/mrp_workorder_views.xml b/mrp_workorder_hr/views/mrp_workorder_views.xml deleted file mode 100644 index 427bd254..00000000 --- a/mrp_workorder_hr/views/mrp_workorder_views.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - mrp.workorder.view.tablet.form.inherit.workorder.hr - mrp.workorder - - - - - - - - - - {'invisible': ['|', '|', '|', ('allow_employee', '=', True), ('is_user_working', '=', True), ('working_state', '=', 'blocked'), ('state', '=', ('done', 'cancel'))]} - - - {'invisible': ['|', '|', ('allow_employee', '=', True), ('is_user_working', '=', False), ('working_state', '=', 'blocked')]} - - - - - - mrp.workorder.view.form.inherit.workorder.hr - mrp.workorder - - - - - - - - - - {'column_invisible': [('parent.allow_employee', '!=', False)]} - - - - - - {'column_invisible': [('parent.allow_employee', '!=', False)]} - - - - - - - - - - mrp.workorder.view.kanban.inherit.mrp.workorder.hr - mrp.workorder - - - - - - - record.last_working_user_id.raw_value & ! allow_employee - - - - - diff --git a/mrp_workorder_hr/wizard/__init__.py b/mrp_workorder_hr/wizard/__init__.py deleted file mode 100644 index af231a21..00000000 --- a/mrp_workorder_hr/wizard/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import propose_change diff --git a/mrp_workorder_hr/wizard/propose_change.py b/mrp_workorder_hr/wizard/propose_change.py deleted file mode 100644 index adb68917..00000000 --- a/mrp_workorder_hr/wizard/propose_change.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from odoo import models - - -class ProposeChange(models.TransientModel): - _inherit = 'propose.change' - - def _workorder_name(self): - if self.workorder_id.employee_id: - return self.workorder_id.employee_id.name - return super()._workorder_name() diff --git a/quality/.idea/.gitignore b/quality/.idea/.gitignore new file mode 100644 index 00000000..35410cac --- /dev/null +++ b/quality/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/quality/.idea/inspectionProfiles/Project_Default.xml b/quality/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..6945e437 --- /dev/null +++ b/quality/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,49 @@ + + + + \ No newline at end of file diff --git a/quality/.idea/inspectionProfiles/profiles_settings.xml b/quality/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 00000000..105ce2da --- /dev/null +++ b/quality/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/quality/.idea/misc.xml b/quality/.idea/misc.xml new file mode 100644 index 00000000..d56657ad --- /dev/null +++ b/quality/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/quality/.idea/modules.xml b/quality/.idea/modules.xml new file mode 100644 index 00000000..45662f75 --- /dev/null +++ b/quality/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/quality/.idea/quality.iml b/quality/.idea/quality.iml new file mode 100644 index 00000000..d0876a78 --- /dev/null +++ b/quality/.idea/quality.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/quality/.idea/vcs.xml b/quality/.idea/vcs.xml new file mode 100644 index 00000000..6c0b8635 --- /dev/null +++ b/quality/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/sf_base/models/base.py b/sf_base/models/base.py index bf46344f..4c77c114 100644 --- a/sf_base/models/base.py +++ b/sf_base/models/base.py @@ -84,7 +84,31 @@ class MachineTool(models.Model): state = fields.Selection( [("正常", "正常"), ("故障", "故障"), ("不可用", "不可用")], default='正常', string="机床状态") - + #0606新增字段 + machine_tool_picture = fields.Binary('机床图片') + heightened_way = fields.Selection([ + ('sifudianji', '伺服电机驱动'), + ('youyagang', '油压缸驱动'), + ('chilunjia', '齿轮架驱动') + ], string="主轴加高方式", default='sifudianji') + workpiece_load = fields.Char('工件负载') + lead_screw = fields.Char('丝杆') + workbench_L = fields.Char('工作台长度(mm)') + workbench_W = fields.Char('工作台宽度(mm)') + guide_rail = fields.Char('导轨') + machine_tool_L = fields.Char('机床长度(mm)') + machine_tool_W = fields.Char('机床宽度(mm)') + machine_tool_H = fields.Char('机床高度(mm)') + feed_speed = fields.Char('进给速度(mm/min)') + tool_speed = fields.Char('刀具速度') + distance = fields.Char('主轴端面至工作台面距离(mm)') + taper = fields.Char('主轴锥度(°)') + torque = fields.Char('主轴点击扭矩(n/m)') + motor_power = fields.Char('主轴电机功率(kw)') + tool_quality_max = fields.Char('刀具最大质量') + tool_long_max = fields.Char('刀具最大长度') + tool_diameter_max = fields.Char('刀具最大刀径') + machine_tool_category = fields.Many2one('sf.machine_tool.category', string='机床类型') # 一个机床对应一個加工工厂,一个加工工厂对应多个机床 factory_id = fields.Many2one('res.partner', string='所属工厂', domain="[('is_factory', '=', True)]") @@ -152,6 +176,26 @@ class MachineTool(models.Model): item.z_axis = item.type_id.z_axis item.b_axis = item.type_id.b_axis item.c_axis = item.type_id.c_axis + item.machine_tool_picture = item.type_id.machine_tool_picture + item.heightened_way = item.type_id.heightened_way + item.workpiece_load = item.type_id.workpiece_load + item.lead_screw = item.type_id.lead_screw + item.workbench_L = item.type_id.workbench_L + item.workbench_W = item.type_id.workbench_W + item.guide_rail = item.type_id.guide_rail + item.machine_tool_L = item.type_id.machine_tool_L + item.machine_tool_W = item.type_id.machine_tool_W + item.machine_tool_H = item.type_id.machine_tool_H + item.feed_speed = item.type_id.feed_speed + item.tool_speed = item.type_id.tool_speed + item.distance = item.type_id.distance + item.taper = item.type_id.taper + item.torque = item.type_id.torque + item.motor_power = item.type_id.motor_power + item.tool_quality_max = item.type_id.tool_quality_max + item.tool_long_max = item.type_id.tool_long_max + item.tool_diameter_max = item.type_id.tool_diameter_max + item.machine_tool_category = item.type_id.machine_tool_category.id # 注册同步机床 def enroll_machine_tool(self): @@ -214,6 +258,33 @@ class MachineToolType(models.Model): default="", string="刀把类型") number_of_knife_library = fields.Integer('刀库数量') rotate_speed = fields.Integer('转速') + #0606新增字段 + created_user = fields.Many2one('res.users', string='创建人', default=lambda self: self.env.user) + machine_tool_picture = fields.Binary('机床图片') + heightened_way = fields.Selection([ + ('sifudianji', '伺服电机驱动'), + ('youyagang', '油压缸驱动'), + ('chilunjia', '齿轮架驱动') + ], string="主轴加高方式", default='sifudianji') + workpiece_load = fields.Char('工件负载') + lead_screw = fields.Char('丝杆') + workbench_L = fields.Char('工作台长度(mm)') + workbench_W = fields.Char('工作台宽度(mm)') + guide_rail = fields.Char('导轨') + machine_tool_L = fields.Char('机床长度(mm)') + machine_tool_W = fields.Char('机床宽度(mm)') + machine_tool_H = fields.Char('机床高度(mm)') + feed_speed = fields.Char('进给速度(mm/min)') + tool_speed = fields.Char('刀具速度') + distance = fields.Char('主轴端面至工作台面距离(mm)') + taper = fields.Char('主轴锥度(°)') + torque = fields.Char('主轴点击扭矩(n/m)') + motor_power = fields.Char('主轴电机功率(kw)') + tool_quality_max = fields.Char('刀具最大质量') + tool_long_max = fields.Char('刀具最大长度') + tool_diameter_max = fields.Char('刀具最大刀径') + machine_tool_category = fields.Many2one('sf.machine_tool.category', string='机床类型') + # 多个型号对应一个机床 machine_tool_id = fields.Many2one('sf.machine_tool', '机床') number_of_axles = fields.Selection( @@ -259,3 +330,14 @@ class CuttingToolType(models.Model): brand_id = fields.Many2one('sf.machine.brand', string='品牌') remark = fields.Text('备注') active = fields.Boolean('有效', default=True) + +class MachineToolCategory(models.Model): + _name = 'sf.machine_tool.category' + _description = '机床类型' + + code = fields.Char('编码') + name = fields.Char('名称') + remark = fields.Text('备注') + category = fields.Selection([('shukong', u'数控'), ('putong', u'普通')], string=u'机床类别', + default='shukong') + diff --git a/sf_base/views/base_view.xml b/sf_base/views/base_view.xml index 6dffe5e0..7aa192c1 100644 --- a/sf_base/views/base_view.xml +++ b/sf_base/views/base_view.xml @@ -91,66 +91,88 @@ + - + form.sf.machine_tool.type sf.machine_tool.type
- - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
@@ -169,6 +191,70 @@
+ #------------------机床类型------------------ + + + search.sf.machine_tool.category + sf.machine_tool.category + + + + + + + + + tree.sf.machine_tool.category + sf.machine_tool.category + + + + + + + + + + + + form.sf.machine_tool.category + sf.machine_tool.category + +
+ + + + + + + + + + + + + + + + +
+
+
+ + + 机床类型 + ir.actions.act_window + sf.machine_tool.category + tree,form + +

+ [机床型号] 还没有哦!点左上角的[创建]按钮,沙发归你了! +

+

+

+
+
#------------------刀具型号------------------ diff --git a/sf_base/views/menu_view.xml b/sf_base/views/menu_view.xml index cb02aca2..e011a29d 100644 --- a/sf_base/views/menu_view.xml +++ b/sf_base/views/menu_view.xml @@ -120,6 +120,12 @@ name="机床型号" sequence="1" action="action_sf_machine_tool_type"/> + -1
+ + + 同步资源库机床型号 + + code + model.sync_machine_tool_category() + 1 + days + -1 + + \ No newline at end of file diff --git a/sf_mrs_connect/models/res_config_setting.py b/sf_mrs_connect/models/res_config_setting.py index b32aef57..53e7006f 100644 --- a/sf_mrs_connect/models/res_config_setting.py +++ b/sf_mrs_connect/models/res_config_setting.py @@ -38,6 +38,8 @@ class ResConfigSettings(models.TransientModel): _logger.info("同步资源库控制系统") self.env['sf.machine_tool.type'].sync_all_machine_tool_type() _logger.info("同步资源库机床型号") + self.env['sf.machine_tool.category'].sync_all_machine_tool_category() + _logger.info("同步资源库机床类型") self.env['sf.cutting_tool.category'].sync_all_cutting_tool_category() _logger.info("同步资源库刀具类别") self.env['sf.cutting_tool.type'].sync_all_cutting_tool_type() diff --git a/sf_mrs_connect/models/sync_common.py b/sf_mrs_connect/models/sync_common.py index 0bafad65..fefbc9c2 100644 --- a/sf_mrs_connect/models/sync_common.py +++ b/sf_mrs_connect/models/sync_common.py @@ -726,6 +726,7 @@ class MachineToolType(models.Model): [('code', '=', item['machine_tool_id'])]).id else: + print(item['machine_tool_picture'].encode('utf-8')) self.env['sf.machine_tool.type'].create({ "id": item['id'], "name": item['name'], @@ -747,6 +748,27 @@ class MachineToolType(models.Model): [('code', '=', item['control_system_id'])]).id, "active": item['active'], 'brand_id': self.env['sf.machine.brand'].search([('code', '=', item['brand_id'])]).id, + 'machine_tool_picture': item['machine_tool_picture'].encode('utf-8'), + "heightened_way": item['heightened_way'], + "workpiece_load": item['workpiece_load'], + "lead_screw": item['lead_screw'], + "workbench_L": item['workbench_L'], + "workbench_W": item['workbench_W'], + "guide_rail": item['guide_rail'], + "machine_tool_L": item['machine_tool_L'], + "machine_tool_W": item['machine_tool_W'], + "machine_tool_H": item['machine_tool_H'], + "feed_speed": item['feed_speed'], + "tool_speed": item['tool_speed'], + "distance": item['distance'], + "taper": item['taper'], + "torque": item['torque'], + "motor_power": item['motor_power'], + "tool_quality_max": item['tool_quality_max'], + "tool_long_max": item['tool_long_max'], + "tool_diameter_max": item['tool_diameter_max'], + "machine_tool_category": self.env['sf.machine_tool.category'].search( + [('code', '=', item['machine_tool_category'])]).id, }) else: @@ -772,6 +794,7 @@ class MachineToolType(models.Model): "id": item['id'], "name": item['name'], "code": item['code'], + "number_of_knife_library": item['number_of_knife_library'], "rotate_speed": item['rotate_speed'], 'machine_tool_id': self.env['sf.machine_tool'].search( @@ -788,6 +811,27 @@ class MachineToolType(models.Model): [('code', '=', item['control_system_id'])]).id, "active": item['active'], 'brand_id': self.env['sf.machine.brand'].search([('code', '=', item['brand_id'])]).id, + 'machine_tool_picture': base64.b64decode(item['machine_tool_picture']), + "heightened_way": item['heightened_way'], + "workpiece_load": item['workpiece_load'], + "lead_screw": item['lead_screw'], + "workbench_L": item['workbench_L'], + "workbench_W": item['workbench_W'], + "guide_rail": item['guide_rail'], + "machine_tool_L": item['machine_tool_L'], + "machine_tool_W": item['machine_tool_W'], + "machine_tool_H": item['machine_tool_H'], + "feed_speed": item['feed_speed'], + "tool_speed": item['tool_speed'], + "distance": item['distance'], + "taper": item['taper'], + "torque": item['torque'], + "motor_power": item['motor_power'], + "tool_quality_max": item['tool_quality_max'], + "tool_long_max": item['tool_long_max'], + "tool_diameter_max": item['tool_diameter_max'], + "machine_tool_category": self.env['sf.machine_tool.category'].search( + [('code', '=', item['machine_tool_category'])]).id, }) else: @@ -1088,6 +1132,66 @@ class sfProductionProcessParameter(models.Model): raise ValidationError("认证未通过") +class MachineToolCategory(models.Model): + _inherit = 'sf.machine_tool.category' + _description = '机床类型' + url = '/api/machine_tool_category/list' + + # 定时同步机床类型 + def sync_machine_tool_category(self): + sf_sync_config = self.env['res.config.settings'].get_values() + token = sf_sync_config['token'] + sf_secret_key = sf_sync_config['sf_secret_key'] + headers = Common.get_headers(self, token, sf_secret_key) + strUrl = sf_sync_config['sf_url'] + self.url + r = requests.post(strUrl, json={}, data=None, headers=headers) + r = r.json() + result = json.loads(r['result']) + if result['status'] == 1: + for item in result['machine_tool_category_yesterday_list']: + brand = self.env['sf.machine_tool.category'].search( + [("code", '=', item['code'])]) + if brand: + brand.name = item['name'], + brand.code = item['code'], + brand.category = item['category'], + brand.remark = item['remark'] + + else: + brand.name = item['name'], + brand.code = item['code'], + brand.category = item['category'], + brand.remark = item['remark'] + else: + raise ValidationError("认证未通过") + + # 同步所有机床类型 + def sync_all_machine_tool_category(self): + sf_sync_config = self.env['res.config.settings'].get_values() + token = sf_sync_config['token'] + sf_secret_key = sf_sync_config['sf_secret_key'] + headers = Common.get_headers(self, token, sf_secret_key) + + strUrl = sf_sync_config['sf_url'] + self.url + r = requests.post(strUrl, json={}, data=None, headers=headers) + r = r.json() + result = json.loads(r['result']) + if result['status'] == 1: + for item in result['machine_tool_category_all_list']: + brand = self.env['sf.machine_tool.category'].search( + [("code", '=', item['code'])]) + if not brand: + self.env['sf.machine_tool.category'].create({ + "name": item['name'], + "code": item['code'], + "category": item['category'], + "remark": item['remark'], + + }) + else: + raise ValidationError("认证未通过") + + # 同步功能刀具列表 class sfSyncFunctional_cutting_tool(models.Model): _inherit = 'sf.functional.cutting.tool' @@ -1113,7 +1217,7 @@ class sfSyncFunctional_cutting_tool(models.Model): brand = self.env['sf.functional.cutting.tool'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -1214,7 +1318,7 @@ class sfSyncFunctional_cutting_tool(models.Model): brand = self.env['sf.functional.cutting.tool'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -1400,7 +1504,7 @@ class SyncIntegralCuttingTool(models.Model): brand = self.env['sf.integral.cutting.tool'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -1477,7 +1581,7 @@ class SyncIntegralCuttingTool(models.Model): brand = self.env['sf.integral.cutting.tool'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -1619,7 +1723,7 @@ class SyncBlade(models.Model): brand = self.env['sf.blade'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -1695,7 +1799,7 @@ class SyncBlade(models.Model): brand = self.env['sf.blade'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -1858,7 +1962,7 @@ class SyncCutterBar(models.Model): brand = self.env['sf.cutter.bar'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -1936,7 +2040,7 @@ class SyncCutterBar(models.Model): brand = self.env['sf.cutter.bar'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -2098,7 +2202,7 @@ class SyncCutterPad(models.Model): brand = self.env['sf.cutter.pad'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -2178,7 +2282,7 @@ class SyncCutterPad(models.Model): brand = self.env['sf.cutter.pad'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -2342,7 +2446,7 @@ class SyncHandle(models.Model): brand = self.env['sf.handle'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -2422,7 +2526,7 @@ class SyncHandle(models.Model): brand = self.env['sf.handle'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -2586,7 +2690,7 @@ class SyncChuck(models.Model): brand = self.env['sf.chuck'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: @@ -2658,7 +2762,7 @@ class SyncChuck(models.Model): brand = self.env['sf.chuck'].search( [("code", '=', item['code'])]) if item.get('image'): - image = item['image'].encode('utf-8') + image = base64.b64decode(item['image']) else: image = '' if not brand: diff --git a/sf_mrs_connect/views/res_config_settings_views.xml b/sf_mrs_connect/views/res_config_settings_views.xml index 7bc7f2ad..e8d81453 100644 --- a/sf_mrs_connect/views/res_config_settings_views.xml +++ b/sf_mrs_connect/views/res_config_settings_views.xml @@ -26,7 +26,7 @@
-
diff --git a/web_copy_confirm/README.rst b/web_copy_confirm/README.rst new file mode 100644 index 00000000..4ff55c86 --- /dev/null +++ b/web_copy_confirm/README.rst @@ -0,0 +1,84 @@ +================================================= +Show confirmation dialogue before copying records +================================================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/15.0/web_copy_confirm + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_copy_confirm + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/162/15.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module will show a confirmation dialog when the user selects the +`Duplicate` option from the `Action` dropdown in the standard form view. + +**Table of contents** + +.. contents:: + :local: + +Changelog +========= + +14.0.1.0.0 (2020-01-04) +~~~~~~~~~~~~~~~~~~~~~~~ +* [PORT] Ported to V14 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Dynapps +* YiZuo + +Contributors +~~~~~~~~~~~~ + +* Stefan Rijnhart +* Robin Conjour +* PengYB + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/web `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_copy_confirm/__init__.py b/web_copy_confirm/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/web_copy_confirm/__manifest__.py b/web_copy_confirm/__manifest__.py new file mode 100644 index 00000000..3ffe5334 --- /dev/null +++ b/web_copy_confirm/__manifest__.py @@ -0,0 +1,27 @@ +# Copyright (C) 2018 DynApps +# Copyright (C) 2022 Yizuo +# @author Stefan Rijnhart +# @author Robin Conjour +# PengYB(YiZuo) use OWL Rewrite. +# @author PengYB +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Show confirmation dialogue before copying records", + "version": "16.0.1.0.0", + "author": "Dynapps,YiZuo, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/web", + "license": "AGPL-3", + "category": "Tools", + "depends": [ + "web", + ], + "assets": { + "web.assets_backend": [ + "web_copy_confirm/static/src/js/web_copy_confirm.js", + ], + "web.qunit_suite_tests": [ + "web_copy_confirm/static/tests/**/*", + ], + }, + "installable": True, +} diff --git a/web_copy_confirm/i18n/de.po b/web_copy_confirm/i18n/de.po new file mode 100644 index 00000000..d9ef7a0e --- /dev/null +++ b/web_copy_confirm/i18n/de.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_copy_confirm +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-10-13 20:46+0000\n" +"Last-Translator: Corneliuus \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: web_copy_confirm +#. openerp-web +#: code:addons/web_copy_confirm/static/src/js/web_copy_confirm.js:0 +#, python-format +msgid "Are you sure that you would like to copy this record?" +msgstr "Sind Sie sicher, dass Sie diesen Datensatz kopieren möchten?" + +#. module: web_copy_confirm +#. openerp-web +#: code:addons/web_copy_confirm/static/src/js/web_copy_confirm.js:0 +#, python-format +msgid "Duplicate" +msgstr "Duplizieren" diff --git a/web_copy_confirm/i18n/zh_CN.po b/web_copy_confirm/i18n/zh_CN.po new file mode 100644 index 00000000..1740c78f --- /dev/null +++ b/web_copy_confirm/i18n/zh_CN.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_copy_confirm +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-11-20 08:18+0000\n" +"PO-Revision-Date: 2022-11-20 16:21+0800\n" +"Last-Translator: \n" +"Language-Team: PengYB \n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.2\n" + +#. module: web_copy_confirm +#. openerp-web +#: code:addons/web_copy_confirm/static/src/js/web_copy_confirm.js:0 +#, python-format +msgid "Are you sure that you would like to copy this record?" +msgstr "你确定要复制这个记录吗?" diff --git a/web_copy_confirm/readme/CONTRIBUTORS.rst b/web_copy_confirm/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..4d5fbd04 --- /dev/null +++ b/web_copy_confirm/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Stefan Rijnhart +* Robin Conjour +* PengYB diff --git a/web_copy_confirm/readme/DESCRIPTION.rst b/web_copy_confirm/readme/DESCRIPTION.rst new file mode 100644 index 00000000..926f7500 --- /dev/null +++ b/web_copy_confirm/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module will show a confirmation dialog when the user selects the +`Duplicate` option from the `Action` dropdown in the standard form view. diff --git a/web_copy_confirm/readme/HISTORY.rst b/web_copy_confirm/readme/HISTORY.rst new file mode 100644 index 00000000..3d7e14b3 --- /dev/null +++ b/web_copy_confirm/readme/HISTORY.rst @@ -0,0 +1,9 @@ +14.0.1.0.0 (2020-01-04) +~~~~~~~~~~~~~~~~~~~~~~~ +* [PORT] Ported to V14 + + +16.0.1.0.0 (2020-01-04) +~~~~~~~~~~~~~~~~~~~~~~~ +* [PORT] Ported to V16 +* PengYB use OWL Rewrite. \ No newline at end of file diff --git a/web_copy_confirm/readme/newsfragments/.gitkeep b/web_copy_confirm/readme/newsfragments/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/web_copy_confirm/static/description/icon.png b/web_copy_confirm/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/web_copy_confirm/static/description/icon.png differ diff --git a/web_copy_confirm/static/description/index.html b/web_copy_confirm/static/description/index.html new file mode 100644 index 00000000..42161b84 --- /dev/null +++ b/web_copy_confirm/static/description/index.html @@ -0,0 +1,434 @@ + + + + + + +Show confirmation dialogue before copying records + + + +
+

Show confirmation dialogue before copying records

+ + +

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runbot

+

This module will show a confirmation dialog when the user selects the +Duplicate option from the Action dropdown in the standard form view.

+

Table of contents

+ +
+

Changelog

+
+

14.0.1.0.0 (2020-01-04)

+
    +
  • [PORT] Ported to V14
  • +
+
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Dynapps
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/web project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/web_copy_confirm/static/src/js/web_copy_confirm.js b/web_copy_confirm/static/src/js/web_copy_confirm.js new file mode 100644 index 00000000..86d9bad8 --- /dev/null +++ b/web_copy_confirm/static/src/js/web_copy_confirm.js @@ -0,0 +1,31 @@ +/** @odoo-module **/ + +// Copyright (C) 2018 DynApps +// Copyright (C) 2022 Yizuo +// @author Stefan Rijnhart +// @author Robin Conjour +// PengYB(YiZuo) use OWL Rewrite. +// @author PengYB +// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import { FormController } from "@web/views/form/form_controller"; +import { _lt } from "@web/core/l10n/translation"; +import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; +import { patch } from "@web/core/utils/patch"; + +patch(FormController.prototype,"Duplicate Confirm",{ + + async duplicateRecord() { + const dialogProps = { + body: _lt("Are you sure that you would like to copy this record?"), + confirm: async () => { + await this.model.root.duplicate(); +// if (!this.model.root.resId) { +// this.env.config.historyBack(); +// } + }, + cancel: () => {}, + }; + this.dialogService.add(ConfirmationDialog, dialogProps); + } +}); \ No newline at end of file diff --git a/web_copy_confirm/static/tests/confirm_tests.js b/web_copy_confirm/static/tests/confirm_tests.js new file mode 100644 index 00000000..bd1f0e90 --- /dev/null +++ b/web_copy_confirm/static/tests/confirm_tests.js @@ -0,0 +1,91 @@ +odoo.define("web_copy_confirm.confirm_tests", function (require) { + "use strict"; + + /* global QUnit*/ + + var FormView = require("web.FormView"); + var testUtils = require("web.test_utils"); + + var createView = testUtils.createView; + + QUnit.module( + "web_copy_confirm", + { + beforeEach: function () { + this.data = { + partner: { + fields: { + display_name: { + string: "STRING", + type: "char", + default: "Name", + }, + }, + records: [ + { + id: 1, + display_name: "first partner", + }, + ], + onchanges: {}, + }, + }; + }, + }, + function () { + QUnit.test("ask confirmation before duplicate", async function (assert) { + assert.expect(4); + const form = await createView({ + View: FormView, + model: "partner", + data: this.data, + arch: ` +
+ + + `, + viewOptions: { + mode: "edit", + }, + res_id: 1, + }); + + // Validate that partner2 does not exist + assert.strictEqual( + typeof form.model.localData.partner_2, + "undefined", + "Partner 2 shouldn't exist" + ); + + // Trigger onDuplicateRecordConfirm + await form._onDuplicateRecordConfirm(); + + // Validate dialog + var confirmDialog = form.getChildren().pop(); + assert.strictEqual( + confirmDialog.buttons[0].text, + "Ok", + "Ok button is available" + ); + assert.strictEqual( + confirmDialog.$content[0].innerHTML, + "Are you sure that you would like to copy this record?", + "Confirmation text is available" + ); + + // Confirm dialog + await confirmDialog.buttons[0].click(); + + // Validate that copy is created + assert.strictEqual( + form.model.localData.partner_2.data.display_name, + "first partner (copy)", + "Copy is created" + ); + + await testUtils.nextTick(); + form.destroy(); + }); + } + ); +}); diff --git a/web_environment_ribbon/README.rst b/web_environment_ribbon/README.rst new file mode 100644 index 00000000..eeb27e98 --- /dev/null +++ b/web_environment_ribbon/README.rst @@ -0,0 +1,98 @@ +====================== +Web Environment Ribbon +====================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/16.0/web_environment_ribbon + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_environment_ribbon + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/162/16.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Mark a Test Environment with a red ribbon on the top left corner in every page + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +* You can change the ribbon's name ("TEST") by editing the default system + parameter "ribbon.name" (in the menu Settings > Parameters > System + Parameters) To hide the ribbon, set this parameter to "False" or delete it. +* You can customize the ribbon color and background color through system + parameters: "ribbon.color", "ribbon.background.color". Fill with valid CSS + colors or just set to "False" to use default values. +* You can add the database name in the ribbon by adding "{db_name}" in the + system parameter "ribbon.name". + +Usage +===== + +To use this module, you need only to install it. After installation, a red +ribbon will be visible on top left corner of every Odoo backend page + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Francesco OpenCode Apruzzese +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Francesco Apruzzese +* Javi Melendez +* Antonio Espinosa +* Thomas Binsfeld +* Xavier Jiménez +* Dennis Sluijk +* Eric Lembregts + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/web `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_environment_ribbon/__init__.py b/web_environment_ribbon/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/web_environment_ribbon/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/web_environment_ribbon/__manifest__.py b/web_environment_ribbon/__manifest__.py new file mode 100644 index 00000000..9d99f184 --- /dev/null +++ b/web_environment_ribbon/__manifest__.py @@ -0,0 +1,27 @@ +# Copyright 2015 Francesco OpenCode Apruzzese +# Copyright 2016 Antonio Espinosa +# Copyright 2017 Thomas Binsfeld +# Copyright 2017 Xavier Jiménez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Web Environment Ribbon", + "version": "16.0.1.0.0", + "category": "Web", + "author": "Francesco OpenCode Apruzzese, " + "Tecnativa, " + "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/web", + "license": "AGPL-3", + "depends": ["web"], + "data": [ + "data/ribbon_data.xml", + ], + "auto_install": False, + "installable": True, + "assets": { + "web.assets_common": [ + "web_environment_ribbon/static/**/*", + ], + }, +} diff --git a/web_environment_ribbon/data/ribbon_data.xml b/web_environment_ribbon/data/ribbon_data.xml new file mode 100644 index 00000000..72a50249 --- /dev/null +++ b/web_environment_ribbon/data/ribbon_data.xml @@ -0,0 +1,20 @@ + + + + + + ribbon.name + ({db_name})]]> + + + + ribbon.color + #f0f0f0 + + + + ribbon.background.color + rgba(255,0,0,.6) + + diff --git a/web_environment_ribbon/i18n/ca.po b/web_environment_ribbon/i18n/ca.po new file mode 100644 index 00000000..6011c8b8 --- /dev/null +++ b/web_environment_ribbon/i18n/ca.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-02-02 22:13+0000\n" +"Last-Translator: eduardgm \n" +"Language-Team: none\n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Nom mostrat" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "Última modificació el" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "Backend \"Web Environment Ribbon\"" diff --git a/web_environment_ribbon/i18n/de.po b/web_environment_ribbon/i18n/de.po new file mode 100644 index 00000000..69c8fd29 --- /dev/null +++ b/web_environment_ribbon/i18n/de.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +# Translators: +# Niki Waibel , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-13 16:06+0000\n" +"PO-Revision-Date: 2020-07-22 12:19+0000\n" +"Last-Translator: c2cdidier \n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Anzeigename" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "Zuletzt geändert am" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "Web-Umgebung Ribbon-Backend" diff --git a/web_environment_ribbon/i18n/es.po b/web_environment_ribbon/i18n/es.po new file mode 100644 index 00000000..f38990cc --- /dev/null +++ b/web_environment_ribbon/i18n/es.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-08-04 17:44+0000\n" +"Last-Translator: eduardgm \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.7.1\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "Backend \"Web Environment Ribbon\"" diff --git a/web_environment_ribbon/i18n/fr.po b/web_environment_ribbon/i18n/fr.po new file mode 100644 index 00000000..5125212c --- /dev/null +++ b/web_environment_ribbon/i18n/fr.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +# Translators: +# OCA Transbot , 2017 +# Quentin THEURET , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-26 02:44+0000\n" +"PO-Revision-Date: 2017-07-26 02:44+0000\n" +"Last-Translator: Quentin THEURET , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "Backend du bandeau de l'environnement Web" diff --git a/web_environment_ribbon/i18n/hr.po b/web_environment_ribbon/i18n/hr.po new file mode 100644 index 00000000..836e2311 --- /dev/null +++ b/web_environment_ribbon/i18n/hr.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-13 16:06+0000\n" +"PO-Revision-Date: 2017-07-13 16:06+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Naziv za prikaz" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "Zadnje modificirano" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "" diff --git a/web_environment_ribbon/i18n/nl.po b/web_environment_ribbon/i18n/nl.po new file mode 100644 index 00000000..4185a0aa --- /dev/null +++ b/web_environment_ribbon/i18n/nl.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-05-17 20:47+0000\n" +"Last-Translator: Bosd \n" +"Language-Team: none\n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Weergavenaam" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "Laatst Gewijzigd op" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "Web Environment Ribbon Backend" diff --git a/web_environment_ribbon/i18n/nl_NL.po b/web_environment_ribbon/i18n/nl_NL.po new file mode 100644 index 00000000..d66b5b3f --- /dev/null +++ b/web_environment_ribbon/i18n/nl_NL.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-13 16:06+0000\n" +"PO-Revision-Date: 2021-04-22 15:47+0000\n" +"Last-Translator: Bosd \n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/" +"23907/nl_NL/)\n" +"Language: nl_NL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Weergavenaam" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "Laatst bijgewerkt op" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "" diff --git a/web_environment_ribbon/i18n/pt.po b/web_environment_ribbon/i18n/pt.po new file mode 100644 index 00000000..486684bc --- /dev/null +++ b/web_environment_ribbon/i18n/pt.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-08-12 11:44+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.7.1\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Nome a Exibir" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "Última Modificação em" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "" diff --git a/web_environment_ribbon/i18n/pt_BR.po b/web_environment_ribbon/i18n/pt_BR.po new file mode 100644 index 00000000..539afa61 --- /dev/null +++ b/web_environment_ribbon/i18n/pt_BR.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +# Translators: +# Rodrigo de Almeida Sottomaior Macedo , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-13 16:06+0000\n" +"PO-Revision-Date: 2018-08-03 12:34+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.1.1\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "Exibir Nome" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "Identificação" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "Última Modificação em" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "Back-end da fita do ambiente da Web" diff --git a/web_environment_ribbon/i18n/sl.po b/web_environment_ribbon/i18n/sl.po new file mode 100644 index 00000000..3790712d --- /dev/null +++ b/web_environment_ribbon/i18n/sl.po @@ -0,0 +1,40 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-13 16:06+0000\n" +"PO-Revision-Date: 2017-07-13 16:06+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "" diff --git a/web_environment_ribbon/i18n/zh_CN.po b/web_environment_ribbon/i18n/zh_CN.po new file mode 100644 index 00000000..696dbc31 --- /dev/null +++ b/web_environment_ribbon/i18n/zh_CN.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_environment_ribbon +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-09-01 12:52+0000\n" +"Last-Translator: 黎伟杰 <674416404@qq.com>\n" +"Language-Team: none\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 3.8\n" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__display_name +msgid "Display Name" +msgstr "显示名称" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend__id +msgid "ID" +msgstr "ID" + +#. module: web_environment_ribbon +#: model:ir.model.fields,field_description:web_environment_ribbon.field_web_environment_ribbon_backend____last_update +msgid "Last Modified on" +msgstr "最后修改时间" + +#. module: web_environment_ribbon +#: model:ir.model,name:web_environment_ribbon.model_web_environment_ribbon_backend +msgid "Web Environment Ribbon Backend" +msgstr "Web环境标识后台" diff --git a/web_environment_ribbon/models/__init__.py b/web_environment_ribbon/models/__init__.py new file mode 100644 index 00000000..18368b47 --- /dev/null +++ b/web_environment_ribbon/models/__init__.py @@ -0,0 +1 @@ +from . import web_environment_ribbon_backend diff --git a/web_environment_ribbon/models/web_environment_ribbon_backend.py b/web_environment_ribbon/models/web_environment_ribbon_backend.py new file mode 100644 index 00000000..5932d7b3 --- /dev/null +++ b/web_environment_ribbon/models/web_environment_ribbon_backend.py @@ -0,0 +1,36 @@ +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, models + + +class WebEnvironmentRibbonBackend(models.AbstractModel): + + _name = "web.environment.ribbon.backend" + _description = "Web Environment Ribbon Backend" + + @api.model + def _prepare_ribbon_format_vals(self): + return {"db_name": self.env.cr.dbname} + + @api.model + def _prepare_ribbon_name(self): + name_tmpl = self.env["ir.config_parameter"].sudo().get_param("ribbon.name") + vals = self._prepare_ribbon_format_vals() + return name_tmpl and name_tmpl.format(**vals) or name_tmpl + + @api.model + def get_environment_ribbon(self): + """ + This method returns the ribbon data from ir config parameters + :return: dictionary + """ + ir_config_model = self.env["ir.config_parameter"] + name = self._prepare_ribbon_name() + return { + "name": name, + "color": ir_config_model.sudo().get_param("ribbon.color"), + "background_color": ir_config_model.sudo().get_param( + "ribbon.background.color" + ), + } diff --git a/web_environment_ribbon/readme/CONFIGURE.rst b/web_environment_ribbon/readme/CONFIGURE.rst new file mode 100644 index 00000000..8542c72e --- /dev/null +++ b/web_environment_ribbon/readme/CONFIGURE.rst @@ -0,0 +1,8 @@ +* You can change the ribbon's name ("TEST") by editing the default system + parameter "ribbon.name" (in the menu Settings > Parameters > System + Parameters) To hide the ribbon, set this parameter to "False" or delete it. +* You can customize the ribbon color and background color through system + parameters: "ribbon.color", "ribbon.background.color". Fill with valid CSS + colors or just set to "False" to use default values. +* You can add the database name in the ribbon by adding "{db_name}" in the + system parameter "ribbon.name". diff --git a/web_environment_ribbon/readme/CONTRIBUTORS.rst b/web_environment_ribbon/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..257e450d --- /dev/null +++ b/web_environment_ribbon/readme/CONTRIBUTORS.rst @@ -0,0 +1,7 @@ +* Francesco Apruzzese +* Javi Melendez +* Antonio Espinosa +* Thomas Binsfeld +* Xavier Jiménez +* Dennis Sluijk +* Eric Lembregts diff --git a/web_environment_ribbon/readme/DESCRIPTION.rst b/web_environment_ribbon/readme/DESCRIPTION.rst new file mode 100644 index 00000000..c52ab9b5 --- /dev/null +++ b/web_environment_ribbon/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Mark a Test Environment with a red ribbon on the top left corner in every page diff --git a/web_environment_ribbon/readme/USAGE.rst b/web_environment_ribbon/readme/USAGE.rst new file mode 100644 index 00000000..408d88cd --- /dev/null +++ b/web_environment_ribbon/readme/USAGE.rst @@ -0,0 +1,2 @@ +To use this module, you need only to install it. After installation, a red +ribbon will be visible on top left corner of every Odoo backend page diff --git a/web_environment_ribbon/static/description/icon.png b/web_environment_ribbon/static/description/icon.png new file mode 100644 index 00000000..78b52ae9 Binary files /dev/null and b/web_environment_ribbon/static/description/icon.png differ diff --git a/web_environment_ribbon/static/description/index.html b/web_environment_ribbon/static/description/index.html new file mode 100644 index 00000000..19706019 --- /dev/null +++ b/web_environment_ribbon/static/description/index.html @@ -0,0 +1,446 @@ + + + + + + +Web Environment Ribbon + + + +
+

Web Environment Ribbon

+ + +

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runbot

+

Mark a Test Environment with a red ribbon on the top left corner in every page

+

Table of contents

+ +
+

Configuration

+
    +
  • You can change the ribbon’s name (“TEST”) by editing the default system +parameter “ribbon.name” (in the menu Settings > Parameters > System +Parameters) To hide the ribbon, set this parameter to “False” or delete it.
  • +
  • You can customize the ribbon color and background color through system +parameters: “ribbon.color”, “ribbon.background.color”. Fill with valid CSS +colors or just set to “False” to use default values.
  • +
  • You can add the database name in the ribbon by adding “{db_name}” in the +system parameter “ribbon.name”.
  • +
+
+
+

Usage

+

To use this module, you need only to install it. After installation, a red +ribbon will be visible on top left corner of every Odoo backend page

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Francesco OpenCode Apruzzese
  • +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/web project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/web_environment_ribbon/static/description/screenshot.png b/web_environment_ribbon/static/description/screenshot.png new file mode 100644 index 00000000..30245656 Binary files /dev/null and b/web_environment_ribbon/static/description/screenshot.png differ diff --git a/web_environment_ribbon/static/src/css/ribbon.css b/web_environment_ribbon/static/src/css/ribbon.css new file mode 100644 index 00000000..cbf4a40d --- /dev/null +++ b/web_environment_ribbon/static/src/css/ribbon.css @@ -0,0 +1,36 @@ +/* Copyright 2015 Francesco OpenCode Apruzzese + Copyright 2017 Thomas Binsfeld + Copyright 2021 Andreas Perhab + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ + +.test-ribbon { + width: 300px; + top: 25px; + left: -100px; + text-align: center; + padding: 10px; + line-height: 20px; + letter-spacing: 1px; + color: #f0f0f0; + -webkit-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + transform: rotate(-45deg); + z-index: 9999; + position: fixed; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); + background: rgba(255, 0, 0, 0.6); + pointer-events: none; +} + +.test-ribbon b { + font-size: 20px; +} + +header:hover ~ .test-ribbon, +nav:hover ~ .test-ribbon { + /* Ease out ribbon when user is using the navigation in Odoo */ + opacity: 0; + transition: 0.2s ease; +} diff --git a/web_environment_ribbon/static/src/js/ribbon.js b/web_environment_ribbon/static/src/js/ribbon.js new file mode 100644 index 00000000..67a45712 --- /dev/null +++ b/web_environment_ribbon/static/src/js/ribbon.js @@ -0,0 +1,62 @@ +/* Copyright 2015 Sylvain Calador + Copyright 2015 Javi Melendez + Copyright 2016 Antonio Espinosa + Copyright 2017 Thomas Binsfeld + Copyright 2017 Xavier Jiménez + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ + +odoo.define("web_environment_ribbon.ribbon", function (require) { + "use strict"; + var rpc = require("web.rpc"); + var core = require("web.core"); + + // Code from: http://jsfiddle.net/WK_of_Angmar/xgA5C/ + function validStrColour(strToTest) { + if (strToTest === "") { + return false; + } + if (strToTest === "inherit") { + return true; + } + if (strToTest === "transparent") { + return true; + } + var image = document.createElement("img"); + image.style.color = "rgb(0, 0, 0)"; + image.style.color = strToTest; + if (image.style.color !== "rgb(0, 0, 0)") { + return true; + } + image.style.color = "rgb(255, 255, 255)"; + image.style.color = strToTest; + return image.style.color !== "rgb(255, 255, 255)"; + } + + core.bus.on("web_client_ready", null, function () { + var ribbon = $('