Manage anonymous partners with a cookie.
Project description
This module allows the creation of temporary partners for anonymous visitors, and set a cookie to establish a session for these partners.
Table of contents
Usage
The following model methods are added to res.partner:
_create_anonymous_partner__cookie(response)
Create a new anonymous partner and set the shopinvader-anonymous-partner cookie. Return the newly created partner record.
response is typically the http response, it must have a set_cookie() method. It is known to work with odoo.http.request.future_response and FastAPI Response objects.
_get_anonymous_partner__cookie(cookies)
Return the partner record corresponding to the shopinvader-anonymous-partner cookie in the current request, if any. Returns an empty record set if the cookie is not set or if the corresponding partner was not found.
cookies is the cookies dictionary from the http request.
Note the record sets returned by these methods are in a sudo’ed environment, so handle with care.
Known issues / Roadmap
some cron to remove old anonymous partners
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Maintainers
This module is part of the shopinvader/odoo-shopinvader project on GitHub.
You are welcome to contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file odoo_addon_shopinvader_anonymous_partner-16.0.1.0.1-py3-none-any.whl
.
File metadata
- Download URL: odoo_addon_shopinvader_anonymous_partner-16.0.1.0.1-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d68e17a8e768ffdabde3b6c52b3cf8cde408156953233d6ffc20c2c9177cd56b |
|
MD5 | 2120b4d8f869758d3716ece60458a4d0 |
|
BLAKE2b-256 | d5543f0f010a25f89cf918f60661aaa1ba5765786f1d37aa3853dc6578e277b6 |