Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for company/customer address #213

Open
lfg-seth opened this issue Nov 29, 2023 · 2 comments
Open

Add support for company/customer address #213

lfg-seth opened this issue Nov 29, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@lfg-seth
Copy link

It seems like there is no way to create or modify company/customer address.

I would like to help develop this if someone could point me in the right direction.

@miggland
Copy link
Contributor

I assume you've seen the documentation, available for example at:
https://demo.inventree.org/api-doc/

New classes can be added simply, see the example for Contacts:

class Contact(inventree.base.InventreeObject):

These use the methods defined in inventree.base.InventreeObject.

Get the URL from the docs, the relevant API_VERSION can be found in https://github.com/inventree/InvenTree/blob/master/InvenTree/InvenTree/api_version.py, or via the corresponding PR which enabled addresses.

The class Company has several methods which help in usage, eg. getting Contacts for the Company (getCompany).

Spontaneously, a new class along the lines of Contact for addresses, and a method in Company to return them, is probably what you're after.

General notes

There is no contribution docs here, but there are pre-commit checks defined. Installing these before you commit locally will make it easier to pass the tests later on.
There are also invoke commands to use locally, see tasks.py.

@miggland
Copy link
Contributor

Also, you'll need to add some tests for your new methods. You should be able to find inspiration in the tets for Company and Contact

@SchrodingersGat SchrodingersGat added enhancement New feature or request help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants