Commit graph

2622 commits

Author SHA1 Message Date
Lance Edgar 7166580e24 Fix phone_2 bug in Customer importer.
If phone_2 being imported is None, remove all secondary Voice phones from
the customer.
2015-04-11 03:24:44 -05:00
Lance Edgar 48a12d10f3 Add Person.employee relationship and User.employee convenience property. 2015-04-11 00:21:27 -05:00
Lance Edgar b78d15ff56 Update changelog. 2015-04-05 21:49:16 -05:00
Lance Edgar 8dfbdb6e6b Improve warning message when duplicates found during data import. 2015-03-26 14:56:42 -05:00
Lance Edgar c77c9dcfab Tweak logging message. 2015-03-26 12:50:19 -05:00
Lance Edgar e111718136 Remove print statement, dang it. 2015-03-25 21:42:33 -05:00
Lance Edgar 0e79626f1b Log warning when duplicate key is detected during import. 2015-03-25 00:33:28 -05:00
Lance Edgar ea1ddc4456 Don't normalize simple instance fields unless they're involved in the import. 2015-03-24 21:13:29 -05:00
Lance Edgar eea046c950 Update changelog. 2015-03-24 13:18:58 -05:00
Lance Edgar fa77fbbdc1 Add supposed optimization for simple fields within importer.
Not sure if this will make a difference or not, we'll see?
2015-03-24 00:17:25 -05:00
Lance Edgar f09af043dc Add DataProvider.int_() method for importers. 2015-03-23 01:15:58 -05:00
Lance Edgar 56f5db4136 Fix Albert's invoice parser case quantity bug.
Seems sometimes those can be decimal within the invoice file.
2015-03-21 16:51:06 -05:00
Lance Edgar 3e925c4a03 Tweak logging when importer creates new model instance. 2015-03-20 19:20:40 -05:00
Lance Edgar 2ac9fae084 Update docstring. 2015-03-20 19:20:32 -05:00
Lance Edgar 69ee74ffd9 Fix phone number normalization for customer importer. 2015-03-19 03:25:00 -05:00
Lance Edgar c020c57c18 Add --warnings flag to base import command. 2015-03-19 02:52:01 -05:00
Lance Edgar 8b07438d6a Tweak case quantity in Albert's invoice parser. 2015-03-19 01:24:29 -05:00
Lance Edgar 0ea99a6aab Various changes to allow custom commands to sit in front of non-Rattail database.
In particular some of the Continuum versioning code required protection
from import failures, and various assumptions about the "default" database
session were refactored.
2015-03-18 20:03:15 -05:00
Lance Edgar 9d364f67e2 Add UnicodeDictWriter and csvutil API docs. 2015-03-18 02:18:31 -05:00
Lance Edgar 870082f833 Update changelog. 2015-03-12 18:35:33 -05:00
Lance Edgar 8bfe04f658 Add unit of measure for cubic feet. 2015-03-12 11:04:13 -05:00
Lance Edgar cf608acdbf Update changelog. 2015-03-12 10:39:43 -05:00
Lance Edgar 96232f863d Catch import error when configuring db in command startup.
Most commands use the database, but e.g. `filemon` on Windows is a notable
exception.  If the SQLAlchemy stuff isn't installed then an import error
will happen; use that to "skip" the db config.
2015-03-12 10:35:58 -05:00
Lance Edgar 77c6730977 Stop normalizing some fields on import.
At some point we have to just let the data be what it is.  This probably
means removing quite a bit more of that sort of normalization.
2015-03-12 01:07:22 -05:00
Lance Edgar e8bbb79a91 Update changelog. 2015-03-11 21:24:41 -05:00
Lance Edgar 4d7e56fa40 Hopefully fix install_pip Fabric function. 2015-03-11 21:14:19 -05:00
Lance Edgar 85640f587d Add Product.last_sold column. 2015-03-10 17:50:33 -05:00
Lance Edgar f8475fbf7d Add duplicate UPC warning in ProductCost importer.
Instead of trying to reset the cost's product association, just warn about
it, since it really needs human attention anyway.
2015-03-10 12:41:54 -05:00
Lance Edgar 3f959bb416 Add get_subdepartment() API function. 2015-03-10 12:41:16 -05:00
Lance Edgar 77a7bfba9b Add order_by kwarg to db.cache.cache_model() function.
The idea here is that in the event a duplicate key(s) exists for the model
being cached, sorting the records should ensure the "last one wins".  This
doesn't accomplish much, but at least the same record should be cached
during subsequent runs, which may help.

This was added to help track down duplicate product UPCs when they were
detected, but I wound up not actually using it in the end.  It's here for
next time...
2015-03-10 12:37:37 -05:00
Lance Edgar b2b23ab02a Fix bug in KeHE catalog parser. 2015-03-06 19:34:45 -06:00
Lance Edgar 64051accd3 Add vegi-softgels unit of measure. 2015-03-03 17:46:17 -06:00
Lance Edgar 509f80da75 Increase report code name length. 2015-03-02 19:33:13 -06:00
Lance Edgar 16a6c7c3c0 Add GPC.pretty() method. 2015-02-27 18:49:50 -06:00
Lance Edgar a5286da26f Add import support for Product.weighed. 2015-02-27 18:48:50 -06:00
Lance Edgar 14c5409d95 Add some more units of measure. 2015-02-27 18:48:29 -06:00
Lance Edgar 6b34a9be9f Revert to simple names and descriptions for model unicode(). 2015-02-27 17:01:16 -06:00
Lance Edgar a0278b92cf Tweak report code importer. 2015-02-27 17:00:10 -06:00
Lance Edgar ba7d85db9f Improve product and vendor schema some more.
* Make `Product.unit_of_measure` required, and adds more values for it.
* Add `unit_size`, `weighed`, `discountable`, `special_order` fields to `Product`.
* Add `lead_time_days` and `order_interval_days` fields to `Vendor`.
* Add (unused thus far) `TaxImporter`.
2015-02-27 01:49:43 -06:00
Lance Edgar d383ec5f5f Add deposit links, taxes, product organic flag.
These were needed for an Instacart integration.
2015-02-26 19:04:36 -06:00
Lance Edgar 618162cff8 Update changelog. 2015-02-26 17:56:14 -06:00
Lance Edgar f2cb5995b5 Fix more string formatting for Python 2.6. 2015-02-25 17:08:55 -06:00
Lance Edgar bf0ec79df0 Fix string formatting for Python 2.6. 2015-02-25 17:07:24 -06:00
Lance Edgar c09c1a9ad8 Make sure unzip is installed when fabricating POD stuff. 2015-02-25 17:03:49 -06:00
Lance Edgar 7199d198eb Add validate_po_number() method to vendor invoice handler.
This is used by Tailbone UI.
2015-02-24 22:47:45 -06:00
Lance Edgar c7a3a9ee8c Make add_row() method of vendor invoice return the row. 2015-02-24 21:43:18 -06:00
Lance Edgar 8f5234d948 Cache session when refreshing vendor invoice batch, for convenience. 2015-02-24 21:42:37 -06:00
Lance Edgar f798df935f Fix cost check when cognizing vendor invoice rows. 2015-02-24 20:38:08 -06:00
Lance Edgar 9c9672062f Add vendor invoice row status for "product found but not cost". 2015-02-24 19:53:34 -06:00
Lance Edgar 6f1d49f5eb Make vendor catalog handler inherit from FileBatchHandler. 2015-02-24 19:35:54 -06:00