2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-09 00:38:50 +00:00

99 Commits

Author SHA1 Message Date
Matthias Mair
10c3d101e8
Replace mklint with djlint (#4746)
* remove markuplint

* remove dedicated html step - will be done by pre-commit

* add djlint for django template linting

* Fix T003: Endblock should have name

* Fix H013: Img tag should have an alt attribute

* Fix H014: Found extra blank lines

* Fix T003: Endblock should have name

* Fix H013: Img tag should have an alt attribute

* small fixes

* Fix T001: Variables should be wrapped in a single whitespace

* Fix T003: Endblock should have name

* small fixes

* fix form method

* add entry to contributing

* fix template changes

* another fix

* use current version
2023-05-02 20:03:52 +10:00
Oliver
27aa16d55d
[Feature] Add RMA support (#4488)
* Adds ReturnOrder and ReturnOrderAttachment models

* Adds new 'role' specific for return orders

* Refactor total_price into a mixin

- Required for PurchaseOrder and SalesOrder
- May not be required for ReturnOrder (remains to be seen)

* Adds API endpoints for ReturnOrder

- Add list endpoint
- Add detail endpoint
- Adds required serializer models

* Adds basic "index" page for Return Order model

* Update API version

* Update navbar text

* Add db migration for new "role"

* Add ContactList and ContactDetail API endpoints

* Adds template and JS code for manipulation of contacts

- Display a table
- Create / edit / delete

* Splits order.js into multiple files

- Javascript files was becoming extremely large
- Hard to debug and find code
- Split into purchase_order / return_order / sales_order

* Fix role name (change 'returns' to 'return_order')

- Similar to existing roles for purchase_order and sales_order

* Adds detail page for ReturnOrder

* URL cleanup

- Use <int:pk> instead of complex regex

* More URL cleanup

* Add "return orders" list to company detail page

* Break JS status codes into new javascript file

- Always difficult to track down where these are rendered
- Enough to warrant their own file now

* Add ability to edit return order from detail page

* Database migrations

- Add new ReturnOrder modeles
- Add new 'contact' field to external orders

* Adds "contact" to ReturnOrder

- Implement check to ensure that the selected "contact" matches the selected "company"

* Adjust filters to limit contact options

* Fix typo

* Expose 'contact' field for PurchaseOrder model

* Render contact information

* Add "contact" for SalesOrder

* Adds setting to enable / disable return order functionality

- Simply hides the navigation elements
- API is not disabled

* Support filtering ReturnOrder by 'status'

- Refactors existing filter into the OrderFilter class

* js linting

* More JS linting

* Adds ReturnOrderReport model

* Add serializer for the ReturnOrderReport model

- A little bit of refactoring along the way

* Admin integration for new report model

* Refactoring for report.api

- Adds generic mixins for filtering queryset (based on updates to label.api)
- Reduces repeated code a *lot*

* Exposes API endpoints for ReturnOrderReport

* Adds default example report file for ReturnOrder

- Requires some more work :)

* Refactor report printing javascript code

- Replace all existing functions with 'printReports'

* Improvements for default StockItem test report template

- Fix bug in template
- Handle potential errors in template tags
- Add more helpers to report tags
- Improve test result rendering

* Reduce logging verbosity from weasyprint

* Refactor javascript for label printing

- Consolidate into a single function
- Similar to refactor of report functions

* Add report print button to return order page

* Record user reference when creating via API

* Refactor order serializers

- Move common code into AbstractOrderSerializer class

* Adds extra line item model for the return order

- Adds serializer and API endpoints as appropriate

* Render extra line table for return order

- Refactor existing functions into a single generic function
- Reduces repeated JS code a lot

* Add ability to create a new extra line item

* Adds button for creating a new lien item

* JS linting

* Update test

* Typo fix

(cherry picked from commit 28ac2be35bd0148c598629988d40b1a234f069a5)

* Enable search for return order

* Don't do pricing (yet) for returnorder extra line table

- Fixes an uncaught error

* Error catching for api.js

* Updates for order models:

- Add 'target_date' field to abstract Order model
- Add IN_PROGRESS status code for return order
- Refactor 'overdue' and 'outstanding' API queries
- Refactor OVERDUE_FILTER on order models
- Refactor is_overdue on order models
- More table filters for return order model

* JS cleanup

* Create ReturnOrderLineItem model

- New type of status label
- Add TotalPriceMixin to ReturnOrder model

* Adds an API serializer for the ReturnOrderLineItem model

* Add API endpoints for ReturnOrderLineItem model

- Including some refactoring along the way

* javascript: refactor loadTableFilters function

- Pass enforced query through to the filters
- Call Object.assign() to construct a superset query
- Removes a lot of code duplication

* Refactor hard-coded URLS to use {% url %} lookup

- Forces error if the URL is wrong
- If we ever change the URL, will still work

* Implement creation of new return order line items

* Adds 'part_detail' annotation to ReturnOrderLineItem serializer

- Required for rendering part information

* javascript: refactor method for creating a group of buttons in a table

* javascript: refactor common buttons with helper functions

* Allow edit and delete of return order line items

* Add form option to automatically reload a table on success

- Pass table name to options.refreshTable

* JS linting

* Add common function for createExtraLineItem

* Refactor loading of attachment tables

- Setup drag-and-drop as part of core function

* CI fixes

* Refactoring out some more common API endpoint code

* Update migrations

* Fix permission typo

* Refactor for unit testing code

* Add unit tests for Contact model

* Tests for returnorder list API

* Annotate 'line_items' to ReturnOrder serializer

* Driving the refactor tractor

* More unit tests for the ReturnOrder API endpoints

* Refactor "print orders" button for various order tables

- Move into "setupFilterList" code (generic)

* add generic 'label printing' button to table actions buttons

* Refactor build output table

* Refactoring icon generation for js

* Refactoring for Part API

* Fix database model type for 'received_date'

* Add API endpoint to "issue" a ReturnOrder

* Improvements for stock tracking table

- Add new status codes
- Add rendering for SalesOrder
- Add rendering for ReturnOrder
- Fix status badges

* Adds functionality to receive line items against a return order

* Add endpoints for completing and cancelling orders

* Add option to allow / prevent editing of ReturnOrder after completed

* js linting

* Wrap "add extra line" button in setting check

* Updates to order/admin.py

* Remove inline admin for returnorderline model

* Updates to pass CI

* Serializer fix

* order template fixes

* Unit test fix

* Fixes for ReturnOrder.receive_line_item

* Unit testing for receiving line items against an RMA

* Improve example report for return order

* Extend unit tests for reporting

* Cleanup here and there

* Unit testing for order views

* Clear "sales_order" field when returning against ReturnOrder

* Add 'location' to deltas when returning from customer

* Bug fix for unit test
2023-03-29 10:35:43 +11:00
Matthias Mair
93b6934127 fix trailing 2022-05-20 13:20:55 +02:00
Oliver Walters
fc3b062188 Mark injected strings as safe 2022-04-27 22:09:25 +10:00
Oliver Walters
4a843908ec Add customize option to hide admin link in user menu 2022-04-27 21:56:04 +10:00
Matthias
37ea6e119e
just center content 2022-04-27 13:21:23 +02:00
Matthias
a02edca2d5
add another spacer 2022-04-27 13:12:22 +02:00
Matthias
1bce7b745e
add custom logo option 2022-04-24 16:13:44 +02:00
Matthias
2847eef71c
load missing tag 2022-04-24 15:13:31 +02:00
Matthias
f2d0537198
set navbar message via config file 2022-04-24 15:12:03 +02:00
Matthias
1127bf2497
make it possible to resitrict the about modal 2022-04-24 01:02:41 +02:00
Oliver Walters
11a6052871 remove the old search bar 2022-03-29 22:46:00 +11:00
Oliver Walters
2976545988 Adds a new "offcanvas" section for search results 2022-03-28 10:02:55 +11:00
Oliver Walters
ab7eda9d2c Add new button to navbar 2022-03-27 21:04:14 +11:00
Matthias Mair
56e6783556
Merge branch 'inventree:master' into matmair/issue2279 2022-03-01 20:14:25 +01:00
Oliver
b2e0241b12 Adds option to "obfuscate" the admin URL
- By default, uses '/admin/'
- Can be set in config yaml file
- Can be set by environment variable
2022-03-01 00:57:53 +11:00
Matthias
9eb238c85e
Merge branch 'master' of https://github.com/inventree/InvenTree into matmair/issue2279 2022-02-12 00:51:15 +01:00
Oliver Walters
40564f0357 Rearrange drop-down menu 2022-01-19 14:38:05 +11:00
Matthias
ee99052d04
Merge branch 'master' of https://github.com/inventree/InvenTree into matmair/issue2279 2022-01-12 02:13:50 +01:00
Oliver
af18d16d98 Tweak admin area icon 2022-01-08 20:19:18 +11:00
Matthias Mair
cdcac90319
Merge branch 'inventree:master' into matmair/issue2279 2021-12-08 18:27:57 +01:00
Matthias
791da9b322
add notification counter to indicator 2021-11-30 16:56:55 +01:00
Matthias
c4c43135f1
Add base UI elements 2021-11-27 21:23:56 +01:00
Matthias
a9995087ac
move spacing from id to class 2021-11-27 16:21:17 +01:00
Matthias
a95b298c62
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-2037 2021-11-18 11:37:11 +01:00
Oliver
2a5b882a25 Navbar updates
- Display "demo mode" with link to docs
- Remove "admin" menu action
2021-11-18 20:34:50 +11:00
Matthias
fa36bcdbca
'safe' loading of links 2021-11-11 13:00:20 +01:00
Matthias
d982bfe201
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-2037 2021-11-10 00:37:49 +01:00
Oliver
35cfa387d1 Fixes navbar menu positioning for smaller screens 2021-11-08 13:38:03 +11:00
ad5ba96278 move toggler to the end 2021-11-06 15:07:01 +00:00
19a3568511 fix nav arranging on mobile 2021-11-06 15:02:40 +00:00
Matthias
83d0693013
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-2037 2021-11-03 21:25:04 +01:00
Oliver
f607841601 Fix navbar spacing when "sticky-header" is enabled 2021-11-01 12:07:07 +11:00
Matthias
62aa014f6b
add button for navbar toogle 2021-11-01 00:09:38 +01:00
Matthias
199254dfe9
adjust navigation integration to new style 2021-10-30 22:35:47 +02:00
Matthias
703c8a31b1
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-2037 2021-10-30 18:23:09 +02:00
Oliver
0ef0c539a7 Update bootstrap-table 2021-10-28 13:03:47 +11:00
Oliver
ae2c3e8293 remove "panel-inventree" references 2021-10-28 08:31:36 +11:00
Oliver
a004f293ff Replace all instances of data-toggle with data-bs-toggle 2021-10-27 22:06:30 +11:00
Oliver
abf2093ab9 Adds user option to enable "sticky header" 2021-10-27 16:26:41 +11:00
Oliver
1e31774ce7 Working on navbar 2021-10-27 15:48:42 +11:00
Matthias
487ac594bb
testing save navigation checks 2021-10-17 19:50:06 +02:00
Matthias
41ce66df6e
add navigation setting 2021-10-16 00:32:48 +02:00
Matthias
32122102e6
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-2037 2021-10-15 23:36:19 +02:00
Oliver
4f985ae225 Revert 1fb76b9
Removes global functions to enable / disable entire sections of functionality
2021-10-13 09:40:17 +11:00
Matthias
9aaf4c25e1
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-2037 2021-10-12 22:23:45 +02:00
Matthias
87fff78944
navigtion-mixin icon setting 2021-10-04 19:30:54 +02:00
Matthias
117baa72eb
nav mixin: set nav-tab name 2021-10-04 19:24:41 +02:00
Matthias
258d159093
human name for plugins 2021-10-04 12:31:12 +02:00
Matthias Mair
44c5003839
Merge branch 'inventree:master' into fr-1421-sso 2021-09-24 00:32:38 +02:00