Merge lp:~openerp-dev/openobject-server/6.0-opw-16988-rha into lp:openobject-server/6.0

Proposed by Rifakat Husen (OpenERP)
Status: Merged
Approved by: Jean-Christophe VASSORT
Approved revision: 3603
Merged at revision: 3604
Proposed branch: lp:~openerp-dev/openobject-server/6.0-opw-16988-rha
Merge into: lp:openobject-server/6.0
Diff against target: 37 lines (+22/-3)
1 file modified
bin/osv/orm.py (+22/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/6.0-opw-16988-rha
Reviewer Review Type Date Requested Status
Rifakat Husen (OpenERP) (community) Needs Resubmitting
Jean-Christophe VASSORT (community) Needs Fixing
Naresh(OpenERP) (community) Approve
Review via email: mp+72538@code.launchpad.net

Description of the change

Hello,

fields.function does not work with multi on osv_memory. This piece of code was in _read_flat() of class orm but not in read() orm_memory.
This fix solves the problem.

Thanks,
Rifakat

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

Launchpad automatic translations update.

3479. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3480. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3481. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Rifakat's branch to fix the problem of search with 'active' field when its in _inherit_fields

3482. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3483. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3484. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3485. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3486. By Husen Daudi <hda@hda-laptop>

merge ach branch issue 16889

3487. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3488. By Raphael Collet (OpenERP)

[MERGE] backport of revision 3391.4.1 from trunk, To fix Printscreen report Title translation

3489. By Raphael Collet (OpenERP)

[MERGE] translation import: source is not relevant in case of translation of record data (model)

3490. By Raphael Collet (OpenERP)

[MERGE] overwrite translation terms when updating modules from command line

3491. By Raphael Collet (OpenERP)

[MERGE] correct store computation of global field of ir.rule

3492. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3493. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3494. By Raphael Collet (OpenERP)

[MERGE] improve method exists() to handle list of ids

3495. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3496. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3497. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3498. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3499. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3500. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3501. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3502. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3503. By Jay Vora (Serpent Consulting Services)

[FIX] call to fields_get should always go with context attached

3504. By Jay Vora (Serpent Consulting Services)

[MERGE] Merged Rifakat's branch for the fix of domain and context over Accounting/Customers/Customers menu

3505. By Raphael Collet (OpenERP)

[MERGE] opw 17657

3506. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3507. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3508. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3509. By Raphael Collet (OpenERP)

[MERGE] owp 17683

3510. By Raphael Collet (OpenERP)

[MERGE] opw 17601

3511. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3512. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3513. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3514. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3515. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3516. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3517. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3518. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3519. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3520. By Raphael Collet (OpenERP)

[MERGE] opw 18120

3521. By Raphael Collet (OpenERP)

[MERGE] opw 17993

3522. By Raphael Collet (OpenERP)

[FIX] revert change 3509, as it introduces a regression

3523. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3524. By Vo Minh Thu

[MERGE] res_partner.lang field size bumped to 32.
This is needed for instance to accomodate Serbian(Latin).
The size will be used for newly created database as osv.orm does not
handle bumping the size of a selection field on update.

3525. By Vo Minh Thu

[MERGE] fields.many2many: delete instead of update on operation 5 (opw 818189).

3526. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3527. By Olivier Dony (Odoo)

[FIX] res.currency data: a few missing currencies: XOF,XAF,UGX,HNL,CLP

3528. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3529. By Olivier Dony (Odoo)

[FIX] fields.function: backport of trunk fix for binary fields with unauthorized UTF-8 bytes

3530. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3531. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3532. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3533. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3534. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3535. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3536. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3537. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3538. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3539. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3540. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3541. By Olivier Dony (Odoo)

[REVERT] fields.function: revert backport of trunk fix as it may cause issues with legacy features transmitting binary files over XML-RPC

The reason for the backport is also gone now that
the issue was fixed in client-side by setting
bin_size:True in context when reading()
ir.actions.report.xml record.

3542. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3543. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3544. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3545. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3546. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3547. By Olivier Laurent (Open ERP)

[MERGE] opw 50559

3548. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3549. By Olivier Laurent (Open ERP)

[MERGE] opw 50997

3550. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3551. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3552. By Olivier Laurent (Open ERP)

[MERGE] opw 51206

3553. By Olivier Laurent (Open ERP)

[FIX] revert r3552 (opw 51206)

3554. By Olivier Laurent (Open ERP)

[FIX] opw 51206 (code improved)

3555. By Olivier Laurent (Open ERP)

[FIX] fixed r3554

3556. By Olivier Laurent (Open ERP)

[MERGE] opw 50912

3557. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3558. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3559. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3560. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3561. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3562. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3563. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3564. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3565. By Olivier Laurent (Open ERP)

[MERGE] backport of revision 3900: groupby boolean field with 3 distinct values (True, False, NULL)

3566. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3567. By Olivier Laurent (Open ERP)

[MERGE] opw 51127

3568. By Olivier Laurent (Open ERP)

[MERGE] opw 54583

3569. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3570. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3571. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3572. By Olivier Laurent (Open ERP)

[MERGE] opw 51026

3573. By Olivier Laurent (Open ERP)

[MERGE] opw 51093

3574. By Olivier Laurent (Open ERP)

[MERGE] opw 50831

3575. By Olivier Laurent (Open ERP)

[MERGE] opw 5801

3576. By Olivier Laurent (Open ERP)

reverted patch for 'opw 51026'

3577. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3578. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3579. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3580. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3581. By Olivier Laurent (Open ERP)

[FIX] ir_values: revert r3568: caused a crash when creating a new purchase.order

3582. By Christophe Simonis (OpenERP)

[IMP] backport of rev <email address hidden> of trunk: tools.translate: be more lenient and accept standart gettext source annotations

Original commit information:
------------------------------------------------------------
revno: 4002
revision-id: <email address hidden>
parent: <email address hidden>
committer: Olivier Dony <email address hidden>
branch nick: trunk
timestamp: Thu 2012-02-02 15:32:10 +0100
message:
  [IMP] tools.translate: be more lenient and accept standart gettext source annotations

   The GetText spec says that PO auto-comments indicating
    the source location have this form:
     #: /path/to/file:lineno
    However OpenERP's POT export system defaults to a modified
    version of this format with an extra 'type' field:
     #: type:/path/to/file:lineno
    The babel extractors we use for openerp-web's translations
    have the GetText format hardcoded, so it's a good idea
    to be more lenient and allow the standards annotations too.
    We can use a default 'code' type for such cases.

    For openerp-web translations the type does not matter,
    as the translations will be directly loaded by the
    web engine from the PO files and served in Javascript
   to the browser, with no typing needed.

    This patch simply avoids failing to parse updated PO files
    that will contain standard GetText annotations for the
    openerp-web related terms.

3583. By tfr (Openerp)

[MERGE] fix opw issue 56037 : res.log context need to allow more the 250 char

3584. By Olivier Laurent (Open ERP)

[FIX] resubmit patch for opw 51206 (cfr r3552, r3553, r3576). Also check addons revision 5056

3585. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3586. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3587. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3588. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3589. By Xavier ALT

[MERGE] OPW 18390

3590. By Xavier ALT

[MERGE] OPW 19972

3591. By Xavier ALT

[MERGE] OPW 381612

3592. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3593. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

3594. By Xavier ALT

[REVERT] r3583: revert back res.log context field to fields.char(size=255)

3595. By Xavier ALT

[REVERT] r3591: causing problem to install some modules

3596. By Xavier ALT

[MERGE] OPW 56037: make sure res.log context is not bigger than field size (250 chars)

3597. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
3598. By Jean-Christophe VASSORT

[MERGE] OPW 441976 Problem with the read method in base/res_currency

When an Integer 'ids' is supplied as parameter of read() method, a
traceback is caused because a dict will be return by the execution
of next statement(when passed 'ids' as integer) that is
'res=super(osv.osv, self).read(cr, user, ids, fields, context, load)'
whereas a list of dict is expected to execute the code within next
looping statement.

3599. By Jean-Christophe VASSORT

[MERGE] OPW 16988 function fields with multi does not work on osv_memory

3600. By Jean-Christophe VASSORT

[REVERT] previous commit cause failure in runbot

Revision history for this message
Jean-Christophe VASSORT (jc-vassort) wrote :

This branch has not passed tests on runbot. Can you check ?

http://runbot.openerp.com/openerp-dev-6-0-opw-16988-rha-4961/logs/test-all.txt

review: Needs Fixing
3601. By Xavier ALT

[MERGE] publisher warranty stats

3602. By Xavier ALT

[RELEASE] OpenERP 6.0.4

3603. By Rifakat Husen (OpenERP)

[Fix]: chcking if ids is integer

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

I have fixed the problem.
Could you please check it again?

Thanks.
Rifakat

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/osv/orm.py'
2--- bin/osv/orm.py 2012-03-07 14:10:09 +0000
3+++ bin/osv/orm.py 2012-03-09 07:47:18 +0000
4@@ -1960,11 +1960,30 @@
5 result.append(r)
6 if id in self.datas:
7 self.datas[id]['internal.date_access'] = time.time()
8+ # all non inherited fields for which the attribute whose name is in load is False
9 fields_post = filter(lambda x: x in self._columns and not getattr(self._columns[x], load), fields_to_read)
10+ todo = {}
11 for f in fields_post:
12- res2 = self._columns[f].get_memory(cr, self, ids, f, user, context=context, values=result)
13- for record in result:
14- record[f] = res2[record['id']]
15+ todo.setdefault(self._columns[f]._multi, [])
16+ todo[self._columns[f]._multi].append(f)
17+ for key, val in todo.items():
18+ if key:
19+ res2 = self._columns[val[0]].get_memory(cr, self, ids, val, user, context=context, values=result)
20+ for pos in val:
21+ for record in result:
22+ if isinstance(res2[record['id']], str): res2[record['id']] = eval(res2[record['id']]) #TOCHECK : why got string instend of dict in python2.6
23+ multi_fields = res2.get(record['id'],{})
24+ if multi_fields:
25+ record[pos] = multi_fields.get(pos,[])
26+ else:
27+ for f in val:
28+ res2 = self._columns[f].get_memory(cr, self, ids, f, user, context=context, values=result)
29+ for record in result:
30+ if res2:
31+ record[f] = res2[record['id']]
32+ else:
33+ record[f] = []
34+
35 if isinstance(ids_orig, (int, long)):
36 return result[0]
37 return result