Skip to content

Commit e67ea33

Browse files
author
Callum Dickinson
committed
Add Odoo 18 support, remove Odoo 13 support
* Add support for Odoo 18 (and hopefully 15, 16 and 17 with it). * Remove support for Odoo 13.
1 parent e80c7d5 commit e67ea33

17 files changed

Lines changed: 1139 additions & 644 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ jobs:
1414
contents: write
1515
steps:
1616
- name: Clone full tree, and checkout branch
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v7
1818
with:
1919
fetch-depth: 0
2020
- name: Configure git user
2121
run: |
2222
git config --global user.name "${GITHUB_ACTOR}"
2323
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
2424
- name: Setup Python
25-
uses: actions/setup-python@v6
25+
uses: actions/setup-python@v7
2626
with:
2727
python-version: "3.14"
2828
cache: "pip"
2929
- name: Setup uv
30-
uses: astral-sh/setup-uv@v7
30+
uses: astral-sh/setup-uv@v10.0.1
3131
with:
32-
version: "0.9.17"
32+
version: "0.12.7"
3333
- name: Create virtual environment
3434
run: uv sync --only-dev
3535
- name: Publish the docs to GitHub Pages

‎.github/workflows/tag.yml‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ jobs:
1212
runs-on: ubuntu-24.04
1313
steps:
1414
- name: Clone full tree, and checkout tag
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v7
1616
with:
1717
fetch-depth: 0
1818
- name: Setup Python
19-
uses: actions/setup-python@v6
19+
uses: actions/setup-python@v7
2020
with:
2121
python-version: "3.14"
2222
cache: "pip"
2323
- name: Setup uv
24-
uses: astral-sh/setup-uv@v7
24+
uses: astral-sh/setup-uv@v10.0.1
2525
with:
26-
version: "0.9.17"
26+
version: "0.12.7"
2727
- name: Build source dist and wheels
2828
run: uv build
2929
- name: Upload source dist and wheels to artifacts
30-
uses: actions/upload-artifact@v4
30+
uses: actions/upload-artifact@v7
3131
with:
3232
name: dist
3333
path: dist/
@@ -42,23 +42,23 @@ jobs:
4242
id-token: write
4343
steps:
4444
- name: Clone full tree, and checkout tag
45-
uses: actions/checkout@v5
45+
uses: actions/checkout@v7
4646
with:
4747
fetch-depth: 0
4848
- name: Download source dist and wheels from artifacts
49-
uses: actions/download-artifact@v4
49+
uses: actions/download-artifact@v8
5050
with:
5151
name: dist
5252
path: dist/
5353
- name: Setup Python
54-
uses: actions/setup-python@v6
54+
uses: actions/setup-python@v7
5555
with:
5656
python-version: "3.14"
5757
cache: "pip"
5858
- name: Setup uv
59-
uses: astral-sh/setup-uv@v7
59+
uses: astral-sh/setup-uv@v10.0.1
6060
with:
61-
version: "0.9.17"
61+
version: "0.12.7"
6262
- name: Publish source dist and wheels to PyPI
6363
run: uv publish
6464

@@ -69,9 +69,9 @@ jobs:
6969
contents: write
7070
steps:
7171
- name: Clone and checkout tag
72-
uses: actions/checkout@v5
72+
uses: actions/checkout@v7
7373
- name: Download source dist and wheels from artifacts
74-
uses: actions/download-artifact@v4
74+
uses: actions/download-artifact@v8
7575
with:
7676
name: dist
7777
path: dist/
@@ -94,22 +94,22 @@ jobs:
9494
contents: write
9595
steps:
9696
- name: Clone full tree, and checkout branch
97-
uses: actions/checkout@v4
97+
uses: actions/checkout@v7
9898
with:
9999
fetch-depth: 0
100100
- name: Configure git user
101101
run: |
102102
git config --global user.name "${GITHUB_ACTOR}"
103103
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
104104
- name: Setup Python
105-
uses: actions/setup-python@v6
105+
uses: actions/setup-python@v7
106106
with:
107107
python-version: "3.14"
108108
cache: "pip"
109109
- name: Setup uv
110-
uses: astral-sh/setup-uv@v7
110+
uses: astral-sh/setup-uv@v10.0.1
111111
with:
112-
version: "0.9.17"
112+
version: "0.12.7"
113113
- name: Create virtual environment
114114
run: uv sync --only-dev
115115
- name: Publish the docs to GitHub Pages

‎.github/workflows/test.yml‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
- "3.14"
2222
steps:
2323
- name: Clone and checkout branch
24-
uses: actions/checkout@v5
24+
uses: actions/checkout@v7
2525
- name: Setup Python
26-
uses: actions/setup-python@v6
26+
uses: actions/setup-python@v7
2727
with:
2828
python-version: "${{ matrix.python_version }}"
2929
cache: "pip"
3030
- name: Run pre-commit hooks
31-
uses: pre-commit/action@v3.0.1
31+
uses: j178/prek-action@v3.0.0
3232

