Author: |
Magnus - Willem Hulshof |
License: |
no license |
Branch: |
WH-subs |
Repository: |
dave-prosee/vertical-publishing |
Dependencies: |
base |
Languages: |
Markdown (38, 9.2%),
Python (241, 58.6%),
and
XML (132, 32.1%) |
Other branches: |
10.0,
10.0-sushma,
WH-compute_taxes,
dev-praveen,
pr/40,
productie,
productie-accept,
revert-30-T0032,
and
test-deploy-stephan |
Other repositories: |
Dhrupesh/vertical-publishing,
EefketG/vertical-publishing,
kumarinie/vertical-publishing,
luciebolt/vertical-publishing,
magnuscolors/vertical-publishing,
praveen-kumarG/vertical-publishing,
sasakuma/vertical-publishing,
and
vidtsin/vertical-publishing |
<h1>Time Dependent</h1>
<p>This is a generic module which can be used on any Model for tracking values changes in a specific time period.</p>
<ul>
<li>Tracking is done for selected Model with selected Fields.</li>
<li>Tracking values are based on Records with various Validity Periods.</li>
<li>Validity Periods help to locate changes for specific time duration.</li>
<li>And have different "Time Dependent > Configuration" with different Models (res.partner / account.account / product.template / etc).</li>
</ul>
<p>Notes(Validation Periods in related model's record):
- Tracking can't be done for past date.
- Tracking is enabled only when configured field's value changes.
- Last tracking always consider as infinity.</p>
<h1>Configuration</h1>
<ul>
<li>After the installation of this module, you need to add some entries in "Settings > Technical > Time Dependent > Configuration".</li>
<li>Create a record in "Time Dependent > Configuration" by selecting Model (Ex: res.partner) and it's Fields (Ex: name, street, etc.). Note: Only following field types are allowed ['boolean', 'char', 'text', 'integer', 'float', 'date', 'datetime'].</li>
<li>In related model's record, set Validation Period in which today's date lies.</li>
</ul>
<h1>Usage (for user)</h1>
<ul>
<li>Go to related Model (Ex: res.partner) and update values of any field specified in "Time Dependent > Configuration".</li>
<li>You can find the changes tracked in configured model's form view.</li>
</ul>
<h1>Usage (for module dev)</h1>
<ul>
<li>Add this time<em>dependent as a dependency in _</em>manifest__.py</li>
</ul>
<p>Below is example with Model (res.partner):</p>
<ul>
<li>Inherit time.dependent:</li>
</ul>
<p>.. code:: python</p>
<pre><code> class Partner(models.Model):
_name = 'res.partner'
_inherit = ['res.partner', 'time.dependent'] //For existing Model
#Note: For new Model
_inherit = 'time.dependent'
</code></pre>
<p>.. Form view::xml</p>
<pre><code> # Valid On in source model
<field name="validity_date"/>
# Add new tab for time faced records
<page name="time_faced" string="Time Dependent Address Data">
<field name="dependent_ids" readonly="1"/>
</page>
</code></pre>