[UPD] Update web_tree_dynamic_colored_field.pot

[UPD] README.rst
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-15.0/web-15.0-web_tree_dynamic_colored_field
Translate-URL: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_tree_dynamic_colored_field/

Added translation using Weblate (French)
pull/3107/head
oca-ci 2022-10-17 13:53:17 +00:00 committed by Enric Tobella
parent 8410d0348c
commit 04a6b859e8
5 changed files with 65 additions and 41 deletions

View File

@ -2,10 +2,13 @@
Colorize field in tree views Colorize field in tree views
============================ ============================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1ec927034e6d02f4933f782ca8f90b78fb16b0c8076ca2b3ccfad0e5872caca4
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status :target: https://odoo-community.org/page/development-status
@ -19,9 +22,9 @@ Colorize field in tree views
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_tree_dynamic_colored_field :target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_tree_dynamic_colored_field
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/162/15.0 :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=15.0
:alt: Try me on Runbot :alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@ -70,6 +73,21 @@ Usage
With this example, column which renders 'name' field will have its text colored in white on a customer records. With this example, column which renders 'name' field will have its text colored in white on a customer records.
* In the tree view declaration, use ``options='"color_field": "my_color"'`` attribute in the ``tree`` tag::
...
<field name="arch" type="xml">
<tree string="View name" colors="color_field: my_color" >
...
<field name="my_color" invisible="1"/>
...
</tree>
</field>
...
* You can also use ``colors="bg_color_field: my_color"`` to defined the field name that will be used
for the background color of the line.
* If you want to use more than one color, you can split the attributes using ';': * If you want to use more than one color, you can split the attributes using ';':
.. code:: .. code::
@ -112,7 +130,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_tree_dynamic_colored_field%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/web/issues/new?body=module:%20web_tree_dynamic_colored_field%0Aversion:%2015.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. Do not contact contributors directly about support or help with technical issues.
@ -134,6 +152,7 @@ Contributors
* Artem Kostyuk <a.kostyuk@mobilunity.com> * Artem Kostyuk <a.kostyuk@mobilunity.com>
* Guewen Baconnier <guewen.baconnier@camptocamp.com> * Guewen Baconnier <guewen.baconnier@camptocamp.com>
* Phuc Tran Thanh <phuc@trobz.com> * Phuc Tran Thanh <phuc@trobz.com>
* Sylvain LE GAL <https://twitter.com/legalsylvain>
Other credits Other credits
~~~~~~~~~~~~~ ~~~~~~~~~~~~~

View File

@ -3,7 +3,7 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 14.0\n" "Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"

View File

@ -1,14 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"

View File

@ -3,18 +3,18 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Colorize field in tree views</title> <title>Colorize field in tree views</title>
<style type="text/css"> <style type="text/css">
/* /*
:Author: David Goodger (goodger@python.org) :Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $ :Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain. :Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils. Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet. customize this style sheet.
*/ */
@ -366,8 +366,10 @@ ul.auto-toc {
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1ec927034e6d02f4933f782ca8f90b78fb16b0c8076ca2b3ccfad0e5872caca4
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/15.0/web_tree_dynamic_colored_field"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_tree_dynamic_colored_field"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/15.0/web_tree_dynamic_colored_field"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_tree_dynamic_colored_field"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module aims to add support for dynamically coloring fields in tree view <p>This module aims to add support for dynamically coloring fields in tree view
according to data in the record.</p> according to data in the record.</p>
<div class="section" id="features"> <div class="section" id="features">
@ -411,6 +413,22 @@ With this example, column which renders 'name' field will have its background co
With this example, column which renders 'name' field will have its text colored in white on a customer records. With this example, column which renders 'name' field will have its text colored in white on a customer records.
</pre> </pre>
</li> </li>
<li><p class="first">In the tree view declaration, use <tt class="docutils literal"><span class="pre">options='&quot;color_field&quot;:</span> &quot;my_color&quot;'</tt> attribute in the <tt class="docutils literal">tree</tt> tag:</p>
<pre class="literal-block">
...
&lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;
&lt;tree string=&quot;View name&quot; colors=&quot;color_field: my_color&quot; &gt;
...
&lt;field name=&quot;my_color&quot; invisible=&quot;1&quot;/&gt;
...
&lt;/tree&gt;
&lt;/field&gt;
...
</pre>
</li>
<li><p class="first">You can also use <tt class="docutils literal"><span class="pre">colors=&quot;bg_color_field:</span> my_color&quot;</tt> to defined the field name that will be used
for the background color of the line.</p>
</li>
<li><p class="first">If you want to use more than one color, you can split the attributes using ;:</p> <li><p class="first">If you want to use more than one color, you can split the attributes using ;:</p>
</li> </li>
</ul> </ul>
@ -419,21 +437,21 @@ options='{&quot;fg_color&quot;: &quot;red:red_color == True; green:green_color =
</pre> </pre>
<p>Example:</p> <p>Example:</p>
<pre class="code xml literal-block"> <pre class="code xml literal-block">
... ...<span class="w">
<span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;arch&quot;</span> <span class="na">type=</span><span class="s">&quot;xml&quot;</span><span class="nt">&gt;</span> </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;arch&quot;</span><span class="w"> </span><span class="na">type=</span><span class="s">&quot;xml&quot;</span><span class="nt">&gt;</span><span class="w">
<span class="nt">&lt;tree</span> <span class="na">string=</span><span class="s">&quot;View name&quot;</span><span class="nt">&gt;</span> </span><span class="nt">&lt;tree</span><span class="w"> </span><span class="na">string=</span><span class="s">&quot;View name&quot;</span><span class="nt">&gt;</span><span class="w">
... </span>...<span class="w">
<span class="nt">&lt;field</span> <span class="na">name=</span><span class="s">&quot;name&quot;</span> <span class="na">options=</span><span class="s">'{&quot;fg_color&quot;: &quot;red:red_color == True; green:green_color == True&quot;}'</span><span class="nt">/&gt;</span> </span><span class="nt">&lt;field</span><span class="w"> </span><span class="na">name=</span><span class="s">&quot;name&quot;</span><span class="w"> </span><span class="na">options=</span><span class="s">'{&quot;fg_color&quot;: &quot;red:red_color == True; green:green_color == True&quot;}'</span><span class="nt">/&gt;</span><span class="w">
... </span>...<span class="w">
<span class="nt">&lt;/tree&gt;</span> </span><span class="nt">&lt;/tree&gt;</span><span class="w">
<span class="nt">&lt;/field&gt;</span> </span><span class="nt">&lt;/field&gt;</span><span class="w">
... </span>...<span class="w">
With this example, the content of the field named `my_color` will be used to </span>With<span class="w"> </span>this<span class="w"> </span>example,<span class="w"> </span>the<span class="w"> </span>content<span class="w"> </span>of<span class="w"> </span>the<span class="w"> </span>field<span class="w"> </span>named<span class="w"> </span>`my_color`<span class="w"> </span>will<span class="w"> </span>be<span class="w"> </span>used<span class="w"> </span>to<span class="w">
populate the `my_color` CSS value. Use a function field to return whichever </span>populate<span class="w"> </span>the<span class="w"> </span>`my_color`<span class="w"> </span>CSS<span class="w"> </span>value.<span class="w"> </span>Use<span class="w"> </span>a<span class="w"> </span>function<span class="w"> </span>field<span class="w"> </span>to<span class="w"> </span>return<span class="w"> </span>whichever<span class="w">
color you want depending on the other record values. Note that this </span>color<span class="w"> </span>you<span class="w"> </span>want<span class="w"> </span>depending<span class="w"> </span>on<span class="w"> </span>the<span class="w"> </span>other<span class="w"> </span>record<span class="w"> </span>values.<span class="w"> </span>Note<span class="w"> </span>that<span class="w"> </span>this<span class="w">
overrides the rest of `colors` attributes, and that you need the tree </span>overrides<span class="w"> </span>the<span class="w"> </span>rest<span class="w"> </span>of<span class="w"> </span>`colors`<span class="w"> </span>attributes,<span class="w"> </span>and<span class="w"> </span>that<span class="w"> </span>you<span class="w"> </span>need<span class="w"> </span>the<span class="w"> </span>tree<span class="w">
to load your field in the first place by adding it as invisible field. </span>to<span class="w"> </span>load<span class="w"> </span>your<span class="w"> </span>field<span class="w"> </span>in<span class="w"> </span>the<span class="w"> </span>first<span class="w"> </span>place<span class="w"> </span>by<span class="w"> </span>adding<span class="w"> </span>it<span class="w"> </span>as<span class="w"> </span>invisible<span class="w"> </span>field.
</pre> </pre>
<p><strong>Note that you should always use single quotes for fields ``options`` and wrap nested values in double quotes since ``options`` is a JSON object.</strong></p> <p><strong>Note that you should always use single quotes for fields ``options`` and wrap nested values in double quotes since ``options`` is a JSON object.</strong></p>
</div> </div>
@ -451,7 +469,7 @@ This feature has then been dropped, but could be reimplement in another way.</li
<h1>Bug Tracker</h1> <h1>Bug Tracker</h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. 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 If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_tree_dynamic_colored_field%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_tree_dynamic_colored_field%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
@ -472,6 +490,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Artem Kostyuk &lt;<a class="reference external" href="mailto:a.kostyuk&#64;mobilunity.com">a.kostyuk&#64;mobilunity.com</a>&gt;</li> <li>Artem Kostyuk &lt;<a class="reference external" href="mailto:a.kostyuk&#64;mobilunity.com">a.kostyuk&#64;mobilunity.com</a>&gt;</li>
<li>Guewen Baconnier &lt;<a class="reference external" href="mailto:guewen.baconnier&#64;camptocamp.com">guewen.baconnier&#64;camptocamp.com</a>&gt;</li> <li>Guewen Baconnier &lt;<a class="reference external" href="mailto:guewen.baconnier&#64;camptocamp.com">guewen.baconnier&#64;camptocamp.com</a>&gt;</li>
<li>Phuc Tran Thanh &lt;<a class="reference external" href="mailto:phuc&#64;trobz.com">phuc&#64;trobz.com</a>&gt;</li> <li>Phuc Tran Thanh &lt;<a class="reference external" href="mailto:phuc&#64;trobz.com">phuc&#64;trobz.com</a>&gt;</li>
<li>Sylvain LE GAL &lt;<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="other-credits"> <div class="section" id="other-credits">