3333
test:
3434
needs: pre-commit
@@ -43,18 +43,18 @@ jobs:
4343
- "3.14"
4444
steps:
4545
- name: Clone full tree, and checkout branch
46-
uses: actions/checkout@v5
46+
uses: actions/checkout@v7
4747
with:
4848
fetch-depth: 0
4949
- name: Setup Python
50-
uses: actions/setup-python@v6
50+
uses: actions/setup-python@v7
5151
with:
5252
python-version: "${{ matrix.python_version }}"
5353
cache: "pip"
5454
- name: Setup uv
55-
uses: astral-sh/setup-uv@v7
55+
uses: astral-sh/setup-uv@v10.0.1
5656
with:
57-
version: "0.9.17"
57+
version: "0.12.7"
5858
- name: Run tests
5959
run: uv run poe test
6060

@@ -63,22 +63,22 @@ jobs:
6363
runs-on: ubuntu-24.04
6464
steps:
6565
- name: Clone full tree, and checkout branch
66-
uses: actions/checkout@v5
66+
uses: actions/checkout@v7
6767
with:
6868
fetch-depth: 0
6969
- name: Setup Python
70-
uses: actions/setup-python@v6
70+
uses: actions/setup-python@v7
7171
with:
7272
python-version: "3.14"
7373
cache: "pip"
7474
- name: Setup uv
75-
uses: astral-sh/setup-uv@v7
75+
uses: astral-sh/setup-uv@v10.0.1
7676
with:
77-
version: "0.9.17"
77+
version: "0.12.7"
7878
- name: Build source dist and wheels
7979
run: uv build
8080
- name: Upload source dist and wheels to artifacts
81-
uses: actions/upload-artifact@v4
81+
uses: actions/upload-artifact@v7
8282
with:
8383
name: dist
8484
path: dist/

‎.pre-commit-config.yaml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ repos:
1515
- id: check-added-large-files
1616
- id: check-merge-conflict
1717
- repo: https://github.com/crate-ci/typos
18-
rev: "v1.40.0"
18+
rev: "v1.48.0"
1919
hooks:
2020
- id: typos
2121
- repo: https://github.com/astral-sh/uv-pre-commit
22-
rev: "0.9.17"
22+
rev: "0.12.7"
2323
hooks:
2424
- id: uv-lock
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: "v0.14.9"
26+
rev: "v0.16.5"
2727
hooks:
2828
- id: ruff-check
2929
- id: ruff-format
3030
- repo: https://github.com/pre-commit/mirrors-mypy
31-
rev: "v1.19.0"
31+
rev: "v2.3.1"
3232
hooks:
3333
- id: mypy
3434
additional_dependencies:
3535
- OdooRPC>=0.9.0
3636
- packaging
37-
- typing-extensions>=4.15.0
37+
- typing-extensions>=4.12.2

‎docs/managers/account-move.md‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,28 @@ All specified records will be processed in a single request.
6161
send_openstack_invoice_email(
6262
account_move: int | AccountMove,
6363
email_ctx: Mapping[str, Any] | None = None,
64-
) -> None
64+
) -> bool
6565
```
6666

6767
Send an OpenStack invoice email for the given
6868
account move (invoice).
6969

70+
*Changed in version 0.3.0*: Now returns ``True`` if the email was
71+
successfully sent, and ``False`` if it was not.
72+
7073
#### Parameters
7174

7275
| Name | Type | Description | Default |
7376
|----------------|----------------------------|-------------------------------------------------|------------|
7477
| `account_move` | `int | AccountMove` | The account move (invoice) to send an email for | (required) |
7578
| `email_ctx` | `Mapping[str, Any] | None` | Optional email context | `None` |
7679

80+
#### Returns
81+
82+
| Type | Description |
83+
|--------|--------------------------------------------------------------|
84+
| `bool` | `True` if the email was successfully sent, otherwise `False` |
85+
7786
## Record
7887

7988
The account move (invoice) manager returns `AccountMove` record objects.
@@ -326,13 +335,22 @@ Change this draft account move (invoice) into "posted" state.
326335
```python
327336
send_openstack_invoice_email(
328337
email_ctx: Mapping[str, Any] | None = None,
329-
) -> None
338+
) -> bool
330339
```
331340

332341
Send an OpenStack invoice email for this account move (invoice).
333342

343+
*Changed in version 0.3.0*: Now returns ``True`` if the email was
344+
successfully sent, and ``False`` if it was not.
345+
334346
#### Parameters
335347

336348
| Name | Type | Description | Default |
337349
|-------------|----------------------------|------------------------|---------|
338350
| `email_ctx` | `Mapping[str, Any] | None` | Optional email context | `None` |
351+
352+
#### Returns
353+
354+
| Type | Description |
355+
|--------|--------------------------------------------------------------|
356+
| `bool` | `True` if the email was successfully sent, otherwise `False` |

0 commit comments

Comments
 (0)