Merge lp:~openerp-dev/openobject-addons/6.1-opw-576381-bth into lp:openobject-addons/6.1

Proposed by Bhumi Thakkar (Open ERP)
Status: Work in progress
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-576381-bth
Merge into: lp:openobject-addons/6.1
Diff against target: 40 lines (+22/-1)
1 file modified
crm/res_partner.py (+22/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-576381-bth
Reviewer Review Type Date Requested Status
Bhumi Thakkar (Open ERP) (community) Needs Resubmitting
Naresh(OpenERP) (community) Needs Fixing
Review via email: mp+114341@code.launchpad.net

Description of the change

Hello,

      ERROR in action "Scheduling Meeting" for customer.

1. Sales => Address Book => Customers
2. Open any record click on action 'Scheduling Meeting'
3. Create meeting with select recurrent and in recurrency option: recurrency period : weekly, and select any day.
4. Open that customer

Observed: Error is coming 'invalid input syntax for integer: "10-20120720023000"
LINE 1: ...ng.id FROM "crm_meeting" WHERE crm_meeting.id IN (E'10-20120.'
Expected: Open Customer successfully and has created meetings.

Got virtual ids from search result and convert virtual ids to real ids and then send to read records.

Thanks.

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

Launchpad automatic translations update.

6884. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

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

[MERGE] l10n_lu. Courtesy of Xavier ALT

6886. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6887. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6888. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6889. By Xavier ALT

[MERGE] OPW 575178: process: node conditions have priority over model states (v6.0 forward-port)

  - process node conditions defined which nodes can be reached in the current
    context, so nodes which doesn't fullfill the conditions should stay gray
    even if ``model_states`` eval to True.

6890. By Xavier ALT

[MERGE] OPW 574806: process: process node active state should be evaluated on related related model_id, if defined (v6.0 forward-port)

6891. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6892. By nel

[FIX] mrp: compare quantities in production using float_compare

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

[FIX] l10n_lu: removed xml view referencing unexisting fields (removed in a previous commit)

6894. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6895. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6896. By nel

[FIX] duplication of MO

6897. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6898. By Xavier ALT

[MERGE] BUG 986668: project: fix call to do_pending/do_close from delegation which has to provide 'ids' as a list

6899. By Xavier ALT

[MERGE] OPW 573701: pad: use openetherpad.org as default pad provided (ietherpad.com being dead)

6900. By Xavier ALT

[MERGE] OPW 573452: stock: fix 'chained_company_id' field help tooltip message

6901. By Xavier ALT

[MERGE] OPW 575264: account_bank_statement_extensions: remove 'graph' mode from bank statement line action, as there is such view defined

6902. By Xavier ALT

[MERGE] OPW 574788: project_issue: remove 'graph' mode for project.issue window action, as there is no such view defined

6903. By Xavier ALT

[MERGE] OPW 575259: account: fix missing company field in account.move.line tree view breaking search on account field

6904. By Xavier ALT

[MERGE] OPW 575766: project: fix error message not translated when trying to delete an analytic account linked to a project

6905. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6906. By Antony Lesuisse (OpenERP)

[FIX] plugin_outlook CookComputing.XmlRpcV2 copyright terms

6907. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6908. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6909. By Xavier ALT

[MERGE] OPW 573839: account: never allow cancelling entries on closed financial periods

6910. By Xavier ALT

[MERGE] OPW 575236: mrp: action_consume() was not consuming all products if splitted in multiple lots

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

[MERGE] updates of l10n_fr and l10n_ca. Courtesy of Akretion,c2c and Savoirfairelinux

6912. By Xavier ALT

[MERGE] OPW 381582: stock: on 'inventory' validation, force stock move date at inventory date

6913. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6914. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6915. By Olivier Dony (Odoo)

[FIX] contract: fix expired contracts reminder job to actually work

The API for sending emails has changed in 6.1, use the new one.
Also fix the expired contract filter to behave similarly to the
"Contracts To Renew" menu inside OpenERP.

6916. By Olivier Dony (Odoo)

[MERGE] OPW 575293: purchase: Supplier references not displayed on purchase order (courtesy of Alexis Delattre)

6917. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6918. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6919. By Xavier (Open ERP)

[FIX] override read_group of account.move.line to be coherent with overridden search. Solves OPW 575885

6920. By Olivier Dony (Odoo)

[MERGE] OPW 577359: mail,fetchmail: more robust handling of incoming mails

- Support inconsistent encoding specifications in
  mail bodies with crashing
- Mark messages as seen on IMAP servers only when they
  have actually been processed
- Properly commit after each incoming message, avoiding
  global rollback in case of later failure (during
  fetchmail cron task)
- Avoid crashing when importing mail without a proper
  From header

Note: this fix depends on a corresponding server fix
(revno: 4248
rev-id: <email address hidden>)

6921. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6922. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6923. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6924. By Olivier Dony (Odoo)

[MERGE] OPW 577225: avoid errors in Sales Analysis for orders without lines

Note: this fix requires an update of the
sale module, or a manual execution of the
query that defines the reporting view.

6925. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6926. By Olivier Dony (Odoo)

[FIX] portal: avoid making new portal users regular Employees

The menus were properly restricted but the portal users
created through the portal wizard on Partners were
erroneously made members of the Employee and Partner Manager
groups.
+ some cleanup in the context management

6927. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6928. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6929. By Christophe Simonis (OpenERP)

[FIX] auth_openid: Due to multiprocessus we must use a FileStore instead of a MemStore to store openid associations.
[FIX] auth_openid: GoogleApps: avoid crash when handle not found in store.
[IMP] auth_openid: flake8.

6930. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6931. By Olivier Dony (Odoo)

[MERGE] project.issue: actually use the Reply-To address of the project when sending out messages

6932. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6933. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6934. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

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.

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

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

Hello,

nice to see you have targeted the root cause. However the fix needs a bit improvement both technically

like you can improve the for loop
map(lambda x: base_calendar.base_calendar_id2real_id(x), ids2)

secondly I don't see the use of this * import from crm_meeting import crm_meeting * statement

and finally in the realids variable you will have the duplicated ids list..for eg I have a meeting ID 7 with 5 recurrency..so I will have virtual ids as something like this ['7-20121013000000', '7-20121012000000', '7-20121011000000', '7-20121015000000', '7-20121014000000'] now when you convert this to real ids you need to also check whether the ids is not already present otherwise you will end up with extra looping in this case(4 extra calls) and the final result will be [7,7,7,7,7]

can you please improve this ?

Thanks,
Naresh

review: Needs Fixing
7027. By Bhumi Thakkar (Open ERP)

[MERGE] Merge in main addons 6.1.

7028. By Bhumi Thakkar (Open ERP)

[IMP] Improve for loop and remove duplicate values from list.

7029. By Bhumi Thakkar (Open ERP)

[IMP] Remove unnecessary statement.

Revision history for this message
Bhumi Thakkar (Open ERP) (bth-openerp) wrote :

Hello,

  I have improved code as per your suggestion.

Thanks.

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

Hello,

This bug was qualified as Not reproducible on Trunk (means that architecture on trunk has changed and so this bug has no meaning anymore). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

7029. By Bhumi Thakkar (Open ERP)

[IMP] Remove unnecessary statement.

7028. By Bhumi Thakkar (Open ERP)

[IMP] Improve for loop and remove duplicate values from list.

7027. By Bhumi Thakkar (Open ERP)

[MERGE] Merge in main addons 6.1.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'crm/res_partner.py'
--- crm/res_partner.py 2011-12-22 09:10:55 +0000
+++ crm/res_partner.py 2012-10-12 06:16:20 +0000
@@ -20,6 +20,27 @@
20##############################################################################20##############################################################################
2121
22from osv import fields,osv22from osv import fields,osv
23from base_calendar import base_calendar
24
25class one2many_mod2(fields.one2many):
26
27 def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
28 if context is None:
29 context = {}
30 if not values:
31 values = {}
32 res = {}
33 for id in ids:
34 res[id] = []
35 ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id,'in',ids)], limit=self._limit)
36
37 realids = map(lambda x: base_calendar.base_calendar_id2real_id(x), ids2)
38 realids = list(set(realids))
39
40 for r in obj.pool.get(self._obj)._read_flat(cr, user, realids, [self._fields_id], context=context, load='_classic_write'):
41 res[r[self._fields_id]].append( r['id'] )
42
43 return res
2344
24class res_partner(osv.osv):45class res_partner(osv.osv):
25 """ Inherits partner and adds CRM information in the partner form """46 """ Inherits partner and adds CRM information in the partner form """
@@ -28,7 +49,7 @@
28 'section_id': fields.many2one('crm.case.section', 'Sales Team'),49 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
29 'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\50 'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
30 'Leads and Opportunities'),51 'Leads and Opportunities'),
31 'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\52 'meeting_ids': one2many_mod2('crm.meeting', 'partner_id',\
32 'Meetings'),53 'Meetings'),
33 'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\54 'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
34 'Phonecalls'),55 'Phonecalls'),