Skip to content

Conversation

@Callum027
Copy link
Collaborator

@Callum027 Callum027 commented Jun 10, 2024

Create a new OpenStack-centric Odoo client Python library to use in our billing-related OpenStack projects.

The library contains comprehensive Markdown-based documentation, which can be served using MkDocs. To do this:

  1. Make sure PDM is installed.
  2. Run pdm install to create a virtual environment.
  3. Run pdm run mkdocs serve to start a local webserver. The documentation will be available at http://localhost:8000.

@Callum027 Callum027 self-assigned this Jun 10, 2024
Callum Dickinson added 28 commits June 10, 2024 19:02
Turns out `get_type_tree` is not actually needed for this application of type hint reflection
@Callum027
Copy link
Collaborator Author

Overall this is awesome, I am impressed with the work and looking forward to using it with Auxilium.

Thank you! I'm excited about this because we can use this in pretty much everything. No more separate ways of implementing the same thing.

automatic value conversions for currency from float to Decimal, depending on if users of the library are going to perform calculations on amounts or rates

I don't think this is particularly useful unfortunately. Both Odoo and OdooRPC deal with floats, not Decimals, and I think doing the conversions would only serve to potentially introduce inaccuracies when the field values are serialised.

The other is that Odoo returns a null value as a False and it might be nice to translated that to a None.

I considered this, and I think I'd like to implement a way to do this at some point, but for now having Union[T, Literal[False]] is actually fairly similar in terms of usage, because False is obviously, well, falsey.

For example, if not record.value works exactly how you'd expect, no difference to if the default value was None instead.

@Callum027 Callum027 changed the title Create the OpenStack Odoo Client library for Python Create the OpenStack Odoo Client Library for Python Jun 27, 2024
@Callum027
Copy link
Collaborator Author

Development version of the docs now available at:

https://catalyst-cloud.github.io/python-openstack-odooclient/develop

Callum Dickinson added 3 commits July 1, 2024 09:53
…the invoice_date_due field to account moves, update package metadata
…), make _record_type_hints read-only, reduce duplicate get_type_hints calls, add/improve docstrings
…pe hinting for `_manager`, add typos pre-commit hook, other grammar and docs fixes
@Callum027 Callum027 merged commit 875504f into main Jul 1, 2024
@Callum027 Callum027 deleted the callum/create-library branch July 1, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants