Oliver Walters
4a28fa7fa8
Fixes for company table
2021-03-03 08:36:16 +11:00
Oliver Walters
cd01bb0ad7
Refactor HTML view permission
...
- Introspect database model from View
- Automatically get the permission from the View class
2021-03-02 21:32:32 +11:00
Oliver Walters
34def10765
Delete un-needed code
2021-02-28 21:44:10 +11:00
Oliver Walters
44635d2499
Use server-side pagination for more list endpoints
2021-02-28 20:35:32 +11:00
Oliver Walters
b315b958b0
PEP fixes
2021-02-27 07:56:38 +11:00
Oliver Walters
5a536be22d
More test refactoring
2021-02-26 22:08:06 +11:00
Oliver Walters
26e80fa0ab
Fancify all the menubars
2021-02-25 09:10:20 +11:00
Oliver Walters
888fd4116c
SupplierPart display now uses menubar display style
2021-02-24 21:12:41 +11:00
Oliver Walters
5525b23b9f
Company view now uses menubar
2021-02-24 20:31:48 +11:00
Oliver Walters
5a58e0a298
Adds "admin" button to supplier part page
2021-02-23 13:16:03 +11:00
Oliver Walters
745188082b
Add more searchable fields to SupplierPart model
2021-02-21 21:06:44 +11:00
Oliver Walters
ba71ce941f
Display supplier part packaging
2021-02-19 14:34:21 +11:00
Oliver Walters
33d66182df
Add "revision" number to report model
...
- Auto-increments whenever the model is saved
2021-02-05 12:01:44 +11:00
Oliver Walters
978ea7cc0b
Typo fix
2021-02-04 23:11:19 +11:00
Oliver Walters
3c5169c793
So I learned something today...
...
In migration files you can access the "historical" pythonic model, and use that, with *all* the helpers,
rather than writing clunky old SQL!!!!
:'(
2021-02-04 23:10:10 +11:00
Oliver Walters
74704a7c1e
Mark migrations with data operations "non atomic"
...
Ref: https://docs.djangoproject.com/en/dev/howto/writing-migrations/#non-atomic-migrations
2021-02-04 22:19:15 +11:00
Oliver Walters
140c8b5395
Use integer field instead of boolean literal (not correct SQL)
2021-02-04 21:33:10 +11:00
Oliver Walters
cabac6614c
Add unit test for currency migration
2021-02-04 09:13:23 +11:00
Oliver Walters
d811f3c48a
Typo fix
...
(cherry picked from commit c58399206c
)
2021-02-04 08:39:27 +11:00
Oliver Walters
93f0dbd4ee
Bug fix: add missing line
...
(cherry picked from commit 2303e03580
)
2021-02-04 08:39:20 +11:00
Oliver Walters
ad0b59bf11
Bug fxi
...
(cherry picked from commit 0e11b722be
)
2021-02-04 08:39:14 +11:00
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