odoo13-addon-website-snippet-country-dropdown


Nameodoo13-addon-website-snippet-country-dropdown JSON
Version 13.0.1.0.1 PyPI version JSON
download
home_pagehttps://github.com/OCA/website
SummaryAllow to select country in a dropdown
upload_time2023-06-28 10:31:01
maintainer
docs_urlNone
authorTecnativa, Odoo Community Association (OCA)
requires_python>=3.5
licenseLGPL-3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =====================================
Website Snippet Country Code Dropdown
=====================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
    :alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwebsite-lightgray.png?logo=github
    :target: https://github.com/OCA/website/tree/13.0/website_snippet_country_dropdown
    :alt: OCA/website
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/website-13-0/website-13-0-website_snippet_country_dropdown
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
    :target: https://runbot.odoo-community.org/runbot/186/13.0
    :alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5| 

This module adds a snippet with a dropdown and an input text field, is a base
for be inherited by others modules into an HTML form.

This can be inserted into form elements.

**Table of contents**

.. contents::
   :local:

Usage
=====

To extend this template you need to inherit ``country_dropdown`` template and
add your personal code.

The template have three input text:

#. ``no_country_field``: Field without code country.
#. ``country_code_field``: Field with only country code (read only)
#. ``complete_field``: Field with the previous two joined (hidden)

The name of the complete field is customizable when user insert the snippet
into a form element with the website editor.

Development
~~~~~~~~~~~

You can call the reusable Qweb template called
``website_snippet_country_dropdown.country_dropdown`` in your views to add a
sensible country-combined field, ideal for *VATs*.

The default country will be the first match among:

#. Extract it from the ``default_country`` variable.
#. Extract it from the first 2 letters of the ``default_value`` variable.
#. The current user's country.
#. The current website's company's country.
#. The first country in the list.

All variables you can use to modify its behavior:

* ``complete_field`` to give it a name. Usually it will match the field name.
* ``default_value`` for the ``complete_field``.
* ``countries`` as a ``res.country`` ORM recordset.
* ``default_country`` as a ``res.country`` record.
* ``no_country_placeholder``.

You can view an example in ``website_sale_checkout_country_vat`` in
OCA/e-commerce.

Known issues / Roadmap
======================

* Add tests.
* Snippet drag and drop `seems to be blocked by Odoo for some unknown reason.
  <https://github.com/OCA/website/pull/230#issuecomment-236681777>`_.
  Given the main purpose of this module is to provide a reusable template for
  other modules to use, did not take the time to fix that use case.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/website/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 <https://github.com/OCA/website/issues/new?body=module:%20website_snippet_country_dropdown%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Tecnativa

Contributors
~~~~~~~~~~~~

* `Tecnativa <https://www.tecnativa.com>`_:

  * Sergio Teruel
  * Jairo Llopis
  * Alexandre Díaz
  * Carlos Roca

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

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

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.

