semvec/pypi-packages huggingface dataset:
apiqa-storage 2.10.0
Apiqa user storage backend for django projects
Requires Python: ~=3.6
Keywords: apiqa django

# apiqa-storage #

This project aim is to provide user storage backend on minio
for all apiqa django projects.

## HowToUse ##

* Add `apiqa-storage` to `requirements.txt`.

```
# Minio file storage
git+https://github.com/pik-software/apiqa-storage.git#egg=apiqa-storage
```

* Add `apiqa_storage` to `INSTALLED_APPS` in settings file.

```python
INSTALLED_APPS = [
    'django.contrib.admin',
    ...,
    'apiqa_storage'
]
```

* Add mixin `ModelWithAttachmentsMixin` to any model. Make and run migrations.

```python
from apiqa_storage.models import ModelWithAttachmentsMixin

class UserFile(ModelWithAttachmentsMixin, ...):
    ...
```

* Add serializer mixin at the beginning and add `attachments`,
 `attachment_ids` to fields.

```python
from apiqa_storage.serializers import AttachmentsSerializerMixin

class ModelWithAttachmentsSerializer(AttachmentsSerializerMixin, ...):
    ...

    class Meta:
        ...
        fields = (..., 'attachments', 'attachment_ids')
```

* Add download and upload file urls to urlpatterns.

```python
from django.urls import path, include

urlpatterns = [
    path('attachments/', include('apiqa_storage.urls')),
]
```

* Or add staff download file url to urlpatterns.

```python
from django.urls import path, include

urlpatterns = [  # noqa
    path('attachments/', include('apiqa_storage.staff_urls')),
]
```

* Add clean files task to celery beat config.

```python
from celery.schedules import crontab
beat_schedule = {
    # apiqa-storage clean files
    'purge_attachments': {
        'task': 'apiqa_storage.tasks.purge_attachments',
        'schedule': crontab(hour=5)
    },
}
```

* Add required minio settings. Create bucket on minio!
[django minio storage usage](https://django-minio-storage.readthedocs.io/en/latest/usage/)

```python
MINIO_STORAGE_ENDPOINT = 'minio:9000'
MINIO_STORAGE_ACCESS_KEY = ...
MINIO_STORAGE_SECRET_KEY = ...
MINIO_STORAGE_BUCKET_NAME = 'local-static'
```
* Other settings
  * **MINIO_STORAGE_MAX_FILE_SIZE**: File size limit for upload, humanfriendly value. 
  See https://humanfriendly.readthedocs.io/en/latest/readme.html#a-note-about-size-units. Default 100M
  * **MINIO_STORAGE_MAX_FILE_NAME_LEN**: File name length limit. Use for database char limit. Default 100
  * **MINIO_STORAGE_MAX_FILES_COUNT**: Limit of files in one object. For example 5 files in ticket. None - is unlimited. Default None
  * **MINIO_STORAGE_USE_HTTPS**: Use https for connect to minio. Default False
  * **MINIO_STORAGE_CLEAN_PERIOD**: Delete files without related objects after N days. Default 30
  
* Run test

```bash
pip install -r requirements.txt
pip install -r requirements.dev.txt
docker-compose up
pytest --cov .
```
odoo9-addon-pos-return-order 9.0.1.0.0.99.dev3
Point of Sale Return Order
Requires Python: ~=2.7

.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
   :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
   :alt: License: AGPL-3

==================
PoS - Return Order
==================

This module extends the functionality of odoo Point Of Sale about POS Order
returns.

With this module, it is now forbidden to return more quantity than the initial
one.

A link is created between the returned Order and the initial Order.
A link is created between the returned Order Line and the initial Order Line.

Implemented Features
====================

* A wizard that allow to select just some products to return:

.. image:: /pos_return_order/static/description/partial_return_wizard.png

Implemented Constraints
=======================

* User can not return more products than the initial quantity:

.. image:: /pos_return_order/static/description/returned_qty_over_initial.png

* If a line has been partially refund, only a reduced quantity can be returned:

.. image:: /pos_return_order/static/description/sum_returned_qty_over_initial.png

* It is not possible to set a negative quantity if the initial Pos Order is
  not indicated:

.. image:: /pos_return_order/static/description/initial_pos_order_required.png

Configuration
=============

In some case, you want to let the possibility to allow negative quantity
in a PoS Order, without mentioning initial order. This can happen for special
products like returnable products, ...

In that case, a checkbox is possible on Product Form View to allow such case

.. image:: /pos_return_order/static/description/product_returnable_bottle.png

Usage
=====

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
   :alt: Try me on Runbot
   :target: https://runbot.odoo-community.org/runbot/184/9.0

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/pos/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

Credits
=======

Contributors
------------

* Sylvain LE GAL <https://twitter.com/legalsylvain>

Funders
-------

The development of this module has been financially supported by:

* La Louve (www.lalouve.net)
* GRAP, Groupement Régional Alimentaire de Proximité (www.grap.coop)

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.