Merge lp:~openerp-dev/openobject-addons/7.0-opw-590221 into lp:openobject-addons/7.0
Status: | Merged |
---|---|
Merged at revision: | 8989 |
Proposed branch: | lp:~openerp-dev/openobject-addons/7.0-opw-590221 |
Merge into: | lp:openobject-addons/7.0 |
Diff against target: |
195 lines (+71/-13) 6 files modified
project_mrp/test/project_task_procurement.yml (+1/-1) purchase/company.py (+6/-2) purchase/purchase.py (+27/-3) sale_stock/company.py (+6/-3) sale_stock/sale_stock.py (+27/-2) sale_stock/test/picking_order_policy.yml (+4/-2) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-590221 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Naresh(OpenERP) (community) | Needs Fixing | ||
Olivier Dony (Odoo) | Pending | ||
Review via email: mp+155543@code.launchpad.net |
Description of the change
timezone issue: when converting the "order date" of Sales Orders or Purchase Orders into the "reference date" for scheduling delivery and procurement, the "order date" is taken as if it was in UTC like all datetime values. In reality it is a fields.date and therefore expressed in the user's timezone.
Test Case
Modules Installed Sale, Purchase Requisition, MRP and PST time zone of User.
Create SO with Order date = 2012-03-26 and When SO is confirmed, it calculates the Expected DO Date like [Sale Order Date (on the SO) + Customer Lead Time (on the SO line, coming from the product) - Security Days (on the company)] so expected date shown to according to PST tz will be 2012-03-25 17:00:00 instead of 2012-03-26 00:00:00. Same implies to PO. as mention on Bug report.
And
Also Improved the confusing and mis-leading Tool-tips for the Company Level Lead time fields Purchase Lead Time and Security Days.
Kindly Review this.
Thank You
Hi Jigar,
Seems a cool fix ! Such a trap was not cached before where conversion being on a field type of different nature.
However few improvements I feel we should do !
It will be nice if we make this method in general so that any one can use it easily. Say we can define this in openerp/ tools/misc. py and then can be accessed where ever its needed. This will reduce code duplicity too.
server/
*Usability* : we can improve a bit the help text added or can have community opinion on this !
*Supplier Order*:
This is the leads/security time for each purchase order. For company security purpose this many days will be removed from the date what suppliers has promised to you.
*Customer Order*:
For company security purpose this many days will be removed from the date, what you have promised to customers,
to cope up with any problems of procurement, final shipping, order negotiation etc.
Thanks,
Naresh Soni
OpenERP Enterprise Services