This module is part of the `OCA/website <https://github.com/OCA/website/tree/13.0/website_snippet_country_dropdown>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OCA/website",
    "name": "odoo13-addon-website-snippet-country-dropdown",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "",
    "author": "Tecnativa, Odoo Community Association (OCA)",
    "author_email": "support@odoo-community.org",
    "download_url": "",
    "platform": null,
    "description": "=====================================\nWebsite Snippet Country Code Dropdown\n=====================================\n\n.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n   !! This file is generated by oca-gen-addon-readme !!\n   !! changes will be overwritten.                   !!\n   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png\n    :target: https://odoo-community.org/page/development-status\n    :alt: Beta\n.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png\n    :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html\n    :alt: License: LGPL-3\n.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwebsite-lightgray.png?logo=github\n    :target: https://github.com/OCA/website/tree/13.0/website_snippet_country_dropdown\n    :alt: OCA/website\n.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png\n    :target: https://translation.odoo-community.org/projects/website-13-0/website-13-0-website_snippet_country_dropdown\n    :alt: Translate me on Weblate\n.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png\n    :target: https://runbot.odoo-community.org/runbot/186/13.0\n    :alt: Try me on Runbot\n\n|badge1| |badge2| |badge3| |badge4| |badge5| \n\nThis module adds a snippet with a dropdown and an input text field, is a base\nfor be inherited by others modules into an HTML form.\n\nThis can be inserted into form elements.\n\n**Table of contents**\n\n.. contents::\n   :local:\n\nUsage\n=====\n\nTo extend this template you need to inherit ``country_dropdown`` template and\nadd your personal code.\n\nThe template have three input text:\n\n#. ``no_country_field``: Field without code country.\n#. ``country_code_field``: Field with only country code (read only)\n#. ``complete_field``: Field with the previous two joined (hidden)\n\nThe name of the complete field is customizable when user insert the snippet\ninto a form element with the website editor.\n\nDevelopment\n~~~~~~~~~~~\n\nYou can call the reusable Qweb template called\n``website_snippet_country_dropdown.country_dropdown`` in your views to add a\nsensible country-combined field, ideal for *VATs*.\n\nThe default country will be the first match among:\n\n#. Extract it from the ``default_country`` variable.\n#. Extract it from the first 2 letters of the ``default_value`` variable.\n#. The current user's country.\n#. The current website's company's country.\n#. The first country in the list.\n\nAll variables you can use to modify its behavior:\n\n* ``complete_field`` to give it a name. Usually it will match the field name.\n* ``default_value`` for the ``complete_field``.\n* ``countries`` as a ``res.country`` ORM recordset.\n* ``default_country`` as a ``res.country`` record.\n* ``no_country_placeholder``.\n\nYou can view an example in ``website_sale_checkout_country_vat`` in\nOCA/e-commerce.\n\nKnown issues / Roadmap\n======================\n\n* Add tests.\n* Snippet drag and drop `seems to be blocked by Odoo for some unknown reason.\n  <https://github.com/OCA/website/pull/230#issuecomment-236681777>`_.\n  Given the main purpose of this module is to provide a reusable template for\n  other modules to use, did not take the time to fix that use case.\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues <https://github.com/OCA/website/issues>`_.\nIn case of trouble, please check there if your issue has already been reported.\nIf you spotted it first, help us smashing it by providing a detailed and welcomed\n`feedback <https://github.com/OCA/website/issues/new?body=module:%20website_snippet_country_dropdown%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.\n\nDo not contact contributors directly about support or help with technical issues.\n\nCredits\n=======\n\nAuthors\n~~~~~~~\n\n* Tecnativa\n\nContributors\n~~~~~~~~~~~~\n\n* `Tecnativa <https://www.tecnativa.com>`_:\n\n  * Sergio Teruel\n  * Jairo Llopis\n  * Alexandre D\u00edaz\n  * Carlos Roca\n\nMaintainers\n~~~~~~~~~~~\n\nThis module is maintained by the OCA.\n\n.. image:: https://odoo-community.org/logo.png\n   :alt: Odoo Community Association\n   :target: https://odoo-community.org\n\nOCA, or the Odoo Community Association, is a nonprofit organization whose\nmission is to support the collaborative development of Odoo features and\npromote its widespread use.\n\nThis module is part of the `OCA/website <https://github.com/OCA/website/tree/13.0/website_snippet_country_dropdown>`_ project on GitHub.\n\nYou are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.\n\n\n",
    "bugtrack_url": null,
    "license": "LGPL-3",
    "summary": "Allow to select country in a dropdown",
    "version": "13.0.1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/OCA/website"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8205f07cb8f7370157ec29a155da5b604c582af2ad5751c1a4c0ec6fdd727396",
                "md5": "751b27cb4b547474d02d3a34e55e4c49",
                "sha256": "5f629a33e53c6259e5d0d3c7cf11bbcd25660585d2d3c56a5c8522f5b498effd"
            },
            "downloads": -1,
            "filename": "odoo13_addon_website_snippet_country_dropdown-13.0.1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "751b27cb4b547474d02d3a34e55e4c49",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 31899,
            "upload_time": "2023-06-28T10:31:01",
            "upload_time_iso_8601": "2023-06-28T10:31:01.679460Z",
            "url": "https://files.pythonhosted.org/packages/82/05/f07cb8f7370157ec29a155da5b604c582af2ad5751c1a4c0ec6fdd727396/odoo13_addon_website_snippet_country_dropdown-13.0.1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-28 10:31:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OCA",
    "github_project": "website",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "odoo13-addon-website-snippet-country-dropdown"
}
        
Elapsed time: 0.20140s