Merge lp:~akretion-team/openobject-addons/trunk-extensible-sale-action-invoice-create into lp:openobject-addons
Status: | Merged |
---|---|
Merged at revision: | 6597 |
Proposed branch: | lp:~akretion-team/openobject-addons/trunk-extensible-sale-action-invoice-create |
Merge into: | lp:openobject-addons |
Diff against target: |
126 lines (+35/-37) 2 files modified
sale/sale.py (+34/-36) sale/stock.py (+1/-1) |
To merge this branch: | bzr merge lp:~akretion-team/openobject-addons/trunk-extensible-sale-action-invoice-create |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Olivier Dony (Odoo) | Approve | ||
Raphaël Valyi - http://www.akretion.com (community) | Approve | ||
qdp (OpenERP) | Pending | ||
Review via email: mp+91147@code.launchpad.net |
Description of the change
This merge proposal adds a function _prepare_invoice() to the sale_order object, that builds the dict that will be used to create the invoice. It allows developers to easily change the values of the account.invoice object before it is created. It is the same kind of development as these other merge proposals by Akretion that were merged in trunk :
https:/
https:/
This merge proposal removes the function _inv_get() ; developers should now inherit the function _prepare_invoice().
This function _inv_get() is not used anywhere in the addons. It is used by 3 modules in extra-trunk :
- cci_sales : they made a near-hard copy of the function _make_invoice... they were waiting for the function _prepare_invoice() ! So they can now inherit _prepare_invoice() (or just remove the line that calls _inv_get() in _make_invoice())
- purchase_
- sale_tax_include -> this functionnality is now part of the addons
If you think it is a problem to remove the function _inv_get(), we can keep it in the code with a warning "depracated, inherit _prepare_invoice() instead".
Hello,
I approve Alexis's change: yet one of those last occasion to improve our daily accounting throughput once the base modules have been overridden, even by a simple localization.
Also Alexis cleaned up the _prepare_ order_line_ invoice_ line methods I introduced in a previous merge and removed the order ids arg as it is totally useless (we may retrieve current order id by doing line.order_id.id).
So please can this go to 6.1 too?
I feel that's cool we have been somewhat consistent with all picking and standard invoice modularization with that last change.