Merge lp:~camptocamp/openerp-humanitarian-ngo/purchase-wkfl-fix_copy_origin-rde into lp:openerp-humanitarian-ngo/purchase-wkfl
Proposed by
Romain Deheele - Camptocamp
Status: | Merged |
---|---|
Merged at revision: | 71 |
Proposed branch: | lp:~camptocamp/openerp-humanitarian-ngo/purchase-wkfl-fix_copy_origin-rde |
Merge into: | lp:openerp-humanitarian-ngo/purchase-wkfl |
Diff against target: |
29 lines (+12/-0) 1 file modified
purchase_requisition_extended/model/purchase_order.py (+12/-0) |
To merge this branch: | bzr merge lp:~camptocamp/openerp-humanitarian-ngo/purchase-wkfl-fix_copy_origin-rde |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Joël Grand-Guillaume @ camptocamp | code review + no tests | Approve | |
Nicolas Bessi - Camptocamp (community) | code review, no test | Approve | |
Leonardo Pistone | code review | Needs Fixing | |
Review via email: mp+203584@code.launchpad.net |
Description of the change
Hi,
When a cost estimate is confirmed, a copy of chosen rfq is duplicated to create a PO in draftpo state.
The problem was that during this operation the origin is lost, because openerp original orm method copy clears the origin field.
This MP overwrites purchase.order copy to pick origin if PO comes from requisition.
To post a comment you must log in.
Romain,
I suggest doing that another way, that I find more clear.
if default is None:
default = {}
initial_origin = default. get('origin' )
...super...
if initial_origin:
...write...
thanks!