Skip to content

Commit

Permalink
Add address_name_text
Browse files Browse the repository at this point in the history
  • Loading branch information
kanda999 committed Jul 5, 2023
1 parent 751be09 commit ab0cb83
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 11 deletions.
1 change: 1 addition & 0 deletions website_sale_address_name_description/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
2 changes: 1 addition & 1 deletion website_sale_address_name_description/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
22 changes: 15 additions & 7 deletions website_sale_address_name_description/i18n/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0+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"
Expand All @@ -21,8 +21,16 @@ msgid "<span>(Name, Company Name)</span>"
msgstr "<span>(お名前, 会社名)</span>"

#. module: website_sale_address_name_description
#: model_terms:ir.ui.view,arch_db:website_sale_address_name_description.address
msgid ""
"<span>Please enter both the company name and the\n"
" name of the person in charge if you are entering a company name.</span>"
msgstr "<span>会社名の場合、ご担当者様の名前も必ず入力してください。</span>"
#: 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 "会社"
1 change: 1 addition & 0 deletions website_sale_address_name_description/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_company
10 changes: 10 additions & 0 deletions website_sale_address_name_description/models/res_company.py
Original file line number Diff line number Diff line change
@@ -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)

22 changes: 22 additions & 0 deletions website_sale_address_name_description/views/res_company_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_company_form" model="ir.ui.view">
<field name="name">res.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form" />
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Adress Texts">
<group>
<field
name="address_name_text"
widget="html"
class="oe-bordered-editor"
options="{'style-inline': true, 'codeview': true }"
/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<xpath expr="//label[@for='name']" position="after">
<span>(Name, Company Name)</span>
</xpath>
<xpath expr="//input[@name='name']" position="inside">
<span>Please enter both the company name and the name of the person
in charge if you are entering a company name.</span>
<xpath expr="//input[@name='name']" position="after">
<t t-out="request.env.company.address_name_text" />
</xpath>
</template>
</odoo>

0 comments on commit ab0cb83

Please sign in to comment.