Merge lp:~openerp-dev/openobject-addons/7.0-opw-596283-rha into lp:openobject-addons/7.0

Proposed by Rifakat Husen (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 9386
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-596283-rha
Merge into: lp:openobject-addons/7.0
Diff against target: 29 lines (+8/-1)
2 files modified
sale_stock/stock.py (+3/-0)
stock_location/stock_location.py (+5/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-596283-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Rifakat Husen (OpenERP) (community) Needs Resubmitting
Review via email: mp+178896@code.launchpad.net

Description of the change

When it is multi step delivery where invoicing is based on delivery, wrong picking is getting invoiced. An internal picking is getting invoiced(Invoice Control=`To Be Invoiced`) instead of delivery order(Invoice Control='Not Applicable')

Steps:
- install sale_stock module
- open location `Output`, change chaining type to `Manual Opearation` from 'Automatic No Step Added'
- create sales qoutation, take any product, any qty, set invoicing option, Create Invoice = On Delivery Order
- validate quotation and check pickings
- Internal Picking is having Invoice Control as To Be Invoiced and Delivery Order is having Not Applicable, perhaps result shoud be opposite.

Fix: Only Delivery Order should be invoiced, so enable invoicing for the picking with state = out.

To post a comment you must log in.
9350. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9351. By Martin Trigaux (OpenERP)

[FIX] board: keep group by in context when adding to dashboard

9352. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9353. By Martin Trigaux (OpenERP)

[FIX] l10n_be: use float instead of string for amount in vat_intra reports

9354. By Denis Ledoux (OpenERP)

[FIX]auth_oauth: auth_oauth handle oauth error 3, auth_oauth_signup raise accessdenied instead of signuperror, auth_signup use literal_eval instead of safe_eval

9355. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9356. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9357. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9358. By Martin Trigaux (OpenERP)

[FIX] account: pass context to move line reconciliation creation (opw #594546)

9359. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9360. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9361. By Martin Trigaux (OpenERP)

[MERGE] l10n_be: add translation of belgian chart of accounts in Flemish

requires merge 5049 in server 7.0 (support of i18n_extra folder)
requires l10n_multilang preinstalled before l10n_be (to add translatable fields)
move l10n_be_wizard.yml to l10n_be_hr_payroll_account (requires an accounting plan installed to import data)
set action wizard for multichart selection opened
add translation of chart of account into nl_BE, courtesy of Geert Janssens
point_of_sale: fix default journal selection for config (broken runbot test)

9362. By Olivier Dony (Odoo)

[FIX] account_report_company: avoid including the address in the computed display name

9363. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9364. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9365. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9366. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9367. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9368. By Olivier Dony (Odoo)

[FIX] account,hr_timesheet_sheet: fix YML assertRaise-like testcases that did not verify the result, courtesy of Laetitia Gangloff (Acsone)

9369. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9370. By Martin Trigaux (OpenERP)

[FIX] sale: correct report for discount column (opw #592874)

9371. By Martin Trigaux (OpenERP)

[MERGE] [FIX] stock: use reload_on_button option in forms for reloading the form that has been modified

9372. By Martin Trigaux (OpenERP)

[FIX] account_voucher: generate empty context to avoid traceback

9373. By Martin Trigaux (OpenERP)

[FIX] point_of_sale: avoid traceback if deleted property

9374. By Martin Trigaux (OpenERP)

[MERGE] various changes
analytic_user_function: fix traceback with non-existant variable
lunch: name_get and remove create button on you lunch account view
mail: being more permissive on check to also allow creating message when have create access rights on model

9375. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9376. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9377. By Martin Trigaux (OpenERP)

[IMP] mrp: allow searching by components, better view for BoM structure

9378. By Martin Trigaux (OpenERP)

[MERGE] backport of revision 8862
mrp, sale_stock: minor usability improvements + properties in sale order lines

9379. By Thibault Delavallée (OpenERP)

[MERGE] [FIX] mail: fixed wrong parsing of multipart/mixed emails. Alternative mode is computed when browsing the parts, not from the message content type.

Added tests.

Also added some notification_email_send=none in mail demo data to avoid sending emails in demo/data/update.

9380. By Christophe Simonis (OpenERP)

[MERGE] project: migrate to aliases

9381. By Martin Trigaux (OpenERP)

[FIX] mrp, stock: permissions error on multicompany + add tests, courtesy of Camptocamp

9382. By Christophe Simonis (OpenERP)

[FIX] stock: allow modification of stock.picking.{in,out} reports via report designer

9383. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9384. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Rifakat,

The fix doesn't seems to work with stock_location installed ! The method *_prepare_chained_picking* overridden in this module will change the value of invoicing control back to 'none'.

can you check please ?

Thanks,
Naresh Soni,
OpenERP Enterprise Services !

review: Needs Fixing
9385. By Rifakat Husen (OpenERP)

[fix] stock_location: solve problem also from stock_location module where _prepare_chained_picking() is overridden

9386. By Rifakat Husen (OpenERP)

[IMP] better way to update a dict

Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Hi,

Thanks for you review, just updated the code.
Please check,
Rifakat

review: Needs Resubmitting
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Unmerged revisions

9386. By Rifakat Husen (OpenERP)

[IMP] better way to update a dict

9385. By Rifakat Husen (OpenERP)

[fix] stock_location: solve problem also from stock_location module where _prepare_chained_picking() is overridden

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_stock/stock.py'
2--- sale_stock/stock.py 2013-04-11 14:56:36 +0000
3+++ sale_stock/stock.py 2013-08-26 12:43:29 +0000
4@@ -31,6 +31,9 @@
5 values = super(stock_move, self)._prepare_chained_picking(cr, uid, picking_name, picking, picking_type, moves_todo, context=context)
6 if picking.sale_id:
7 values['sale_id'] = picking.sale_id.id
8+ if values.get('type') == 'out' and picking.sale_id.order_policy == 'picking':
9+ values['invoice_state'] = '2binvoiced'
10+ picking.write({'invoice_state': 'none'})
11 return values
12
13 class stock_picking(osv.osv):
14
15=== modified file 'stock_location/stock_location.py'
16--- stock_location/stock_location.py 2012-12-10 11:16:54 +0000
17+++ stock_location/stock_location.py 2013-08-26 12:43:29 +0000
18@@ -112,7 +112,11 @@
19
20 def _prepare_chained_picking(self, cr, uid, picking_name, picking, picking_type, moves_todo, context=None):
21 res = super(stock_move, self)._prepare_chained_picking(cr, uid, picking_name, picking, picking_type, moves_todo, context=context)
22- res.update({'invoice_state': moves_todo[0][1][6] or 'none'})
23+ state = moves_todo[0][1][6] or 'none'
24+ if picking.sale_id:
25+ if res.get('type') == 'out' and picking.sale_id.order_policy == 'picking':
26+ state = '2binvoiced'
27+ res.update(invoice_state=state)
28 return res
29 stock_move()
30