[MERGE]: Merge with latest trunk-server

bzr revid: rpa@tinyerp.com-20120719115350-tri4bb1dhj0nisxu
bzr revid: rpa@tinyerp.com-20120720051040-8t93m3g7h7yuq66e
bzr revid: rpa@tinyerp.com-20120723053329-z8u5az5hp2l9ru6c
This commit is contained in:
Rucha (Open ERP) 2012-07-23 11:03:29 +05:30
commit 4aca0c1a93
10 changed files with 103 additions and 54 deletions

View File

@ -286,6 +286,7 @@ CREATE TABLE ir_module_module (
write_date timestamp without time zone,
write_uid integer references res_users on delete set null,
website character varying(256),
summary character varying(256),
name character varying(128) NOT NULL,
author character varying(128),
url character varying(128),

View File

@ -1,10 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="menu_reporting" name="Reporting" sequence="90" groups="base.group_user"/>
<!-- Top menu item -->
<menuitem name="Reporting"
id="menu_reporting"
groups="base.group_user"
sequence="170"/>
<menuitem id="menu_reporting_dashboard" name="Dashboards" parent="menu_reporting" sequence="0"/>
<menuitem id="menu_reporting_config" name="Configuration" parent="menu_reporting" sequence="100" groups="base.group_system"/>
<menuitem id="menu_administration" name="Settings" sequence="100"/>
<!-- Top menu item -->
<menuitem name="Settings"
id="menu_administration"
sequence="500"/>
<menuitem id="menu_management" name="Modules" parent="menu_administration" sequence="0"/>
<menuitem id="menu_config" name="Configuration" parent="menu_administration" sequence="1"/>
<menuitem id="menu_administration_shortcut" parent="menu_administration" name="Custom Shortcuts" sequence="50"/>
@ -12,11 +21,13 @@
<menuitem id="menu_translation" name="Translations" parent="menu_administration" sequence="7"/>
<menuitem id="menu_translation_app" name="Application Terms" parent="menu_translation" sequence="4" groups="base.group_no_one"/>
<menuitem id="menu_translation_export" name="Import / Export" parent="menu_translation" sequence="3" groups="base.group_no_one"/>
<menuitem id="menu_custom" name="Technical" parent="menu_administration" sequence="110" groups="base.group_no_one"/>
<menuitem id="next_id_2" name="User Interface" parent="menu_custom"/>
<menuitem id="menu_email" name="Email" parent="menu_custom" sequence="1"/>
<menuitem id="menu_security" name="Security" parent="menu_custom" sequence="25"/>
<menuitem id="menu_ir_property" name="Parameters" parent="menu_custom" sequence="24"/>
<menuitem id="next_id_4" name="Low Level Objects" parent="menu_custom" sequence="30"/>
</data>
</openerp>

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-server\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:44+0000\n"
"PO-Revision-Date: 2012-07-08 22:23+0000\n"
"PO-Revision-Date: 2012-07-19 05:44+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-07-19 04:40+0000\n"
"X-Generator: Launchpad (build 15637)\n"
"X-Launchpad-Export-Date: 2012-07-20 04:37+0000\n"
"X-Generator: Launchpad (build 15644)\n"
#. module: base
#: model:res.country,name:base.sh
@ -459,7 +459,7 @@ msgstr "ir.ui.view_sc"
#: field:res.widget.user,widget_id:0
#: field:res.widget.wizard,widgets_list:0
msgid "Widget"
msgstr "ウィジット"
msgstr "ウィジット"
#. module: base
#: view:ir.model.access:0
@ -2514,7 +2514,7 @@ msgstr ""
#. module: base
#: model:ir.actions.act_window,name:base.action_res_widget_wizard
msgid "Homepage Widgets Management"
msgstr "ホームページウィジット管理"
msgstr "ホームページウィジット管理"
#. module: base
#: field:res.company,rml_header1:0
@ -2782,7 +2782,7 @@ msgstr "インポート / エクスポート"
#. module: base
#: model:ir.actions.todo.category,name:base.category_tools_customization_config
msgid "Tools / Customization"
msgstr "ツール / カスタマイゼーション"
msgstr "ツール / カスタム化"
#. module: base
#: field:ir.model.data,res_id:0
@ -2895,7 +2895,7 @@ msgstr "マネジャ"
#. module: base
#: model:ir.ui.menu,name:base.menu_custom
msgid "Customization"
msgstr "カスタマイゼーション"
msgstr "カスタム化"
#. module: base
#: model:res.country,name:base.py
@ -7797,7 +7797,7 @@ msgstr ""
#. module: base
#: view:res.widget.wizard:0
msgid "Widget Wizard"
msgstr "ウィジットウィザード"
msgstr "ウィジットウィザード"
#. module: base
#: model:ir.module.module,shortdesc:base.module_l10n_hn
@ -12068,7 +12068,7 @@ msgstr ""
"このモジュールはパートナのアドレスの中にGoogleマップ項目を追加します。\n"
"====================================================\n"
"\n"
"これを使うと、URLウィジットからGoogleマップを直接開くことができます。"
"これを使うと、URLウィジットからGoogleマップを直接開くことができます。"
#. module: base
#: field:workflow.activity,action:0
@ -14297,7 +14297,7 @@ msgstr "連絡先を隠すためにはアクティブな項目のチェックを
#. module: base
#: model:ir.model,name:base.model_res_widget_wizard
msgid "Add a widget for User"
msgstr "ユーザのウィジットを追加"
msgstr "ユーザのウィジットを追加"
#. module: base
#: model:res.country,name:base.dk
@ -15305,7 +15305,7 @@ msgstr "イラン"
#: model:ir.actions.act_window,name:base.res_widget_user_act_window
#: model:ir.ui.menu,name:base.menu_res_widget_user_act_window
msgid "Widgets per User"
msgstr "ユーザ当りのウィジット"
msgstr "ユーザ当りのウィジット"
#. module: base
#: model:ir.actions.act_window,name:base.action_publisher_warranty_contract_form
@ -15579,7 +15579,7 @@ msgstr "情報"
#. module: base
#: view:res.widget.user:0
msgid "User Widgets"
msgstr "ユーザウィジット"
msgstr "ユーザウィジット"
#. module: base
#: view:base.module.update:0
@ -17621,7 +17621,7 @@ msgstr "機能"
#. module: base
#: view:res.widget:0
msgid "Search Widget"
msgstr "ウィジットの検索"
msgstr "ウィジットの検索"
#. module: base
#: model:ir.module.category,description:base.module_category_customer_relationship_management
@ -17742,7 +17742,7 @@ msgstr "受発注のドキュメントの内容に応じて、自動的に正し
#: model:ir.actions.act_window,name:base.res_widget_act_window
#: model:ir.ui.menu,name:base.menu_res_widget_act_window
msgid "Homepage Widgets"
msgstr "ホームページウィジット"
msgstr "ホームページウィジット"
#. module: base
#: help:res.company,rml_footer2:0
@ -17815,23 +17815,23 @@ msgid ""
" "
msgstr ""
"\n"
"このモジュールは何の開発もなし新しいモジュールの作成ができます。\n"
"このモジュールは何の開発もなし新しいモジュールの作成ができます。\n"
"======================================================================\n"
"\n"
"これは記録セッションの中でオブジェクトの全ての操作を記録します。そして、\n"
".ZIPモジュールを生成します。それによって、OpenERPクライアントから直接\n"
"独自モジュールを作成することができます。\n"
"\n"
"このバージョンは作成と既存のレコードの更新ために動作します。それは依存関係と、\n"
"全てのウィジットのタイプのためリンク(多対1、多対多など)を再計算します。\n"
"このバージョンは作成と既存のレコードの更新ために動作します。それは依存関係と、\n"
"全てのウィジットのタイプのためリンク(多対1、多対多など)を再計算します。\n"
"また、ワークフローとデモ / 更新データもサポートします。\n"
"\n"
"カスタム設定とデモ / テストデータのために、簡単に再利用と公表可能なモジュールを\n"
"作成するために役立つはずです。\n"
"\n"
"利用方法:\n"
"モジュールウィザードの アドミニストレーション/カスタマイゼーション/モジュール \n"
"作成/エクスポート カスタマイゼーション を実行します。\n"
"モジュールウィザードの アドミニストレーション/カスタム化/モジュール \n"
"作成/エクスポート カスタム化 を実行します。\n"
"記録の日時の基準、記録されるオブジェクト、記録モジュールを選択します。\n"
" "

View File

@ -482,6 +482,7 @@ class module(osv.osv):
'application': terp.get('application', False),
'auto_install': terp.get('auto_install', False),
'icon': terp.get('icon', False),
'summary': terp.get('summary', ''),
}
# update the list of available packages

View File

@ -43,7 +43,7 @@
<search string="Search modules">
<group col='10' colspan='4'>
<field name="name" filter_domain="['|', ('name','ilike',self), ('shortdesc','ilike',self)]" string="Module"/>
<field name="description" string="Keywords"/>
<field name="description" string="Keywords" filter_domain="['|', ('description', 'ilike', self), ('summary', 'ilike', self)]"/>
<separator orientation="vertical"/>
<filter name="app" icon="terp-check" string="Apps" domain="[('application', '=', 1)]"/>
<filter name="extra" icon="terp-check" string="Extra" domain="[('application', '=', 0)]"/>
@ -70,6 +70,7 @@
<field name="icon"/>
<field name="name"/>
<field name="state"/>
<field name="summary"/>
<templates>
<t t-name="kanban-box">
<div class="oe_module_vignette oe_kanban_auto_height">
@ -78,7 +79,8 @@
<div class="oe_module_desc">
<h4><a type="edit"><field name="shortdesc"/></a></h4>
<p class="oe_module_name">
<field name="name"/><br/>
<t t-if="record.summary.raw_value"><field name="summary"/><br/></t>
<i><field name="name" groups="base.group_no_one"/></i>
</p>
<button type="object" name="button_immediate_install" states="uninstalled">Install</button>
<button t-if="installed" disabled="disabled">Installed</button>

View File

@ -19,9 +19,10 @@
#
##############################################################################
import os
import math
import os
from osv import osv, fields
import re
import tools
from tools.translate import _
import logging
@ -307,6 +308,37 @@ class res_partner(osv.osv):
res.append((record.id, name))
return res
def name_create(self, cr, uid, name, context=None):
""" Override of orm's name_create method for partners. The purpose is
to handle some basic formats to create partners using the
name_create.
Supported syntax:
- 'raoul@grosbedon.fr': create a partner with name raoul@grosbedon.fr
and sets its email to raoul@grosbedon.fr
- 'Raoul Grosbedon <raoul@grosbedon.fr>': create a partner with name
Raoul Grosbedon, and set its email to raoul@grosbedon.fr
- anything else: fall back on the default name_create
Regex :
- ([a-zA-Z0-9._%-]+@[a-zA-Z0-9_-]+\.[a-zA-Z0-9._]{1,8}): raoul@grosbedon.fr
- ([\w\s.\\-]+)[\<]([a-zA-Z0-9._%-]+@[a-zA-Z0-9_-]+\.[a-zA-Z0-9._]{1,8})[\>]:
Raoul Grosbedon, raoul@grosbedon.fr
"""
contact_regex = re.compile('([\w\s.\\-]+)[\<]([a-zA-Z0-9._%-]+@[a-zA-Z0-9_-]+\.[a-zA-Z0-9._]{1,8})[\>]')
email_regex = re.compile('([a-zA-Z0-9._%-]+@[a-zA-Z0-9_-]+\.[a-zA-Z0-9._]{1,8})')
contact_regex_res = contact_regex.findall(name)
email_regex_res = email_regex.findall(name)
if contact_regex_res:
name = contact_regex_res[0][0].rstrip(' ') # remove extra spaces on the right
email = contact_regex_res[0][1]
rec_id = self.create(cr, uid, {self._rec_name: name, 'email': email}, context);
return self.name_get(cr, uid, [rec_id], context)[0]
elif email_regex:
email = '%s' % (email_regex_res[0])
rec_id = self.create(cr, uid, {self._rec_name: email, 'email': email}, context);
return self.name_get(cr, uid, [rec_id], context)[0]
else:
return super(res_partner, self).create(cr, uid, name, context)
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args = []

View File

