-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] addon shopinvader_schema_address: init
- Loading branch information
Showing
16 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# generated from manifests external_dependencies | ||
extendable_pydantic | ||
pydantic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../si_schema_address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import schema |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'Shopinvader Schema Address', | ||
'summary': """ | ||
Adds shchema address: address billing_address delivery_address""", | ||
'version': '16.0.1.0.0', | ||
'license': 'AGPL-3', | ||
'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', | ||
'website': 'https://github.com/shopinvader/odoo-shopinvader', | ||
"depends": [ | ||
"pydantic", | ||
"extendable", | ||
], | ||
"external_dependencies": {"python": ["extendable_pydantic", "pydantic"]}, | ||
'data': [ | ||
], | ||
'demo': [ | ||
], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[ This file is optional, it should explain how to configure | ||
the module before using it; it is aimed at advanced users. ] | ||
|
||
To configure this module, you need to: | ||
|
||
#. Go to ... | ||
|
||
.. figure:: ../static/description/image.png | ||
:alt: alternative description | ||
:width: 600 px |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* Firstname Lastname <[email protected]> (optional company website url) | ||
* Second Person <[email protected]> (optional company website url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ This file is optional and contains additional credits, other than | ||
authors, contributors, and maintainers. ] | ||
|
||
The development of this module has been financially supported by: | ||
|
||
* Company 1 name | ||
* Company 2 name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[ This file must be max 2-3 paragraphs, and is required. ] | ||
|
||
This module extends the functionality of ... to support ... | ||
and to allow you to ... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[ The change log. The goal of this file is to help readers | ||
understand changes between version. The primary audience is | ||
end users and integrators. Purely technical changes such as | ||
code refactoring must not be mentioned here. | ||
|
||
This file may contain ONE level of section titles, underlined | ||
with the ~ (tilde) character. Other section markers are | ||
forbidden and will likely break the structure of the README.rst | ||
or other documents where this fragment is included. ] | ||
|
||
11.0.x.y.z (YYYY-MM-DD) | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
* [BREAKING] Breaking changes come first. | ||
(`#70 <https://github.com/OCA/repo/issues/70>`_) | ||
* [ADD] New feature. | ||
(`#74 <https://github.com/OCA/repo/issues/74>`_) | ||
* [FIX] Correct this. | ||
(`#71 <https://github.com/OCA/repo/issues/71>`_) | ||
|
||
11.0.x.y.z (YYYY-MM-DD) | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
* ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ This file must only be present if there are very specific | ||
installation instructions, such as installing non-python | ||
dependencies. The audience is systems administrators. ] | ||
|
||
To install this module, you need to: | ||
|
||
#. Do this ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[ Enumerate known caveats and future potential improvements. | ||
It is mostly intended for end-users, and can also help | ||
potential new contributors discovering new features to implement. ] | ||
|
||
* ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[ This file must be present and contains the usage instructions | ||
for end-users. As all other rst files included in the README, | ||
it MUST NOT contain reStructuredText sections | ||
only body text (paragraphs, lists, tables, etc). Should you need | ||
a more elaborate structure to explain the addon, please create a | ||
Sphinx documentation (which may include this file as a "quick start" | ||
section). ] | ||
|
||
To use this module, you need to: | ||
|
||
#. Go to ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
import pydantic | ||
|
||
from typing import Optional | ||
|
||
from extendable_pydantic import ExtendableModelMeta | ||
from pydantic import BaseModel | ||
from odoo.addons.pydantic import utils | ||
|
||
|
||
class State(BaseModel, metaclass=ExtendableModelMeta): | ||
id: int | ||
name: str | ||
code: str | ||
class Config: | ||
orm_mode = True | ||
getter_dict = utils.GenericOdooGetter | ||
|
||
class Country(BaseModel, metaclass=ExtendableModelMeta): | ||
id: int | ||
name: str | ||
code: str | ||
class Config: | ||
orm_mode = True | ||
getter_dict = utils.GenericOdooGetter | ||
|
||
|
||
class Address(BaseModel, metaclass=ExtendableModelMeta): | ||
name: str | ||
street: str | ||
street2: Optional[str] = None | ||
zip: str | ||
city: str | ||
phone: Optional[str] = None | ||
email: Optional[str] = None | ||
state: Optional[State] = pydantic.Field(alias="state_id") or None | ||
country: Country = pydantic.Field(alias="country_id") | ||
|
||
class Config: | ||
orm_mode = True | ||
getter_dict = utils.GenericOdooGetter | ||
|
||
|
||
class BillingAddress(Address): | ||
""" | ||
Billing Address | ||
""" | ||
|
||
|
||
class ShippingAddress(Address): | ||
""" | ||
Shipping Address | ||
""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.