Skip to content

Commit f80b2b2

Browse files
committed
[MIG] subscription: Migration to 18.0
1 parent 0cb7277 commit f80b2b2

27 files changed

+418
-1360
lines changed

subscription_oca/README.rst

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Subscription management
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
20-
:target: https://github.com/OCA/contract/tree/17.0/subscription_oca
20+
:target: https://github.com/OCA/contract/tree/18.0/subscription_oca
2121
:alt: OCA/contract
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca
23+
:target: https://translation.odoo-community.org/projects/contract-18-0/contract-18-0-subscription_oca
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -70,17 +70,17 @@ To create subscriptions with the sale of a product:
7070
Known issues / Roadmap
7171
======================
7272

73-
- Refactor all the onchanges that have business logic to computed
74-
write-able fields when possible. Keep onchanges only for UI purposes.
75-
- Add tests.
73+
- Refactor all the onchanges that have business logic to computed
74+
write-able fields when possible. Keep onchanges only for UI purposes.
75+
- Add tests.
7676

7777
Bug Tracker
7878
===========
7979

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

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

@@ -91,21 +91,24 @@ Authors
9191
-------
9292

9393
* Domatix
94+
* Onestein
9495

9596
Contributors
9697
------------
9798

98-
- Carlos Martínez <[email protected]>
99-
- Carolina Ferrer <[email protected]>
100-
- `Ooops404 <https://www.ooops404.com>`__:
99+
- Carlos Martínez <[email protected]>
100+
- Carolina Ferrer <[email protected]>
101+
- `Ooops404 <https://www.ooops404.com>`__:
101102

102-
103+
103104

104-
- `Sygel <https://www.sygel.es>`__:
105+
- `Sygel <https://www.sygel.es>`__:
105106

106-
- Harald Panten
107-
- Valentin Vinagre
108-
- Alberto Martínez
107+
- Harald Panten
108+
- Valentin Vinagre
109+
- Alberto Martínez
110+
111+
- Dennis Sluijk <[email protected]>
109112

110113
Maintainers
111114
-----------
@@ -120,6 +123,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
120123
mission is to support the collaborative development of Odoo features and
121124
promote its widespread use.
122125

123-
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/17.0/subscription_oca>`_ project on GitHub.
126+
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/18.0/subscription_oca>`_ project on GitHub.
124127

125128
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

