Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
327371b
[12.0][ADD] add base_iap_alternative
sebastienbeau Sep 9, 2020
4021b66
[ADD] icon.png
OCA-git-bot Sep 11, 2020
443d0c2
[IMP] iap_alternative_provider: black, isort, prettier
hendrixcosta Oct 22, 2020
74ceff8
[IMP] iap_alternative_provider: black, isort, prettier
Dec 7, 2020
bed6f8b
[MIG] iap_alternative_provider: Migration to 14.0
Dec 7, 2020
d30c84e
[FIX] fix multicompany field
sebastienbeau Jan 10, 2021
3a75b90
Added translation using Weblate (Catalan)
ofonseca-pyming Feb 14, 2022
48749ce
[MIG] iap_alternative_provider: Migration to 15.0
petrus-v May 12, 2022
4ab4fe9
[IMP] add unit-tests
petrus-v May 13, 2022
7c5bd3c
[CHG] remove server_environment dependency
petrus-v May 16, 2022
52c1a7b
Update translation files
weblate Dec 16, 2022
e8cdcdc
[16.0][MIG] iap_alternative_provider: Migration to 16.0
FernandoRomera Dec 19, 2022
29c40ee
Update translation files
weblate Jun 7, 2023
eb6d8d6
Added translation using Weblate (Spanish)
Ivorra78 Dec 7, 2023
26b582d
Added translation using Weblate (Italian)
mymage Jan 2, 2024
7fa7dc7
Update translation files
weblate Feb 2, 2024
04f4327
Translated using Weblate (Italian)
mymage Feb 5, 2024
de35d44
Translated using Weblate (Spanish)
Ivorra78 Feb 14, 2024
5273195
[IMP] iap_alternative_provider: pre-commit auto fixes
Apr 19, 2024
7a39b7f
[MIG] iap_alternative_provider: Migration to 17.0
Apr 19, 2024
19974df
Added translation using Weblate (Chinese (Simplified) (zh_CN))
xtanuiha Jun 16, 2024
c182d83
[MIG] iap_alternative_provider: Migration to 18.0
natuan9 Mar 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions iap_alternative_provider/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
========================
IAP Alternative Provider
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a553eb511075a2b7c71156fdfec49709339b37077904d0b585a91acee72fd9ff
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/18.0/iap_alternative_provider
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-iap_alternative_provider
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Abstract module that provide base functionality for implementing
alternative provider for the IAP application.

