Commit Graph

14178 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
09fabff551
Fix filters for part variant table (#4748)
- Slight adjustment to HTML tags
- Buttons were not displaying correctly inline
2023-05-02 14:47:02 +10:00
Oliver
149c4df231
Remove restriction on manual stock item installation (#4747)
- Allow stock item to be manually inside an item which is iteself installed in an item
- No practical reason for this limitation to exist
2023-05-02 14:46:54 +10:00
Oliver
d9864fce69
New Crowdin updates (#4737)
* updated translation base

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-02 14:46:46 +10:00
Oliver
20d8c2b4e6
Include error type when an error occurs updating exchange rates (#4728)
- Will allow us to further introspect errors received by sentry
2023-05-02 09:34:03 +10:00
Lavissa
6bd95f3b15
Link changes and in-table clipboards (#4697)
* Add clipboard to tables and external link changes

* Clipboard icon added to tables for screens >1200px wide. Enables
  copying of SKU/MPN/IPN from table cells where these otherwise are
  hyperlinks

* External links now open in new tabs with noreferrer

* Move external links into separate template

* All statically rendered external links have been moved out to a new
  template.
2023-05-02 08:13:50 +10:00
Miklós Márton
0b8feb2c4a
Display proper printing target name in the label printing modal dialog (#4727)
Fix #4717
2023-05-02 07:59:54 +10:00
Matthias Mair
e5e1a09b45
CI cleanup (#4744)
* merge doc checks into main QC checks

* rename

* well both APIs are closed now so this would be useless

* make header more concise

* add check if server code changed - make run conditional

* reformat
2023-05-02 07:58:57 +10:00
Matthias Mair
21e0679cb9
[FR] Remove Gitpod integration (#4740)
Fixes #4729
2023-05-02 07:39:38 +10:00
Matthias Mair
5e99e54bbc
Update README.md with digitalocean info (#4742)
* Update README.md with digitalocean info

* update link for DO in docs
2023-05-01 19:42:14 +02:00
Oliver
be856c3682
Scan in items fix (#4738)
* Clean up comments

* Bug fix

- Pass options.modal through if provided when creating new barcodeDialog

* Fix for scanning from item context into location
2023-05-01 23:50:20 +10:00
Oliver
ad4acef459
Plugin metadata docs (#4724)
* Add page for model metadata

* Add intro section

* Add info on direct access

* more updates
2023-05-01 23:33:44 +10:00
Matthias Mair
08c4aa4998
Make sure plugins are always on a new line (#4721)
* "Install Plugin" via GUI fails to add plugin to plugins.txt correctly for first plugin
Fixes #4719

* remove old change as it was not the root issue

* make sure plugins are always written on a new line
2023-05-01 23:26:23 +10:00
Oliver
c5ba632463
Use coveralls github action (#4735) 2023-05-01 22:13:35 +10:00
Matthias Mair
abee2cee88
Code style improvements (#4683)
* fix list comps

* mopre comp fixes

* reduce computing cost on any() calls

* add bugbear

* check for clean imports

* only allow limited relative imports

* fix notification method lookup

* fix notification method assigement

* rewrite assigment

* fix upstream changes to new style

* fix upstream change to new coding style
2023-04-28 20:49:53 +10:00
Matthias Mair
660a4f8e39
bump deps (#4692)
* bump deps

* add markuplint setting to disable character-reference
2023-04-28 20:12:13 +10:00
Oliver
f6831558a4
Fix export of order data (#4714)
* Adds extra unit test for exporting sales orders

- Exporting sales orders to .xls currently throws exception

* Fix 'total_price' field when exporting orders

* Fix for unit test
2023-04-28 06:54:50 +10:00
Oliver
f6021c4749
sentry.io improvements (#4712)
* Write function to catch sentry.io events before sending

- Will let us ignore certain types of errors which we are not interested in

* Cleanup

* Include release info

* Allow sentry reporting in debug mode

* Consolidate DRF sentry code into InvenTree/sentry.py

* Add more error types to ignore

* update docs
2023-04-28 06:54:31 +10:00
miggland
8d28fc06be
Improve text when no sub-categories found (#4711)
Avoids confusion when looking for parts
2023-04-27 22:57:16 +10:00
Oliver
e2c3b28640
Company docs updates (#4710)
* Refactor order documentation into simpler consolidated pages

* Reorganize images

* Add documentation on "Contact"

* Add imgae
2023-04-27 22:27:21 +10:00
Oliver
bb860227c8
New Crowdin updates (#4705)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-27 14:43:54 +10:00
Oliver
82e98dffb8
Add custom template loader class (#4706)
- Specifically to ignore caching for generated reports and labels
- Fixes https://github.com/inventree/InvenTree/issues/4611
2023-04-27 13:28:00 +10:00
Matthias Mair
3975a85742
Check if doc links are broken (#4686)
* add check for links

* fix style

* call silently

* add dep

* add path

* ignore readme as it contains necesarry broken links

* fix syntax

* check recursevly

* run in sync

* use linkcheckmd instaead

* use sync

* add requests

* revert fix to check if checks still work

* fix lookup

* fix old link

* run check verbose

* run async

* remove recurse

* introduce error for test

* fix link
2023-04-27 07:24:26 +10:00
Oliver
608f96c723
Add python example for deleting a part (#4703)
* Add python example for deleting a part

* Ignore PRs which are just docs from release notes
2023-04-26 23:18:03 +10:00
Oliver
5fcab2aec3
Specify order currency (#4698)
* Add 'order_currency' to the various external order models

- By default will use the currency specified for the supplier (or customer)
- Can be specified per order, also

* Display order currency on order pgae

* Add 'order_currency' field

* Enable "blank" currency option (to default to the currency specified by the referenced company

* Fix default currency code when adding line items

* Remove 'total_price_currency' serializer field

- Now replaced with 'order_currency' for greater flexibility

* Bump api_version.py

* Update default order report templates

* Updated docs

* More docs updaes

* Adjust unit tests

* Use 'order_currency' in order tables

* Update purchase order api unit tests
2023-04-26 17:35:15 +10:00
Oliver
36d17c082b
Homepage hide inactive (#4700)
* Add user setting for including "inactive" parts in results displayed on homepage

* Adds user setting to hide inactive parts on the homepage

Closes https://github.com/inventree/InvenTree/issues/4688
2023-04-26 15:45:14 +10:00
Oliver
f382d7ef21
Disable httpstat.us tests (#4699)
- Uptime of the eternal service is not great
- For now, disable tests
- Potentially reintroduce these at some point in the future
2023-04-26 14:27:13 +10:00
Oliver
eaa518852c
Mark "supplier" field as required on PurchaseOrder serializer (#4693)
- Fixes https://github.com/inventree/InvenTree/issues/4687
2023-04-26 12:35:55 +10:00
Lavissa
011b5915e1
Fix missed translation of overallocation string (#4681)
* Fix missed translation of overallocation string

* Added missing translation prefix on string for Overallocation REJECT choice

* Fix missing translation in part admin panel

* Added missing translation prefix on string for "variant of" column in
  admin panel
2023-04-25 22:41:31 +10:00
Matthias Mair
d7bdcd95a6
Fix plugin meta lookup (#4684)
* fix website lookup

* use the raw data on error
2023-04-24 08:28:50 +10:00
Oliver
5411cf0878
Update README.md (#4679)
Add documentation badge
2023-04-23 00:20:41 +10:00
Jakob Haufe
7537fd1278
Fix sorting by location in stock item table (#4658)
Currently, when sorting the stock item table by location, it gets sorted
by location id.

This changes the sorting criterion to pathstring.
2023-04-23 00:12:03 +10:00
Oliver
8df207d8e1
Extend ReportMixin class to support labels (#4678)
* Extend ReportMixin context to shim label templates also

* Update docs
2023-04-22 23:46:43 +10:00
Oliver
50cbaff76d
Fixes for docs building (#4659) 2023-04-22 23:35:25 +10:00
Oliver
2ffd2354eb
Documentation integration (#4653)
* Add documentation under docs/ directory

* Add CI workflow for mkdocs configuration checking

* Add documentation issue template

* update pip-tools?

* Update .gitignore files

* Fix .gitignore rules

* Improve release notes page

* remove references to old repo
2023-04-22 22:40:29 +10:00
Oliver
20f01e8741
New Crowdin updates (#4648)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-22 09:11:33 +10:00
Oliver
ad545bad24
Update to report plugin API (#4649)
explicitly add the model instance when allowing plugins to add context data
2023-04-21 15:28:31 +10:00
Oliver
9198b52398
Add ordering and search to ProjectCodeList API endpoint (#4645) 2023-04-20 22:51:47 +10:00
Oliver
0f2fd2f678
New Crowdin updates (#4641)
* updated translation base

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-20 22:49:31 +10:00
Oliver
91189fbb77
Fix for "focus" field in forms (#4644)
- Reimplements ability to auto-focus fields when launching modal forms
- Can specify with the "focus" option
- Otherwise, will focus on the first available field
2023-04-20 22:40:08 +10:00
Oliver
7bc4de6a92
Fix persist buttons (#4640)
Fixes "persist form" buttons for the following models:

- Part
- PartCategory
- StockItem
- StockLocation

Closes https://github.com/inventree/InvenTree/issues/4491
2023-04-20 22:12:43 +10:00
Oliver
c64ff9d569
Refactor table buttons for printing (#4639)
- Make them to look like the other printing buttons
2023-04-20 22:12:33 +10:00
Oliver
68d1682000
Report Plugins (#4643)
* Add plugin mixin class for extending reports

* Expose report context to the plugin system

* Add an example mixin for adding context data to a report

* Add the 'request' object to the plugin code
2023-04-20 14:21:22 +10:00
Lavissa
a020548c8e
Fix typo in Update Check Interval setting (#4642)
Change will create a new translation key
The following locales have added strings to the old key:

DE
Intervall für die Suche nach Updates

HU
Frissítés keresés gyakorisága

PT
Atualizar Verificação de Intervalo
2023-04-20 11:15:01 +10:00
Oliver
070e2afcea
Project code support (#4636)
* Support image uploads in the "notes" markdown fields

- Implemented using the existing EasyMDE library
- Copy / paste support
- Drag / drop support

* Remove debug message

* Updated API version

* Better UX when saving notes

* Pin PIP version (for testing)

* Bug fixes

- Fix typo
- Use correct serializer type

* Add unit testing

* Update role permissions

* Typo fix

* Update migration file

* Adds a notes mixin class to be used for refactoring

* Refactor existing models with notes to use the new mixin

* Add helper function for finding all model types with a certain mixin

* Refactor barcode plugin to use new method

* Typo fix

* Add daily task to delete old / unused notes

* Add ProjectCode model

(cherry picked from commit 382a0a2fc32c930d46ed3fe0c6d2cae654c2209d)

* Adds IsStaffOrReadyOnly permissions

- Authenticated users get read-only access
- Staff users get read/write access

(cherry picked from commit 53d04da86c4c866fd9c909d147d93844186470b4)

* Adds API endpoints for project codes

(cherry picked from commit 5ae1da23b2eae4e1168bc6fe28a3544dedc4a1b4)

* Add migration file for projectcode model

(cherry picked from commit 5f8717712c65df853ea69907d33e185fd91df7ee)

* Add project code configuration page to the global settings view

* Add 'project code' field to orders

* Add ability to set / edit the project code for various order models

* Add project code info to order list tables

* Add configuration options for project code integration

* Allow orders to be filtered by project code

* Refactor table_filters.js

- Allow orders to be filtered dynamically by project code

* Bump API version

* Fixes

* Add resource mixin for exporting project code in order list

* Add "has_project_code" filter

* javascript fix

* Edit / delete project codes via API

- Also refactor some existing JS

* Move MetadataMixin to InvenTree.models

To prevent circular imports

(cherry picked from commit d23b013881eaffe612dfbfcdfc5dff6d729068c6)

* Fixes for circular imports

* Add metadata for ProjectCode model

* Add Metadata API endpoint for ProjectCode

* Add unit testing for ProjectCode API endpoints
2023-04-20 00:47:07 +10:00
Oliver
eafd2ac966
Catch error if notes directory does not exist (#4638) 2023-04-19 22:41:19 +10:00
Matthias Mair
1b8ad70fb6
[FR] Refactor plugin registry (#4340)
* add mixin order ref

* move import

* fix import order

* reorder import

* move activation/deactivation to mixins

* move loaded/unloaded mixins out into seperate modules

* fix deactivation sequence

* switch to classmethods for loading

* only run (de)activation if defined for mixin
Fixes #4184

* fix deactivating

* move reloading back to registry

* fix merge error

* move app mixin deactivation

* fix migration reloading

* reverse deactivation sequence

* Revert "reverse deactivation sequence"

This reverts commit aff17dd07d.
2023-04-19 20:54:42 +10:00
Oliver
5cd74c4190
Support image uploads in the "notes" markdown fields (#4615)
* Support image uploads in the "notes" markdown fields

- Implemented using the existing EasyMDE library
- Copy / paste support
- Drag / drop support

* Remove debug message

* Updated API version

* Better UX when saving notes

* Pin PIP version (for testing)

* Bug fixes

- Fix typo
- Use correct serializer type

* Add unit testing

* Update role permissions

* Typo fix

* Update migration file

* Adds a notes mixin class to be used for refactoring

* Refactor existing models with notes to use the new mixin

* Add helper function for finding all model types with a certain mixin

* Refactor barcode plugin to use new method

* Typo fix

* Add daily task to delete old / unused notes

* Bug fix for barcode refactoring

* Add unit testing for function
2023-04-19 13:08:26 +10:00
Matthias Mair
2623c22b7e
Remove hashes from dev requirements (#4627)
* Remove hashes from dev requirements
Fixes #4616

* rollback https://github.com/inventree/InvenTree/pull/4617
2023-04-19 07:10:02 +10:00
Matthias Mair
9d5522c18c
[FR] Update to OpenAPI from CoreAPI (#4178)
* [FR] Update to OpenAPI from CoreAPI
Fixes #3226

* factor request function out

* add schema export task

* add api-docs

* add action to check if diff occured

* also wait for docstyle

* use full command

* add envs for inventree

* update inventree before running

* use relative path

* remove schema action

* remove tags to fit 3.0 parsers

* fix url base name for reloads

* revert change in plugin resolver

* remove unused tags

* add rapidoc too

* declare api regex

* fix as suggested by @martonmiklos in
https://github.com/inventree/InvenTree/pull/4178#discussion_r1167279443

* set inventree logo

* remove Rapidoc
2023-04-18 23:08:36 +10:00