subscription_oca/__manifest__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
{
44
"name": "Subscription management",
55
"summary": "Generate recurring invoices.",
6-
"version": "17.0.1.0.0",
6+
"version": "18.0.1.0.0",
77
"development_status": "Beta",
88
"category": "Subscription Management",
99
"website": "https://github.com/OCA/contract",
1010
"license": "AGPL-3",
11-
"author": "Domatix, Odoo Community Association (OCA)",
11+
"author": "Domatix, Onestein, Odoo Community Association (OCA)",
1212
"depends": ["sale_management", "account"],
1313
"data": [
1414
"views/product_template_views.xml",
15+
"views/account_move_views.xml",
1516
"views/sale_subscription_views.xml",
1617
"views/sale_subscription_stage_views.xml",
1718
"views/sale_subscription_tag_views.xml",

subscription_oca/data/ir_cron.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<?xml version="1.0" encoding="utf-8" ?>
2-
<odoo>
2+
<odoo noupdate="1">
33
<record id="ir_cron_subscription_management" model="ir.cron">
44
<field name="name">Subscriptions management</field>
55
<field eval="True" name="active" />
66
<field name="user_id" ref="base.user_root" />
77
<field name="interval_number">24</field>
88
<field name="interval_type">hours</field>
9-
<field name="numbercall">-1</field>
10-
<field eval="False" name="doall" />
119
<field ref="model_sale_subscription" name="model_id" />
1210
<field name="state">code</field>
1311
<field name="code">model.cron_subscription_management()</field>
Lines changed: 59 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,71 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3+
<data noupdate="1">
4+
<record id="seq_id" model="ir.sequence">
5+
<field name="name">sale_subscription_sequencer</field>
6+
<field name="code">sale.subscription</field>
7+
<field name="prefix">SUB</field>
8+
<field name="padding">5</field>
9+
</record>
310

4-
<data>
5-
<record id="seq_id" model="ir.sequence">
6-
<field name="name">sale_subscription_sequencer</field>
7-
<field name="code">sale.subscription</field>
8-
<field name="prefix">SUB</field>
9-
<field name="padding">5</field>
10-
</record>
11-
</data>
12-
13-
<data noupdate="1">
14-
<record id="subscription_stage_draft" model="sale.subscription.stage">
15-
<!-- <field eval="True" name="active"/> -->
16-
<field name="name">Ready to start</field>
17-
<field name="sequence">0</field>
18-
<field name="type">pre</field>
19-
<field name="description">
20-
Draft equivalent, a subscription is ready to start when is not marked as in progress but it can be at any moment. If there's no 'Closed'-type stage defined, when a subscription comes to an end by automatic means, it will be marked with this stage.
21-
</field>
22-
<field eval="False" name="fold" />
23-
</record>
24-
25-
<record id="subscription_stage_in_progress" model="sale.subscription.stage">
26-
<!-- <field eval="True" name="active"/> -->
27-
<field name="name">In progress</field>
28-
<field name="sequence">1</field>
29-
<field name="type">in_progress</field>
30-
<field eval="False" name="fold" />
31-
<field name="description">
32-
As an 'In progress'-type of stage, it will trigger the recurring invoicing process if applicable. If this stage is the first - sequence order - of the available 'In progress' types and there's a stage change from any other non-'In progress' types to this one, an invoice will be created automatically if the start date is the present day.
33-
</field>
34-
</record>
35-
36-
<record id="subscription_stage_closed" model="sale.subscription.stage">
37-
<!-- <field eval="True" name="active"/> -->
38-
<field name="name">Closed</field>
39-
<field name="sequence">2</field>
40-
<field name="type">post</field>
41-
<field eval="False" name="fold" />
42-
<field name="description">
43-
The final stage of a subscription. There are two ways to mark a subscription as closed. The easiest one is using the kanban card-moving capabilities, pressing the 'Close subscription' button (only available if a subscription is in progress).
44-
</field>
45-
</record>
11+
<record id="subscription_stage_draft" model="sale.subscription.stage">
12+
<field name="name">Draft</field>
13+
<field name="sequence">0</field>
14+
<field name="type">draft</field>
15+
<field name="description">
16+
Draft, still working on the specifics.
17+
</field>
18+
<field eval="False" name="fold" />
19+
</record>
4620

21+
<record id="subscription_stage_ready" model="sale.subscription.stage">
22+
<field name="name">Ready to start</field>
23+
<field name="sequence">1</field>
24+
<field name="type">pre</field>
25+
<field name="description">
26+
A subscription is ready to start when is not marked as in progress but it can be at any moment. If there's no 'Closed'-type stage defined, when a subscription comes to an end by automatic means, it will be marked with this stage.
27+
</field>
28+
<field eval="False" name="fold" />
29+
</record>
4730

48-
</data>
31+
<record id="subscription_stage_in_progress" model="sale.subscription.stage">
32+
<field name="name">In progress</field>
33+
<field name="sequence">2</field>
34+
<field name="type">in_progress</field>
35+
<field eval="False" name="fold" />
36+
<field name="description">
37+
As an 'In progress'-type of stage, it will trigger the recurring invoicing process if applicable. If this stage is the first - sequence order - of the available 'In progress' types and there's a stage change from any other non-'In progress' types to this one, an invoice will be created automatically if the start date is the present day.
38+
</field>
39+
</record>
4940

50-
<record id="close_reason_expensive" model="sale.subscription.close.reason">
51-
<!-- <field eval="True" name="active"/> -->
52-
<field name="name">The subscription is too expensive</field>
53-
</record>
41+
<record id="subscription_stage_closed" model="sale.subscription.stage">
42+
<field name="name">Closed</field>
43+
<field name="sequence">3</field>
44+
<field name="type">post</field>
45+
<field eval="False" name="fold" />
46+
<field name="description">
47+
The final stage of a subscription. There are two ways to mark a subscription as closed. The easiest one is using the kanban card-moving capabilities, pressing the 'Close subscription' button (only available if a subscription is in progress).
48+
</field>
49+
</record>
50+
</data>
5451

55-
<record id="close_reason_requirement" model="sale.subscription.close.reason">
56-
<!-- <field eval="True" name="active"/> -->
57-
<field name="name">Subscription does not meet my requirements</field>
58-
</record>
59-
60-
<record id="close_reason_ended" model="sale.subscription.close.reason">
61-
<!-- <field eval="True" name="active"/> -->
62-
<field name="name">The subscription ended</field>
63-
</record>
52+
<record id="close_reason_expensive" model="sale.subscription.close.reason">
53+
<field name="name">The subscription is too expensive</field>
54+
</record>
6455

65-
<record id="close_reason_use" model="sale.subscription.close.reason">
66-
<!-- <field eval="True" name="active"/> -->
67-
<field name="name">I don't really use it</field>
68-
</record>
56+
<record id="close_reason_requirement" model="sale.subscription.close.reason">
57+
<field name="name">Subscription does not meet my requirements</field>
58+
</record>
6959

70-
<record id="close_reason_other" model="sale.subscription.close.reason">
71-
<!-- <field eval="True" name="active"/> -->
72-
<field name="name">Other</field>
73-
</record>
60+
<record id="close_reason_ended" model="sale.subscription.close.reason">
61+
<field name="name">The subscription ended</field>
62+
</record>
7463

64+
<record id="close_reason_use" model="sale.subscription.close.reason">
65+
<field name="name">I don't really use it</field>
66+
</record>
7567

68+
<record id="close_reason_other" model="sale.subscription.close.reason">
69+
<field name="name">Other</field>
70+
</record>
7671
</odoo>

0 commit comments

Comments
 (0)