Browse Source

[UPD] README.rst

12.0-mig-module_prototyper_last
OCA-git-bot 5 years ago
parent
commit
51a2422428
  1. 12
      base_m2m_custom_field/static/description/index.html
  2. 2
      configuration_helper/static/description/index.html
  3. 2
      module_analysis/static/description/index.html

12
base_m2m_custom_field/static/description/index.html

@ -397,7 +397,7 @@ is needed, for example to be editable in a dedicated tree view.</p>
<span class="s1">'my_model_a_b_rel'</span><span class="p">,</span>
<span class="s1">'my_model_a_id'</span><span class="p">,</span>
<span class="s1">'my_model_b_id'</span><span class="p">,</span>
<span class="n">create_table</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
<span class="n">create_table</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="p">)</span>
@ -410,7 +410,7 @@ is needed, for example to be editable in a dedicated tree view.</p>
<span class="s1">'my_model_a_b_rel'</span><span class="p">,</span>
<span class="s1">'my_model_b_id'</span><span class="p">,</span>
<span class="s1">'my_model_a_id'</span><span class="p">,</span>
<span class="n">create_table</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
<span class="n">create_table</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="p">)</span>
@ -420,13 +420,13 @@ is needed, for example to be editable in a dedicated tree view.</p>
<span class="n">my_model_a_id</span> <span class="o">=</span> <span class="n">fields</span><span class="o">.</span><span class="n">Many2one</span><span class="p">(</span>
<span class="s1">'my.model.a'</span><span class="p">,</span>
<span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
<span class="n">index</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="c1"># Index is mandatory here</span>
<span class="n">required</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">index</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Index is mandatory here</span>
<span class="p">)</span>
<span class="n">my_model_b_id</span> <span class="o">=</span> <span class="n">fields</span><span class="o">.</span><span class="n">Many2one</span><span class="p">(</span>
<span class="s1">'my.model.b'</span><span class="p">,</span>
<span class="n">required</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span>
<span class="n">index</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="c1"># Index is mandatory here</span>
<span class="n">required</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">index</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="c1"># Index is mandatory here</span>
<span class="p">)</span>
</pre>
<p>By setting <cite>create_table=False</cite> on the Many2manyCustom field, and using the

2
configuration_helper/static/description/index.html

@ -397,7 +397,7 @@ using those defined in ‘res.company’: it avoids duplicated field definitions
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
<pre class="code python literal-block">
<span class="kn">from</span> <span class="nn">.</span> <span class="nn">company</span> <span class="kn">import</span> <span class="n">ResCompany</span>
<span class="kn">from</span> <span class="nn">.</span> <span class="n">company</span> <span class="kn">import</span> <span class="nn">ResCompany</span>
<span class="k">class</span> <span class="nc">WhatiwantConfigSettings</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">TransientModel</span><span class="p">):</span>
<span class="n">_inherit</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'res.config.settings'</span><span class="p">,</span> <span class="s1">'abstract.config.settings'</span><span class="p">]</span>

2
module_analysis/static/description/index.html

@ -454,7 +454,7 @@ files), create a custom modules and overload the module model :</p>
<span class="n">xml_documentation_qty</span> <span class="o">=</span> <span class="n">fields</span><span class="o">.</span><span class="n">Integer</span><span class="p">(</span>
<span class="n">string</span><span class="o">=</span><span class="s1">'Quantity of Comments in XML Files'</span><span class="p">)</span>
<span class="nd">&#64;api.model</span>
<span class="nd">&#64;api</span><span class="o">.</span><span class="n">model</span>
<span class="k">def</span> <span class="nf">_get_analyse_settings</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">res</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">_get_analyse_settings</span><span class="p">()</span>
<span class="k">if</span> <span class="ow">not</span> <span class="s1">'.html'</span> <span class="ow">in</span> <span class="n">res</span><span class="p">:</span>

Loading…
Cancel
Save