Merge lp://qastaging/~openerp-dev/openobject-addons/7.0-opw-595832-pna into lp://qastaging/openobject-addons/7.0

Proposed by Pinakin Nayi (OpenERP)
Status: Work in progress
Proposed branch: lp://qastaging/~openerp-dev/openobject-addons/7.0-opw-595832-pna
Merge into: lp://qastaging/openobject-addons/7.0
Diff against target: 31 lines (+13/-4)
1 file modified
stock/stock.py (+13/-4)
To merge this branch: bzr merge lp://qastaging/~openerp-dev/openobject-addons/7.0-opw-595832-pna
Reviewer Review Type Date Requested Status
Romain Deheele - Camptocamp (community) Needs Fixing
Pinakin Nayi (OpenERP) (community) Needs Resubmitting
Naresh(OpenERP) (community) Needs Fixing
Review via email: mp+178709@code.qastaging.launchpad.net

Description of the change

Hello Sir,

I improved stock module When we configure chained locations, it generates a sequence gap on delivery orders :
OUT/00002 --> OUT/00004 --> OUT/00006, etc....

Steps to reproduce :
- Create a new db with demo data
- Install module:
  - Sales management
  - Warehouse
- Put admin user in extended view (Technical Features")
- In warehouse configuration select:
  - Manage multiple locations and warehouses
- Go to Warehouse -> Configuration -> Location, select Output location
 - Edit chained location customer: Set "Chaining type" to "Manual operation"
- Create 2 sale orders with field "Create Invoice" on Delivery Order.
- Confirm Sale Orders, it generates two delivery orders with a sequence gap (OUT/00002 and OUT/00004)

Bug : https://bugs.launchpad.net/openobject-addons/+bug/1204832

Thanks,
pna

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Pinakin,

The merge proposed seems to fix the issue. just a nit that needs to be corrected.

@line:12 no need to browse the picking as the variable picking will have the browse_record instance so you can directly access the name.

Thanks,
Naresh Soni,
OpenERP Enterprise Services !

review: Needs Fixing
9350. By Pinakin Nayi (OpenERP)

[IMP]stock: nit code as there is no need to browse record

Revision history for this message
Pinakin Nayi (OpenERP) (pna-openerp) wrote :

Hello Sir,

Thanks for review.

I updated code as per suggestion.

Thanks,
pna

review: Needs Resubmitting
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

if old_ptype == 'internal' :
17 + model_name = 'stock.picking'
18 + else :
19 + model_name = 'stock.picking.' + old_ptype

Should be optimized:

model_name = 'stock.picking' + ( old_ptype != 'internal' and ('.' + old_ptype) or '')

AND
if pick_name will always be True, so should not be needed.
Instead this should be inline:

new_pick_name = picking.type == 'out' and seq_obj.get(cr, uid, 'stock.picking.' + ptype) or pick_name

Hope this helps.

(else and : should be together..pep8)

Thanks.

Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

Hello Pinakin,

Merge this branch in actual addons branch (rev9518) leads to a conflict.
Could you update/modify your branch to avoid this conflict?

Best Regards,

Romain

Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

Hello Pinakin,

Could you consider the next branch : https://code.launchpad.net/~camptocamp/ocb-addons/7.0-fix-updated-lp-1204832-RDE
Your actual proposed branch causes a conflict when you merge it in official addons.
rev 9592 takes in account your commits without conflict when you will merge it.
rev 9593 brings some improvements proposed by Serpent Consulting Services.

Thanks in advance,

Romain

review: Needs Fixing
Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

The case is getting old, and is based on old addons base.
It seems to me that the easier is to delete this branch and create a new branch by merging my proposed branch.

Best Regards,

Romain

Unmerged revisions

9350. By Pinakin Nayi (OpenERP)

[IMP]stock: nit code as there is no need to browse record

9349. By Pinakin Nayi (OpenERP)

[FIX]stock : improve sequence gap on delivery order

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.