odoo-addon-cooperator-website 16.0.1.0.0.9__py3-none-any.whl → 16.0.1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/cooperator_website/README.rst +14 -2
- odoo/addons/cooperator_website/__manifest__.py +1 -1
- odoo/addons/cooperator_website/controllers/main.py +17 -2
- odoo/addons/cooperator_website/i18n/ca.po +9 -6
- odoo/addons/cooperator_website/i18n/cooperator_website.pot +7 -0
- odoo/addons/cooperator_website/readme/HISTORY.rst +8 -0
- odoo/addons/cooperator_website/static/description/index.html +42 -26
- odoo/addons/cooperator_website/static/src/js/cooperator.js +30 -25
- odoo/addons/cooperator_website/views/subscription_template.xml +0 -1
- {odoo_addon_cooperator_website-16.0.1.0.0.9.dist-info → odoo_addon_cooperator_website-16.0.1.0.1.dist-info}/METADATA +15 -3
- {odoo_addon_cooperator_website-16.0.1.0.0.9.dist-info → odoo_addon_cooperator_website-16.0.1.0.1.dist-info}/RECORD +13 -13
- {odoo_addon_cooperator_website-16.0.1.0.0.9.dist-info → odoo_addon_cooperator_website-16.0.1.0.1.dist-info}/WHEEL +0 -0
- {odoo_addon_cooperator_website-16.0.1.0.0.9.dist-info → odoo_addon_cooperator_website-16.0.1.0.1.dist-info}/top_level.txt +0 -0
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
2
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
3
|
+
:alt: Odoo Community Association
|
|
4
|
+
|
|
1
5
|
===================
|
|
2
6
|
Cooperators Website
|
|
3
7
|
===================
|
|
@@ -7,13 +11,13 @@ Cooperators Website
|
|
|
7
11
|
!! This file is generated by oca-gen-addon-readme !!
|
|
8
12
|
!! changes will be overwritten. !!
|
|
9
13
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
10
|
-
!! source digest: sha256:
|
|
14
|
+
!! source digest: sha256:8d7e1090d161e15e102afc40d73fe184a6bc6543b0a76d0303afcb28f099710e
|
|
11
15
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
12
16
|
|
|
13
17
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
14
18
|
:target: https://odoo-community.org/page/development-status
|
|
15
19
|
:alt: Beta
|
|
16
|
-
.. |badge2| image:: https://img.shields.io/badge/
|
|
20
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
17
21
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
18
22
|
:alt: License: AGPL-3
|
|
19
23
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcooperative-lightgray.png?logo=github
|
|
@@ -39,6 +43,14 @@ shares online.
|
|
|
39
43
|
Changelog
|
|
40
44
|
=========
|
|
41
45
|
|
|
46
|
+
16.0.1.0.1 (2026-02-03)
|
|
47
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
48
|
+
|
|
49
|
+
**Bugfixes**
|
|
50
|
+
|
|
51
|
+
- Fix the validation of the minimum number of shares on the website form. (`#174 <https://github.com/OCA/cooperative/issues/174>`_)
|
|
52
|
+
|
|
53
|
+
|
|
42
54
|
16.0.1.0.0 (2023-12-04)
|
|
43
55
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
44
56
|
|
|
@@ -263,6 +263,11 @@ class WebsiteSubscription(http.Controller):
|
|
|
263
263
|
"""
|
|
264
264
|
return True
|
|
265
265
|
|
|
266
|
+
def get_share_minimum_quantity(self, share):
|
|
267
|
+
if share.force_min_qty:
|
|
268
|
+
return share.minimum_quantity
|
|
269
|
+
return 1
|
|
270
|
+
|
|
266
271
|
def validation( # noqa: C901 (method too complex)
|
|
267
272
|
self, kwargs, logged, values, post_file
|
|
268
273
|
):
|
|
@@ -341,6 +346,17 @@ class WebsiteSubscription(http.Controller):
|
|
|
341
346
|
values["error"] = {"iban"}
|
|
342
347
|
return request.render(redirect, values)
|
|
343
348
|
|
|
349
|
+
share = self.get_selected_share(kwargs)
|
|
350
|
+
# check subscription respect min qty of shares
|
|
351
|
+
min_qty = self.get_share_minimum_quantity(share)
|
|
352
|
+
share_qty = int(kwargs.get("ordered_parts"))
|
|
353
|
+
if share_qty <= min_qty:
|
|
354
|
+
values = self.fill_values(values, is_company, logged)
|
|
355
|
+
values["error_msg"] = _(
|
|
356
|
+
"Number of shares must be at least {min_qty}."
|
|
357
|
+
).format(min_qty=min_qty)
|
|
358
|
+
return request.render(redirect, values)
|
|
359
|
+
|
|
344
360
|
# check the subscription's amount
|
|
345
361
|
max_amount = company.subscription_maximum_amount
|
|
346
362
|
if logged:
|
|
@@ -348,14 +364,13 @@ class WebsiteSubscription(http.Controller):
|
|
|
348
364
|
if partner.member:
|
|
349
365
|
max_amount = max_amount - partner.total_value
|
|
350
366
|
if company.unmix_share_type:
|
|
351
|
-
share = self.get_selected_share(kwargs)
|
|
352
367
|
if partner.cooperator_type != share.default_code:
|
|
353
368
|
values = self.fill_values(values, is_company, logged)
|
|
354
369
|
values["error_msg"] = _(
|
|
355
370
|
"You can't subscribe to two different types of share."
|
|
356
371
|
)
|
|
357
372
|
return request.render(redirect, values)
|
|
358
|
-
total_amount =
|
|
373
|
+
total_amount = share_qty * share.list_price
|
|
359
374
|
|
|
360
375
|
if max_amount > 0 and total_amount > max_amount:
|
|
361
376
|
values = self.fill_values(values, is_company, logged)
|
|
@@ -6,7 +6,7 @@ msgid ""
|
|
|
6
6
|
msgstr ""
|
|
7
7
|
"Project-Id-Version: Odoo Server 16.0\n"
|
|
8
8
|
"Report-Msgid-Bugs-To: \n"
|
|
9
|
-
"PO-Revision-Date: 2025-
|
|
9
|
+
"PO-Revision-Date: 2025-10-28 12:23+0000\n"
|
|
10
10
|
"Last-Translator: Eugeni Chafer <eugeni@chafer.cat>\n"
|
|
11
11
|
"Language-Team: none\n"
|
|
12
12
|
"Language: ca\n"
|
|
@@ -23,34 +23,37 @@ msgstr "+34 456 926 505"
|
|
|
23
23
|
|
|
24
24
|
#. module: cooperator_website
|
|
25
25
|
#: model_terms:ir.ui.view,arch_db:cooperator_website.becomecompanycooperator
|
|
26
|
+
#, fuzzy
|
|
26
27
|
msgid "0647980091"
|
|
27
|
-
msgstr ""
|
|
28
|
+
msgstr "0647980091"
|
|
28
29
|
|
|
29
30
|
#. module: cooperator_website
|
|
30
31
|
#: model_terms:ir.ui.view,arch_db:cooperator_website.address_template
|
|
32
|
+
#, fuzzy
|
|
31
33
|
msgid "1030"
|
|
32
|
-
msgstr ""
|
|
34
|
+
msgstr "1030"
|
|
33
35
|
|
|
34
36
|
#. module: cooperator_website
|
|
35
37
|
#: model_terms:ir.ui.view,arch_db:cooperator_website.contact_template
|
|
36
38
|
msgid "1978-03-05"
|
|
37
|
-
msgstr ""
|
|
39
|
+
msgstr "05-03-1978"
|
|
38
40
|
|
|
39
41
|
#. module: cooperator_website
|
|
40
42
|
#: model_terms:ir.ui.view,arch_db:cooperator_website.address_template
|
|
41
43
|
msgid "<option value=\"\">Country...</option>"
|
|
42
|
-
msgstr ""
|
|
44
|
+
msgstr "<option value=\"\">País...</option>"
|
|
43
45
|
|
|
44
46
|
#. module: cooperator_website
|
|
45
47
|
#: model_terms:ir.ui.view,arch_db:cooperator_website.cooperator_thanks
|
|
46
48
|
msgid ""
|
|
47
49
|
"<span>Your subscription has been <b>successfully</b> registered.</span>"
|
|
48
50
|
msgstr ""
|
|
51
|
+
"<span>La vostra sol·licitud ha estat <b>registrada correctament</b>.</span>"
|
|
49
52
|
|
|
50
53
|
#. module: cooperator_website
|
|
51
54
|
#: model_terms:ir.ui.view,arch_db:cooperator_website.address_template
|
|
52
55
|
msgid "Address"
|
|
53
|
-
msgstr ""
|
|
56
|
+
msgstr "Adreça"
|
|
54
57
|
|
|
55
58
|
#. module: cooperator_website
|
|
56
59
|
#. odoo-python
|
|
@@ -223,6 +223,13 @@ msgstr ""
|
|
|
223
223
|
msgid "Main Address"
|
|
224
224
|
msgstr ""
|
|
225
225
|
|
|
226
|
+
#. module: cooperator_website
|
|
227
|
+
#. odoo-python
|
|
228
|
+
#: code:addons/cooperator_website/controllers/main.py:0
|
|
229
|
+
#, python-format
|
|
230
|
+
msgid "Number of shares must be at least {min_qty}."
|
|
231
|
+
msgstr ""
|
|
232
|
+
|
|
226
233
|
#. module: cooperator_website
|
|
227
234
|
#: model_terms:ir.ui.view,arch_db:cooperator_website.contact_template
|
|
228
235
|
msgid "Phone"
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
16.0.1.0.1 (2026-02-03)
|
|
2
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
3
|
+
|
|
4
|
+
**Bugfixes**
|
|
5
|
+
|
|
6
|
+
- Fix the validation of the minimum number of shares on the website form. (`#174 <https://github.com/OCA/cooperative/issues/174>`_)
|
|
7
|
+
|
|
8
|
+
|
|
1
9
|
16.0.1.0.0 (2023-12-04)
|
|
2
10
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
3
11
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
2
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
3
|
<head>
|
|
5
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
5
|
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
7
|
-
<title>
|
|
6
|
+
<title>README.rst</title>
|
|
8
7
|
<style type="text/css">
|
|
9
8
|
|
|
10
9
|
/*
|
|
11
10
|
:Author: David Goodger (goodger@python.org)
|
|
12
|
-
:Id: $Id: html4css1.css
|
|
11
|
+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
|
13
12
|
:Copyright: This stylesheet has been placed in the public domain.
|
|
14
13
|
|
|
15
14
|
Default cascading style sheet for the HTML output of Docutils.
|
|
15
|
+
Despite the name, some widely supported CSS2 features are used.
|
|
16
16
|
|
|
17
17
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
|
18
18
|
customize this style sheet.
|
|
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
|
275
275
|
margin-left: 2em ;
|
|
276
276
|
margin-right: 2em }
|
|
277
277
|
|
|
278
|
-
pre.code .ln { color:
|
|
278
|
+
pre.code .ln { color: gray; } /* line numbers */
|
|
279
279
|
pre.code, code { background-color: #eeeeee }
|
|
280
280
|
pre.code .comment, code .comment { color: #5C6576 }
|
|
281
281
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
@@ -301,7 +301,7 @@ span.option {
|
|
|
301
301
|
span.pre {
|
|
302
302
|
white-space: pre }
|
|
303
303
|
|
|
304
|
-
span.problematic {
|
|
304
|
+
span.problematic, pre.problematic {
|
|
305
305
|
color: red }
|
|
306
306
|
|
|
307
307
|
span.section-subtitle {
|
|
@@ -360,39 +360,52 @@ ul.auto-toc {
|
|
|
360
360
|
</style>
|
|
361
361
|
</head>
|
|
362
362
|
<body>
|
|
363
|
-
<div class="document"
|
|
364
|
-
<h1 class="title">Cooperators Website</h1>
|
|
363
|
+
<div class="document">
|
|
365
364
|
|
|
365
|
+
|
|
366
|
+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
|
367
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
|
368
|
+
</a>
|
|
369
|
+
<div class="section" id="cooperators-website">
|
|
370
|
+
<h1>Cooperators Website</h1>
|
|
366
371
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
367
372
|
!! This file is generated by oca-gen-addon-readme !!
|
|
368
373
|
!! changes will be overwritten. !!
|
|
369
374
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
-
!! source digest: sha256:
|
|
375
|
+
!! source digest: sha256:8d7e1090d161e15e102afc40d73fe184a6bc6543b0a76d0303afcb28f099710e
|
|
371
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
|
-
<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/
|
|
377
|
+
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/cooperative/tree/16.0/cooperator_website"><img alt="OCA/cooperative" src="https://img.shields.io/badge/github-OCA%2Fcooperative-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/cooperative-16-0/cooperative-16-0-cooperator_website"><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/cooperative&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
378
|
<p>This module adds the cooperator subscription form allowing to subscribe for
|
|
374
379
|
shares online.</p>
|
|
375
380
|
<p><strong>Table of contents</strong></p>
|
|
376
381
|
<div class="contents local topic" id="contents">
|
|
377
382
|
<ul class="simple">
|
|
378
383
|
<li><a class="reference internal" href="#changelog" id="toc-entry-1">Changelog</a><ul>
|
|
379
|
-
<li><a class="reference internal" href="#section-1" id="toc-entry-2">16.0.1.0.
|
|
380
|
-
<li><a class="reference internal" href="#section-2" id="toc-entry-3">
|
|
384
|
+
<li><a class="reference internal" href="#section-1" id="toc-entry-2">16.0.1.0.1 (2026-02-03)</a></li>
|
|
385
|
+
<li><a class="reference internal" href="#section-2" id="toc-entry-3">16.0.1.0.0 (2023-12-04)</a></li>
|
|
386
|
+
<li><a class="reference internal" href="#section-3" id="toc-entry-4">12.0.3.0.0 (2022-06-23)</a></li>
|
|
381
387
|
</ul>
|
|
382
388
|
</li>
|
|
383
|
-
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-
|
|
384
|
-
<li><a class="reference internal" href="#credits" id="toc-entry-
|
|
385
|
-
<li><a class="reference internal" href="#authors" id="toc-entry-
|
|
386
|
-
<li><a class="reference internal" href="#contributors" id="toc-entry-
|
|
387
|
-
<li><a class="reference internal" href="#maintainers" id="toc-entry-
|
|
389
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-5">Bug Tracker</a></li>
|
|
390
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-6">Credits</a><ul>
|
|
391
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-7">Authors</a></li>
|
|
392
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-8">Contributors</a></li>
|
|
393
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
|
|
388
394
|
</ul>
|
|
389
395
|
</li>
|
|
390
396
|
</ul>
|
|
391
397
|
</div>
|
|
392
398
|
<div class="section" id="changelog">
|
|
393
|
-
<
|
|
399
|
+
<h2><a class="toc-backref" href="#toc-entry-1">Changelog</a></h2>
|
|
394
400
|
<div class="section" id="section-1">
|
|
395
|
-
<
|
|
401
|
+
<h3><a class="toc-backref" href="#toc-entry-2">16.0.1.0.1 (2026-02-03)</a></h3>
|
|
402
|
+
<p><strong>Bugfixes</strong></p>
|
|
403
|
+
<ul class="simple">
|
|
404
|
+
<li>Fix the validation of the minimum number of shares on the website form. (<a class="reference external" href="https://github.com/OCA/cooperative/issues/174">#174</a>)</li>
|
|
405
|
+
</ul>
|
|
406
|
+
</div>
|
|
407
|
+
<div class="section" id="section-2">
|
|
408
|
+
<h3><a class="toc-backref" href="#toc-entry-3">16.0.1.0.0 (2023-12-04)</a></h3>
|
|
396
409
|
<p><strong>Features</strong></p>
|
|
397
410
|
<ul class="simple">
|
|
398
411
|
<li>Use the <tt class="docutils literal">website.contactus_thanks</tt> webpage as a base for the thanks page
|
|
@@ -417,8 +430,8 @@ individuals and for companies). (<a class="reference external" href="https://git
|
|
|
417
430
|
email address on website pages. (<a class="reference external" href="https://github.com/OCA/cooperative/issues/88">#88</a>)</li>
|
|
418
431
|
</ul>
|
|
419
432
|
</div>
|
|
420
|
-
<div class="section" id="section-
|
|
421
|
-
<
|
|
433
|
+
<div class="section" id="section-3">
|
|
434
|
+
<h3><a class="toc-backref" href="#toc-entry-4">12.0.3.0.0 (2022-06-23)</a></h3>
|
|
422
435
|
<p><strong>Deprecations and Removals</strong></p>
|
|
423
436
|
<ul class="simple">
|
|
424
437
|
<li>Removed reCAPTCHA logic out of this module. Install
|
|
@@ -427,7 +440,7 @@ email address on website pages. (<a class="reference external" href="https://git
|
|
|
427
440
|
</div>
|
|
428
441
|
</div>
|
|
429
442
|
<div class="section" id="bug-tracker">
|
|
430
|
-
<
|
|
443
|
+
<h2><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h2>
|
|
431
444
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/cooperative/issues">GitHub Issues</a>.
|
|
432
445
|
In case of trouble, please check there if your issue has already been reported.
|
|
433
446
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
@@ -435,23 +448,25 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
435
448
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
436
449
|
</div>
|
|
437
450
|
<div class="section" id="credits">
|
|
438
|
-
<
|
|
451
|
+
<h2><a class="toc-backref" href="#toc-entry-6">Credits</a></h2>
|
|
439
452
|
<div class="section" id="authors">
|
|
440
|
-
<
|
|
453
|
+
<h3><a class="toc-backref" href="#toc-entry-7">Authors</a></h3>
|
|
441
454
|
<ul class="simple">
|
|
442
455
|
<li>Coop IT Easy SC</li>
|
|
443
456
|
</ul>
|
|
444
457
|
</div>
|
|
445
458
|
<div class="section" id="contributors">
|
|
446
|
-
<
|
|
459
|
+
<h3><a class="toc-backref" href="#toc-entry-8">Contributors</a></h3>
|
|
447
460
|
<ul class="simple">
|
|
448
461
|
<li>Coop IT Easy SC</li>
|
|
449
462
|
</ul>
|
|
450
463
|
</div>
|
|
451
464
|
<div class="section" id="maintainers">
|
|
452
|
-
<
|
|
465
|
+
<h3><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h3>
|
|
453
466
|
<p>This module is maintained by the OCA.</p>
|
|
454
|
-
<a class="reference external image-reference" href="https://odoo-community.org"
|
|
467
|
+
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
468
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
469
|
+
</a>
|
|
455
470
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
456
471
|
mission is to support the collaborative development of Odoo features and
|
|
457
472
|
promote its widespread use.</p>
|
|
@@ -460,5 +475,6 @@ promote its widespread use.</p>
|
|
|
460
475
|
</div>
|
|
461
476
|
</div>
|
|
462
477
|
</div>
|
|
478
|
+
</div>
|
|
463
479
|
</body>
|
|
464
480
|
</html>
|
|
@@ -9,41 +9,46 @@ odoo.define("cooperator.oe_cooperator", function (require) {
|
|
|
9
9
|
var ajax = require("web.ajax");
|
|
10
10
|
|
|
11
11
|
$(".oe_cooperator").each(function () {
|
|
12
|
-
var oe_cooperator = this;
|
|
12
|
+
var $oe_cooperator = $(this);
|
|
13
|
+
var $share_product_id = $oe_cooperator.find("#share_product_id");
|
|
14
|
+
var $ordered_parts = $oe_cooperator.find("#ordered_parts");
|
|
15
|
+
var share_price = 0;
|
|
16
|
+
var min_qty = 0;
|
|
13
17
|
|
|
14
|
-
$("
|
|
15
|
-
var share_product_id = $
|
|
18
|
+
$share_product_id.on("change", function () {
|
|
19
|
+
var share_product_id = $share_product_id.val();
|
|
16
20
|
ajax.jsonRpc("/subscription/get_share_product", "call", {
|
|
17
21
|
share_product_id: share_product_id,
|
|
18
22
|
}).then(function (data) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
var share_product = data[share_product_id];
|
|
24
|
+
share_price = share_product.list_price;
|
|
25
|
+
min_qty = share_product.min_qty;
|
|
26
|
+
var suggested_qty = min_qty;
|
|
27
|
+
if (!share_product.force_min_qty) {
|
|
28
|
+
min_qty = 1;
|
|
23
29
|
}
|
|
24
|
-
$("
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
$ordered_parts.attr("min", min_qty);
|
|
31
|
+
if ($ordered_parts.val() < suggested_qty) {
|
|
32
|
+
$ordered_parts.val(suggested_qty);
|
|
33
|
+
}
|
|
34
|
+
// Update the share quantity and the total price by
|
|
35
|
+
// triggering the event which will call the function
|
|
36
|
+
// below.
|
|
37
|
+
$ordered_parts.trigger("change");
|
|
30
38
|
});
|
|
31
39
|
});
|
|
32
40
|
|
|
33
|
-
$
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
$(oe_cooperator).on("focusout", "input.js_quantity", function () {
|
|
43
|
-
$("a.js_add_cart_json").trigger("click");
|
|
41
|
+
$ordered_parts.on("change", function () {
|
|
42
|
+
var quantity = $ordered_parts.val();
|
|
43
|
+
if (quantity < min_qty) {
|
|
44
|
+
quantity = min_qty;
|
|
45
|
+
$ordered_parts.val(quantity);
|
|
46
|
+
}
|
|
47
|
+
$('input[name="total_parts"]').val(quantity * share_price);
|
|
44
48
|
});
|
|
45
49
|
|
|
46
|
-
|
|
50
|
+
// Compute initial values.
|
|
51
|
+
$share_product_id.trigger("change");
|
|
47
52
|
});
|
|
48
53
|
});
|
|
49
54
|
});
|
|
@@ -333,7 +333,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
333
333
|
</div>
|
|
334
334
|
</div>
|
|
335
335
|
<div class="col-md-3 col-6" name="total_parts_container">
|
|
336
|
-
<div id="share_price" style="display: none;" />
|
|
337
336
|
<label for="total_parts" class="form-label">Total</label>
|
|
338
337
|
<div class="input-group input-group-sm mb-3 has-validation">
|
|
339
338
|
<span class="input-group-text" t-out="company.currency_id.symbol" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-cooperator_website
|
|
3
|
-
Version: 16.0.1.0.
|
|
3
|
+
Version: 16.0.1.0.1
|
|
4
4
|
Summary: This module adds the cooperator subscription form allowing to subscribe for shares online.
|
|
5
5
|
Home-page: https://github.com/OCA/cooperative
|
|
6
6
|
Author: Coop IT Easy SC, Odoo Community Association (OCA)
|
|
@@ -14,6 +14,10 @@ Requires-Python: >=3.10
|
|
|
14
14
|
Requires-Dist: odoo-addon-cooperator<16.1dev,>=16.0dev
|
|
15
15
|
Requires-Dist: odoo<16.1dev,>=16.0a
|
|
16
16
|
|
|
17
|
+
.. image:: https://odoo-community.org/readme-banner-image
|
|
18
|
+
:target: https://odoo-community.org/get-involved?utm_source=readme
|
|
19
|
+
:alt: Odoo Community Association
|
|
20
|
+
|
|
17
21
|
===================
|
|
18
22
|
Cooperators Website
|
|
19
23
|
===================
|
|
@@ -23,13 +27,13 @@ Cooperators Website
|
|
|
23
27
|
!! This file is generated by oca-gen-addon-readme !!
|
|
24
28
|
!! changes will be overwritten. !!
|
|
25
29
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
26
|
-
!! source digest: sha256:
|
|
30
|
+
!! source digest: sha256:8d7e1090d161e15e102afc40d73fe184a6bc6543b0a76d0303afcb28f099710e
|
|
27
31
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
28
32
|
|
|
29
33
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
|
30
34
|
:target: https://odoo-community.org/page/development-status
|
|
31
35
|
:alt: Beta
|
|
32
|
-
.. |badge2| image:: https://img.shields.io/badge/
|
|
36
|
+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
|
33
37
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
|
34
38
|
:alt: License: AGPL-3
|
|
35
39
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcooperative-lightgray.png?logo=github
|
|
@@ -55,6 +59,14 @@ shares online.
|
|
|
55
59
|
Changelog
|
|
56
60
|
=========
|
|
57
61
|
|
|
62
|
+
16.0.1.0.1 (2026-02-03)
|
|
63
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
64
|
+
|
|
65
|
+
**Bugfixes**
|
|
66
|
+
|
|
67
|
+
- Fix the validation of the minimum number of shares on the website form. (`#174 <https://github.com/OCA/cooperative/issues/174>`_)
|
|
68
|
+
|
|
69
|
+
|
|
58
70
|
16.0.1.0.0 (2023-12-04)
|
|
59
71
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
60
72
|
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
odoo/addons/cooperator_website/README.rst,sha256=
|
|
1
|
+
odoo/addons/cooperator_website/README.rst,sha256=3JEuMSHFOJxuf-1MCUMJmcZX2QQZqOScY4oGmvH3DRo,4861
|
|
2
2
|
odoo/addons/cooperator_website/__init__.py,sha256=-K73v6bcubPUhV-dO8DgSW4cRXZ16e_8MO8fZDnsRnU,184
|
|
3
|
-
odoo/addons/cooperator_website/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/cooperator_website/__manifest__.py,sha256=fnq3iDhQEMNYZvspu0gC6Pe6n0f0o5Ef8u8EwZK06tQ,887
|
|
4
4
|
odoo/addons/cooperator_website/controllers/__init__.py,sha256=1OQMQy6Bp0XSPHU3NQVlwiEPJw9r2VebuLOtWG1OMXY,177
|
|
5
|
-
odoo/addons/cooperator_website/controllers/main.py,sha256=
|
|
6
|
-
odoo/addons/cooperator_website/i18n/ca.po,sha256=
|
|
5
|
+
odoo/addons/cooperator_website/controllers/main.py,sha256=MWtR5td1b8y-RR1t5Ro8HjI2Kqf9ZkZmHPV1mY1TRM8,18834
|
|
6
|
+
odoo/addons/cooperator_website/i18n/ca.po,sha256=rPnvUiQ6S1VLcMD2mpPnqISCxKrXx0pCmsI3U7j_KDA,9064
|
|
7
7
|
odoo/addons/cooperator_website/i18n/ca_ES.po,sha256=zGMacXByIVo3Ppr-VLn5BgOqldQ8VXmyAjDBal8oU-w,8802
|
|
8
|
-
odoo/addons/cooperator_website/i18n/cooperator_website.pot,sha256=
|
|
8
|
+
odoo/addons/cooperator_website/i18n/cooperator_website.pot,sha256=rs022BsW8G04KLGyExybVIfqhILtuumjYFfOFseEi0Q,8911
|
|
9
9
|
odoo/addons/cooperator_website/i18n/de.po,sha256=LNbAO4G4Umeqo8nm4_oG4XV4gA7xCovIx2pQRja37Qk,8799
|
|
10
10
|
odoo/addons/cooperator_website/i18n/es.po,sha256=knnHJvlFy_MY5Xif9KcM1jr4EBLw_woaxa-YqtFS8yU,10245
|
|
11
11
|
odoo/addons/cooperator_website/i18n/fr.po,sha256=Gh8h89d--JpwqGEHVHNzKBEKu3oLM-om3pdTlRDRiQY,9940
|
|
12
12
|
odoo/addons/cooperator_website/i18n/it.po,sha256=L_jBfCT_cbS4XAKiSk27zq8JiOAscE-4j8gazehFBzM,10118
|
|
13
13
|
odoo/addons/cooperator_website/readme/CONTRIBUTORS.rst,sha256=jZSoYmiU3IPeLac0s1aHy-axvutpCVeY76cpndsLQok,18
|
|
14
14
|
odoo/addons/cooperator_website/readme/DESCRIPTION.rst,sha256=wCnmBpV1y0Wo_AMvmo8EiG4VJ9gEtwjhbjK2xpQQOL8,91
|
|
15
|
-
odoo/addons/cooperator_website/readme/HISTORY.rst,sha256=
|
|
15
|
+
odoo/addons/cooperator_website/readme/HISTORY.rst,sha256=ZLNQmNncUDppxTdVGh4_llYFHjlMeTnfoTgAy2Wd3Gs,1834
|
|
16
16
|
odoo/addons/cooperator_website/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
|
17
|
-
odoo/addons/cooperator_website/static/description/index.html,sha256=
|
|
18
|
-
odoo/addons/cooperator_website/static/src/js/cooperator.js,sha256=
|
|
19
|
-
odoo/addons/cooperator_website/views/subscription_template.xml,sha256=
|
|
20
|
-
odoo_addon_cooperator_website-16.0.1.0.
|
|
21
|
-
odoo_addon_cooperator_website-16.0.1.0.
|
|
22
|
-
odoo_addon_cooperator_website-16.0.1.0.
|
|
23
|
-
odoo_addon_cooperator_website-16.0.1.0.
|
|
17
|
+
odoo/addons/cooperator_website/static/description/index.html,sha256=wykmYRlBmMGrPUkKYj06zedqFEVhWe0oTn3XLzLDRIk,15612
|
|
18
|
+
odoo/addons/cooperator_website/static/src/js/cooperator.js,sha256=AoiHxAaEpryBv0Rd034qDgfdugN3_tCnKco1NRGl0-o,2184
|
|
19
|
+
odoo/addons/cooperator_website/views/subscription_template.xml,sha256=Eu7zOAWwe49Qq5DK_HH6uXqTXErHwCgn6Pa0fGWricM,28413
|
|
20
|
+
odoo_addon_cooperator_website-16.0.1.0.1.dist-info/METADATA,sha256=PpIVOuSkZ6tT5lBmg840bimNFV0hH4UiDm3geRBxYGQ,5503
|
|
21
|
+
odoo_addon_cooperator_website-16.0.1.0.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
22
|
+
odoo_addon_cooperator_website-16.0.1.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
23
|
+
odoo_addon_cooperator_website-16.0.1.0.1.dist-info/RECORD,,
|
|
File without changes
|