|
| 1 | +===================== |
| 2 | +Web Portal Properties |
| 3 | +===================== |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:78e97cb87d23dcc9399efaa2ef26bdaed9413fd691e1725b324c23c1461a71b7 |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Beta |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/web/tree/17.0/web_portal_properties |
| 21 | + :alt: OCA/web |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_portal_properties |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +This module creates a new field that can be used to add a new parameter |
| 32 | +on field property description. This parameter will allow us to show some |
| 33 | +parameters on portal view. |
| 34 | + |
| 35 | +**Table of contents** |
| 36 | + |
| 37 | +.. contents:: |
| 38 | + :local: |
| 39 | + |
| 40 | +Configuration |
| 41 | +============= |
| 42 | + |
| 43 | +Just modify the definition field like |
| 44 | + |
| 45 | +.. code:: python |
| 46 | +
|
| 47 | + from odoo import models |
| 48 | +
|
| 49 | + from odoo.addons.web_portal_properties.fields import PortalPropertiesDefinition |
| 50 | +
|
| 51 | +
|
| 52 | + class ProjectProject(models.Model): |
| 53 | + _inherit = "project.project" |
| 54 | +
|
| 55 | + task_properties_definition = PortalPropertiesDefinition() |
| 56 | +
|
| 57 | +Then, use the widget ``portal_properties`` on your field to allow the |
| 58 | +edition for the user. |
| 59 | + |
| 60 | +Finally, on the portal template add this snippet with the right |
| 61 | +parameters: |
| 62 | + |
| 63 | +.. code:: xml |
| 64 | +
|
| 65 | + <?xml version="1.0" encoding="UTF-8" ?> |
| 66 | + <odoo> |
| 67 | + <template id="portal_my_task" inherit_id="project.portal_my_task"> |
| 68 | + <xpath expr="//div[@id='card_body']" position="inside"> |
| 69 | +
|
| 70 | + <t t-call="web_portal_properties.portal_properties"> |
| 71 | + <t t-set="properties_record" t-value="task" /> |
| 72 | + <t t-set="properties_field" t-value="'task_properties'" /> |
| 73 | + </t> |
| 74 | + </xpath> |
| 75 | + </template> |
| 76 | + </odoo> |
| 77 | +
|
| 78 | +Usage |
| 79 | +===== |
| 80 | + |
| 81 | +On form view, we will be able to set a new parameter, |
| 82 | +``Show in portal``. |
| 83 | + |
| 84 | +|image| |
| 85 | + |
| 86 | +On portal, we will be able to see the parameters. |
| 87 | + |
| 88 | +|image1| |
| 89 | + |
| 90 | +.. |image| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_portal_properties/static/description/form_view.png |
| 91 | +.. |image1| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_portal_properties/static/description/portal_view.png |
| 92 | + |
| 93 | +Known issues / Roadmap |
| 94 | +====================== |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +Bug Tracker |
| 99 | +=========== |
| 100 | + |
| 101 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_. |
| 102 | +In case of trouble, please check there if your issue has already been reported. |
| 103 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 104 | +`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_portal_properties%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 105 | + |
| 106 | +Do not contact contributors directly about support or help with technical issues. |
| 107 | + |
| 108 | +Credits |
| 109 | +======= |
| 110 | + |
| 111 | +Authors |
| 112 | +------- |
| 113 | + |
| 114 | +* Dixmit |
| 115 | + |
| 116 | +Contributors |
| 117 | +------------ |
| 118 | + |
| 119 | +- `Dixmit <https://www.dixmit.com>`__ |
| 120 | + |
| 121 | + - Enric Tobella |
| 122 | + |
| 123 | +Maintainers |
| 124 | +----------- |
| 125 | + |
| 126 | +This module is maintained by the OCA. |
| 127 | + |
| 128 | +.. image:: https://odoo-community.org/logo.png |
| 129 | + :alt: Odoo Community Association |
| 130 | + :target: https://odoo-community.org |
| 131 | + |
| 132 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 133 | +mission is to support the collaborative development of Odoo features and |
| 134 | +promote its widespread use. |
| 135 | + |
| 136 | +This module is part of the `OCA/web <https://github.com/OCA/web/tree/17.0/web_portal_properties>`_ project on GitHub. |
| 137 | + |
| 138 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments