-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Add Delivery Address field to Purchase Orders #9768
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
If this method is not considered best practice, please let me know. |
@Reza98Sh there is a conflict in the migrations; please delete the ones you added and regenerate them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good for a first PR
null=True, | ||
verbose_name=_('Delivery Address'), | ||
help_text=_('Delivery address for this order'), | ||
related_name='+', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not practical for future use; please use a related name that makes sense when using the Adress model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed it
An implementation question: where / how do the users define an address for "themself" which can be used here? One approach might be to create a "company" object which is the "internal" company, which can then have one or more addresses associated with it? Any other ideas? |
f87e685
to
a36d430
Compare
Sorry I haven't any serious experience with InvenTree but I think It's good if there is option to create address without define company |
@matmair thoughts on this? Does a set of "internal addresses" for "me" (which are not linked to a company object) make the most sense? |
There is no real inherent connection between Addresses and Companies but the way the current data model works there are a few functions that would need rethinking. Mainly:
Having (1 or more) internal companies as references would be nice for a few of the open EPICs. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9768 +/- ##
=======================================
Coverage 86.34% 86.34%
=======================================
Files 1234 1235 +1
Lines 54239 54245 +6
Branches 2236 2236
=======================================
+ Hits 46830 46839 +9
+ Misses 6841 6838 -3
Partials 568 568
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request implements the feature requested in #9303 by adding a dedicated
delivery_address
field to Purchase Orders.Changes Implemented
Backend:
0110_purchaseorder_delivery_address.py
) to apply the schema change.delivery_address
ForeignKey
field to thePurchaseOrder
model, linking tocompany.Address
.delivery_address
field in thePurchaseOrderSerializer
to make it available via the API.delivery_address
in theautocomplete_fields
inPurchaseOrderAdmin
for a better user experience in the admin panel.Frontend:
delivery_address
field to theusePurchaseOrderFields
hook, making it visible and editable in the Purchase Order forms.Closes #9303