Merge lp:~openerp-dev/openobject-addons/6.1-opw-577235-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: no longer in the source branch.
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-577235-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 53 lines (+12/-2)
3 files modified
account/account.py (+1/-1)
account/account_invoice.py (+4/-0)
account/account_move_line.py (+7/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-577235-skh
Reviewer Review Type Date Requested Status
Somesh Khare (community) Needs Resubmitting
Naresh(OpenERP) (community) Approve
Nehal Panchal (OpenERP) (community) Needs Resubmitting
Review via email: mp+118350@code.launchpad.net

Description of the change

Helo Sir,

[FIX]account: Confirming a customer invoice with the account have secondary currency as company currency does not work.

Steps to reproduce:
1. Create 3 Account type: receivable:
400000 : no secondary currency
400001 : secondary currency = company currency (=EUR)
400002 : secondary currency = USD
2. Create a Customer Invoice "Invoice Currency = EUR" and select the account 400001 and Try to Confirm the invoice, Raise Error.

Kindly review the branch and please share your views on it.

Thanks
Somesh Khare

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

Launchpad automatic translations update.

6936. By Xavier ALT

[MERGE] OPW 576898: stock: when changing stock.move product lot, do not crash if user didn't fill the product field

6937. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6938. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6939. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6940. By Olivier Dony (Odoo)

[MERGE] mail.thread: fix message_process to avoid duplicate deliveries

Due to a programming error in the code, any message that had
several values in the References header create as many
duplicate copies of the message as they were previous
messages in the discussion.
Also cleaned up and simplified the code.

6941. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6942. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6943. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

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

[MERGE] l10n_be fixes

6945. By Olivier Dony (Odoo)

[FIX] OPW 576675: base_crypt: avoid causing TransactionRollbackErrors after each registry reload

See individual commit message for more info

6946. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6947. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6948. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6949. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6950. By Xavier ALT

[MERGE] OPW 576461: account: on invoice move creation, correctly compute quantity and amount currency when journal is configured for grouping

6951. By Xavier ALT

[MERGE] OPW 574507: mrp: 'change qty' wizard on MO have to also update the related picking list stock move quantity

6952. By Olivier Dony (Odoo)

[MERGE] OPW 578181: fix missing column in hr.holiday list, making group by date_from fail miserably

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

[FIX] account_voucher: supplier payment, accounting entry generation

6954. By Xavier ALT

[MERGE] OPW 576484: account: fix invoice residual, avoid adding multiple times residual for same partial reconcile

6955. By Xavier ALT

[MERGE] OPW 577014: email_template: for not force mass_mail in mail.compose.message wizard, if user is working on a single resource

6956. By Xavier ALT

[MERGE] OPW 576491: edi + email_template: correctly generate edi_web_view_url when sending email from mail.compose.message wizard

 * edi: improve generation/usage of edi_web_url_view for template rendering

   - wrap edi_web_url_view generation to _edi_get_object_web_url_view() method.
   - automatically add 'edi_web_url_view' to all email.template rendering context

   - introduce LazyEdiWebUrlViewGetter class, to allow resolving record wihtin
     template rendering context - only when necessary. This to prevent generating
     unrequested edi_web_url_view links

 * mail & email_template: allow to modify render_template context

   - add _prepare_render_template_context() method to allow modifying context
     before rendering template.

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

[MERGE] fixes in account_voucher

6958. By Xavier ALT

[FIX] OPW 577963: ir_attachment: speed up ir.attachment search for large databases

6959. By Olivier Dony (Odoo)

[FIX] document: complete previous fix, restore sort order after filtering

6960. By Xavier ALT

[MERGE] BUG 1039664: edi: fix wrong cursor when generating edi_web_url_view

  regression from revid: <email address hidden>

6961. By Xavier ALT

[MERGE] OPW 577140: stock: use float_compare() to check if initial and provided quantity equals - based on UoM rounding

6962. By Olivier Dony (Odoo)

[MERGE] OPW 576610: always reuse printed invoice instead of regenerating

Backport of trunk fix r.7215
revid:<email address hidden>

6963. By Xavier ALT

[MERGE] OPW 267641: crm/crm_action_rule: mail action are not sent to both action and current watchers

6964. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

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

[MERGE] staging branch with fixes

6966. By Xavier ALT

[MERGE] OPW 574251: account_voucher: voucher on bank statement, have to use period and date from bank statement / bank statement line - not today

6967. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6968. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6969. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6970. By Chris Biersbach (OpenERP)

[MERGE] OPW 578367: hr_timesheet_sheet: Fixed onchange_employee to also return a value for user_id

6971. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6972. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6973. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6974. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6975. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6976. By Olivier Dony (Odoo)

[MERGE] OPW 578410: hr_timesheet_invoice: avoid overriding default data with demo data, as it breaks translations for nodemo databases

6977. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6978. By Stephane Wirtel (OpenERP)

[FIX] warning: rename the product_id_change method to onchange_product_id

6979. By Olivier Dony (Odoo)

[MERGE] OPW 573257: account.move.line: proper handling of unicode values in period name resolution

6980. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6981. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6982. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6983. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6984. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6985. By Olivier Laurent (Open ERP)

[FIX] sale_margin: mixed up arguments passed to 'super'

6986. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6987. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6988. By Olivier Dony (Odoo)

[FIX] account_analytic_analysis: reminder should report consumed hours using the correct field

As the hours_quantity field is used to flag an account
as `to renew`, it should be used as well when reporting
the consumed quantity.

6989. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6990. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6991. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6992. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6993. By Xavier ALT

[MERGE] OPW 578842: sale_margin: fix call of store parent's '_get_order' function

6994. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6995. By Olivier Dony (Odoo)

[FIX] OPW 576692: Exported timezones were not specified, and CalDAV clients like mozilla lightning recognize timezone as local instead of UTC

6996. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6997. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6998. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6999. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7000. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7001. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7002. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7003. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7004. By Olivier Dony (Odoo)

[FIX] OPW 574637: account_analytic_plans: remove the strange behavior of instance editing - a thing of the past

7005. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7006. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Nehal Panchal (OpenERP) (nep-openerp) wrote :

Hello,

When create new journal item using menu:Accounting/Customers/Journal Items and Accounting/Suppliers/Journal Items, record cannot be saved due to keyerror of company_id.

In the previous fix company_id is not passed while creating new journal item in
if not vals.get('currency_id'):
     comp_curr = self.pool.get('res.company').browse(cr,uid,vals['company_id']).currency_id.id
     vals.update(currency_id=comp_curr)

This fixes the issue.

Thanks

review: Needs Resubmitting
7007. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7008. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7009. By Xavier ALT

[MERGE] OPW 50562: stock: fix picking type for chained picking

  forward port of v6.0 revid: <email address hidden>

7010. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7011. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7012. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7013. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7014. By Olivier Dony (Odoo)

[MERGE] OPW 579232: mrp: better handle partial consumption of raw products that were split in production lots

- System will no longer consume every line of raw product after a split
- If a raw product line with the exact quantity to consume is present,
  only this one will be consumed
- If no raw product line matches the quantity to consume, the system
  will consume the available lines (starting with smallest quantities first)
  until it attains the required quantity, possibly splitting one line
  further if no combination of the existing lines gives the right
  quantity.
- The production lot column and the split button will now be available
  on both sides of the production order form, allowing fine control
  of the production lots that were consumed, in case the defaults
  do not match what was used in reality.

7015. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7016. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7017. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7018. By Xavier ALT

[MERGE] OPW 577045: translations: collective fix of missing translation terms in reports

7019. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7020. By Xavier ALT

[MERGE] OPW 575716: account: force account.financial.report balance of *zero* to be displayed positively

7021. By Xavier ALT

[MERGE] OPW 579553: account: fix traceback when modifing existing journal entry line

7022. By Xavier ALT

[MERGE] OPW 576019: sale/purchase: when changing SO or PO line product, use product's UoM even if current UoM is of the same category

7023. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7024. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7025. By Stephane Wirtel (OpenERP)

[FIX] point_of_sale: remove unused file

7026. By Xavier ALT

[MERGE] OPW 578622: project: duplicating project must reset analytic account code

7027. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7028. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7029. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7030. By Olivier Dony (Odoo)

[FIX] wiki: remove unused 6.0 web addon components - web API was rewritten from scratch in 6.1

7031. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7032. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7033. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7034. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7035. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7036. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7037. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7038. By Xavier ALT

[MERGE] OPW 577723: purchase: add domain on purchase order partner field for autocomplete to search only for suppliers

7039. By Xavier ALT

[MERGE] OPW 577045: account/hr_holidays: fix untranslated string and 'Filter By' display on account reports

7040. By Xavier ALT

[MERGE] OPW 576804: hr_holidays: fix problem with accentuated chars in 'Leaves by Department' report

7041. By Xavier ALT

[MERGE] OPW 579990: account: changing invoice line account should take product taxes or account taxes, not both

  backport of trunk addons revid: <email address hidden>

7042. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7043. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7044. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7045. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7046. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7047. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7048. By Xavier ALT

[MERGE] OPW 579331: base_vat: button check_vat should not return 'None' uppon success - this will cause error for clients using XML-RPC

7049. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7050. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7051. By Xavier ALT

[MERGE] OPW 578792: project_issue/resource: fix calc. of open/close & working hours to open/close on issue + has to be timezone aware

7052. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7053. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7054. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7055. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7056. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7057. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
7058. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7059. By Olivier Dony (Odoo)

[FIX] project_issue: fix access rights error when using portal access

Due to the recent change in the computation of the closing duration
for project issues[1], viewing issues now fails for users who do not
have read access to project.project. This is typically the case for
portal users, who can view their own issues but not the project details.
Doing the computation in superuser mode does not cause any security
problem and avoids the access rights error.

7060. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7061. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7062. By Somesh Khare

[IMP]: in the move line amount currency should not be shown in the move line if invoice currency is same as account secondary currency or company currency (Case: Ref 577235)

Revision history for this message
Somesh Khare (somesh.khare) wrote :

Hello Sir,

[IMP]: in the move line amount currency should not be shown if invoice currency is same as account secondary currency or company currency.

Eg: Invoice currency is EUR and Invoice account secondary currency is also EUR in this case when we validate the invoice, amount currency should not reflect in the created move line. Where it should be only in case of multi currency.

I have improved the code and it seems working as expected. Kindly review the branch and share your views in it.

Thanks,
Somesh Khare

review: Needs Resubmitting

Unmerged revisions

7062. By Somesh Khare

[IMP]: in the move line amount currency should not be shown in the move line if invoice currency is same as account secondary currency or company currency (Case: Ref 577235)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2012-10-09 09:58:14 +0000
3+++ account/account.py 2012-11-09 06:22:17 +0000
4@@ -1324,7 +1324,7 @@
5 else:
6 if journal.sequence_id:
7 c = {'fiscalyear_id': move.period_id.fiscalyear_id.id}
8- new_name = obj_sequence.next_by_id(cr, uid, journal.sequence_id.id, c)
9+ new_name = obj_sequence.next_by_id(cr, uid, journal.sequence_id.id, context=c)
10 else:
11 raise osv.except_osv(_('Error'), _('No sequence defined on the journal !'))
12
13
14=== modified file 'account/account_invoice.py'
15--- account/account_invoice.py 2012-10-05 12:58:20 +0000
16+++ account/account_invoice.py 2012-11-09 06:22:17 +0000
17@@ -932,6 +932,10 @@
18 _('You cannot create an invoice on a centralised journal. Uncheck the centralised counterpart box in the related journal from the configuration menu.'))
19
20 line = self.finalize_invoice_move_lines(cr, uid, inv, line)
21+
22+ currency_id = inv.company_id.currency_id.id
23+ for i in line:
24+ i[2]['currency_id'] = currency_id
25
26 move = {
27 'ref': inv.reference and inv.reference or inv.name,
28
29=== modified file 'account/account_move_line.py'
30--- account/account_move_line.py 2012-09-06 14:35:17 +0000
31+++ account/account_move_line.py 2012-11-09 06:22:17 +0000
32@@ -152,7 +152,6 @@
33 else:
34 move_line_total += (payment_line.debit - payment_line.credit)
35 line_total_in_company_currency += (payment_line.debit - payment_line.credit)
36-
37 result = move_line_total
38 res[move_line.id]['amount_residual_currency'] = sign * (move_line.currency_id and self.pool.get('res.currency').round(cr, uid, move_line.currency_id, result) or result)
39 res[move_line.id]['amount_residual'] = sign * line_total_in_company_currency
40@@ -1330,6 +1329,13 @@
41 'user_id': uid
42 })]
43
44+ if not vals.get('currency_id'):
45+ if not vals.get('company_id'):
46+ vals['company_id'] = self.pool.get('res.company')._company_default_get(cr, uid, 'account.move.line', context=None)
47+ comp_curr = self.pool.get('res.company').browse(cr,uid,vals['company_id']).currency_id.id
48+ vals.update(currency_id=comp_curr)
49+
50+
51 result = super(account_move_line, self).create(cr, uid, vals, context=context)
52 # CREATE Taxes
53 if vals.get('account_tax_id', False):