An example of alternative provider can be found in [the
connector-telephony
repository](https://github.com/OCA/connector-telephony), with the module
**sms_ovh_http** (sending sms with ovh instead of odoo iap)

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20iap_alternative_provider%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Akretion

Contributors
------------

- Sébastien BEAU <sebastien.beau@akretion.com>
- Trobz (https://www.trobz.com)

- Tuan Nguyen tuanna@trobz.com

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.

.. |maintainer-sebastienbeau| image:: https://github.com/sebastienbeau.png?size=40px
:target: https://github.com/sebastienbeau
:alt: sebastienbeau

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-sebastienbeau|

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/18.0/iap_alternative_provider>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions iap_alternative_provider/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions iap_alternative_provider/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2020 Akretion (https://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


{
"name": "IAP Alternative Provider",
"summary": "Base module for providing alternative provider for iap apps",
"version": "18.0.1.0.0",
"category": "Tools",
"website": "https://github.com/OCA/server-tools",
"author": "Akretion, Odoo Community Association (OCA)",
"maintainers": ["sebastienbeau"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["iap"],
"data": ["views/iap_account_view.xml"],
}
50 changes: 50 additions & 0 deletions iap_alternative_provider/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * iap_alternative_provider
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\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"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__assigned_attachment_ids
msgid "Assigned Attachments"
msgstr ""

#. module: iap_alternative_provider
#: model:ir.model,name:iap_alternative_provider.model_iap_account
msgid "IAP Account"
msgstr ""

#. module: iap_alternative_provider
#: model_terms:ir.ui.view,arch_db:iap_alternative_provider.iap_account_view_form
msgid "Info"
msgstr ""

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__name
msgid "Name"
msgstr ""

#. module: iap_alternative_provider
#: model:ir.model.fields.selection,name:iap_alternative_provider.selection__iap_account__provider__odoo
msgid "Odoo IAP"
msgstr ""

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__provider
msgid "Provider"
msgstr ""

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__smart_search
msgid "Smart Search"
msgstr ""
52 changes: 52 additions & 0 deletions iap_alternative_provider/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * iap_alternative_provider
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-14 19:34+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\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 4.17\n"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__assigned_attachment_ids
msgid "Assigned Attachments"
msgstr "Archivos Adjuntos Asignados"

#. module: iap_alternative_provider
#: model:ir.model,name:iap_alternative_provider.model_iap_account
msgid "IAP Account"
msgstr "Cuenta IAP"

#. module: iap_alternative_provider
#: model_terms:ir.ui.view,arch_db:iap_alternative_provider.iap_account_view_form
msgid "Info"
msgstr "Info"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__name
msgid "Name"
msgstr "Nombre"

#. module: iap_alternative_provider
#: model:ir.model.fields.selection,name:iap_alternative_provider.selection__iap_account__provider__odoo
msgid "Odoo IAP"
msgstr "IAP de Odoo"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__provider
msgid "Provider"
msgstr "Proveedor"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__smart_search
msgid "Smart Search"
msgstr "Búsqueda Inteligente"
34 changes: 34 additions & 0 deletions iap_alternative_provider/i18n/iap_alternative_provider.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * iap_alternative_provider
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \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: iap_alternative_provider
#: model:ir.model,name:iap_alternative_provider.model_iap_account
msgid "IAP Account"
msgstr ""

#. module: iap_alternative_provider
#: model_terms:ir.ui.view,arch_db:iap_alternative_provider.iap_account_view_form
msgid "Info"
msgstr ""

#. module: iap_alternative_provider
#: model:ir.model.fields.selection,name:iap_alternative_provider.selection__iap_account__provider__odoo
msgid "Odoo IAP"
msgstr ""

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__provider
msgid "Provider"
msgstr ""
52 changes: 52 additions & 0 deletions iap_alternative_provider/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * iap_alternative_provider
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-05 09:35+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\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.17\n"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__assigned_attachment_ids
msgid "Assigned Attachments"
msgstr "Allegati assegnati"

#. module: iap_alternative_provider
#: model:ir.model,name:iap_alternative_provider.model_iap_account
msgid "IAP Account"
msgstr "Account IAP"

#. module: iap_alternative_provider
#: model_terms:ir.ui.view,arch_db:iap_alternative_provider.iap_account_view_form
msgid "Info"
msgstr "Informazioni"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__name
msgid "Name"
msgstr "Nome"

#. module: iap_alternative_provider
#: model:ir.model.fields.selection,name:iap_alternative_provider.selection__iap_account__provider__odoo
msgid "Odoo IAP"
msgstr "IAP Odoo"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__provider
msgid "Provider"
msgstr "Provider"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__smart_search
msgid "Smart Search"
msgstr "Ricerca intelligente"
37 changes: 37 additions & 0 deletions iap_alternative_provider/i18n/zh_CN.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * iap_alternative_provider
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-06-16 17:40+0000\n"
"Last-Translator: xtanuiha <feihu.zhang@live.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 4.17\n"

#. module: iap_alternative_provider
#: model:ir.model,name:iap_alternative_provider.model_iap_account
msgid "IAP Account"
msgstr "IAP账户"

#. module: iap_alternative_provider
#: model_terms:ir.ui.view,arch_db:iap_alternative_provider.iap_account_view_form
msgid "Info"
msgstr "信息"

#. module: iap_alternative_provider
#: model:ir.model.fields.selection,name:iap_alternative_provider.selection__iap_account__provider__odoo
msgid "Odoo IAP"
msgstr "Odoo IAP"

#. module: iap_alternative_provider
#: model:ir.model.fields,field_description:iap_alternative_provider.field_iap_account__provider
msgid "Provider"
msgstr "提供者"
1 change: 1 addition & 0 deletions iap_alternative_provider/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import iap_account
37 changes: 37 additions & 0 deletions iap_alternative_provider/models/iap_account.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2020 Akretion (https://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class IapAccount(models.Model):
_inherit = "iap.account"

provider = fields.Selection([("odoo", "Odoo IAP")], required=True, default="odoo")

def _get_service_from_provider(self):
"""In case that the provider only propose one service you can
return the service in your module to simplify the user interface"""
return None

def _set_service_from_provider(self):
for record in self:
service = record._get_service_from_provider()
if service and record.service_id != service:
record.service_id = service

@api.onchange("provider")
def onchange_provider(self):
self._set_service_from_provider()

@api.model_create_multi
def create(self, vals_list):
record = super().create(vals_list)
record._set_service_from_provider()
return record

def write(self, vals):
res = super().write(vals)
self._set_service_from_provider()
return res
3 changes: 3 additions & 0 deletions iap_alternative_provider/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions iap_alternative_provider/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Sébastien BEAU \<<sebastien.beau@akretion.com>\>
- Trobz (https://www.trobz.com)
- Tuan Nguyen <tuanna@trobz.com>
Loading