Merge lp:~openerp-dev/openobject-addons/6.1-opw-573823-rha into lp:openobject-addons/6.1

Proposed by Rifakat Husen (OpenERP)
Status: Approved
Approved by: Vinay Rana (OpenERP)
Approved revision: 6769
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-573823-rha
Merge into: lp:openobject-addons/6.1
Diff against target: 33 lines (+8/-3)
1 file modified
point_of_sale/point_of_sale.py (+8/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-573823-rha
Reviewer Review Type Date Requested Status
Vinay Rana (OpenERP) (community) Approve
Xavier ALT Pending
Naresh(OpenERP) Pending
Review via email: mp+103107@code.launchpad.net

Description of the change

Hello,

In Point of Sale, for PoS Order when we don't fill field 'Connected Salesman' and try to
post accounting entries through button 'Post Entries' then we get the error.

Also solved problem for tax account, we any product has default tax configured and tax is not configured with tax account then in that case
product's account should be used.

Solved this problem, please review it.

Thanks,
Rifakat Haradwala

To post a comment you must log in.
6750. By Quentin (OpenERP) <email address hidden>

[IMP] portal: improved inheritancy when creating a new portal user

6751. By Quentin (OpenERP) <email address hidden>

[REF] l10n_be: added some comments

6752. By Quentin (OpenERP) <email address hidden>

[FIX] portal: moved the prepare_user_data on wizard rather than on the user

6753. By Antony Lesuisse (OpenERP)

[FIX] home action

6754. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6755. By nel

[FIX] stock: check if the move exists to avoid the key error

6756. By nel

[FIX] stock: small important fix

6757. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6758. By nel

[FIX] stock: check if currency on product or picking exists

6759. By Olivier Laurent (Open ERP)

[FIX] l10n_multilang should be certified since it's a dependancy for a certified module (l10n_ch)

6760. By Olivier Laurent (Open ERP)

[FIX] raise clear except_osv instead of traceback

6761. By Olivier Laurent (Open ERP)

[FIX] added missing certificate number

6762. By Olivier Dony (Odoo)

[MERGE] crm: multiple bugfixes for mass-conversion wizards

6763. By Olivier Dony (Odoo)

[MERGE] crm.lead: bugfixes for saleman allocation and convert to opportunity

6764. By Quentin (OpenERP) <email address hidden>

[MERGE] some fixes in constraints in account_coda

6765. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6766. By Xavier ALT

[MERGE] server action: fix missing active_model in context when calling server action run()

6767. By Xavier ALT

[MERGE] project_gtd: fix UnicodeDecodeError on GTD Task search view when user language is different than English

6768. By Xavier ALT

[MERGE] OPW 573248: crm: do not round localized user value as this will display NaN of kanban view (ex: decimal separator <> '.')

6769. By Rifakat Husen (OpenERP)

[FIX] point_of_sale: fix problem for default product account in case tax doesn't have tax account

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

The propose patch wil fix the issue.

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

Hello,

This bug was qualified as Confirmed(technically) on Trunk (means still existing).as 'Post Entries' button is removed from 7.0 but patch proposed is a genuine technically looking at the code, A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-opw-573823-port-mma/+merge/132288 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Unmerged revisions

6769. By Rifakat Husen (OpenERP)

[FIX] point_of_sale: fix problem for default product account in case tax doesn't have tax account

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py 2012-02-13 16:12:01 +0000
+++ point_of_sale/point_of_sale.py 2012-04-26 10:02:42 +0000
@@ -445,8 +445,9 @@
445 if order.state<>'paid': continue445 if order.state<>'paid': continue
446446
447 curr_c = res_obj.browse(cr, uid, uid).company_id447 curr_c = res_obj.browse(cr, uid, uid).company_id
448 comp_id = res_obj.browse(cr, order.user_id.id, order.user_id.id).company_id448 comp_id = False
449 comp_id = comp_id and comp_id.id or False449 if order.user_id:
450 comp_id = res_obj.browse(cr, order.user_id.id, order.user_id.id).company_id.id
450 to_reconcile = []451 to_reconcile = []
451 group_tax = {}452 group_tax = {}
452 account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context).id453 account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context).id
@@ -464,12 +465,16 @@
464 taxes = [t for t in line.product_id.taxes_id]465 taxes = [t for t in line.product_id.taxes_id]
465 computed = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit * (100.0-line.discount) / 100.0, line.qty)466 computed = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit * (100.0-line.discount) / 100.0, line.qty)
466 computed_taxes = computed['taxes']467 computed_taxes = computed['taxes']
468 product_income_acc = line.product_id.product_tmpl_id.property_account_income and \
469 line.product_id.product_tmpl_id.property_account_income.id or \
470 line.product_id.categ_id.property_account_income_categ and \
471 line.product_id.categ_id.property_account_income_categ.id
467472
468 for tax in computed_taxes:473 for tax in computed_taxes:
469 tax_amount += round(tax['amount'], 2)474 tax_amount += round(tax['amount'], 2)
470 group_key = (tax['tax_code_id'],475 group_key = (tax['tax_code_id'],
471 tax['base_code_id'],476 tax['base_code_id'],
472 tax['account_collected_id'])477 tax['account_collected_id'] or product_income_acc)
473478
474 if group_key in group_tax:479 if group_key in group_tax:
475 group_tax[group_key] += round(tax['amount'], 2)480 group_tax[group_key] += round(tax['amount'], 2)