Skip to content

Commit 9afcfbd

Browse files
jmaPascalRepond
andcommitted
primeng: acquistion
* Fixes poetry shell plugins. * Removes is_canceled, send_now, exange_rate, receipt_date useless acquistions fields. * Moves order_date from order lines to orders. * Removes order type as it is useless. * Uses primeng css class in the JSONSchemas. * Adds the number of children in the acquisition acounts serializer. * Adjusts acquistion permissions. * Removes toggle-switch type in JSONSchemas. * Fixes the multi-select type in JSONSchemas. * Fixes invalid user name regular expression. * Uniformizes placeholders. Co-Authored-by: Johnny Mariéthoz <[email protected]> Co-Authored-by: Pascal Repond <[email protected]>
1 parent b116a0c commit 9afcfbd

File tree

118 files changed

+820
-2362
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+820
-2362
lines changed

Dockerfile.base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ FROM python:3.9-slim-bullseye
2020
# require debian packages
2121
RUN apt-get update -y && apt-get upgrade -y
2222
RUN apt-get install --no-install-recommends -y git vim-tiny curl gcc gnupg libc6-dev procps imagemagick && rm -rf /var/lib/apt/lists/*
23-
RUN pip install --upgrade setuptools wheel pip poetry
23+
RUN pip install --upgrade setuptools wheel pip poetry && poetry self add poetry-plugin-shell
2424

2525
# # uwsgi uwsgitop uwsgi-tools
2626

INSTALL.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ among other things.
5858
$ pyenv install 3.9.7
5959
$ cd rero-ils
6060
$ pyenv local 3.9.7
61-
$ sudo pip install poetry
61+
$ curl -sSL https://install.python-poetry.org | python3 -
62+
$ optional: poetry self add poetry-plugin-shell
63+
64+
See: https://python-poetry.org/docs#installation for more detail.
6265

6366
Next, ``cd`` into the project directory and bootstrap the instance (this will install
6467
all Python dependencies and build all static assets):

data/acq_invoices.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

data/acq_order_lines.json

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"priority": 0,
55
"quantity": 3,
66
"amount": 25,
7-
"exchange_rate": 1,
87
"notes": [
98
{
109
"type": "staff_note",
@@ -23,15 +22,13 @@
2322
"library": {
2423
"$ref": "https://bib.rero.ch/api/libraries/1"
2524
},
26-
"is_cancelled": false,
27-
"send_now": true
25+
"is_cancelled": false
2826
},
2927
{
3028
"pid": "2",
3129
"priority": 0,
3230
"quantity": 15,
3331
"amount": 5,
34-
"exchange_rate": 1,
3532
"notes": [
3633
{
3734
"type": "staff_note",
@@ -50,15 +47,13 @@
5047
"library": {
5148
"$ref": "https://bib.rero.ch/api/libraries/1"
5249
},
53-
"is_cancelled": false,
54-
"send_now": true
50+
"is_cancelled": false
5551
},
5652
{
5753
"pid": "3",
5854
"priority": 0,
5955
"quantity": 2,
6056
"amount": 100,
61-
"exchange_rate": 1,
6257
"notes": [
6358
{
6459
"type": "staff_note",
@@ -77,15 +72,13 @@
7772
"library": {
7873
"$ref": "https://bib.rero.ch/api/libraries/1"
7974
},
80-
"is_cancelled": false,
81-
"send_now": true
75+
"is_cancelled": false
8276
},
8377
{
8478
"pid": "4",
8579
"priority": 0,
8680
"quantity": 5,
8781
"amount": 10,
88-
"exchange_rate": 1,
8982
"acq_account": {
9083
"$ref": "https://bib.rero.ch/api/acq_accounts/7"
9184
},
@@ -98,15 +91,13 @@
9891
"library": {
9992
"$ref": "https://bib.rero.ch/api/libraries/2"
10093
},
101-
"is_cancelled": false,
102-
"send_now": true
94+
"is_cancelled": false
10395
},
10496
{
10597
"pid": "5",
10698
"priority": 5,
10799
"quantity": 1,
108100
"amount": 100,
109-
"exchange_rate": 1,
110101
"notes": [
111102
{
112103
"type": "staff_note",
@@ -125,15 +116,13 @@
125116
"library": {
126117
"$ref": "https://bib.rero.ch/api/libraries/2"
127118
},
128-
"is_cancelled": false,
129-
"send_now": true
119+
"is_cancelled": false
130120
},
131121
{
132122
"pid": "6",
133123
"priority": 1,
134124
"quantity": 5,
135125
"amount": 7,
136-
"exchange_rate": 1,
137126
"acq_account": {
138127
"$ref": "https://bib.rero.ch/api/acq_accounts/14"
139128
},
@@ -146,15 +135,13 @@
146135
"library": {
147136
"$ref": "https://bib.rero.ch/api/libraries/3"
148137
},
149-
"is_cancelled": false,
150-
"send_now": true
138+
"is_cancelled": false
151139
},
152140
{
153141
"pid": "7",
154142
"priority": 1,
155143
"quantity": 15,
156144
"amount": 12,
157-
"exchange_rate": 1,
158145
"acq_account": {
159146
"$ref": "https://bib.rero.ch/api/acq_accounts/20"
160147
},
@@ -167,15 +154,13 @@
167154
"library": {
168155
"$ref": "https://bib.rero.ch/api/libraries/4"
169156
},
170-
"is_cancelled": false,
171-
"send_now": true
157+
"is_cancelled": false
172158
},
173159
{
174160
"pid": "8",
175161
"priority": 1,
176162
"quantity": 10,
177163
"amount": 20,
178-
"exchange_rate": 1,
179164
"acq_account": {
180165
"$ref": "https://bib.rero.ch/api/acq_accounts/4"
181166
},
@@ -188,15 +173,13 @@
188173
"library": {
189174
"$ref": "https://bib.rero.ch/api/libraries/1"
190175
},
191-
"is_cancelled": false,
192-
"send_now": true
176+
"is_cancelled": false
193177
},
194178
{
195179
"pid": "9",
196180
"priority": 0,
197181
"quantity": 3,
198182
"amount": 22,
199-
"exchange_rate": 1,
200183
"acq_account": {
201184
"$ref": "https://bib.rero.ch/api/acq_accounts/2"
202185
},
@@ -216,7 +199,6 @@
216199
"priority": 0,
217200
"quantity": 3,
218201
"amount": 25,
219-
"exchange_rate": 1,
220202
"notes": [
221203
{
222204
"type": "staff_note",
@@ -235,7 +217,6 @@
235217
"library": {
236218
"$ref": "https://bib.rero.ch/api/libraries/1"
237219
},
238-
"is_cancelled": false,
239-
"order_date": "2021-07-20"
220+
"is_cancelled": false
240221
}
241222
]

data/acq_orders.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{
33
"pid": "1",
44
"reference": "AOSTE-CANT1-POL-1",
5-
"type": "monograph",
65
"currency": "EUR",
76
"notes": [
87
{
@@ -18,12 +17,12 @@
1817
},
1918
"organisation": {
2019
"$ref": "https://bib.rero.ch/api/organisations/1"
21-
}
20+
},
21+
"send_now": true
2222
},
2323
{
2424
"pid": "2",
2525
"reference": "AOSTE-CANT1-POL-2",
26-
"type": "monograph",
2726
"currency": "EUR",
2827
"notes": [
2928
{
@@ -39,12 +38,12 @@
3938
},
4039
"organisation": {
4140
"$ref": "https://bib.rero.ch/api/organisations/1"
42-
}
41+
},
42+
"send_now": true
4343
},
4444
{
4545
"pid": "3",
4646
"reference": "AOSTE-CANT2-POL-1",
47-
"type": "monograph",
4847
"currency": "EUR",
4948
"notes": [
5049
{
@@ -65,7 +64,6 @@
6564
{
6665
"pid": "4",
6766
"reference": "AOSTE-AVISE-POL-1",
68-
"type": "monograph",
6967
"currency": "EUR",
7068
"notes": [
7169
{
@@ -86,7 +84,6 @@
8684
{
8785
"pid": "5",
8886
"reference": "AOSTE-LYCEE-POL-1",
89-
"type": "monograph",
9087
"currency": "EUR",
9188
"notes": [
9289
{
@@ -107,7 +104,6 @@
107104
{
108105
"pid": "6",
109106
"reference": "AOSTE-CANT1-POL-6",
110-
"type": "monograph",
111107
"currency": "EUR",
112108
"library": {
113109
"$ref": "https://bib.rero.ch/api/libraries/1"
@@ -122,7 +118,6 @@
122118
{
123119
"pid": "7",
124120
"reference": "AOSTE-CANT1-POL-2021-1",
125-
"type": "monograph",
126121
"currency": "EUR",
127122
"notes": [
128123
{
@@ -138,6 +133,7 @@
138133
},
139134
"organisation": {
140135
"$ref": "https://bib.rero.ch/api/organisations/1"
141-
}
136+
},
137+
"send_now": true
142138
}
143139
]

data/acq_receipts.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"$ref": "https://bib.rero.ch/api/acq_orders/1"
66
},
77
"reference": "AOSTE-CANT1-POL-1",
8-
"exchange_rate": 1,
98
"notes": [
109
{
1110
"type": "staff_note",
@@ -25,7 +24,6 @@
2524
"$ref": "https://bib.rero.ch/api/acq_orders/7"
2625
},
2726
"reference": "AOSTE-CANT1-POL-2021-1",
28-
"exchange_rate": 1,
2927
"notes": [
3028
{
3129
"type": "staff_note",

data/role_policies.json

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,6 @@
3636
"pro_acquisition_manager",
3737
"pro_library_administrator"
3838
],
39-
"acin-access": [
40-
"pro_full_permissions",
41-
"pro_acquisition_manager",
42-
"pro_library_administrator"
43-
],
44-
"acin-search": [
45-
"pro_full_permissions",
46-
"pro_read_only",
47-
"pro_acquisition_manager",
48-
"pro_library_administrator"
49-
],
50-
"acin-read": [
51-
"pro_full_permissions",
52-
"pro_read_only",
53-
"pro_acquisition_manager",
54-
"pro_library_administrator"
55-
],
56-
"acin-create": [
57-
"pro_full_permissions",
58-
"pro_acquisition_manager",
59-
"pro_library_administrator"
60-
],
61-
"acin-update": [
62-
"pro_full_permissions",
63-
"pro_acquisition_manager",
64-
"pro_library_administrator"
65-
],
66-
"acin-delete": [
67-
"pro_full_permissions",
68-
"pro_acquisition_manager",
69-
"pro_library_administrator"
70-
],
7139
"acol-access": [
7240
"pro_full_permissions",
7341
"pro_acquisition_manager",

pyproject.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ rero_ils = "rero_ils:alembic"
252252

253253
[project.entry-points."invenio_db.models"]
254254
acq_accounts = "rero_ils.modules.acquisition.acq_accounts.models"
255-
acq_invoices = "rero_ils.modules.acquisition.acq_invoices.models"
256255
acq_order_lines = "rero_ils.modules.acquisition.acq_order_lines.models"
257256
acq_orders = "rero_ils.modules.acquisition.acq_orders.models"
258257
acq_receipt_lines = "rero_ils.modules.acquisition.acq_receipt_lines.models"
@@ -289,7 +288,6 @@ messages_wiki = "flask_wiki"
289288

290289
[project.entry-points."invenio_jsonschemas.schemas"]
291290
acq_accounts = "rero_ils.modules.acquisition.acq_accounts.jsonschemas"
292-
acq_invoices = "rero_ils.modules.acquisition.acq_invoices.jsonschemas"
293291
acq_order_lines = "rero_ils.modules.acquisition.acq_order_lines.jsonschemas"
294292
acq_orders = "rero_ils.modules.acquisition.acq_orders.jsonschemas"
295293
acq_receipt_lines = "rero_ils.modules.acquisition.acq_receipt_lines.jsonschemas"
@@ -334,7 +332,6 @@ patron_types = "rero_ils.oauth.scopes:patron_types"
334332

335333
[project.entry-points."invenio_pidstore.fetchers"]
336334
acq_account_id = "rero_ils.modules.acquisition.acq_accounts.api:acq_account_id_fetcher"
337-
acq_invoice_id = "rero_ils.modules.acquisition.acq_invoices.api:acq_invoice_id_fetcher"
338335
acq_order_id = "rero_ils.modules.acquisition.acq_orders.api:acq_order_id_fetcher"
339336
acq_order_line_id = "rero_ils.modules.acquisition.acq_order_lines.api:acq_order_line_id_fetcher"
340337
acq_receipt_id = "rero_ils.modules.acquisition.acq_receipts.api:acq_receipt_id_fetcher"
@@ -367,7 +364,6 @@ vendor_id = "rero_ils.modules.vendors.api:vendor_id_fetcher"
367364

368365
[project.entry-points."invenio_pidstore.minters"]
369366
acq_account_id = "rero_ils.modules.acquisition.acq_accounts.api:acq_account_id_minter"
370-
acq_invoice_id = "rero_ils.modules.acquisition.acq_invoices.api:acq_invoice_id_minter"
371367
acq_order_id = "rero_ils.modules.acquisition.acq_orders.api:acq_order_id_minter"
372368
acq_order_line_id = "rero_ils.modules.acquisition.acq_order_lines.api:acq_order_line_id_minter"
373369
acq_receipt_id = "rero_ils.modules.acquisition.acq_receipts.api:acq_receipt_id_minter"
@@ -399,7 +395,6 @@ vendor_id = "rero_ils.modules.vendors.api:vendor_id_minter"
399395

400396
[project.entry-points."invenio_records.jsonresolver"]
401397
acq_accounts = "rero_ils.modules.acquisition.acq_accounts.jsonresolver"
402-
acq_invoices = "rero_ils.modules.acquisition.acq_invoices.jsonresolver"
403398
acq_order_lines = "rero_ils.modules.acquisition.acq_order_lines.jsonresolver"
404399
acq_orders = "rero_ils.modules.acquisition.acq_orders.jsonresolver"
405400
acq_receipt_lines = "rero_ils.modules.acquisition.acq_receipt_lines.jsonresolver"
@@ -428,7 +423,6 @@ vendors = "rero_ils.modules.vendors.jsonresolver"
428423

429424
[project.entry-points."invenio_search.mappings"]
430425
acq_accounts = "rero_ils.modules.acquisition.acq_accounts.mappings"
431-
acq_invoices = "rero_ils.modules.acquisition.acq_invoices.mappings"
432426
acq_order_lines = "rero_ils.modules.acquisition.acq_order_lines.mappings"
433427
acq_orders = "rero_ils.modules.acquisition.acq_orders.mappings"
434428
acq_receipt_lines = "rero_ils.modules.acquisition.acq_receipt_lines.mappings"

0 commit comments

Comments
 (0)