Enable archiving of products

Things that this PR does:

- Adds UI to archive products (duplicated from the users page)
- Refactor the users and products UI into one base view model function to remove duplication
- Adds sql table to track products (which is currently one way synced from couch)
- Prevents archived products from being sent to the phone
- Adds a filter to include archived product data in reports
- Prevents archived products from being downloaded in product export

I think I picked 100 because i saw that elsewhere first, I don't think
there are downsides to making it longer.

On Tue, Sep 16, 2014 at 11:35 AM, Cory Zue <notifications@github.com> wrote:

> In corehq/apps/commtrack/models.py:
>
> > @@ -1350,6 +1435,45 @@ def remove_location(self, location):
> >              self.submit_location_block(caseblock)
> >
> >
> > +class SQLProduct(models.Model):
> > +    """
> > +    A SQL based clone of couch Products.
> > +
> > +    This is used to efficiently filter StockState and other
> > +    SQL based queries to exclude data for archived products.
> > +    """
> > +    domain = models.CharField(max_length=100, db_index=True)
>
> I see max_length=255 in other places. how did you choose 100 and is there
> any significant downside to making it larger?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/dimagi/commcare-hq/pull/4043/files#r17609081>.
>