[FIX+IMP+MIG] contract: Several refinements:

* Remove incorrect oldname attributes.
* Add filter on partners for running contracts (+ a support o2m field for that).
* Cover more tables in model renaming + cleaner code using a loop.
* Don't copy contract lines, but rename table + copy contract records on pre.
* Contract code is now populated to "Reference/Description" field in invoice.
* Order on new contract model has been restored to the same as old analytic accounts.
This commit is contained in:
Pedro M. Baeza
2019-09-13 11:40:47 +02:00
committed by Francisco Ivan Anton Prieto
parent f55b537d08
commit a2cd6455ad
79 changed files with 63545 additions and 15851 deletions

View File

@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Contracts Management - Recurring</title>
<title>Recurring - Contracts Management</title>
<style type="text/css">
/*
@@ -360,8 +360,8 @@ ul.auto-toc {
</style>
</head>
<body>
<div class="document" id="contracts-management-recurring">
<h1 class="title">Contracts Management - Recurring</h1>
<div class="document" id="recurring-contracts-management">
<h1 class="title">Recurring - Contracts Management</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
@@ -393,33 +393,32 @@ user access rights.</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<p>To use this module, you need to:</p>
<ol class="arabic simple">
<li>Go to Accounting -&gt; Contracts and select or create a new contract.</li>
<li>Check <em>Generate recurring invoices automatically</em>.</li>
<li>Fill fields for selecting the recurrency and invoice parameters:<ul>
<li>Journal</li>
<li>Pricelist</li>
<li>Period. It can be any interval of days, weeks, months, months last day or
years.</li>
<li>Start date and next invoice date.</li>
<li>Invoicing type: pre-paid or post-paid.</li>
<li>Contracts are in Invoicing -&gt; Customers -&gt; Customer and Invoicing -&gt; Vendors -&gt; Supplier Contracts</li>
<li>When creating a contract, fill fields for selecting the invoicing parameters:<ul>
<li>a journal</li>
<li>a price list (optional)</li>
</ul>
</li>
<li>Add the lines to be invoiced with the product, description, quantity and
price.</li>
<li>You can mark Auto-price? for having a price automatically obtained applying
the pricelist to the product price.</li>
<li>You have the possibility to use the markers #START# or #END# in the
description field to show the start and end date of the invoiced period.</li>
<li>Choosing between pre-paid and post-paid, you modify the dates that are shown
with the markers.</li>
<li>A cron is created with daily interval, but if you are in debug mode, you can
click on <em>Create invoices</em> to force this action.</li>
<li>Click <em>Show recurring invoices</em> link to show all invoices created by the
<li>And add the lines to be invoiced with:<ul>
<li>the product with a description, a quantity and a price</li>
<li>the recurrence parameters: interval (days, weeks, months, months last day or years),
start date, date of next invoice (automatically computed, can be modified) and end date (optional)</li>
<li>auto-price, for having a price automatically obtained from the price list</li>
<li>#START# or #END# in the description field to display the start/end date of
the invoiced period in the invoice line description</li>
<li>pre-paid (invoice at period start) or post-paid (invoice at start of next period)</li>
</ul>
</li>
<li>The “Generate Recurring Invoices from Contracts” cron runs daily to generate the invoices.
If you are in debug mode, you can click on the invoice creation button.</li>
<li>The <em>Show recurring invoices</em> shortcut on contracts shows all invoices created from the
contract.</li>
<li>Click on <em>Print &gt; Contract</em> menu to print contract report.</li>
<li>Click on <em>Send by Email</em> button to send contract by email.</li>
<li>The contract report can be printed from the Print menu</li>
<li>The contract can be sent by email with the <em>Send by Email</em> button</li>
<li>Contract templates can be created from the Configuration -&gt; Contracts -&gt; Contract Templates menu.
They allow to define default journal, price list and lines when creating a contract.
To use it, just select the template on the contract and fields will be filled automatically.</li>
</ol>
</div>
<div class="section" id="known-issues-roadmap">
@@ -456,6 +455,9 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Vicent Cubells &lt;<a class="reference external" href="mailto:vicent.cubells&#64;tecnativa.com">vicent.cubells&#64;tecnativa.com</a>&gt;</li>
<li>Miquel Raïch &lt;<a class="reference external" href="mailto:miquel.raich&#64;eficent.com">miquel.raich&#64;eficent.com</a>&gt;</li>
<li>Souheil Bejaoui &lt;<a class="reference external" href="mailto:souheil.bejaoui&#64;acsone.eu">souheil.bejaoui&#64;acsone.eu</a>&gt;</li>
<li>Thomas Binsfeld &lt;<a class="reference external" href="mailto:thomas.binsfeld&#64;acsone.eu">thomas.binsfeld&#64;acsone.eu</a>&gt;</li>
<li>Rafael Blasco &lt;<a class="reference external" href="mailto:rafael.blasco&#64;tecnativa.com">rafael.blasco&#64;tecnativa.com</a>&gt;</li>
<li>Guillaume Vandamme &lt;<a class="reference external" href="mailto:guillaume.vandamme&#64;acsone.eu">guillaume.vandamme&#64;acsone.eu</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">