Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 account_payment_term_restricted/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
========================================================
Account Payment Terms - Customer / Supplier Restrictions
========================================================

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

.. |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%2Faccount--payment-lightgray.png?logo=github
:target: https://github.com/OCA/account-payment/tree/18.0/account_payment_term_restricted
:alt: OCA/account-payment
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-payment-18-0/account-payment-18-0-account_payment_term_restricted
: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/account-payment&target_branch=18.0
:alt: Try me on Runboat

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

- Model account payment term.

- Add two new fields

- for_customer
- for_supplier

- Add domain on partner form, to limit displays of account payment
term.

This module is distributed in the hope that it will be useful.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-payment/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/account-payment/issues/new?body=module:%20account_payment_term_restricted%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
-------

* Sylvain LE GAL
* La Louve
* Druidoo

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

- Sylvain LE GAL
<`https://twitter.com/legalsylvain\\> <https://twitter.com/legalsylvain\>>`__
- Druidoo <`https://www.druidoo.io\\> <https://www.druidoo.io\>>`__
- `Trobz <https://www.trobz.com>`__

- Phan Hong Phuc <[email protected]>

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/account-payment <https://github.com/OCA/account-payment/tree/18.0/account_payment_term_restricted>`_ 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 account_payment_term_restricted/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions account_payment_term_restricted/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2016-Today: La Louve (<http://www.lalouve.net/>)
# Copyright (C) 2019-Today: Druidoo (<https://www.druidoo.io>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Account Payment Terms - Customer / Supplier Restrictions",
"version": "18.0.1.0.0",
"category": "Accounting",
"author": "Sylvain LE GAL, La Louve, Druidoo, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-payment",
"license": "AGPL-3",
"depends": [
"account",
],
"data": [
"views/view_account_payment_term.xml",
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_term_restricted
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.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: account_payment_term_restricted
#: model:ir.model,name:account_payment_term_restricted.model_res_partner
msgid "Contact"
msgstr ""

#. module: account_payment_term_restricted
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_res_partner__property_payment_term_id
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_res_users__property_payment_term_id
msgid "Customer Payment Terms"
msgstr ""

#. module: account_payment_term_restricted
#: model:ir.model,name:account_payment_term_restricted.model_account_payment_term
msgid "Payment Terms"
msgstr ""

#. module: account_payment_term_restricted
#: model:ir.model.fields,help:account_payment_term_restricted.field_res_partner__property_supplier_payment_term_id
#: model:ir.model.fields,help:account_payment_term_restricted.field_res_users__property_supplier_payment_term_id
msgid "This payment term will be used instead of the default one for purchase orders and vendor bills"
msgstr ""

#. module: account_payment_term_restricted
#: model:ir.model.fields,help:account_payment_term_restricted.field_res_partner__property_payment_term_id
#: model:ir.model.fields,help:account_payment_term_restricted.field_res_users__property_payment_term_id
msgid "This payment term will be used instead of the default one for sales orders and customer invoices"
msgstr ""

#. module: account_payment_term_restricted
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_res_partner__property_supplier_payment_term_id
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_res_users__property_supplier_payment_term_id
msgid "Vendor Payment Terms"
msgstr ""

#. module: account_payment_term_restricted
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_account_payment_term__for_customer
msgid "for Customers"
msgstr ""

#. module: account_payment_term_restricted
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_account_payment_term__for_supplier
msgid "for Suppliers"
msgstr ""

69 changes: 69 additions & 0 deletions account_payment_term_restricted/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_payment_term_restricted
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-19 14:37+0000\n"
"PO-Revision-Date: 2020-03-19 14:37+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_payment_term_restricted
#: model:ir.model,name:account_payment_term_restricted.model_res_partner
msgid "Contact"
msgstr "Contact"

#. module: account_payment_term_restricted
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_res_partner__property_payment_term_id
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_res_users__property_payment_term_id
msgid "Customer Payment Terms"
msgstr "Conditions de paiement du client"

#. module: account_payment_term_restricted
#: model:ir.model,name:account_payment_term_restricted.model_account_payment_term
msgid "Payment Terms"
msgstr "Modalités de paiement"

#. module: account_payment_term_restricted
#: model:ir.model.fields,help:account_payment_term_restricted.field_res_partner__property_supplier_payment_term_id
#: model:ir.model.fields,help:account_payment_term_restricted.field_res_users__property_supplier_payment_term_id
msgid ""
"This payment term will be used instead of the default one for purchase "
"orders and vendor bills"
msgstr ""
"Ce délai de paiement sera utilisé à la place de celui par défaut pour les "
"bons de commande et les factures fournisseurs"

#. module: account_payment_term_restricted
#: model:ir.model.fields,help:account_payment_term_restricted.field_res_partner__property_payment_term_id
#: model:ir.model.fields,help:account_payment_term_restricted.field_res_users__property_payment_term_id
msgid ""
"This payment term will be used instead of the default one for sales orders "
"and customer invoices"
msgstr ""
"Ce délai de paiement sera utilisé à la place de celui par défaut pour les "
"commandes clients et les factures clients"

#. module: account_payment_term_restricted
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_res_partner__property_supplier_payment_term_id
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_res_users__property_supplier_payment_term_id
msgid "Vendor Payment Terms"
msgstr "Conditions de paiement du fournisseur"

#. module: account_payment_term_restricted
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_account_payment_term__for_customer
msgid "for Customers"
msgstr "pour les clients"

#. module: account_payment_term_restricted
#: model:ir.model.fields,field_description:account_payment_term_restricted.field_account_payment_term__for_supplier
msgid "for Suppliers"
msgstr "pour les fournisseurs"
7 changes: 7 additions & 0 deletions account_payment_term_restricted/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (C) 2016-Today: La Louve (<http://www.lalouve.net/>)
# Copyright (C) 2019-Today: Druidoo (<https://www.druidoo.io>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import res_partner
from . import account_payment_term
13 changes: 13 additions & 0 deletions account_payment_term_restricted/models/account_payment_term.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (C) 2016-Today: La Louve (<http://www.lalouve.net/>)
# Copyright (C) 2019-Today: Druidoo (<https://www.druidoo.io>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class AccountPaymentTerm(models.Model):
_inherit = "account.payment.term"

for_customer = fields.Boolean(default=True)
for_supplier = fields.Boolean(default=True)
17 changes: 17 additions & 0 deletions account_payment_term_restricted/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) 2016-Today: La Louve (<http://www.lalouve.net/>)
# Copyright (C) 2019-Today: Druidoo (<https://www.druidoo.io>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class ResPartner(models.Model):
_inherit = "res.partner"

property_payment_term_id = fields.Many2one(
domain="[('for_customer', '=', True)]",
)
property_supplier_payment_term_id = fields.Many2one(
domain="[('for_supplier', '=', True)]",
)
3 changes: 3 additions & 0 deletions account_payment_term_restricted/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions account_payment_term_restricted/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Sylvain LE GAL \<https://twitter.com/legalsylvain\>
- Druidoo \<https://www.druidoo.io\>
- [Trobz](https://www.trobz.com)
- Phan Hong Phuc \<[email protected]\>
9 changes: 9 additions & 0 deletions account_payment_term_restricted/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- Model account payment term.
- Add two new fields
- for_customer
- for_supplier

- Add domain on partner form, to limit displays of account payment
term.

This module is distributed in the hope that it will be useful.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading