diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2010-06-25 14:15:49 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2010-06-25 14:15:49 +0200 |
| commit | d831c02230527bd5e9581b6900a1fac4e2092089 (patch) | |
| tree | 182f280bfe98779c04e181d302be920b8d615401 /addons | |
| parent | 2ad555b66e0c66e1d7fd11ffc35c5c46a3394471 (diff) | |
| parent | 93693b7372deeedc85a79b21f4f60d0c15a83e12 (diff) | |
merge
bzr revid: fp@tinyerp.com-20100625121549-n78eljdhjet9z5c0
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/auction/board_auction_demo.xml | 14 | ||||
| -rw-r--r-- | addons/crm/crm_lead.py | 29 | ||||
| -rw-r--r-- | addons/event/board_association_demo.xml | 14 | ||||
| -rw-r--r-- | addons/project/board_project_demo.xml | 4 |
4 files changed, 29 insertions, 32 deletions
diff --git a/addons/auction/board_auction_demo.xml b/addons/auction/board_auction_demo.xml index 504a02263da..f260f8bb1fc 100644 --- a/addons/auction/board_auction_demo.xml +++ b/addons/auction/board_auction_demo.xml @@ -2,13 +2,13 @@ <openerp> <data noupdate="1"> - <record model="ir.ui.view_sc" id="sc_auction_dash"> - <field name="name">Auction dashboard</field> - <field name="user_id" ref="base.user_root"/> - <field name="resource">ir.ui.menu</field> - <field name="sequence">4</field> - <field name="res_id" ref="menu_board_auction"/> - </record> +<!-- <record model="ir.ui.view_sc" id="sc_auction_dash">--> +<!-- <field name="name">Auction dashboard</field>--> +<!-- <field name="user_id" ref="base.user_root"/>--> +<!-- <field name="resource">ir.ui.menu</field>--> +<!-- <field name="sequence">4</field>--> +<!-- <field name="res_id" ref="menu_board_auction"/>--> +<!-- </record>--> </data> </openerp> diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 0ecfdca357e..491784682f2 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -248,7 +248,7 @@ and users by email"), def message_new(self, cr, uid, msg, context): """ Automatically calls when new email message arrives - + @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks @@ -260,7 +260,7 @@ and users by email"), body = msg.get('body') msg_from = msg.get('from') priority = msg.get('priority') - + vals = { 'name': subject, 'email_from': msg_from, @@ -270,13 +270,13 @@ and users by email"), } if msg.get('priority', False): vals['priority'] = priority - - res = mailgate_pool.get_partner(cr, uid, msg.get('from')) + + res = mailgate_pool.get_partner(cr, uid, msg.get('from') or msg.get_unixfrom()) if res: vals.update(res) res = self.create(cr, uid, vals, context) - - + + attachents = msg.get('attachments', []) for attactment in attachents or []: data_attach = { @@ -292,21 +292,18 @@ and users by email"), return res def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}): - """ + """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of update mail’s IDs """ - + if isinstance(ids, (str, int, long)): ids = [ids] - + msg_from = msg['from'] - vals.update({ - 'description': msg['body'] - }) - if msg.get('priority', False): + if msg.get('priority'): vals['priority'] = msg.get('priority') maps = { @@ -314,14 +311,14 @@ and users by email"), 'revenue': 'planned_revenue', 'probability':'probability' } - vls = { } + vls = {} for line in msg['body'].split('\n'): line = line.strip() res = tools.misc.command_re.match(line) - if res and maps.get(res.group(1).lower(), False): + if res and maps.get(res.group(1).lower()): key = maps.get(res.group(1).lower()) vls[key] = res.group(2).lower() - + vals.update(vls) res = self.write(cr, uid, ids, vals) return res diff --git a/addons/event/board_association_demo.xml b/addons/event/board_association_demo.xml index 959f2c1f5a8..c30dad64790 100644 --- a/addons/event/board_association_demo.xml +++ b/addons/event/board_association_demo.xml @@ -6,13 +6,13 @@ Administrator shortcut Demo user startup menu --> - <record model="ir.ui.view_sc" id="sc_association_dash"> - <field name="name">Dashboard</field> - <field name="user_id" ref="base.user_root"/> - <field name="resource">ir.ui.menu</field> - <field name="sequence">1</field> - <field name="res_id" ref="menu_board_associations_manager"/> - </record> +<!-- <record model="ir.ui.view_sc" id="sc_association_dash">--> +<!-- <field name="name">Dashboard</field>--> +<!-- <field name="user_id" ref="base.user_root"/>--> +<!-- <field name="resource">ir.ui.menu</field>--> +<!-- <field name="sequence">1</field>--> +<!-- <field name="res_id" ref="menu_board_associations_manager"/>--> +<!-- </record>--> <record model="res.users" id="base.user_root"> <field name="action_id" ref="open_board_associations_manager"/> </record> diff --git a/addons/project/board_project_demo.xml b/addons/project/board_project_demo.xml index fa92e92f092..2a160b4454f 100644 --- a/addons/project/board_project_demo.xml +++ b/addons/project/board_project_demo.xml @@ -7,13 +7,13 @@ Administrator shortcut Demo user startup menu --> - <record id="sc_account_dash" model="ir.ui.view_sc"> + <!--record id="sc_account_dash" model="ir.ui.view_sc"> <field name="name">project dashboard</field> <field name="user_id" ref="base.user_demo"/> <field name="resource">ir.ui.menu</field> <field name="sequence">3</field> <field name="res_id" ref="menu_board_project"/> - </record> + </record--> <record id="base.user_root" model="res.users"> <field name="action_id" ref="open_board_project"/> </record> |
