Skip to main content

Store user access token for one-time-login

Project description

Odoo REST Framework

Version : 1.0.6

Package :

pip install odoo_rest_framework
package link :
https://pypi.org/project/odoo-rest-framework/
github link :
https://github.com/HanZawNyein/odoo-rest-framework.git
Author :
Han Zaw Nyein
Author_email:
hanzawnyineonline@gmail.com

Description :

Store user access token for one-time-login

Code Example

from odoo_rest_framework import (
    jwt_http,
    validator,
    util,
    status,
    fields_extractor,
    format_dict_one2many,
    format_dict_many2one,
    serializer,
    send_notifications
)


market_review = request.env['market.review'].search(search_query)
data = serializer(market_review)
return jwt_http.response(success=True, message='Success', data=data)

Response Example

{
"success": true,
"message": "Success",
"data": [
    {
        "id":1,
        "create_date": "2022-08-22 04:32:06",
        "write_date": "2022-08-23 07:56:15",
        "year": "2022",
        "total_broker": 100,
        "product_id": {"id": 22, "name": "product"},
        "prospect_condition_lines": [
            {
                "id": 1,
                "status": "inquiry",
                "model_id": {"id": 1, "name": "Test Model"},
                "create_date": "2022-08-10 07:10:50",
                "write_date": "2022-08-12 07:11:00",
                "product_id": {"id": 1, "name": "product"},
                "branch_id": {"id": 1, "name": "Test Brand"},
                "holding_id": {"id": 6, "name": "Bago"},
                "qty": 8,
                "way_plan_id": {"id": 1, "name": "Monthly Way Plan for February(Bago)"},
                "market_review_id": null
            },
            {
                "id": 2,
                "status": "inquiry",
                "model_id": {"id": 1, "name": "Test Model"},
                "create_date": "2022-08-22 04:32:06",
                "write_date": "2022-08-23 07:56:15",
                "product_id": {"id": 1, "name": "product"},
                "branch_id": {"id": 1, "name": "Test Brand"},
                "holding_id": {"id": 6, "name": "Bago"},
                "qty": 0,
                "way_plan_id": null,
                "market_review_id": null
            }
        ],
        "date": "2022-09-02",
        "feedback_type": "normal",
        "feedback": "this is Feedback"
        }
    ]
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo_rest_framework-1.0.7.tar.gz (8.1 kB view details)

Uploaded Source

File details

Details for the file odoo_rest_framework-1.0.7.tar.gz.

File metadata

  • Download URL: odoo_rest_framework-1.0.7.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.3

File hashes

Hashes for odoo_rest_framework-1.0.7.tar.gz
Algorithm Hash digest
SHA256 9625b3b72e4b9d0c8f2c93c633f54fbdbd4d8b009b6430f026ff521cc96a39c1
MD5 f36f288db5d17632b35aa0f6ed37c325
BLAKE2b-256 caf41ad4d103c33b46568f0ecaebb3c0df0cfe182fb1a1937d47b8abe5901364

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page