-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '14.0' into 14.0-pms_api_rest
- Loading branch information
Showing
80 changed files
with
5,279 additions
and
610 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
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
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
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,69 @@ | ||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: "0 12 * * 0" | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Stale PRs and issues policy | ||
uses: actions/stale@v4 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
# General settings. | ||
ascending: true | ||
remove-stale-when-updated: true | ||
# Pull Requests settings. | ||
# 120+30 day stale policy for PRs | ||
# * Except PRs marked as "no stale" | ||
days-before-pr-stale: 120 | ||
days-before-pr-close: 30 | ||
exempt-pr-labels: "no stale" | ||
stale-pr-label: "stale" | ||
stale-pr-message: > | ||
There hasn't been any activity on this pull request in the past 4 months, so | ||
it has been marked as stale and it will be closed automatically if no | ||
further activity occurs in the next 30 days. | ||
If you want this PR to never become stale, please ask a PSC member to apply | ||
the "no stale" label. | ||
# Issues settings. | ||
# 180+30 day stale policy for open issues | ||
# * Except Issues marked as "no stale" | ||
days-before-issue-stale: 180 | ||
days-before-issue-close: 30 | ||
exempt-issue-labels: "no stale,needs more information" | ||
stale-issue-label: "stale" | ||
stale-issue-message: > | ||
There hasn't been any activity on this issue in the past 6 months, so it has | ||
been marked as stale and it will be closed automatically if no further | ||
activity occurs in the next 30 days. | ||
If you want this issue to never become stale, please ask a PSC member to | ||
apply the "no stale" label. | ||
# 15+30 day stale policy for issues pending more information | ||
# * Issues that are pending more information | ||
# * Except Issues marked as "no stale" | ||
- name: Needs more information stale issues policy | ||
uses: actions/stale@v4 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
ascending: true | ||
only-labels: "needs more information" | ||
exempt-issue-labels: "no stale" | ||
days-before-stale: 15 | ||
days-before-close: 30 | ||
days-before-pr-stale: -1 | ||
days-before-pr-close: -1 | ||
remove-stale-when-updated: true | ||
stale-issue-label: "stale" | ||
stale-issue-message: > | ||
This issue needs more information and there hasn't been any activity | ||
recently, so it has been marked as stale and it will be closed automatically | ||
if no further activity occurs in the next 30 days. | ||
If you think this is a mistake, please ask a PSC member to remove the "needs | ||
more information" label. |
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
This file was deleted.
Oops, something went wrong.
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
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,81 @@ | ||
============================== | ||
Payment Acquirer Multiproperty | ||
============================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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%2Fpms-lightgray.png?logo=github | ||
:target: https://github.com/OCA/pms/tree/14.0/payment_acquirer_multi_pms_properties | ||
:alt: OCA/pms | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/pms-14-0/pms-14-0-payment_acquirer_multi_pms_properties | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/293/14.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Set the pms property in the payment acquirer to filter on website payments | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
Sets one or more properties in the payment acquirer so that payment method is only available for documents of those properties. | ||
If you leave it blank, it will be available to everyone. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pms/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/pms/issues/new?body=module:%20payment_acquirer_multi_pms_properties%0Aversion:%2014.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 | ||
~~~~~~~ | ||
|
||
* Commit [Sun] | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Commit [Sun] <https://www.commitsun.com>`: | ||
|
||
* Dario Lodeiros | ||
|
||
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. | ||
|
||
This module is part of the `OCA/pms <https://github.com/OCA/pms/tree/14.0/payment_acquirer_multi_pms_properties>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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 @@ | ||
from . import models | ||
from . import controllers |
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,18 @@ | ||
# Copyright 2009-2020 Noviat. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Payment Acquirer Multiproperty", | ||
"author": "Commit [Sun], Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/pms", | ||
"category": "Generic Modules/Property Management System", | ||
"version": "14.0.1.0.1", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
"pms", | ||
], | ||
"data": [ | ||
"views/payment_acquirer.xml", | ||
], | ||
"installable": True, | ||
} |
3 changes: 3 additions & 0 deletions
3
payment_acquirer_multi_pms_properties/controllers/__init__.py
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,3 @@ | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import portal |
23 changes: 23 additions & 0 deletions
23
payment_acquirer_multi_pms_properties/controllers/portal.py
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,23 @@ | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from odoo.addons.account.controllers.portal import PortalAccount | ||
|
||
|
||
class PortalAccount(PortalAccount): | ||
def _invoice_get_page_view_values(self, invoice, access_token, **kwargs): | ||
""" | ||
Override to add the pms property filter | ||
""" | ||
values = super(PortalAccount, self)._invoice_get_page_view_values( | ||
invoice, access_token, **kwargs | ||
) | ||
for acquirer in values["acquirers"]: | ||
if ( | ||
acquirer.pms_property_ids | ||
and invoice.pms_property_id.id not in acquirer.pms_property_ids.ids | ||
): | ||
values["acquirers"] -= acquirer | ||
for pms in values["pms"]: | ||
if pms.acquirer_id not in values["acquirers"].ids: | ||
values["pms"] -= pms | ||
return values |
45 changes: 45 additions & 0 deletions
45
payment_acquirer_multi_pms_properties/i18n/payment_acquirer_multi_pms_properties.pot
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,45 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * payment_acquirer_multi_pms_properties | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.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: payment_acquirer_multi_pms_properties | ||
#: model:ir.model.fields,field_description:payment_acquirer_multi_pms_properties.field_payment_acquirer__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: payment_acquirer_multi_pms_properties | ||
#: model:ir.model.fields,field_description:payment_acquirer_multi_pms_properties.field_payment_acquirer__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: payment_acquirer_multi_pms_properties | ||
#: model:ir.model.fields,field_description:payment_acquirer_multi_pms_properties.field_payment_acquirer____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: payment_acquirer_multi_pms_properties | ||
#: model:ir.model,name:payment_acquirer_multi_pms_properties.model_payment_acquirer | ||
msgid "Payment Acquirer" | ||
msgstr "" | ||
|
||
#. module: payment_acquirer_multi_pms_properties | ||
#: model:ir.model.fields,field_description:payment_acquirer_multi_pms_properties.field_payment_acquirer__pms_property_ids | ||
msgid "Properties" | ||
msgstr "" | ||
|
||
#. module: payment_acquirer_multi_pms_properties | ||
#: model:ir.model.fields,help:payment_acquirer_multi_pms_properties.field_payment_acquirer__pms_property_ids | ||
msgid "" | ||
"Properties with access to the element; if not set, all properties can access" | ||
msgstr "" |
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 payment_acquirer |
21 changes: 21 additions & 0 deletions
21
payment_acquirer_multi_pms_properties/models/payment_acquirer.py
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,21 @@ | ||
# Copyright 2009-2020 Noviat | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class PaymentAcquirer(models.Model): | ||
_inherit = "payment.acquirer" | ||
_check_pms_properties_auto = True | ||
|
||
pms_property_ids = fields.Many2many( | ||
string="Properties", | ||
help="Properties with access to the element;" | ||
" if not set, all properties can access", | ||
required=False, | ||
comodel_name="pms.property", | ||
relation="pms_acquirer_property_rel", | ||
column1="acquirer_id", | ||
column2="property_id", | ||
check_pms_properties=True, | ||
) |
3 changes: 3 additions & 0 deletions
3
payment_acquirer_multi_pms_properties/readme/CONTRIBUTORS.rst
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,3 @@ | ||
* `Commit [Sun] <https://www.commitsun.com>`: | ||
|
||
* Dario Lodeiros |
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 @@ | ||
Set the pms property in the payment acquirer to filter on website payments |
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 @@ | ||
Sets one or more properties in the payment acquirer so that payment method is only available for documents of those properties. | ||
If you leave it blank, it will be available to everyone. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.