@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem icon="terp-partner" id="menu_base_partner" name="Sales" sequence="0" groups="base.group_sale_salesman"/>
<!-- Top menu item -->
<menuitem name="Sales"
id="menu_base_partner"
groups="base.group_sale_salesman"
sequence="30"/>
<menuitem id="base.menu_sales" parent="base.menu_base_partner" name="Sales" sequence="1" />
<menuitem id="menu_base_config" parent="menu_base_partner" name="Configuration" sequence="30" groups="group_system"/>
<menuitem id="menu_config_address_book" parent="menu_base_config" name="Address Book" sequence="40" groups="group_system"/>
<!--
=======================
Partner Titles
=======================
-->
<!-- Partner Titles -->
<record id="view_partner_title_tree" model="ir.ui.view">
<field name="name">res.partner.title.tree</field>
<field name="model">res.partner.title</field>
@ -70,11 +72,8 @@
</record>
<menuitem action="action_partner_title_contact" id="menu_partner_title_contact" name="Contact Titles" parent="menu_config_address_book" sequence="3" groups="base.group_no_one"/>
<!--
=======================
Partner
=======================
-->
<!-- Partner -->
<record id="view_partner_tree" model="ir.ui.view">
<field name="name">res.partner.tree</field>
<field name="model">res.partner</field>
@ -104,7 +103,7 @@
<field name="photo" widget='image' class="oe_avatar oe_left"/>
<div class="oe_title">
<div class="oe_edit_only">
<label for="name" string="Customer Name"/>
<label for="name" string="Customer Name"/>
(<field name="is_company" on_change="onchange_type(is_company)" class="oe_inline"/> <label for="is_company" string="Is a Company?"/>)
</div>
<h1>
@ -119,7 +118,7 @@
<field name="parent_id"
domain="[('is_company', '=', True)]" context="{'default_is_company': True}"
attrs="{'invisible': [('is_company','=', True)]}"
on_change="onchange_address(use_parent_address, parent_id)"/>,
on_change="onchange_address(use_parent_address, parent_id)"/>,
<label for="type" attrs="{'invisible': [('parent_id','=', False)]}"/>
<div attrs="{'invisible': [('parent_id','=', False)]}">
<field class="oe_inline"
@ -196,7 +195,7 @@
<a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value" style="text-decoration: none;" >
<img src="/web/static/src/img/icons/terp-mail-message-new.png" border="0" width="16" height="16"/>
</a>
</td>
</tr>
</table>
@ -214,18 +213,24 @@
<group>
<field name="user_id" />
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group>
<field name="customer"/>
<field name="supplier"/>
</group>
<group>
<field name="ref"/>
<field name="lang"/>
<field name="date"/>
</group>
<group>
<field name="customer"/>
<field name="supplier"/>
<field name="active"/>
</group>
</group>
</page>
<page string="History" invisible="True"></page>
<!-- The History page becomes visible as soon as there is something to display inside -->
<page string="History" name="page_history" invisible="True">
</page>
<page string="Internal Notes">
<field name="comment" placeholder="Internal notes about this customer..."/>
</page>
@ -242,7 +247,7 @@
<field name="arch" type="xml">
<search string="Search Partner">
<group col='10' colspan='4'>
<field name="name"
<field name="name"
filter_domain="['|','|',('name','ilike',self),('parent_id','ilike',self),('ref','=',self)]"
string="Partner"/>
<separator orientation="vertical"/>
@ -250,7 +255,7 @@
<filter string="Persons" name="type_person" icon="terp-personal" domain="[('is_company','=',0)]"/>
<filter string="Companies" name="type_company" icon="terp-partner" domain="[('is_company','=',1)]"/>
<filter string="Customers" name="customer" icon="terp-personal" domain="[('customer','=',1)]" help="Customer Partners"/>
<filter string="Suppliers" name="supplier" icon="terp-personal" domain="[('supplier','=',1)]" help="Supplier Partners"/>
<filter string="Suppliers" name="supplier" icon="terp-personal" domain="[('supplier','=',1)]" help="Supplier Partners"/>
<separator orientation="vertical"/>
<field name="category_id"/>
<field name="user_id"/>
@ -428,11 +433,8 @@
<field name="view_type">form</field>
<field name="view_id" ref="view_payterm_form"/>
</record>
<!--
======================
Categories
======================
-->
<!-- Categories -->
<record id="view_partner_category_form" model="ir.ui.view">
<field name="name">Partner Categories</field>
<field name="model">res.partner.category</field>
@ -511,4 +513,3 @@
</data>
</openerp>

View File

@ -58,7 +58,7 @@
<field name="comment"/>
</page>
</notebook>
</sheet>
</sheet>
</form>
</field>
</record>
@ -199,7 +199,7 @@
<field name="name" readonly="1" class="oe_inline"/>
(<field name="login" readonly="1" class="oe_inline"/>)
</h1>
<group col="4">
<group name="preferences" col="4">
<field name="context_lang" readonly="0"/>
<field name="company_id" readonly="0"
groups="base.group_multi_company" on_change="on_change_company_id(company_id)"/>

View File

@ -77,8 +77,8 @@ def initialize(cr):
cr.execute('INSERT INTO ir_module_module \
(author, website, name, shortdesc, description, \
category_id, auto_install, state, certificate, web, license, application, icon, sequence) \
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING id', (
category_id, auto_install, state, certificate, web, license, application, icon, sequence, summary) \
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) RETURNING id', (
info['author'],
info['website'], i, info['name'],
info['description'], category_id,
@ -86,7 +86,7 @@ def initialize(cr):
info['web'],
info['license'],
info['application'], info['icon'],
info['sequence']))
info['sequence'], info['summary']))
id = cr.fetchone()[0]
cr.execute('INSERT INTO ir_model_data \
(name,model,module, res_id, noupdate) VALUES (%s,%s,%s,%s,%s)', (

View File

@ -341,6 +341,7 @@ def load_information_from_description_file(module):
'web': False,
'website': '',
'sequence': 100,
'summary': '',
}
info.update(itertools.izip(
'depends data demo test init_xml update_xml demo_xml'.split(),