Commit Graph

311 Commits

Author SHA1 Message Date
Oliver Walters
b284fe7f2b Remove quotes around column names
(cherry picked from commit 386cb2dd3a)
2021-02-04 08:39:05 +11:00
Oliver Walters
29bb735dc4 Helper functions to automatically extract migration file info 2021-02-04 00:25:00 +11:00
Oliver Walters
34dbfe6d28 Test troublesome migration 0019 2021-02-03 23:16:23 +11:00
Oliver Walters
5e9097b5e0 PSQL: Upper-case column names *must* be qualified with double-quotes
Ref: https://www.xspdf.com/resolution/53039249.html
2021-02-03 13:16:32 +11:00
Oliver Walters
0e246a7fdf Migration fix (response is different for postgresql) 2021-02-03 13:02:28 +11:00
Oliver Walters
793e5b820e Remove all model references from migration file 2021-02-03 11:56:48 +11:00
Oliver Walters
bc43d14ebf Change model functions to raw SQL 2021-02-03 11:28:43 +11:00
Oliver Walters
f798537c73 Reverse migration company.0024 2021-02-03 09:52:59 +11:00
Oliver Walters
fef5b7548e Increase unit testing for order API 2021-01-14 22:06:53 +11:00
Oliver Walters
2a91bb0c87 Update SupplierPart model to allow data importing
- django-import-export plugin seems to require null=True for char fields
- yes, this goes against django "best practice"
- Hopefully a better solution can be found
2021-01-03 22:16:32 +11:00
Oliver Walters
607cc90ce0 Add extra context to SupplierPartCreate form
(cherry picked from commit 5f8f0232a9)
2020-11-27 11:18:23 +11:00
eeintech
11745ebd6c Removed one too many indent 2020-11-19 15:32:42 -05:00
eeintech
4768c9cbb3 Fixed validation of SupplierPart edit form by forcing the value of single_pricing field 2020-11-19 15:31:39 -05:00
Oliver Walters
599220a931 Fixes for custom SQL queries
- Don't use double quotes!
- NO NO NO!
- Single quotes only
2020-11-19 09:15:16 +11:00
Oliver Walters
0f42916521 Improve settings.py
- Load database config from either config.yaml or environment variables
- Mix and match, if you want!
- Move to use logging module rather than just printing stuff
- Error if required database parameters are not required
2020-11-13 13:38:01 +11:00
Oliver Walters
362437e75e PEP fixes 2020-11-13 07:28:21 +11:00
Oliver Walters
f239c8f8c8 Add missing migration file 2020-11-12 22:04:50 +11:00
Oliver Walters
ae7fbd6112 Add PEP8-naming extension for flake
- Enforcing python naming checks
2020-11-12 21:53:04 +11:00
Oliver Walters
47cbf3071d Add option to add a single-quantity price-break when creating a new SupplierPart object
- Add unit testing!
2020-11-12 21:36:32 +11:00
Oliver Walters
fd79f1ea0e Fixes for 'single pricing' for SupplierPart 2020-11-12 19:46:19 +11:00
Oliver Walters
51d2d85c26 When creating a new price break for a supplier part, default to using the currency code specified for the supplier company 2020-11-12 11:14:50 +11:00
Oliver Walters
1532be9c1e Add 'currency' option for company
- e.g. an external supplier might have a default currency
- Adds a form input which only allows selection of allowed currency codes
- Add unit testing for currency validation
2020-11-12 11:02:10 +11:00
Oliver Walters
ebac06ebee Add 'single_pricing' form to the EditSupplierPartForm
- Idea here is to automatically create a unit-pricing price-break when a new SupplierPart is created
2020-11-11 13:55:25 +11:00
Oliver Walters
fc89501a62 Fix for SQL cursor query
- What works in SQLite don't necessarily fly with the big boys
2020-11-11 08:06:14 +11:00
Oliver Walters
a19cf1f27a PEP fixes 2020-11-11 00:26:59 +11:00
Oliver Walters
4dff18e4a6 Remove common_currency model entirely
- A lot of views / pages / etc needed to be updated too
- Now uses django-money fields entirely
- Create a manual rate exchange backend (needs more work!)
2020-11-11 00:21:06 +11:00
Oliver Walters
83582ae87f Add custom migration for the part_supplierpricebreak model
- Copies across existing pricing data
- Yikes
2020-11-10 22:25:05 +11:00
Oliver Walters
f560be1a9a Bug fix: Part thumbnail API list was not working
- Part images could not be selected from grid
2020-11-04 15:41:17 +11:00
Oliver Walters
b3ac261746 Add filter for supplier part table:
Filter by "active" status
2020-10-29 12:50:17 +11:00
Oliver Walters
d8ada930c8 More template updates
- Add icons to more action buttons
2020-10-28 22:37:58 +11:00
Oliver Walters
d0b7d91ca4 Update multiple templates with fontawesome icons 2020-10-28 18:30:38 +11:00
Oliver
5e63ccc9f6
Merge pull request #1043 from eeintech/unique_email_company
[Company] Allow duplicate names - Unique name/email pair
2020-10-23 13:23:48 +11:00
eeintech
9131edc43d Company index: swapped 'title' for 'pagetype' for adding company button 2020-10-21 09:34:49 -05:00
eeintech
46b889c572 Assigned all user permissions for company tests 2020-10-20 14:52:34 -05:00
eeintech
de65e1631d Updated company templates permissions 2020-10-20 14:46:10 -05:00
eeintech
39eddc7203 Added user permissions on company views 2020-10-20 14:11:40 -05:00
eeintech
5793839a01 Added UniqueConstraint on name/email pair, renamed migration file 2020-10-20 07:37:07 -05:00
eeintech
7bc925d016 Merge branch 'master' of git://github.com/inventree/InvenTree into unique_email_company 2020-10-20 07:19:48 -05:00
eeintech
dfa4d3f8ed Display IPN and pipe char only if IPN exists 2020-10-18 14:37:35 -05:00
eeintech
af6b30eaca Added IPN to Supplier Part string representation
Improved Supplier Part templates and fixed 'Order Part' button in supplier_part_orders
2020-10-15 13:09:00 -05:00
eeintech
70a3b7f891 Improved migration, still fails if email duplicates exist in current DB 2020-10-13 07:43:57 -05:00
eeintech
ac82640c6c Company: allowed duplicate names, made email field unique, custom migration 2020-10-12 17:51:48 -05:00
Oliver Walters
ab454e5ba4 More template changes: perms -> roles 2020-10-06 16:46:13 +11:00
Oliver Walters
3f59ce3f93 Update unit tests
- requires the user to actually have the necessary permissions!
2020-10-06 01:30:36 +11:00
Oliver Walters
16d720b62c Update permission requirements for API
- Automatically use model permissions by default!
-
2020-10-06 00:36:55 +11:00
Oliver Walters
2039100d3e Add some unit testing 2020-10-04 00:24:48 +10:00
Oliver Walters
27656633df Update admin links to require specific permissions 2020-09-30 23:57:23 +10:00
Oliver Walters
d1cce7df94 Add direct admin links if the user is staff 2020-09-30 00:02:10 +10:00
Oliver Walters
0e5f10c020 Add some more search terms to the admin interface 2020-09-29 23:41:50 +10:00
Oliver Walters
ff7570aea4 VIews / forms / etc 2020-09-18 21:49:56 +10:00