From ab0cb83d03d2722e4a54c700a736b3a017868a28 Mon Sep 17 00:00:00 2001 From: kanda999 Date: Wed, 5 Jul 2023 09:28:39 +0000 Subject: [PATCH] Add address_name_text --- .../__init__.py | 1 + .../__manifest__.py | 2 +- .../i18n/ja.po | 22 +++++++++++++------ .../models/__init__.py | 1 + .../models/res_company.py | 10 +++++++++ .../views/res_company_views.xml | 22 +++++++++++++++++++ .../views/website_sale_address_view.xml | 5 ++--- 7 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 website_sale_address_name_description/models/__init__.py create mode 100644 website_sale_address_name_description/models/res_company.py create mode 100644 website_sale_address_name_description/views/res_company_views.xml diff --git a/website_sale_address_name_description/__init__.py b/website_sale_address_name_description/__init__.py index e69de29b..0650744f 100644 --- a/website_sale_address_name_description/__init__.py +++ b/website_sale_address_name_description/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/website_sale_address_name_description/__manifest__.py b/website_sale_address_name_description/__manifest__.py index 6974548b..20ba7606 100644 --- a/website_sale_address_name_description/__manifest__.py +++ b/website_sale_address_name_description/__manifest__.py @@ -8,6 +8,6 @@ "website": "https://www.quartile.co", "version": "15.0.1.0.0", "depends": ["website_sale"], - "data": ["views/website_sale_address_view.xml"], + "data": ["views/website_sale_address_view.xml", "views/res_company_views.xml"], "installable": True, } diff --git a/website_sale_address_name_description/i18n/ja.po b/website_sale_address_name_description/i18n/ja.po index 4a170e8f..8821ba48 100644 --- a/website_sale_address_name_description/i18n/ja.po +++ b/website_sale_address_name_description/i18n/ja.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 15.0+e\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-05 06:21+0000\n" -"PO-Revision-Date: 2023-07-05 06:21+0000\n" +"POT-Creation-Date: 2023-07-05 09:26+0000\n" +"PO-Revision-Date: 2023-07-05 09:26+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -21,8 +21,16 @@ msgid "(Name, Company Name)" msgstr "(お名前, 会社名)" #. module: website_sale_address_name_description -#: model_terms:ir.ui.view,arch_db:website_sale_address_name_description.address -msgid "" -"Please enter both the company name and the\n" -" name of the person in charge if you are entering a company name." -msgstr "会社名の場合、ご担当者様の名前も必ず入力してください。" +#: model:ir.model.fields,field_description:website_sale_address_name_description.field_res_company__address_name_text +msgid "Address Name Text" +msgstr "アドレス名称テキスト" + +#. module: website_sale_address_name_description +#: model_terms:ir.ui.view,arch_db:website_sale_address_name_description.view_company_form +msgid "Adress Texts" +msgstr "アドレステキスト" + +#. module: website_sale_address_name_description +#: model:ir.model,name:website_sale_address_name_description.model_res_company +msgid "Companies" +msgstr "会社" diff --git a/website_sale_address_name_description/models/__init__.py b/website_sale_address_name_description/models/__init__.py new file mode 100644 index 00000000..aff44f33 --- /dev/null +++ b/website_sale_address_name_description/models/__init__.py @@ -0,0 +1 @@ +from . import res_company diff --git a/website_sale_address_name_description/models/res_company.py b/website_sale_address_name_description/models/res_company.py new file mode 100644 index 00000000..1dbca7ae --- /dev/null +++ b/website_sale_address_name_description/models/res_company.py @@ -0,0 +1,10 @@ +# Copyright 2023 Quartile Limited + +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = "res.company" + + address_name_text = fields.Html(translate=True, sanitize=False) + \ No newline at end of file diff --git a/website_sale_address_name_description/views/res_company_views.xml b/website_sale_address_name_description/views/res_company_views.xml new file mode 100644 index 00000000..8197638e --- /dev/null +++ b/website_sale_address_name_description/views/res_company_views.xml @@ -0,0 +1,22 @@ + + + + res.company.form + res.company + + + + + + + + + + + + diff --git a/website_sale_address_name_description/views/website_sale_address_view.xml b/website_sale_address_name_description/views/website_sale_address_view.xml index 69c93fdf..b56a766e 100644 --- a/website_sale_address_name_description/views/website_sale_address_view.xml +++ b/website_sale_address_name_description/views/website_sale_address_view.xml @@ -4,9 +4,8 @@ (Name, Company Name) - - Please enter both the company name and the name of the person - in charge if you are entering a company name. + +