Skip to content

Commit

Permalink
[MIG] purchase_post_code_propose_address_sst: Migration to 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AungKoKoLin1997 committed Oct 27, 2023
1 parent d49b0ab commit 56009fc
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 67 deletions.
2 changes: 1 addition & 1 deletion purchase_post_code_propose_address_sst/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Post Code (JP) Propose Purchase Order Address
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:93ff9946dd09b0842e88baecf400c535023bb0386e12833a4e6992acd7a151e1
!! source digest: sha256:01d41b3473c7606b42b6734eeb572af8c4b0e49b5a703e442842d4abc0b2c156
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
4 changes: 2 additions & 2 deletions purchase_post_code_propose_address_sst/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Post Code (JP) Propose Purchase Order Address",
"version": "11.0.1.0.1",
"version": "15.0.1.0.0",
"author": "Quartile Limited",
"website": "https://www.quartile.co",
"category": "Purchase",
"license": "AGPL-3",
"depends": ["purchase"],
"depends": ["purchase_ext_sst"],
"external_dependencies": {"python": ["jaconv"]},
"data": ["views/purchase_order_views.xml"],
"installable": True,
Expand Down
77 changes: 41 additions & 36 deletions purchase_post_code_propose_address_sst/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -1,97 +1,102 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_post_code_propose_address_sst
# * purchase_post_code_propose_address_sst
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0+e\n"
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-04-26 07:18+0000\n"
"PO-Revision-Date: 2019-04-26 07:18+0000\n"
"Last-Translator: <>\n"
"POT-Creation-Date: 2023-10-27 03:54+0000\n"
"PO-Revision-Date: 2023-10-27 03:54+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: purchase_post_code_propose_address_sst
#: model:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
#: model_terms:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
msgid "<span class=\"oe_read_only\">〒</span>"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model_terms:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
msgid "Address"
msgstr "アドレス"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order_city
#: model:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order__city
#: model_terms:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
msgid "City"
msgstr "市区町村"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order_country_id
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order__country_id
msgid "Country"
msgstr ""
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:70
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:90
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:98
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:0
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:0
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:0
#, python-format
msgid "Error"
msgstr "エラー"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:91
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:0
#, python-format
msgid "Only digits are allowed."
msgstr "数値のみで入力してください。"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order_zipcode
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order__zipcode
msgid "Post Code (Search)"
msgstr "郵便番号(検索用)"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order_zip
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order__zip
msgid "Post Code (Supplier)"
msgstr "郵便番号(仕入先)"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:99
#: code:addons/purchase_post_code_propose_address_sst/models/purchase_order.py:0
#, python-format
msgid "Post code should be 7 digits."
msgstr "郵便番号には7桁の数値を入れてください。"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order_state_id
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order__state_id
msgid "Prefecture"
msgstr "都道府県"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.model,name:purchase_post_code_propose_address_sst.model_purchase_order
msgid "Purchase Order"
msgstr "発注"

#. module: purchase_post_code_propose_address_sst
#: model:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
#: model_terms:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
msgid "State"
msgstr "都道府県"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order_street
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order__street
msgid "Street"
msgstr "町名番地"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
#: model_terms:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
msgid "Street 2..."
msgstr "町名番地2…"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
#: model_terms:ir.ui.view,arch_db:purchase_post_code_propose_address_sst.purchase_order_form
msgid "Street..."
msgstr "町名番地…"
msgstr ""

#. module: purchase_post_code_propose_address_sst
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order_street2
#: model:ir.model.fields,field_description:purchase_post_code_propose_address_sst.field_purchase_order__street2
msgid "Street2"
msgstr "町名番地2"
msgstr ""
25 changes: 6 additions & 19 deletions purchase_post_code_propose_address_sst/models/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,13 @@ class PurchaseOrder(models.Model):
_inherit = "purchase.order"

country_id = fields.Many2one(
string="Country", default=lambda self: self.env.ref("base.jp")
)
state_id = fields.Many2one(
"res.country.state",
string="Prefecture",
)
city = fields.Char(
string="City",
)
street = fields.Char(
oldname="address",
string="Street",
)
street2 = fields.Char(
string="Street2",
)
zipcode = fields.Char(
string="Post Code (Search)",
"res.country", string="Country", default=lambda self: self.env.ref("base.jp")
)
state_id = fields.Many2one("res.country.state", string="Prefecture")
city = fields.Char()
street = fields.Char()
street2 = fields.Char()
zipcode = fields.Char(string="Post Code (Search)")
zip = fields.Char(
related="partner_id.zip",
string="Post Code (Supplier)",
Expand Down Expand Up @@ -106,7 +94,6 @@ def check_zipcode(self, zipcode):
}
return field, msg

@api.multi
def write(self, vals):
res = super(PurchaseOrder, self).write(vals)
for order in self:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Post Code (JP) Propose Purchase Order Address</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:93ff9946dd09b0842e88baecf400c535023bb0386e12833a4e6992acd7a151e1
!! source digest: sha256:01d41b3473c7606b42b6734eeb572af8c4b0e49b5a703e442842d4abc0b2c156
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/qrtl/rmm-custom/tree/15.0/purchase_post_code_propose_address_sst"><img alt="qrtl/rmm-custom" src="https://img.shields.io/badge/github-qrtl%2Frmm--custom-lightgray.png?logo=github" /></a></p>
<p>This module adds the ability to make suggestions by zip code.</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="purchase_order_kpis_tree" model="ir.ui.view">
<field name="name">purchase.order.tree</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_kpis_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='company_id']" position="before">
<field name="zipcode" optional="show" />
<field name="city" optional="show" />
<field name="state_id" optional="hide" />
<field name="country_id" optional="hide" />
<field name="street" optional="show" />
<field name="street2" optional="hide" />
</xpath>
</field>
</record>
<record id="purchase_order_tree" model="ir.ui.view">
<field name="name">purchase.order.tree</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='company_id']" position="before">
<field name="zipcode" />
<field name="city" />
<field name="state_id" invisible="1" />
<field name="country_id" invisible="1" />
<field name="street" />
<field name="street2" invisible="1" />
<field name="zipcode" optional="show" />
<field name="city" optional="show" />
<field name="state_id" optional="hide" />
<field name="country_id" optional="hide" />
<field name="street" optional="show" />
<field name="street2" optional="hide" />
</xpath>
</field>
</record>
Expand Down Expand Up @@ -75,4 +90,15 @@
</xpath>
</field>
</record>
<record id="purchase_order_view_search" model="ir.ui.view">
<field name="name">purchase.order.select</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_view_search" />
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="before">
<field name="zipcode" />
<field name="street" />
</xpath>
</field>
</record>
</odoo>
2 changes: 0 additions & 2 deletions setup/purchase_post_code_propose_address_sst/setup.cfg

This file was deleted.

0 comments on commit 56009fc

Please sign in to comment.