Skip to content

Commit

Permalink
[16.0][MIG] membership_initial_fee
Browse files Browse the repository at this point in the history
  • Loading branch information
edlopen committed Apr 30, 2024
1 parent 3b718d6 commit 8762e5d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 15 deletions.
23 changes: 17 additions & 6 deletions membership_initial_fee/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Initial fee for memberships
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3df3ecdcbe8ddc664e1595c94950aaa2525890fd05bc89b1d70fdcce59354e61
!! source digest: sha256:983abac29cb1e9d8f220741dd8e7f2b68997476c9156d968fdd885fd7293a94f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -17,13 +17,13 @@ Initial fee for memberships
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fvertical--association-lightgray.png?logo=github
:target: https://github.com/OCA/vertical-association/tree/14.0/membership_initial_fee
:target: https://github.com/OCA/vertical-association/tree/16.0/membership_initial_fee
:alt: OCA/vertical-association
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/vertical-association-14-0/vertical-association-14-0-membership_initial_fee
:target: https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_initial_fee
: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/vertical-association&target_branch=14.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/vertical-association&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -61,7 +61,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/vertical-association/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/vertical-association/issues/new?body=module:%20membership_initial_fee%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/vertical-association/issues/new?body=module:%20membership_initial_fee%0Aversion:%2016.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.

Expand Down Expand Up @@ -99,6 +99,17 @@ 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/vertical-association <https://github.com/OCA/vertical-association/tree/14.0/membership_initial_fee>`_ project on GitHub.
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
:target: https://github.com/rafaelbn
:alt: rafaelbn
.. |maintainer-edlopen| image:: https://github.com/edlopen.png?size=40px
:target: https://github.com/edlopen
:alt: edlopen

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

|maintainer-rafaelbn| |maintainer-edlopen|

This module is part of the `OCA/vertical-association <https://github.com/OCA/vertical-association/tree/16.0/membership_initial_fee>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 2 additions & 1 deletion membership_initial_fee/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

{
"name": "Initial fee for memberships",
"version": "14.0.1.0.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"category": "Association",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/vertical-association",
"depends": ["membership"],
"data": ["views/product_template_views.xml"],
"maintainers": ["rafaelbn", "edlopen"],
}
2 changes: 1 addition & 1 deletion membership_initial_fee/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _prepare_initial_fee_vals(self):
"quantity": 1.0,
"move_id": self.move_id.id,
"account_id": self.account_id.id,
"analytic_account_id": self.analytic_account_id.id,
"analytic_line_ids": self.analytic_line_ids.ids,
}
inv_line = self.env["account.move.line"].new(line_vals)
inv_line.name = product_fee.description_sale or _("Membership initial fee")
Expand Down
10 changes: 6 additions & 4 deletions membership_initial_fee/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ <h1 class="title">Initial fee for memberships</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3df3ecdcbe8ddc664e1595c94950aaa2525890fd05bc89b1d70fdcce59354e61
!! source digest: sha256:983abac29cb1e9d8f220741dd8e7f2b68997476c9156d968fdd885fd7293a94f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/OCA/vertical-association/tree/14.0/membership_initial_fee"><img alt="OCA/vertical-association" src="https://img.shields.io/badge/github-OCA%2Fvertical--association-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/vertical-association-14-0/vertical-association-14-0-membership_initial_fee"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/vertical-association&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<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/OCA/vertical-association/tree/16.0/membership_initial_fee"><img alt="OCA/vertical-association" src="https://img.shields.io/badge/github-OCA%2Fvertical--association-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/vertical-association-16-0/vertical-association-16-0-membership_initial_fee"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/vertical-association&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Charge an initial fee when a partner is invoiced for the first time with a
member product.</p>
<p><strong>Table of contents</strong></p>
Expand Down Expand Up @@ -415,7 +415,7 @@ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/vertical-association/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/vertical-association/issues/new?body=module:%20membership_initial_fee%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/vertical-association/issues/new?body=module:%20membership_initial_fee%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -448,7 +448,9 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/vertical-association/tree/14.0/membership_initial_fee">OCA/vertical-association</a> project on GitHub.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/rafaelbn"><img alt="rafaelbn" src="https://github.com/rafaelbn.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/edlopen"><img alt="edlopen" src="https://github.com/edlopen.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/vertical-association/tree/16.0/membership_initial_fee">OCA/vertical-association</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
5 changes: 2 additions & 3 deletions membership_initial_fee/tests/test_membership_initial_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Copyright 2017 Tecnativa - David Vidal
# License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0

from odoo.tests import common
from odoo.tests.common import TransactionCase


class TestMembershipInitialFee(common.SavepointCase):
class TestMembershipInitialFee(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down Expand Up @@ -94,7 +94,6 @@ def test_create_invoice_initial_fee_taxes(self):
initial_fee_line = invoice.invoice_line_ids.filtered(
lambda x: x.product_id == self.product_fee
)
initial_fee_line._onchange_product_id()
self.assertEqual(initial_fee_line.tax_ids, tax)

def test_onchange_product_fee(self):
Expand Down
6 changes: 6 additions & 0 deletions setup/membership_initial_fee/setup.py
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,
)

0 comments on commit 8762e5d

Please sign in to comment.