From 7f8f2ff466c79f3d52cb3d50bd4bfe4470c9a812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= Date: Mon, 11 Dec 2023 22:50:11 +0000 Subject: [PATCH 1/3] chore: small simplification --- .gitignore | 2 ++ .vscode/settings.json | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index a24030ea..aa3cb3c5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ easypay.shelve* .DS_Store +/.vscode/settings.json + /dist /build /src/budy.egg-info diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 1dbe3422..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "files.exclude": { - "**/._*": true, - "**/*.pyc": true, - "**/__pycache__": true - }, - "python.analysis.typeCheckingMode": "off" -} From d7e883a239b2880077d6611d35bf43bd479c105e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= Date: Wed, 13 Dec 2023 10:54:41 +0000 Subject: [PATCH 2/3] chore: `fix_lines_s()` method Support for `fix_lines_s()` method has been added. This method is used to fix the lines of a `Bundle` entity. --- CHANGELOG.md | 2 +- src/budy/models/bundle.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d1e4d5b..c832eb75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -* +* Support for `fix_lines_s()` in `Bundle` ### Changed diff --git a/src/budy/models/bundle.py b/src/budy/models/bundle.py index 2ae8b638..8e0b8314 100644 --- a/src/budy/models/bundle.py +++ b/src/budy/models/bundle.py @@ -544,6 +544,17 @@ def empty_s(self): self.lines = [] self.save() + @appier.operation(name = "Fix Lines") + def fix_lines_s(self): + lines = self.lines + lines_f = [] + for line in lines: + if not line.is_resolvable(): continue + line.resolve() + lines_f.append(line) + self.lines = lines_f + self.save() + @appier.operation(name = "Fix Sub Total") def fix_sub_total_s(self): if self.sub_total: return From de3c17f97fac67993665e813c2be3983aa1bd816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= Date: Wed, 13 Dec 2023 11:02:06 +0000 Subject: [PATCH 3/3] version: 0.8.6 --- CHANGELOG.md | 8 +++++++- setup.py | 2 +- src/budy/main.py | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c832eb75..8ec11438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -* Support for `fix_lines_s()` in `Bundle` +* ### Changed @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * +## [0.8.6] - 2023-12-13 + +### Added + +* Support for `fix_lines_s()` in `Bundle` + ## [0.8.5] - 2023-06-29 ### Fixed diff --git a/setup.py b/setup.py index ae8dbc3a..1b605b97 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ setuptools.setup( name = "budy", - version = "0.8.5", + version = "0.8.6", author = "Hive Solutions Lda.", author_email = "development@hive.pt", description = "Budy E-commerce System", diff --git a/src/budy/main.py b/src/budy/main.py index 0c7db9f7..d56a0a15 100644 --- a/src/budy/main.py +++ b/src/budy/main.py @@ -90,7 +90,7 @@ def get_seeplus_api(self): return self.seeplus_api def _version(self): - return "0.8.5" + return "0.8.6" def _description(self): return "Budy"