Delete recurring invoice lines when their contract is deleted.
Otherwise, when a contract is deleted, the lines remain orphan with no way to
access it or may generate wrong invoice (should not happen in standard as only
accessed through contracts via recurring_invoice_line_ids).
Fixes#6801
When automatically generating invoices, contract should browse the fiscal position by calling
the function get_fiscal_position of the account.fiscal.position class instead of checking the
property field on the partner
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
When creating the recurring invoices of the contracts, the invoices accounts(ir.property) must be set according to the company of the contract, not according to the company of the user creating the invoices
the product_id_change name is reset if name is not passed to method args
the product_id_change call in account_analytic_view set name as false so it is reset each time the product is change
the yearly interval add a year to the next recurring date instead of one month
product_id_change set the description with the same behavior as sale orders
product_id_change set the price unit according to the pricelist
_prepare_invoice is split into two sub methods, _prepare_invoice_data and _prepare_invoice_line
_prepare_invoice actually prepare the invoice values instead of directly creating the invoice
The additional parameters were made to avoid overwriting values when changing of template.
As we can not add parameters in only one module, we overwrite values only for not saved records.
This mitigates the overwrite while not changing the API.
bzr revid: mat@openerp.com-20140508083948-gkk7d1250a8znhlt
In addition, do not set the line description as the product name + product description, only the product description: same behavior than in invoices and sale orders
bzr revid: dle@openerp.com-20140429112147-hqfqd0y487s817n7
The id of the sale pricelist of the customer was set as currency_id, instead of using the id of the currency of the pricelist. (Obviously)
Furthermore, the currency of the contract pricelist takes the lead.
Then, if none of these two are set, we choose the currency of the company, finally.
bzr revid: dle@openerp.com-20140204115226-rowmbr5223fcu08k