[MERGE] cleaning all form views

bzr revid: fp@tinyerp.com-20120611100052-e2u8augm7kkc0uyr
This commit is contained in:
Fabien Pinckaers
2012-06-11 12:00:52 +02:00
44 changed files with 1052 additions and 2024 deletions
-5
View File
@@ -65,12 +65,7 @@
'res/res_bank_view.xml',
'res/res_country_view.xml',
'res/res_currency_view.xml',
'res/res_partner_event_view.xml',
'res/res_users_view.xml',
'res/wizard/partner_sms_send_view.xml',
'res/wizard/partner_wizard_massmail_view.xml',
'res/wizard/partner_clear_ids_view.xml',
'res/wizard/partner_wizard_ean_check_view.xml',
'res/res_partner_data.xml',
'res/ir_property_view.xml',
'security/base_security.xml',
File diff suppressed because it is too large Load Diff
+4 -46
View File
@@ -203,53 +203,11 @@ class act_window(osv.osv):
def _search_view(self, cr, uid, ids, name, arg, context=None):
res = {}
def encode(s):
if isinstance(s, unicode):
return s.encode('utf8')
return s
for act in self.browse(cr, uid, ids, context=context):
fields_from_fields_get = self.pool.get(act.res_model).fields_get(cr, uid, context=context)
search_view_id = False
if act.search_view_id:
search_view_id = act.search_view_id.id
else:
res_view = self.pool.get('ir.ui.view').search(cr, uid,
[('model','=',act.res_model),('type','=','search'),
('inherit_id','=',False)], context=context)
if res_view:
search_view_id = res_view[0]
if search_view_id:
field_get = self.pool.get(act.res_model).fields_view_get(cr, uid, search_view_id,
'search', context)
fields_from_fields_get.update(field_get['fields'])
field_get['fields'] = fields_from_fields_get
res[act.id] = str(field_get)
else:
def process_child(node, new_node, doc):
for child in node.childNodes:
if child.localName=='field' and child.hasAttribute('select') \
and child.getAttribute('select')=='1':
if child.childNodes:
fld = doc.createElement('field')
for attr in child.attributes.keys():
fld.setAttribute(attr, child.getAttribute(attr))
new_node.appendChild(fld)
else:
new_node.appendChild(child)
elif child.localName in ('page','group','notebook'):
process_child(child, new_node, doc)
form_arch = self.pool.get(act.res_model).fields_view_get(cr, uid, False, 'form', context)
dom_arc = dom.minidom.parseString(encode(form_arch['arch']))
new_node = copy.deepcopy(dom_arc)
for child_node in new_node.childNodes[0].childNodes:
if child_node.nodeType == child_node.ELEMENT_NODE:
new_node.childNodes[0].removeChild(child_node)
process_child(dom_arc.childNodes[0],new_node.childNodes[0],dom_arc)
form_arch['arch'] = new_node.toxml()
form_arch['fields'].update(fields_from_fields_get)
res[act.id] = str(form_arch)
field_get = self.pool.get(act.res_model).fields_view_get(cr, uid,
act.search_view_id and act.search_view_id.id or False,
'search', context=context)
res[act.id] = str(field_get)
return res
def _get_help_status(self, cr, uid, ids, name, arg, context=None):
@@ -28,9 +28,11 @@
<field name="model">ir.config_parameter</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="System Parameters">
<field name="key" colspan="4"/>
<field name="value" colspan="4"/>
<form string="System Parameters" version="7.0">
<group>
<field name="key"/>
<field name="value"/>
</group>
</form>
</field>
</record>
+7 -9
View File
@@ -16,17 +16,15 @@
<field name="model">ir.filters</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Filters">
<group colspan="4" col="6" >
<form string="Filters" version="7.0">
<group col="4">
<field name="name"/>
<field name="model_id"/>
<field name="user_id"/>
<field name="model_id"/>
</group>
<group col="4" expand="1">
<separator string="Domain" colspan="2" />
<separator string="Context" colspan="2" />
<field name="domain" nolabel="1" colspan="2"/>
<field name="context" nolabel="1" colspan="2"/>
<group>
<field name="domain"/>
<field name="context"/>
</group>
</form>
</field>
@@ -76,4 +74,4 @@
<menuitem parent="base.next_id_2" name="User-defined Filters"
id="menu_ir_filters" action="actions_ir_filters_view" sequence="5"/>
</data>
</openerp>
</openerp>
+4 -1
View File
@@ -255,6 +255,9 @@ class ir_ui_menu(osv.osv):
return res
def _get_needaction_info(self, cr, uid, id, domain=[], context={}):
return [False, 0]
def _get_needaction(self, cr, uid, ids, field_names, args, context=None):
if context is None:
context = {}
@@ -278,7 +281,7 @@ class ir_ui_menu(osv.osv):
'menu_id', 'gid', 'Groups', help="If you have groups, the visibility of this menu will be based on these groups. "\
"If this field is empty, OpenERP will compute visibility based on the related object's read access."),
'complete_name': fields.function(_get_full_name,
string='Complete Name', type='char', size=128),
string='Full Path', type='char', size=128),
'icon': fields.selection(tools.icons, 'Icon', size=64),
'icon_pict': fields.function(_get_icon_pict, type='char', size=32),
'web_icon': fields.char('Web Icon File', size=128),
+30 -5
View File
@@ -74,10 +74,31 @@ class view(osv.osv):
_order = "priority,name"
def _check_xml(self, cr, uid, ids, context=None):
def root_view(record):
if not record.inherit_id:
return record
else:
return root_view(record.inherit_id)
def call_view(record):
try:
root = root_view(record)
# Temporarily commented, waiting fixes; it breaks most updates because
# when you update modules, all views are in the database, but only
# fields of loaded objects are on the objects. This breaks the
# fields_view_get calls. (field exists in view but not in the object)
#
# self.pool.get(root.model).fields_view_get(cr, uid, view_id=root.id, view_type=root.type, context=context)
return True
except:
_logger.exception("Can't obtain view description for model: %s (view id: %s).", record.model, record.id)
return False
for view in self.browse(cr, uid, ids, context):
return call_view(view)
# TODO The following code should be executed (i.e. no early return above).
# TODO The view.rng file can be read only once!
eview = etree.fromstring(view.arch.encode('utf8'))
if eview.get('layout') or eview.get('validate'):
continue
frng = tools.file_open(os.path.join('base','rng','view.rng'))
try:
relaxng_doc = etree.parse(frng)
@@ -108,9 +129,13 @@ class view(osv.osv):
:rtype: list of tuples
:return: [(view_arch,view_id), ...]
"""
cr.execute("""SELECT arch, id FROM ir_ui_view WHERE inherit_id=%s AND model=%s
ORDER BY priority""",
(view_id, model))
cr.execute("""SELECT
arch, id
FROM
ir_ui_view
WHERE
inherit_id=%s AND model=%s
ORDER BY priority""", (view_id, model))
return cr.fetchall()
def write(self, cr, uid, ids, vals, context=None):
@@ -1,21 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_model_menu_create" model="ir.ui.view">
<field name="name">Create Menu</field>
<field name="model">wizard.ir.model.menu.create</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Menu">
<separator colspan="4" string="Create Menu"/>
<field name="name"/>
<field name="menu_id" domain="[('parent_id','&lt;&gt;',False)]"/>
<separator colspan="4" string=""/>
<label colspan="2" string=""/>
<group col="2" colspan="2">
<button special="cancel" string="_Close" icon="gtk-cancel"/>
<button name="menu_create" string="Create _Menu" type="object" icon="gtk-ok"/>
<form string="Create Menu" version="7.0">
<header>
<button name="menu_create" string="Create _Menu" type="object"/>
<button special="cancel" string="_Cancel"/>
</header>
<group>
<field name="name"/>
<field name="menu_id" domain="[('parent_id','&lt;&gt;',False)]"/>
</group>
</form>
</field>
@@ -14,15 +14,14 @@
<field name="model">workflow</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Workflow">
<group col="6" colspan="4" >
<form string="Workflow" version="7.0">
<group col="4">
<field name="name"/>
<field name="osv"/>
<field name="on_create"/>
</group>
<separator colspan="4" string="Activities"/>
<field colspan="4" name="activities" nolabel="1"/>
</form>
<field name="activities"/>
</form>
</field>
</record>
@@ -93,57 +92,50 @@
<field name="model">workflow.activity</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Activity">
<group col="6" colspan="4">
<field name="name"/>
<field name="wkf_id"/>
<field name="kind"/>
<form string="Activity" version="7.0">
<group>
<group>
<field name="name"/>
<field name="wkf_id"/>
<field name="kind"/>
</group>
<group>
<field name="flow_start"/>
<field name="flow_stop"/>
</group>
</group>
<group colspan="2">
<field name="flow_start"/>
<field name="flow_stop"/>
</group>
<notebook colspan="4">
<notebook>
<page string="Properties">
<group colspan="4" col="6">
<group colspan="1" col="2">
<separator string="Subflow" colspan="2"/>
<group>
<group string="Subflow">
<field name="subflow_id" attrs="{'readonly':[('kind','&lt;&gt;','subflow')]}"/>
<field name="signal_send"/>
</group>
<group colspan="1" col="2">
<separator string="Conditions" colspan="2"/>
<group string="Conditions">
<field name="split_mode"/>
<field name="join_mode"/>
</group>
<group colspan="1" col="2">
<separator string="Actions" colspan="2"/>
<group string="Actions">
<field name="action_id"/>
<field name="action" attrs="{'readonly':[('kind','=','dummy')]}"/>
</group>
</group>
</page>
<page string="Transitions">
<group colspan="4" col="4">
<group col="2" colspan="2">
<field name="in_transitions" nolabel="1" height="400">
<tree string="Incoming Transitions">
<field name="act_from"/>
<field name="signal"/>
<field name="condition"/>
</tree>
</field>
</group>
<group col="2" colspan="2">
<field name="out_transitions" nolabel="1" height="400">
<tree string="Outgoing Transitions">
<field name="act_to"/>
<field name="signal"/>
<field name="condition"/>
</tree>
</field>
</group>
</group>
<field name="in_transitions">
<tree string="Incoming Transitions">
<field name="act_from"/>
<field name="signal"/>
<field name="condition"/>
</tree>
</field>
<field name="out_transitions">
<tree string="Outgoing Transitions">
<field name="act_to"/>
<field name="signal"/>
<field name="condition"/>
</tree>
</field>
</page>
</notebook>
</form>
@@ -209,14 +201,14 @@
<field name="model">workflow.transition</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Transition">
<group col="6" colspan ="4">
<form string="Transition" version="7.0">
<group col="6">
<field name="act_from"/>
<field name="act_to"/>
<field name="signal"/>
<field name="condition"/>
<field name="trigger_model"/>
<field name="trigger_expr_id"/>
<field name="trigger_expr_id"/>
<field name="group_id"/>
</group>
</form>
@@ -270,11 +262,13 @@
<field name="model">workflow.instance</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Workflow Instances">
<field name="wkf_id" readonly="1"/>
<field name="res_id" readonly="1"/>
<field name="res_type" readonly="1"/>
<field name="state" readonly="1"/>
<form string="Workflow Instances" version="7.0">
<group col="4">
<field name="wkf_id"/>
<field name="res_id"/>
<field name="res_type"/>
<field name="state"/>
</group>
</form>
</field>
</record>
@@ -328,12 +322,14 @@
<field name="model">workflow.workitem</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Workflow Workitems">
<field name="wkf_id" readonly="1"/>
<field name="act_id" readonly="1"/>
<field name="subflow_id" readonly="1"/>
<field name="inst_id" readonly="1"/>
<field name="state" readonly="1"/>
<form string="Workflow Workitems" version="7.0">
<group col="4">
<field name="wkf_id"/>
<field name="act_id"/>
<field name="subflow_id"/>
<field name="inst_id"/>
<field name="state"/>
</group>
</form>
</field>
</record>
+1 -1
View File
@@ -163,7 +163,7 @@ class module(osv.osv):
_columns = {
'name': fields.char("Technical Name", size=128, readonly=True, required=True, select=True),
'category_id': fields.many2one('ir.module.category', 'Category', readonly=True, select=True),
'shortdesc': fields.char('Name', size=256, readonly=True, translate=True),
'shortdesc': fields.char('Module Name', size=256, readonly=True, translate=True),
'description': fields.text("Description", readonly=True, translate=True),
'author': fields.char("Author", size=128, readonly=True),
'maintainer': fields.char('Maintainer', size=128, readonly=True),
+43 -32
View File
@@ -8,13 +8,14 @@
<field name="name">ir.module.category.form</field>
<field name="model">ir.module.category</field>
<field name="type">form</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<form string="Module Category">
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
<field name="description" colspan="4"/>
<form string="Module Category" version="7.0">
<group col="4">
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
</group>
<field name="description"/>
</form>
</field>
</record>
@@ -118,8 +119,8 @@
<field name="model">ir.module.module</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<form string="Module" version="7.0">
<header>
<button name="button_install" states="uninstalled" string="Install" icon="terp-gtk-jump-to-ltr" type="object" class="oe_form_button_hi"/>
<button name="button_upgrade" states="installed" string="Upgrade" icon="terp-gtk-go-back-rtl" type="object" class="oe_form_button_hi"/>
<button name="button_uninstall" states="installed" string="Uninstall (beta)"
@@ -128,30 +129,40 @@
<button name="button_uninstall_cancel" states="to remove" string="Cancel Uninstall" icon="gtk-cancel" type="object"/>
<button name="button_upgrade_cancel" states="to upgrade" string="Cancel Upgrade" icon="gtk-cancel" type="object"/>
<button name="button_install_cancel" states="to install" string="Cancel Install" icon="gtk-cancel" type="object"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="uninstalled"/>
<field name="state" widget="statusbar" statusbar_visible="uninstalled"/>
</header>
<sheet>
<div class="oe_right oe_form_button_box">
<field name="icon" widget='image'/>
</div>
</div>
<sheet string="Module" layout="auto">
<field name="icon" widget='image' nolabel="1" rowspan="6" colspan="1"/>
<group colspan="2" col="2" class="oe_form_group_label_border">
<field name="shortdesc" string="Application Name"/>
<field name="category_id"/>
<field name="author" select="2"/>
<field name="license"/>
<field name="website" select="2" widget="url" string="Author Website"/>
<field name="installed_version"/>
<div class="oe_form_title">
<label for="shortdesc" class="oe_form_readonly_hidden"/>
<h1><field name="shortdesc"/></h1>
<label for="category_id" class="oe_form_readonly_hidden"/>
<h2><field name="category_id" class="oe_form_inline"/></h2>
</div>
<group>
<group>
<field name="name"/>
<field name="license"/>
<field name="installed_version"/>
</group>
<group>
<field name="author"/>
<field name="website" widget="url"/>
</group>
</group>
<notebook colspan="4">
<page string="Description">
<field colspan="4" name="description" select="2" nolabel="1" rowspan="6"/>
<field name="description"/>
</page>
<page string="Technical Data">
<field name="name"/>
<field name="certificate" />
<field name="demo"/>
<field name="application"/>
<field colspan="4" name="dependencies_id" nolabel="1">
<group col="4">
<field name="name"/>
<field name="demo"/>
<field name="application"/>
</group>
<field name="dependencies_id">
<tree string="Dependencies">
<field name="name"/>
<field name="state"/>
@@ -159,12 +170,12 @@
</field>
</page>
<page string="Features" attrs="{'invisible':[('state','!=','installed')]}">
<separator string="Created Menus" colspan="4"/>
<field colspan="4" name="menus_by_module" nolabel="1"/>
<separator string="Created Views" colspan="2"/>
<separator string="Defined Reports" colspan="2"/>
<field colspan="2" name="views_by_module" nolabel="1"/>
<field colspan="2" name="reports_by_module" nolabel="1"/>
<separator string="Created Menus"/>
<field name="menus_by_module"/>
<separator string="Created Views"/>
<field name="views_by_module"/>
<separator string="Defined Reports"/>
<field name="reports_by_module"/>
</page>
</notebook>
</sheet>
@@ -7,34 +7,18 @@
<field name="model">base.language.import</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Import Translation">
<group col="8">
<group colspan="3">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
<newline/>
<label colspan="4" width="220" string="Supported file formats: *.csv (Comma-separated values) or *.po (GetText Portable Objects)"/>
<label colspan="4" width="220" string="Please double-check that the file encoding is set to UTF-8 (sometimes called Unicode) when the translator exports it."/>
<label colspan="4" width="220"/>
<label colspan="4" width="220" string="When using CSV format, please also check that the first line of your file is one of the following:"/>
<label colspan="4" width="220" string="- type,name,res_id,src,value"/>
<label colspan="4" width="220" string="- module,type,name,res_id,src,value"/>
</group>
<separator orientation="vertical" rowspan="15"/>
<group colspan="4" col="4">
<separator string="Import Translation" colspan="4"/>
<label colspan="4" nolabel="1" string="If you need another language than the official ones available, you can import a language pack from here. Other OpenERP languages than the official ones can be found on launchpad."/>
<newline/>
<field name="name" width="200"/>
<field name="code"/>
<field name="data" colspan="4"/>
<field name="overwrite"/>
</group>
<group colspan="8" col="8">
<separator string="" colspan="8"/>
<label colspan="6" width="220"/>
<button special="cancel" string="_Close" icon="gtk-cancel"/>
<button name="import_lang" string="_Import" type="object" icon="gtk-ok"/>
</group>
<form string="Import Translation" version="7.0">
<header>
<button name="import_lang" string="_Import" type="object" icon="gtk-ok"/>
<button special="cancel" string="_Close" icon="gtk-cancel"/>
</header>
<separator string="Import Translation" colspan="2"/>
<label nolabel="1" string="If you need another language than the official ones available, you can import a language pack from here. Other OpenERP languages than the official ones can be found on launchpad." colspan="2"/>
<group col="4">
<field name="name"/>
<field name="code"/>
<field name="data"/>
<field name="overwrite"/>
</group>
</form>
</field>
@@ -7,11 +7,11 @@
<field name="model">base.module.configuration</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="System Configuration Done">
<label align="0.0" string="All pending configuration wizards have been executed. You may restart individual wizards via the list of configuration wizards." colspan="4"/>
<separator string="" colspan="4"/>
<newline/>
<button special="cancel" string="_Ok" icon="gtk-ok"/>
<form string="System Configuration Done" version="7.0">
<header>
<button special="cancel" string="_Ok"/>
</header>
<label string="All pending configuration wizards have been executed. You may restart individual wizards via the list of configuration wizards."/>
</form>
</field>
</record>
@@ -7,15 +7,12 @@
<field name="model">base.module.scan</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Scan for new modules">
<separator string="" colspan="4"/>
<label string="This function will check if you installed new modules in the 'addons' path of your server installation." colspan="4" />
<separator string="" colspan="4"/>
<newline/>
<group colspan="4">
<button special="cancel" string="Close" icon="gtk-cancel"/>
<button name="watch_dir" string="Check new modules" type="object" icon="gtk-ok"/>
</group>
<form string="Scan for new modules" version="7.0">
<header>
<button name="watch_dir" string="Check new modules" type="object" icon="gtk-ok"/>
<button special="cancel" string="Close" icon="gtk-cancel"/>
</header>
<label string="This function will check if you installed new modules in the 'addons' path of your server installation."/>
</form>
</field>
</record>
@@ -38,6 +38,7 @@ class base_module_upgrade(osv.osv_memory):
if view_type != 'form':
return res
context = {} if context is None else context
record_id = context and context.get('active_id', False) or False
active_model = context.get('active_model')
if (not record_id) or (not active_model):
@@ -45,14 +46,14 @@ class base_module_upgrade(osv.osv_memory):
ids = self.get_module_list(cr, uid, context=context)
if not ids:
res['arch'] = '''<form string="Apply Scheduled Upgrades">
res['arch'] = '''<form string="Apply Scheduled Upgrades" version="7.0">
<header>
<button name="config" string="Start configuration" type="object" icon="gtk-ok"/>
<button special="cancel" string="Close" icon="gtk-cancel"/>
</header>
<separator string="System update completed" colspan="4"/>
<label align="0.0" string="The selected modules have been updated / installed !" colspan="4"/>
<label align="0.0" string="We suggest to reload the menu tab to see the new menus (Ctrl+T then Ctrl+R)." colspan="4"/>
<separator string="" colspan="4"/>
<newline/>
<button special="cancel" string="Close" icon="gtk-cancel"/>
<button name="config" string="Start configuration" type="object" icon="gtk-ok"/>
</form>'''
return res
@@ -7,17 +7,16 @@
<field name="model">base.module.upgrade</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="System Update">
<group colspan="2" col="4">
<label align="0.0" string="Your system will be updated." colspan="4"/>
<label align="0.0" string="Note that this operation might take a few minutes." colspan="4"/>
<separator string="Modules to Update" colspan="4"/>
<field name="module_info" nolabel="1" colspan="4"/>
<separator string="" colspan="4"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="upgrade_module" string="Update" type="object" icon="gtk-go-forward"/>
</group>
</form>
<form string="System Update" version="7.0">
<header>
<button name="upgrade_module" string="Update" type="object" icon="gtk-go-forward"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
</header>
<label string="Your system will be updated."/>
<label string="Note that this operation might take a few minutes."/>
<separator string="Modules to Update"/>
<field name="module_info"/>
</form>
</field>
</record>
@@ -37,22 +36,21 @@
id="menu_view_base_module_upgrade"
parent="menu_management"
sequence="3"/>
<record id="view_base_module_upgrade_install" model="ir.ui.view">
<field name="name">Module Upgrade Install</field>
<field name="model">base.module.upgrade</field>
<field name="type">form</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<form string="Apply Scheduled Upgrades">
<separator string="System update completed" colspan="4"/>
<label align="0.0" string="The selected modules have been updated / installed !" colspan="4"/>
<label align="0.0" string="We suggest to reload the menu tab to see the new menus (Ctrl+T then Ctrl+R)." colspan="4"/>
<separator string="" colspan="4"/>
<newline/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="config" string="Start configuration" type="object" icon="gtk-ok"/>
</form>
<form string="Apply Scheduled Upgrades" version="7.0">
<header>
<button name="config" string="Start configuration" type="object" icon="gtk-ok"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
</header>
<label string="The selected modules have been updated / installed !"/>
<label string="We suggest to reload the menu tab to see the new menus (Ctrl+T then Ctrl+R)."/>
</form>
</field>
</record>
-2
View File
@@ -24,7 +24,6 @@ import tools
import res_country
import res_lang
import res_partner
import res_partner_event
import res_bank
import res_config
import res_currency
@@ -35,7 +34,6 @@ import res_lang
import res_widget
import ir_property
import wizard
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+14 -26
View File
@@ -24,33 +24,21 @@
<field name="model">ir.property</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Parameters">
<separator colspan="4" string="Property"/>
<field name="name" select="1"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<separator colspan="4" string="Field Information"/>
<field colspan="4" name="fields_id" select="1"/>
<field colspan="4" name="type"/>
<group colspan="4" attrs="{'invisible' : [('type', 'not in', ('integer', 'boolean'))]}">
<field colspan="4" name="value_integer" widget="integer"/>
<form string="Parameters" version="7.0">
<group col="4">
<field name="name"/>
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
<field name="fields_id"/>
<field name="type"/>
<field name="res_id"/>
</group>
<group colspan="4" attrs="{'invisible' : [('type', '!=', 'float')]}">
<field colspan="4" name="value_float" />
</group>
<group colspan="4" attrs="{'invisible' : [('type', 'not in', ('date', 'datetime'))]}">
<field colspan="4" name="value_datetime" />
</group>
<group colspan="4" attrs="{'invisible' : [('type', 'not in', ('char', 'text'))]}">
<field colspan="4" name="value_text" />
</group>
<group colspan="4" attrs="{'invisible' : [('type', '!=', 'many2one')]}">
<field colspan="4" name="value_reference" />
</group>
<group colspan="4" attrs="{'invisible' : [('type', '!=', 'binary')]}">
<field colspan="4" name="value_binary" />
</group>
<separator colspan="4" string="Resource"/>
<field colspan="4" name="res_id"/>
<field name="value_integer" attrs="{'invisible' : [('type', 'not in', ('integer', 'boolean'))]}"/>
<field name="value_float" attrs="{'invisible' : [('type', '!=', 'float')]}"/>
<field name="value_datetime" attrs="{'invisible' : [('type', 'not in', ('date', 'datetime'))]}"/>
<field name="value_text" attrs="{'invisible' : [('type', 'not in', ('char', 'text'))]}"/>
<field name="value_reference" attrs="{'invisible' : [('type', '!=', 'many2one')]}"/>
<field name="value_binary" attrs="{'invisible' : [('type', '!=', 'binary')]}"/>
</form>
</field>
</record>
+51 -46
View File
@@ -7,27 +7,31 @@
<field name="model">res.bank</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bank">
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="bic" select="1"/>
<field name="active" select="2"/>
<form string="Bank" version="7.0">
<group col="4">
<field name="name"/>
<field name="bic"/>
</group>
<newline/>
<group colspan="2" col="4">
<separator string="Address" colspan="4"/>
<field name="street" select="2"/>
<field name="street2" select="2"/>
<field name="zip"/>
<field name="city"/>
<field name="country" select="2"/>
<field name="state" select="2"/>
</group>
<group colspan="2" col="2">
<separator string="Communication" colspan="2"/>
<field name="phone"/>
<field name="fax"/>
<field name="email" widget="email"/>
<group>
<group string="Address">
<label for="street" string="Address"/>
<div>
<field name="street" placeholder="Street..."/>
<field name="street2"/>
<div>
<field name="zip" class="oe_form_inline" placeholder="ZIP"/>
<field name="city" class="oe_form_inline" placeholder="City"/>
</div>
<field name="state" placeholder="State"/>
<field name="country" placeholder="Country"/>
</div>
</group>
<group string="Communication">
<field name="phone"/>
<field name="fax"/>
<field name="email" widget="email"/>
<field name="active"/>
</group>
</group>
</form>
</field>
@@ -59,11 +63,13 @@
<field name="model">res.partner.bank.type</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bank Account Type">
<field name="name"/>
<field name="code"/>
<field name="field_ids" colspan="4"/>
<field name="format_layout" colspan="4"/>
<form string="Bank Account Type" version="7.0">
<group col="4">
<field name="name"/>
<field name="code"/>
</group>
<field name="field_ids"/>
<field name="format_layout"/>
</form>
</field>
</record>
@@ -73,8 +79,8 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Bank Account Type">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="name"/>
<field name="code"/>
</tree>
</field>
</record>
@@ -84,29 +90,28 @@
<field name="model">res.partner.bank</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bank account">
<group colspan="4" col="6">
<form string="Bank account" version="7.0">
<group col="4">
<field name="state"/>
<field name="acc_number"/>
<field name="company_id" on_change="onchange_company_id(company_id)" invisible="context.get('company_hide', True)" widget="selection"/>
<field name="footer" attrs="{'invisible': [('company_id','=',False)]}"/>
<newline/>
<field name="acc_number"/>
</group>
<group name="owner" colspan="2" col="2">
<separator colspan="4" string="Bank Account Owner"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<field name="owner_name"/>
<field name="street"/>
<field name="city"/>
<field name="zip"/>
<field name="country_id"/>
<field name="state_id"/>
</group>
<group name="bank" colspan="2" col="2">
<separator colspan="2" string="Information About the Bank"/>
<field name="bank" on_change="onchange_bank_id(bank)"/>
<field name="bank_name" attrs="{'required': [('company_id','&lt;&gt;',False)]}"/>
<field name="bank_bic"/>
<group>
<group name="owner" string="Bank Account Owner">
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<field name="owner_name"/>
<field name="street"/>
<field name="city"/>
<field name="zip"/>
<field name="country_id"/>
<field name="state_id"/>
</group>
<group name="bank" string="Information About the Bank">
<field name="bank" on_change="onchange_bank_id(bank)"/>
<field name="bank_name" attrs="{'required': [('company_id','&lt;&gt;',False)]}"/>
<field name="bank_bic"/>
</group>
</group>
</form>
+62 -47
View File
@@ -18,66 +18,81 @@
<field name="model">res.company</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Company">
<group colspan="4" col="6">
<group colspan="4" col="4">
<field name="name"/>
<form string="Company" version="7.0">
<sheet>
<div class="oe_right oe_form_avatar">
<field name="logo" nolabel="1" widget="image"/>
</div>
<div class="oe_right oe_form_button_box">
<button name="%(preview_report)d" string="Preview Header/Footer" type="action" icon="gtk-print"/>
</div>
<div class="oe_form_title">
<label for="name" class="oe_form_readonly_hidden"/>
<h1><field name="name"/></h1>
<group col="4">
<field name="partner_id" readonly="1" required="0" groups="base.group_no_one"/>
<field name="parent_id" groups="base.group_multi_company"/>
</group>
<group colspan="2" col="2">
<field name="logo" nolabel="1" widget="image"/>
</group>
</group>
</div>
<notebook colspan="4">
<page string="General Information">
<separator string="Address Information" colspan="4"/>
<field name="street" colspan="4"/>
<field name="street2" invisible="1"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="state_id"/>
<field name="phone" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<field name="email" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<field name="fax" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<field name="website" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<field name="vat" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<field name="company_registry" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<separator string="Header/Footer of Reports" colspan="4"/>
<group colspan="4" col="3">
<field name="rml_header1" colspan="3" placeholder="Global Business Solutions"/>
<newline/>
<field name="rml_footer1" colspan="3" groups="base.group_no_one"/>
<newline/>
<field name="rml_footer2" colspan="2"/>
<button name="%(bank_account_update)d" string="Set Bank Accounts" type="action" icon="gtk-go-forward"/>
<newline/>
<label string="" colspan="2"/>
<button name="%(preview_report)d" string="Preview Header/Footer" type="action" icon="gtk-print"/>
<group>
<group>
<label for="street" string="Address"/>
<div>
<field name="street" placeholder="Street..."/>
<field name="street2"/>
<div>
<field name="zip" class="oe_form_inline" placeholder="ZIP"/>
<field name="city" class="oe_form_inline" placeholder="City"/>
</div>
<field name="state_id" placeholder="State"/>
<field name="country_id" placeholder="Country"/>
</div>
<field name="website" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
</group>
<group>
<field name="phone" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<field name="email" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<field name="fax" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<field name="vat" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
<field name="company_registry" on_change="on_change_header(phone, email, fax, website, vat, company_registry)"/>
</group>
</group>
<separator string="Header/Footer of Reports"/>
<group>
<field name="rml_header1" placeholder="Global Business Solutions"/>
<field name="rml_footer1" groups="base.group_no_one"/>
<label for="rml_footer2"/>
<div>
<field name="rml_footer2"/>
<button name="%(bank_account_update)d" string="Set Bank Accounts" type="action" icon="gtk-go-forward"/>
</div>
</group>
</page>
<page string="Header/Footer" groups="base.group_no_one">
<group colspan="2" col="4">
<group>
<field name="paper_format" on_change="onchange_paper_format(paper_format)"/>
<field name="rml_header"/>
</group>
<field colspan="4" name="rml_header" nolabel="1"/>
</page>
<page string="Internal Header/Footer" groups="base.group_no_one">
<separator string="Portrait" colspan="2"/>
<separator string="Landscape" colspan="2"/>
<field colspan="2" name="rml_header2" nolabel="1"/>
<field colspan="2" name="rml_header3" nolabel="1"/>
<label for="rml_header2"/>
<field name="rml_header2"/>
<label for="rml_header3"/>
<field name="rml_header3"/>
</page>
<page string="Configuration">
<separator string="Accounting" colspan="4"/>
<field name="currency_id" colspan="2"/>
<newline/>
<group>
<field name="currency_id"/>
</group>
</page>
<page string="Bank Accounts">
<field name="bank_ids" nolabel="1"/>
<field name="bank_ids"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
@@ -133,7 +148,7 @@
<field name="type">form</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<form string="Multi Company">
<form string="Multi Company" version="7.0">
<group col="6" colspan="4">
<field name="name" colspan="6"/>
<separator string="Matching" colspan="6"/>
@@ -156,10 +171,10 @@
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<search string="Multi Company">
<field name="name" select="1"/>
<field name="company_id" select="1" widget="selection"/>
<field name="company_dest_id" select="1" widget="selection"/>
<field name="object_id" select="1"/>
<field name="name"/>
<field name="company_id" widget="selection"/>
<field name="company_dest_id" widget="selection"/>
<field name="object_id"/>
</search>
</field>
</record>
+21 -57
View File
@@ -5,29 +5,15 @@
<field name="model">res.config</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<group colspan="4" col="8">
<group colspan="1" width="220">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1"/>
<newline/>
<label align="0.0" string="description" width="200" colspan="2"/>
</group>
<separator string="vsep" orientation="vertical" colspan="1" rowspan="12"/>
<group colspan="6">
<separator string="title" colspan="4"/>
<group string="res_config_contents"/>
</group>
</group>
<group colspan="8" col="8">
<separator string="" colspan="6"/>
<group colspan="4" width="220">
</group>
<button name="action_skip" icon="gtk-jump-to" special="cancel"
type="object" string="Cancel" colspan="1"/>
<button name="action_next" icon="gtk-go-forward"
type="object" string="Apply" colspan="1"/>
</group>
</form>
<form version="7.0">
<header>
<button name="action_skip" icon="gtk-jump-to" special="cancel"
type="object" string="Cancel" colspan="1"/>
<button name="action_next" icon="gtk-go-forward"
type="object" string="Apply" colspan="1"/>
</header>
<group string="res_config_contents" col="4"/>
</form>
</field>
</record>
@@ -36,19 +22,12 @@
<field name="model">ir.actions.configuration.wizard</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Next Configuration Step">
<image name="gtk-dialog-info"/>
<group>
<field name="note" nolabel="1" colspan="4" width="500"/>
<group colspan="4" col="8">
<field name="progress" widget="progressbar"/>
<label string="" colspan="4"/>
<group colspan="1" col="2">
<form string="Next Configuration Step" version="7.0">
<header>
<button name="action_next" icon="gtk-go-forward"
type="object" string="Continue"/>
</group>
</group>
</group>
</header>
<field name="note"/>
</form>
</field>
</record>
@@ -58,30 +37,15 @@
<field name="model">res.config.installer</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<group colspan="4" col="8">
<group colspan="1" width="220" height="250">
<field name="config_logo" widget="image" width="220" height="130" nolabel="1" colspan="1"/>
<newline/>
<label align="0.0" string="description" width="200" colspan="2"/>
</group>
<separator string="vsep" orientation="vertical" colspan="1" rowspan="12"/>
<group colspan="6">
<separator string="title" colspan="4"/>
<group colspan="8"/>
</group>
</group>
<group colspan="8" col="8">
<separator string="" colspan="8"/>
<group colspan="4" width="220">
</group>
<button name="action_skip" icon="gtk-jump-to" special="cancel"
type="object" string="Cancel" colspan="1"/>
<button name="action_next" icon="gtk-go-forward"
type="object" string="Install Modules" colspan="1"/>
</group>
<form version="7.0">
<header>
<button name="action_skip" icon="gtk-jump-to" special="cancel"
type="object" string="Cancel" colspan="1"/>
<button name="action_next" icon="gtk-go-forward"
type="object" string="Install Modules" colspan="1"/>
</header>
<separator string="title" colspan="4"/>
</form>
</field>
</record>
+14 -10
View File
@@ -3,8 +3,8 @@
<data>
<!--
Country
-->
Country
-->
<record id="view_country_tree" model="ir.ui.view">
<field name="name">res.country.tree</field>
@@ -23,10 +23,12 @@
<field name="model">res.country</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Country">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="address_format" colspan="4" groups="base.group_no_one"/>
<form string="Country" version="7.0">
<group col="4">
<field name="name"/>
<field name="code"/>
<field name="address_format" colspan="4" groups="base.group_no_one"/>
</group>
</form>
</field>
</record>
@@ -65,10 +67,12 @@
<field name="model">res.country.state</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="State">
<field name="country_id" select="1"/>
<field name="name" select="1"/>
<field name="code" select="1"/>
<form string="State" version="7.0">
<group>
<field name="name"/>
<field name="code"/>
<field name="country_id"/>
</group>
</form>
</field>
</record>
+13 -18
View File
@@ -37,39 +37,32 @@
<field name="model">res.currency</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Currency">
<group col="6" colspan="4">
<form string="Currency" version="7.0">
<group col="4">
<field name="name"/>
<field name="rate"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group col="6" colspan="4">
<group col="2" colspan="2">
<separator string="Price Accuracy" colspan="2"/>
<group>
<group string="Price Accuracy">
<field name="rounding"/>
<field name="accuracy"/>
</group>
<group col="2" colspan="2">
<separator string="Display" colspan="2"/>
<group string="Display">
<field name="symbol"/>
<field name="position"/>
</group>
<group col="2" colspan="2">
<separator string="Miscellaneous" colspan="2"/>
<group string="Miscellaneous">
<field name="base"/>
<field name="active" select="1"/>
<field name="active"/>
</group>
</group>
<field colspan="4" mode="tree,form" name="rate_ids" nolabel="1" attrs="{'readonly':[('base','=',True)]}">
<form string="Rates">
<field name="name"/>
<field name="rate"/>
</form>
<tree string="Rates">
<field mode="tree" name="rate_ids" attrs="{'readonly':[('base','=',True)]}">
<tree string="Rates" editable="bottom">
<field name="name"/>
<field name="rate"/>
</tree>
@@ -95,8 +88,10 @@
<field name="model">res.currency.rate.type</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Currency Rate Type">
<field name="name"/>
<form string="Currency Rate Type" version="7.0">
<group>
<field name="name"/>
</group>
</form>
</field>
</record>
+77 -77
View File
@@ -23,79 +23,79 @@
<field name="model">res.lang</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Languages">
<group col="6" colspan="4">
<field name="name"/>
<field name="code" />
<field name="iso_code"/>
<newline/>
<field name="grouping" />
<field name="date_format"/>
<field name="time_format"/>
<newline/>
<field name="direction" />
<field name="decimal_point"/>
<field name="thousands_sep"/>
<newline/>
<field name="active" />
<field name="translatable"/>
</group>
<separator colspan="4" string="Legends for Date and Time Formats"/>
<form string="Languages" version="7.0">
<group col="6" colspan="4">
<field name="name"/>
<field name="code" />
<field name="iso_code"/>
<newline/>
<field name="grouping" />
<field name="date_format"/>
<field name="time_format"/>
<newline/>
<field name="direction" />
<field name="decimal_point"/>
<field name="thousands_sep"/>
<newline/>
<field name="active" />
<field name="translatable"/>
</group>
<separator colspan="4" string="Legends for Date and Time Formats"/>
<group col="4" colspan="4">
<label align="0.0" string="%%a - Abbreviated weekday name."/>
<label align="0.0" string="%%A - Full weekday name."/>
<newline/>
<label align="0.0" string="%%b - Abbreviated month name."/>
<label align="0.0" string="%%B - Full month name." />
<newline/>
<label align="0.0" string="%%c - Appropriate date and time representation." />
<label align="0.0" string="%%d - Day of the month [01,31]." />
<newline/>
<label align="0.0" string="%%H - Hour (24-hour clock) [00,23]." />
<label align="0.0" string="%%I - Hour (12-hour clock) [01,12]." />
<newline/>
<label align="0.0" string="%%j - Day of the year [001,366]." />
<label align="0.0" string="%%m - Month number [01,12]." />
<newline/>
<label align="0.0" string="%%M - Minute [00,59]." />
<label align="0.0" string="%%p - Equivalent of either AM or PM." />
<newline/>
<label align="0.0" string="%%S - Seconds [00,61]." />
<label align="0.0" string="%%w - Weekday number [0(Sunday),6]." />
<newline/>
<label align="0.0" string="%%x - Appropriate date representation." />
<label align="0.0" string="%%X - Appropriate time representation." />
<newline/>
<label align="0.0" string="%%y - Year without century [00,99]." />
<label align="0.0" string="%%Y - Year with century." />
<newline/>
<label align="0.0" string="%%U - Week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Sunday are considered to be in week 0." />
<label align="0.0" string="%%W - Week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0." />
<newline/>
<label align="0.0" string="======================================================" />
<label align="0.0" string="%%a - Abbreviated weekday name."/>
<label align="0.0" string="%%A - Full weekday name."/>
<newline/>
<label align="0.0" string="%%b - Abbreviated month name."/>
<label align="0.0" string="%%B - Full month name." />
<newline/>
<label align="0.0" string="%%c - Appropriate date and time representation." />
<label align="0.0" string="%%d - Day of the month [01,31]." />
<newline/>
<label align="0.0" string="%%H - Hour (24-hour clock) [00,23]." />
<label align="0.0" string="%%I - Hour (12-hour clock) [01,12]." />
<newline/>
<label align="0.0" string="%%j - Day of the year [001,366]." />
<label align="0.0" string="%%m - Month number [01,12]." />
<newline/>
<label align="0.0" string="%%M - Minute [00,59]." />
<label align="0.0" string="%%p - Equivalent of either AM or PM." />
<newline/>
<label align="0.0" string="%%S - Seconds [00,61]." />
<label align="0.0" string="%%w - Weekday number [0(Sunday),6]." />
<newline/>
<label align="0.0" string="%%x - Appropriate date representation." />
<label align="0.0" string="%%X - Appropriate time representation." />
<newline/>
<label align="0.0" string="%%y - Year without century [00,99]." />
<label align="0.0" string="%%Y - Year with century." />
<newline/>
<label align="0.0" string="%%U - Week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Sunday are considered to be in week 0." />
<label align="0.0" string="%%W - Week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0." />
<newline/>
<label align="0.0" string="======================================================" />
</group>
<newline/>
<group colspan="4" col="4">
<separator string="Examples" colspan="4"/>
<newline/>
<label align="0.0" string="1. %%c ==> Fri Dec 5 18:25:20 2008"/>
<label align="0.0" string="2. %%a ,%%A ==> Fri, Friday"/>
<newline/>
<label align="0.0" string="3. %%x ,%%X ==> 12/05/08, 18:25:20"/>
<label align="0.0" string="4. %%b, %%B ==> Dec, December"/>
<newline/>
<label align="0.0" string="5. %%y, %%Y ==> 08, 2008"/>
<label align="0.0" string="6. %%d, %%m ==> 05, 12"/>
<newline/>
<label align="0.0" string="7. %%H:%%M:%%S ==> 18:25:20"/>
<label align="0.0" string="8. %%I:%%M:%%S %%p ==> 06:25:20 PM"/>
<newline/>
<label align="0.0" string="9. %%j ==> 340"/>
<label align="0.0" string="10. %%S ==> 20"/>
<newline/>
<label align="0.0" string="11. %%U or %%W ==> 48 (49th week)"/>
<label align="0.0" string="12. %%w ==> 5 ( Friday is the 6th day)"/>
<newline/>
<separator string="Examples" colspan="4"/>
<newline/>
<label align="0.0" string="1. %%c ==> Fri Dec 5 18:25:20 2008"/>
<label align="0.0" string="2. %%a ,%%A ==> Fri, Friday"/>
<newline/>
<label align="0.0" string="3. %%x ,%%X ==> 12/05/08, 18:25:20"/>
<label align="0.0" string="4. %%b, %%B ==> Dec, December"/>
<newline/>
<label align="0.0" string="5. %%y, %%Y ==> 08, 2008"/>
<label align="0.0" string="6. %%d, %%m ==> 05, 12"/>
<newline/>
<label align="0.0" string="7. %%H:%%M:%%S ==> 18:25:20"/>
<label align="0.0" string="8. %%I:%%M:%%S %%p ==> 06:25:20 PM"/>
<newline/>
<label align="0.0" string="9. %%j ==> 340"/>
<label align="0.0" string="10. %%S ==> 20"/>
<newline/>
<label align="0.0" string="11. %%U or %%W ==> 48 (49th week)"/>
<label align="0.0" string="12. %%w ==> 5 ( Friday is the 6th day)"/>
<newline/>
</group>
</form>
@@ -107,14 +107,14 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Languages">
<group>
<filter string="Translatable" icon="terp-tools" domain="[('translatable','=',True)]"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="code"/>
<field name="iso_code"/>
<field name="direction"/>
</group>
<group>
<filter string="Translatable" icon="terp-tools" domain="[('translatable','=',True)]"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="code"/>
<field name="iso_code"/>
<field name="direction"/>
</group>
</search>
</field>
</record>
+1 -2
View File
@@ -143,7 +143,6 @@ class res_partner(osv.osv):
'comment': fields.text('Notes'),
'address': fields.one2many('res.partner.address', 'partner_id', 'Contacts'), # should be removed in version 7, but kept until then for backward compatibility
'category_id': fields.many2many('res.partner.category', 'res_partner_category_rel', 'partner_id', 'category_id', 'Tags'),
'events': fields.one2many('res.partner.event', 'partner_id', 'Events'),
'credit_limit': fields.float(string='Credit Limit'),
'ean13': fields.char('EAN13', size=13),
'active': fields.boolean('Active'),
@@ -205,7 +204,7 @@ class res_partner(osv.osv):
if default is None:
default = {}
name = self.read(cr, uid, [id], ['name'], context)[0]['name']
default.update({'name': _('%s (copy)')%(name), 'events':[]})
default.update({'name': _('%s (copy)')%(name)})
return super(res_partner, self).copy(cr, uid, id, default, context)
def onchange_type(self, cr, uid, ids, is_company, context=None):
@@ -1,42 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import osv
from osv import fields
class res_partner_event(osv.osv):
_name = "res.partner.event"
_columns = {
'name': fields.char('Events', size=64, required=True),
'description': fields.text('Description'),
'partner_id': fields.many2one('res.partner', 'Partner', select=True),
'date': fields.datetime('Date', size=16),
'user_id': fields.many2one('res.users', 'User'),
}
_order = 'date desc'
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'user_id': lambda self, cr, uid, context: uid,
}
res_partner_event()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- <menuitem id="menu_partner_events" name="Events" parent="menu_config_address_book" sequence="7"/>-->
<record id="res_partner_event-wopartner-view_form" model="ir.ui.view">
<field name="name">res.partner.event.form</field>
<field name="model">res.partner.event</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Event Logs">
<separator colspan="4" string="General Description"/>
<field name="name" select="1" string="Name"/>
<field name="date" select="1"/>
<field name="user_id" select="1"/>
<separator colspan="4" string="Description"/>
<field colspan="4" name="description" nolabel="1" widget="text_tag"/>
</form>
</field>
</record>
<record id="res_partner_event-wopartner-view_tree" model="ir.ui.view">
<field name="name">res.partner.event.tree</field>
<field name="model">res.partner.event</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Event Logs">
<field name="date"/>
<field name="name" string="Event"/>
<field name="user_id"/>
</tree>
</field>
</record>
</data>
</openerp>
+96 -297
View File
@@ -6,225 +6,6 @@
<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 Address
=====================
-->
<record id="view_res_partner_address_filter" model="ir.ui.view">
<field name="name">res.partner.address.select</field>
<field name="model">res.partner.address</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Contact">
<group>
<filter string="Customer" name="customer" icon="terp-personal" domain="[('is_customer_add','=','1')]" />
<filter string="Supplier" name="supplier" icon="terp-personal" domain="[('is_supplier_add','=','1')]" />
<separator orientation="vertical"/>
<field name="partner_id" string="Partner"/>
<field name="name" />
<field name="country_id" />
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by' : 'partner_id'}" />
<filter string="Country" icon="terp-go-home" domain="[]" context="{'group_by' : 'country_id'}" />
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}" />
</group>
</search>
</field>
</record>
<record id="view_partner_address_tree" model="ir.ui.view">
<field name="name">res.partner.address.tree</field>
<field name="model">res.partner.address</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Partner Addresses">
<field name="partner_id"/>
<field name="name"/>
<field name="phone"/>
<field name="email"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="type"/>
</tree>
</field>
</record>
<record id="action_partner_addess_tree" model="ir.actions.act_window">
<field name="name">Partner Contacts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner.address</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_partner_address_tree"/>
</record>
<record id="view_partner_address_form1" model="ir.ui.view">
<field name="name">res.partner.address.form1</field>
<field name="model">res.partner.address</field>
<field name="type">form</field>
<field eval="8" name="priority"/>
<field name="arch" type="xml">
<form string="Address">
<group colspan="4" col="6">
<field name="partner_id" colspan="2"/>
<field name="active"/>
<field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
<newline/>
<field name="name"/>
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field name="function"/>
</group>
<group colspan="2" col="2">
<separator string="Postal Address" colspan="4" col="4"/>
<field name="type"/>
<field name="street"/>
<field name="street2"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="state_id"/>
</group>
<group colspan="2" col="2">
<separator string="Communication" colspan="4" col="4"/>
<field name="phone"/>
<field name="fax"/>
<field name="mobile"/>
<field name="email" widget="email"/>
</group>
</form>
</field>
</record>
<record model="ir.ui.view" id="contacts_kanban_view">
<field name="name">res.partner.address.kanban</field>
<field name="model">res.partner.address</field>
<field name="type">kanban</field>
<field name="arch" type="xml">
<kanban>
<field name="color"/>
<field name="name"/>
<field name="email"/>
<templates>
<t t-name="kanban-box">
<t t-set="color" t-value="kanban_color(record.color.raw_value || record.name.raw_value)"/>
<div t-att-class="color + (record.color.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
<div class="oe_kanban_box oe_kanban_color_border">
<div class="oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_auto_height">
<table class="oe_kanban_table">
<tr>
<td class="oe_kanban_title1" align="left" valign="middle">
<field name="name"/>
</td>
<td valign="top" width="22">
<img t-att-src="kanban_gravatar(record.email.value, 22)" class="oe_kanban_gravatar"/>
</td>
</tr>
</table>
</div>
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
<table class="oe_kanban_table">
<tr>
<td valign="top" width="22" align="left">
<img src="/base/static/src/img/kanban_partner.png" width="64" height="64"/>
</td>
<td valign="top" align="left">
<div class="oe_kanban_title2">
<field name="title"/>
<t t-if="record.title.raw_value and record.function.raw_value">,</t>
<field name="function"/>
</div>
<div class="oe_kanban_title3">
<field name="partner_id"/>
<t t-if="record.partner_id.raw_value and record.country_id.raw_value">,</t>
<field name="country_id"/>
</div>
<div class="oe_kanban_title3">
<i><field name="email"/>
<t t-if="record.phone.raw_value and record.email.raw_value">,</t>
<field name="phone"/></i>
</div>
</td>
</tr>
</table>
</div>
<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
<div class="oe_kanban_left">
<a string="Edit" icon="gtk-edit" type="edit"/>
<a string="Change Color" icon="color-picker" type="color" name="color"/>
<a 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>
</div>
<br class="oe_kanban_clear"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="action_partner_address_form" model="ir.actions.act_window">
<field name="name">Addresses</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.partner.address</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,kanban</field>
<field name="context">{"search_default_customer":1}</field>
<field name="search_view_id" ref="view_res_partner_address_filter"/>
<field name="help">Customers (also called Partners in other areas of the system) helps you manage your address book of companies whether they are prospects, customers and/or suppliers. The partner form allows you to track and record all the necessary information to interact with your partners from the company address to their contacts as well as pricelists, and much more. If you installed the CRM, with the history tab, you can track all the interactions with a partner such as opportunities, emails, or sales orders issued.</field>
</record>
<record id="action_partner_address_form_view1" model="ir.actions.act_window.view">
<field eval="10" name="sequence"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_partner_address_tree"/>
<field name="act_window_id" ref="action_partner_address_form"/>
</record>
<record id="action_partner_address_form_view2" model="ir.actions.act_window.view">
<field eval="20" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_partner_address_form1"/>
<field name="act_window_id" ref="action_partner_address_form"/>
</record>
<!--
=========================================
the short form used in the partner form
=========================================
-->
<record id="view_partner_address_form2" model="ir.ui.view">
<field name="name">res.partner.address.form2</field>
<field name="model">res.partner.address</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Contacts">
<field name="name" select="1"/>
<field domain="[('domain', '=', 'contact')]" name="title"/>
<field name="street"/>
<field name="street2"/>
<field name="type"/>
<field name="function"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<newline/>
<field name="zip"/>
<field name="city"/>
<newline/>
<field completion="1" name="country_id" select="1"/>
<field name="state_id"/>
<newline/>
<field name="phone"/>
<field name="fax"/>
<newline/>
<field name="mobile"/>
<field name="email" widget="email"/>
</form>
</field>
</record>
<!--
=======================
Partner Titles
@@ -236,8 +17,8 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Partner Titles">
<field name="name" select="1"/>
<field name="shortcut" select="1"/>
<field name="name"/>
<field name="shortcut"/>
</tree>
</field>
</record>
@@ -246,10 +27,12 @@
<field name="model">res.partner.title</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Partner Titles">
<field name="name" select="1"/>
<field name="shortcut" select="1"/>
<field name="domain"/>
<form string="Partner Titles" version="7.0">
<group col="4">
<field name="name"/>
<field name="shortcut"/>
<field name="domain"/>
</group>
</form>
</field>
</record>
@@ -316,54 +99,71 @@
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Partners" validate="0">
<group col="8" colspan="4">
<group col="2">
<field name="photo" widget='image' nolabel="1"/>
</group>
<group colspan="4">
<h2><field name="name" required="1" nolabel="1" colspan="4" placeholder="Customer Name"/></h2><newline/>
<field name="function" attrs="{'invisible': [('is_company', '=', True)]}"/>
<field name="title" size="0" domain="[('domain', '=', 'contact')]"/>
<field name="parent_id" string="Company" attrs="{'invisible': [('is_company','=', True)]}"
domain="[('is_company', '=', True)]" context="{'default_is_company': True}"
<form string="Partners" version="7.0">
<sheet>
<field name="photo" widget='image' class="oe_form_avatar oe_right" height="70"/>
<div class="oe_right oe_form_button_box" name="buttons">
</div>
<div class="oe_form_title">
<div class="oe_form_readonly_hidden">
<label for="name" string="Customer Name"/>
(<field name="is_company" on_change="onchange_type(is_company)" class="oe_form_inline"/> <label for="is_company" string="Is a Company?"/>)
</div>
<h1>
<field name="name"/>
</h1>
<div attrs="{'invisible': [('is_company','=', True)]}">
<label for="parent_id" class="oe_form_readonly_hidden"/>
</div>
<h2 attrs="{'invisible': [('is_company','=', True)]}">
<field name="parent_id" string="Company"
domain="[('is_company', '=', True)]" context="{'default_is_company': True}"
class="oe_form_inline"
on_change="onchange_address(use_parent_address, parent_id)"/>,
<field name="function" class="oe_form_inline" placeholder="Job Position"/>
</h2>
<field name="category_id" widget="many2many_tags" placeholder="Tags..."/>
</div>
<group>
<group>
<label for="type" attrs="{'invisible': [('parent_id','=', False)]}"/>
<div attrs="{'invisible': [('parent_id','=', False)]}">
<field class="oe_form_inline"
name="type"/>
<label for="use_parent_address"/>
<field name="use_parent_address"
class="oe_form_inline"
on_change="onchange_address(use_parent_address, parent_id)"/>
</div>
<label for="street" string="Address"/>
<div>
<field name="street" placeholder="Street..."/>
<field name="street2"/>
<div>
<field name="zip" class="oe_form_inline" placeholder="ZIP"/>
<field name="city" class="oe_form_inline" placeholder="City"/>
</div>
<field name="state_id" placeholder="State"/>
<field name="country_id" placeholder="Country"/>
</div>
<field name="website" widget="url" placeholder="www.openerp.com"/>
</group>
<group col="2">
<field name="is_company" on_change="onchange_type(is_company)"/>
<field name="customer"/>
<field name="supplier"/>
<group>
<field name="phone" placeholder="+32.81.81.37.00"/>
<field name="mobile"/>
<field name="fax"/>
<field name="email" widget="email"/>
<field name="title" domain="[('domain', '=', 'contact')]" attrs="{'invisible': [('is_company','=', True)]}"/>
</group>
</group>
<notebook colspan="4">
<page string="General">
<group colspan="2">
<separator string="Address" colspan="4"/>
<field name="type" string="Type" attrs="{'invisible': [('is_company','=', True)]}"/>
<group colspan="2">
<field name="use_parent_address" attrs="{'invisible': [('parent_id', '=', False)]}"
on_change="onchange_address(use_parent_address, parent_id)"/>
</group>
<newline/>
<field name="street" colspan="4"/>
<field name="street2" colspan="4"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="state_id"/>
</group>
<group colspan="2">
<separator string="Communication" colspan="4"/>
<field name="phone" colspan="4" placeholder="+32.81.81.37.00"/>
<field name="mobile" colspan="4"/>
<field name="fax" colspan="4"/>
<field name="email" widget="email" colspan="4"/>
<field name="website" widget="url" colspan="4" placeholder="www.openerp.com"/>
<field name="ref" colspan="4"/>
</group>
<group colspan="4" attrs="{'invisible': [('is_company','=', False)]}">
<field name="child_ids" context="{'default_parent_id': active_id}" nolabel="1" mode="kanban,list">
<kanban quick_create="true" create="false">
<page string="Contacts">
<field name="child_ids" context="{'default_parent_id': active_id}" mode="kanban">
<kanban>
<field name="color"/>
<field name="name"/>
<field name="title"/>
@@ -414,26 +214,29 @@
</templates>
</kanban>
</field>
</group>
</page>
<page string="Sales &amp; Purchases" attrs="{'invisible': [('customer', '=', False), ('supplier', '=', False)]}">
<separator string="General Information" colspan="4"/>
<field name="lang" colspan="4"/>
<field name="user_id"/>
<field name="active"/>
<field name="date"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<newline/>
<group>
<group>
<field name="lang"/>
<field name="user_id"/>
<field name="date"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<group>
<field name="customer"/>
<field name="supplier"/>
<field name="active"/>
<field name="ref"/>
</group>
</group>
</page>
<page string="History" invisible="True">
</page>
<page string="Categories">
<field name="category_id" colspan="4" nolabel="1" widget="many2many_tags"/>
</page>
<page string="Notes">
<field name="comment" colspan="4" nolabel="1" placeholder="Internal notes about this customer..."/>
<page string="History" invisible="True"></page>
<page string="Internal Notes">
<field name="comment" placeholder="Internal notes about this customer..."/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
@@ -598,8 +401,10 @@
<field name="model">res.payterm</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Payment Term">
<field colspan="4" name="name"/>
<form string="Payment Term" version="7.0">
<group>
<field name="name"/>
</group>
</form>
</field>
</record>
@@ -620,12 +425,12 @@
<field name="model">res.partner.category</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Partner Category">
<field name="name" select="1"/>
<field name="active"/>
<field name="parent_id"/>
<separator colspan="4" string="Partners"/>
<field colspan="4" name="partner_ids" nolabel="1"/>
<form string="Partner Category" version="7.0">
<group col="4">
<field name="name"/>
<field name="active"/>
<field name="parent_id"/>
</group>
</form>
</field>
</record>
@@ -691,12 +496,6 @@
<menuitem action="action_partner_category_form" id="menu_partner_category_form" name="Partner Categories" sequence="4" parent="menu_config_address_book" groups="base.group_no_one"/>
<act_window domain="[('partner_id', '=', active_id)]" context="{'default_partner_id':active_id}"
id="act_res_partner_event" name="Events"
res_model="res.partner.event"
src_model="res.partner"
/>
</data>
</openerp>
+7 -150
View File
@@ -1,129 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem name="Requests" id="menu_resquest_ref" parent="base.next_id_4" sequence="1"/>
<record id="res_request_tree-view" model="ir.ui.view">
<field name="name">res.request.tree</field>
<field name="model">res.request</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Requests" colors="blue:state == 'waiting';gray:state == 'closed'">
<field name="create_date"/>
<field name="act_from"/>
<field name="act_to"/>
<field name="name"/>
<field name="priority"/>
<field name="trigger_date"/>
<field name="state"/>
</tree>
</field>
</record>
<record id="res_request-view" model="ir.ui.view">
<field name="name">res.request.form</field>
<field name="model">res.request</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Requests">
<group colspan="4" col="6">
<field name="name" colspan="4"/>
<field name="create_date" string="Request Date"/>
<newline/>
<field name="act_from"/>
<field name="priority"/>
<field name="active"/>
</group>
<notebook colspan="4">
<page string="Request">
<field name="act_to"/>
<field name="trigger_date"/>
<separator colspan="4" string="Description"/>
<newline/>
<field colspan="4" name="body" nolabel="1"/>
<group col="5" colspan="4">
<field name="state"/>
<button name="request_close" states="waiting,draft,active" string="Close" type="object" icon="gtk-close"/>
<button name="request_send" states="draft,active" string="Send" type="object" icon="terp-camera_test"/>
<button name="request_reply" states="waiting" string="Reply" type="object" icon="gtk-undo"/>
</group>
</page>
<page string="References">
<field name="ref_partner_id"/>
<field colspan="4" name="ref_doc1"/>
<field colspan="4" name="ref_doc2"/>
</page>
<page string="History">
<field colspan="4" name="history" nolabel="1" widget="one2many_list"/>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="res_request_calendar_view">
<field name="name">Request - Calendar</field>
<field name="model">res.request</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Requests" date_start="trigger_date" color="act_to">
<field name="name"/>
<field name="act_from"/>
</calendar>
</field>
</record>
<record id="res_request_search_view" model="ir.ui.view">
<field name="name">res.request.search</field>
<field name="model">res.request</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Requests">
<filter string="Current" icon="terp-camera_test" domain="['|',('state','=','draft'),('state','=','active')]"
help="Draft and Active"/>
<separator orientation="vertical"/>
<filter string="Waiting" icon="terp-gtk-media-pause" domain="[('state','=','waiting')]"/>
<separator orientation="vertical"/>
<field name="act_from"/>
<field name="act_to" select="1"/>
<field name="name"/>
<field name="state"/>
<newline/>
<group expand="0" string="Group By" colspan="4">
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record id="res_request_calendar_view" model="ir.ui.view">
<field name="name">res.request.calendar</field>
<field name="model">res.request</field>
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar string="Requests" date_start="create_date" color="act_to">
<field name="name"/>
<field name="act_to"/>
</calendar>
</field>
</record>
<record id="res_request-act" model="ir.actions.act_window">
<field name="name">Requests</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.request</field>
<field name="view_id" eval="False"/>
<field name="view_mode">tree,form,calendar</field>
<field name="search_view_id" ref="res_request_search_view"/>
<field name="context">{"search_default_act_to":uid}</field>
</record>
<menuitem action="res_request-act" id="menu_res_request_act" parent="menu_resquest_ref" />
<record id="res_request_link-view" model="ir.ui.view">
<field name="name">res.request.link.form</field>
<field name="model">res.request.link</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Request Link">
<field name="name"/>
<field name="object"/>
<field name="priority"/>
<form string="Request Link" version="7.0">
<group col="4">
<field name="name"/>
<field name="object"/>
<field name="priority"/>
</group>
</form>
</field>
</record>
@@ -158,38 +46,7 @@
<field name="view_id" eval="False"/>
<field name="search_view_id" ref="res_request_link_search_view"/>
</record>
<menuitem action="res_request_link-act" id="menu_res_request_link_act" parent="menu_resquest_ref" />
<menuitem action="res_request_link-act" id="menu_res_request_link_act" parent="base.next_id_4" />
<record id="res_request_history_tree-view" model="ir.ui.view">
<field name="name">res.request.history.tree</field>
<field name="model">res.request.history</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Request History">
<field name="act_from"/>
<field name="act_to"/>
<field name="date_sent"/>
<field name="name"/>
</tree>
</field>
</record>
<record id="res_request_history_form-view" model="ir.ui.view">
<field name="name">res.request.history.form</field>
<field name="model">res.request.history</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Request History">
<field name="act_from"/>
<field name="act_to"/>
<field name="date_sent"/>
<newline/>
<field colspan="4" name="body"/>
</form>
</field>
</record>
</data>
</openerp>
+69 -73
View File
@@ -7,22 +7,24 @@
<field name="model">res.groups</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Groups">
<field name="category_id" select="1"/>
<field name="name" select="1"/>
<notebook colspan="4">
<form string="Groups" version="7.0">
<group col="4">
<field name="category_id"/>
<field name="name"/>
</group>
<notebook>
<page string="Users">
<field colspan="4" name="users" nolabel="1"/>
<field name="users"/>
</page>
<page string="Inherited">
<label colspan="4" string="Users added to this group are automatically added in the following groups."/>
<field colspan="4" name="implied_ids" nolabel="1"/>
<label string="Users added to this group are automatically added in the following groups."/>
<field name="implied_ids"/>
</page>
<page string="Menus">
<field colspan="4" name="menu_access" nolabel="1"/>
<field name="menu_access"/>
</page>
<page string="Access Rights">
<field colspan="4" name="model_access" nolabel="1">
<field name="model_access">
<tree string="Access Rules" editable="top">
<field name="model_id"/>
<field name="perm_read"/>
@@ -31,19 +33,20 @@
<field name="perm_unlink"/>
<field name="name"/>
</tree>
<form string="Access Controls">
<field colspan="4" name="name" select="1"/>
<field name="model_id" select="1"/>
<newline/>
<field name="perm_read"/>
<field name="perm_write"/>
<field name="perm_create"/>
<field name="perm_unlink"/>
<form string="Access Controls" version="7.0">
<group col="4">
<field name="name"/>
<field name="model_id"/>
<field name="perm_read"/>
<field name="perm_write"/>
<field name="perm_create"/>
<field name="perm_unlink"/>
</group>
</form>
</field>
</page>
<page string="Rules">
<field colspan="4" name="rule_groups" nolabel="1">
<field name="rule_groups">
<tree string="Rules">
<field name="name"/>
<field name="model_id"/>
@@ -51,7 +54,7 @@
</tree>
</field>
</page><page string="Notes">
<field colspan="4" name="comment" nolabel="1"/>
<field name="comment"/>
</page>
</notebook>
</form>
@@ -73,55 +76,53 @@
<field name="model">res.users</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Users" layout="manual">
<sheet layout="auto">
<field name="id" invisible="1"/>
<group colspan="4" col="4" class="oe_form_group_label_border">
<field name="id" invisible="1"/>
<field name="name" select="1"/>
<field name="login" select="1"/>
<field name="new_password" password="True" attrs="{'required': [('id','=',False)]}"/>
<field name="active"/>
<form string="Users" version="7.0">
<field name="id" invisible="1"/>
<sheet>
<div class="oe_right">
<field name="avatar" widget='image' nolabel="1" on_change="onchange_avatar(avatar)" class="oe_form_avatar"/>
</div>
<div class="oe_form_title">
<label for="name" class="oe_form_readonly_hidden"/>
<h1><field name="name"/></h1>
<label for="company_id" class="oe_form_readonly_hidden"/>
<h2><field name="company_id" context="{'user_preference': 0}"/></h2>
</div>
<group>
<group>
<field name="login"/>
<field name="new_password" password="True" attrs="{'required': [('id','=',False)]}"/>
</group>
<group>
<field name="active"/>
</group>
</group>
<notebook colspan="4">
<page string="User">
<group col="2" colspan="3" width="80%%">
<group col="2" name="preferences" class="oe_form_group_label_border">
<separator string="Preferences" colspan="2"/>
<page string="Preferences">
<group>
<group name="preferences">
<field name="context_lang"/>
<field name="context_tz"/>
<field name="menu_tips"/>
</group>
<group col="1">
<group col="2" groups="base.group_no_one" class="oe_form_group_label_border">
<separator string="Action" colspan="2"/>
<field name="action_id"/>
<field domain="[('usage','=','menu')]" name="menu_id" required="True"/>
</group>
<group name="default_filters" col="2" class="oe_form_group_label_border">
<separator string="Default Filters" colspan="2"/>
<field name="company_id" required="1" context="{'user_preference': 0}" groups="base.group_multi_company"/>
</group>
<group groups="base.group_no_one">
<field name="action_id"/>
<field domain="[('usage','=','menu')]" name="menu_id" required="True"/>
</group>
</group>
<group col="1" name="avatar" class="oe_form_group_label_border">
<separator string="Avatar"/>
<field name="avatar" widget='image' nolabel="1" on_change="onchange_avatar(avatar)"/>
</group>
<group colspan="4" col="2" class="oe_form_group_label_border">
<separator string="Email Preferences" colspan="2"/>
<group>
<field name="user_email" widget="email"/>
<field name="signature"/>
</group>
</page>
<page string="Access Rights">
<group colspan="4" col="4" class="oe_form_group_label_border">
<field nolabel="1" name="groups_id"/>
<group col="4">
<field name="groups_id"/>
</group>
</page>
<page string="Allowed Companies" groups="base.group_multi_company">
<field colspan="4" nolabel="1" name="company_ids" select="1"/>
<field name="company_ids"/>
</page>
</notebook>
</sheet>
@@ -191,31 +192,26 @@
<field name="type">form</field>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<form string="Users" layout="auto">
<div class="oe_form_title" colspan="4">
<field name="name" readonly="1" nolabel="1"/>
(<field name="login" readonly="1" nolabel="1"/>)
<form string="Users" version="7.0">
<div class="oe_right oe_form_avatar">
<field name="avatar" widget='image' on_change="onchange_avatar(avatar)"/>
</div>
<newline/>
<group col="2" colspan="3">
<group col="2" colspan="2" name="preferences" class="oe_form_group_label_border">
<separator string="Preferences" colspan="2"/>
<field name="context_lang" readonly="0"/>
<field name="context_tz" readonly="0"/>
<field name="menu_tips" readonly="0" groups="base.group_no_one"/>
</group>
<group name="default_filters" colspan="2" col="2" class="oe_form_group_label_border">
<separator string="Default Filters" colspan="2"/>
<div class="oe_form_title">
<h1>
<field name="name" readonly="1" class="oe_form_readonly_hidden"/>
(<field name="login" readonly="1" class="oe_form_readonly_hidden"/>)
</h1>
<label for="company_id" class="oe_form_readonly_hidden"/>
<h2>
<field name="company_id" widget="selection" readonly="0"
groups="base.group_multi_company" on_change="on_change_company_id(company_id)"/>
</group>
</h2>
</div>
<group col="4" string="Preferences">
<field name="context_lang" readonly="0"/>
<field name="context_tz" readonly="0"/>
</group>
<group col="1">
<separator string="Avatar"/>
<field name="avatar" widget='image' nolabel="1" on_change="onchange_avatar(avatar)" readonly="0"/>
</group>
<group col="2" colspan="4" class="oe_form_group_label_border">
<separator string="Email Preferences" colspan="2"/>
<group string="Email Preferences">
<field name="user_email" widget="email" readonly="0"/>
<field name="signature" readonly="0"/>
</group>
+18 -16
View File
@@ -16,9 +16,11 @@
<field name="model">res.widget</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Widgets">
<field name="title" colspan="4"/>
<field name="content" colspan="4" nolabel="1"/>
<form string="Widgets" version="7.0">
<group>
<field name="title"/>
<field name="content"/>
</group>
</form>
</field>
</record>
@@ -59,10 +61,12 @@
<field name="model">res.widget.user</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="User Widgets">
<field name="widget_id"/>
<field name="user_id"/>
<field name="sequence"/>
<form string="User Widgets" version="7.0">
<group col="4">
<field name="widget_id"/>
<field name="user_id"/>
<field name="sequence"/>
</group>
</form>
</field>
</record>
@@ -79,15 +83,13 @@
<field name="model">res.widget.wizard</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Widget Wizard" col="4">
<field name="widgets_list" colspan="4"/>
<newline/>
<separator string="" colspan="6"/>
<group colspan="6" col="4" >
<button special="cancel" string="Cancel" icon="gtk-cancel" />
<button name="res_widget_add" string="Add" type="object"/>
</group>
</form>
<form string="Widget Wizard" col="4" version="7.0">
<header>
<button name="res_widget_add" string="Add" type="object"/>
<button special="cancel" string="Cancel" icon="gtk-cancel" />
</header>
<field name="widgets_list"/>
</form>
</field>
</record>
<act_window name="Homepage Widgets Management"
@@ -1,28 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import partner_sms_send
import partner_wizard_massmail
import partner_clear_ids
import partner_wizard_ean_check
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,53 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import netsvc
from osv import fields, osv
class partner_clear_ids(osv.osv_memory):
""" Clear IDs """
_name = "partner.clear.ids"
_description = "Clear IDs"
def clear_ids(self, cr, uid, ids, context):
"""
Clear Ids
@param cr: the current row, from the database cursor.
@param uid: the current user’s ID for security checks.
@param ids: the ID or list of IDs
@param context: A standard dictionary
"""
partner_pool = self.pool.get('res.partner')
active_ids = context and context.get('active_ids', [])
res = {}
for partner in partner_pool.browse(cr, uid, active_ids, context=context):
if active_ids in partner:
res.update({'ref': False})
return res
partner_clear_ids()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_partner_clear_ids" model="ir.ui.view">
<field name="name">Clear IDs</field>
<field name="model">partner.clear.ids</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Clear Ids">
<label string="Want to Clear Ids ? "/>
<separator string="" colspan="6" />
<label string="" colspan="2"/>
<group>
<button special="cancel" string="Cancel" icon="gtk-cancel" />
<button name="clear_ids" string="Clear IDs" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<record id="action_view_partner_clear_ids" model="ir.actions.act_window">
<field name="name">Clear IDs</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">partner.clear.ids</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>
@@ -1,84 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import tools
from osv import fields, osv
class partner_sms_send(osv.osv_memory):
""" Create Menu """
_name = "partner.sms.send"
_description = "Send SMS"
_columns = {
'mobile_to': fields.char('To', size=256, required=True),
'app_id': fields.char('API ID', size=256,required=True),
'user': fields.char('Login', size=256,required=True),
'password': fields.char('Password', size=256,required=True),
'text': fields.text('SMS Message',required=True),
}
def default_get(self, cr, uid, fields, context=None):
"""
This function gets default values
@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 fields: List of fields for default value
@param context: A standard dictionary for contextual values
@return : default values of fields.
"""
partner_pool = self.pool.get('res.partner')
active_ids = context and context.get('active_ids', [])
res = {}
for partner in partner_pool.browse(cr, uid, active_ids, context=context):
if 'mobile_to' in fields:
res.update({'mobile_to': partner.mobile})
return res
def sms_send(self, cr, uid, ids, context):
"""
to send sms
@param cr: the current row, from the database cursor.
@param uid: the current user’s ID for security checks.
@param ids: the ID or list of IDs
@param context: A standard dictionary
@return: number indicating the acknowledgement
"""
nbr = 0
for data in self.browse(cr, uid, ids, context) :
tools.sms_send(
data.user,
data.password,
data.app_id,
tools.ustr(data.text),
data.mobile_to)
nbr += 1
return {}
partner_sms_send()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Create Menu From view -->
<record id="view_partner_sms_send" model="ir.ui.view">
<field name="name">Send SMS</field>
<field name="model">partner.sms.send</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="SMS - Gateway: clickatell">
<separator string="Bulk SMS send" colspan="4"/>
<field name="mobile_to"/>
<field name="app_id"/>
<field name="user"/>
<field name="password"/>
<separator string="Message" colspan="4" />
<field name="text" colspan="4" nolabel="1"/>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="sms_send" string="Send SMS" type="object" icon="terp-mail-message-new"/>
</group>
</form>
</field>
</record>
<act_window name="Send an SMS"
res_model="partner.sms.send"
src_model="res.partner"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_partner_sms_send"/>
</data>
</openerp>
@@ -1,79 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import math
from osv import osv
from tools.misc import UpdateableStr
import pooler
class partner_wizard_ean_check(osv.osv_memory):
""" Ean check """
_name = "partner.wizard.ean.check"
_description = "Ean Check"
def is_pair(x):
return not x%2
def get_ean_key(string):
if not string or string=='':
return '0'
if len(string)!=12:
return '0'
sum = 0
for i in range(12):
if is_pair(i):
sum = sum + int(string[i])
else:
sum = sum + 3*int(string[i])
return str(int(math.ceil(sum/10.0)*10-sum))
def default_get(self, cr, fields, context):
partner_table = self.pool.get('res.partner')
ids = context.get('active_ids')
partners = partner_table.browse(cr, uid, ids)
_check_arch_lst = ['<?xml version="1.0"?>', '<form string="Check EAN13">', '<label string=""/>', '<label string=""/>','<label string="Original" />', '<label string="Computed" />']
for partner in partners:
if partner['ean13'] and len(partner['ean13'])>11 and len(partner['ean13'])<14:
_check_arch_lst.append('<label colspan="2" string="%s" />' % partner['ean13']);
key = get_ean_key(partner['ean13'][:12])
_check_arch_lst.append('<label string=""/>')
if len(partner['ean13'])==12:
_check_arch_lst.append('<label string="" />');
else:
_check_arch_lst.append('<label string="%s" />' % partner['ean13'][12])
_check_arch_lst.append('<label string="%s" />' % key)
_check_arch_lst.append('</form>')
_check_arch.string = '\n'.join(_check_arch_lst)
def update_ean(self, cr, uid, ids, context):
partner_table = self.pool.get('res.partner')
ids = context.get('active_ids')
partners = partner_table.browse(cr, uid, ids)
for partner in partners:
partner_table.write(cr, uid, ids, {
'ean13': "%s%s" % (partner['ean13'][:12], get_ean_key(partner['ean13'][:12]))
})
return {}
partner_wizard_ean_check()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_partner_wizard_ean_check" model="ir.ui.view">
<field name="name">Ean check</field>
<field name="model">partner.wizard.ean.check</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Ean check">
<separator string="" colspan="4"/>
<label string="Want to check Ean ? "/>
<separator string="" colspan="6" />
<label string="" colspan="2"/>
<group>
<button special="cancel" string="Ignore" icon="gtk-cancel" />
<button name="update_ean" string="Correct EAN13" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
<record id="action_view_partner_wizard_ean_check" model="ir.actions.act_window">
<field name="name">Ean check</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">partner.wizard.ean.check</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>
@@ -1,85 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
import re
import logging
_logger = logging.getLogger(__name__)
class partner_massmail_wizard(osv.osv_memory):
""" Mass Mailing """
_name = "partner.massmail.wizard"
_description = "Mass Mailing"
_columns = {
'email_from': fields.char("Sender's email", size=256, required=True),
'subject': fields.char('Subject', size=256,required=True),
'text': fields.text('Message',required=True),
}
def mass_mail_send(self, cr, uid, ids, context):
"""Send the given mail to all partners whose ids
are present in ``context['active_ids']``, to
all addresses with an email set.
:param dict context: ``context['active_ids']``
should contain the list of
ids of the partners who should
receive the mail.
"""
nbr = 0
partner_pool = self.pool.get('res.partner')
data = self.browse(cr, uid, ids[0], context=context)
event_pool = self.pool.get('res.partner.event')
assert context['active_model'] == 'res.partner', 'This wizard must be started on a list of Partners'
active_ids = context.get('active_ids', [])
partners = partner_pool.browse(cr, uid, active_ids, context)
subtype = 'plain'
if re.search('(<(pre)|[pubi].*>)', data.text):
subtype = 'html'
ir_mail_server = self.pool.get('ir.mail_server')
emails_seen = set()
for partner in partners:
for adr in partner.child_ids:
if adr.is_company:
#we don't want to consider child companies but only the contacts
continue
if adr.email and not adr.email in emails_seen:
try:
emails_seen.add(adr.email)
name = adr.name or partner.name
to = '"%s" <%s>' % (name, adr.email)
msg = ir_mail_server.build_email(data.email_from, [to], data.subject, data.text, subtype=subtype)
if ir_mail_server.send_email(cr, uid, msg):
nbr += 1
except Exception:
#ignore failed deliveries, will be logged anyway
pass
event_pool.create(cr, uid,
{'name': 'Email(s) sent through mass mailing',
'partner_id': partner.id,
'description': data.text })
_logger.info('Mass-mailing wizard sent %s emails', nbr)
return {'email_sent': nbr}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_partner_mass_mail" model="ir.ui.view">
<field name="name">Mass Mailing</field>
<field name="model">partner.massmail.wizard</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Mass Mailing" col="4">
<field name="email_from"/>
<newline/>
<field name="subject"/>
<newline/>
<field name="text" widget="text_tag"/>
<newline/>
<separator string="" colspan="6"/>
<group colspan="6" col="4" >
<button special="cancel" string="Cancel" icon="gtk-cancel" />
<button name="mass_mail_send" string="Send Email" type="object" icon="terp-mail-message-new"/>
</group>
</form>
</field>
</record>
<act_window name="Mass Mailing"
res_model="partner.massmail.wizard"
src_model="res.partner"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_partner_mass_mail"/>
</data>
</openerp>
@@ -63,8 +63,6 @@
"access_res_partner_bank_type_field_group_user","res_partner_bank_type_field group_user","model_res_partner_bank_type_field",,1,0,0,0
"access_res_partner_category_group_user","res_partner_category group_user","model_res_partner_category","group_user",1,0,0,0
"access_res_partner_category_group_partner_manager","res_partner_category group_partner_manager","model_res_partner_category","group_partner_manager",1,1,1,1
"access_res_partner_event_group_user","res_partner_event group_user","model_res_partner_event","group_user",1,0,0,0
"access_res_partner_event_group_partner_manager","res_partner_event group_partner_manager","model_res_partner_event","group_partner_manager",1,1,1,1
"access_res_partner_title_group_user","res_partner_title group_user","model_res_partner_title","group_partner_manager",1,1,1,1
"access_res_partner_title_group_partner_manager","res_partner_title group_partner_manager","model_res_partner_title",,1,0,0,0
"access_res_request_group_user","res_request group_user","model_res_request","base.group_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
63 access_res_partner_bank_type_field_group_user res_partner_bank_type_field group_user model_res_partner_bank_type_field 1 0 0 0
64 access_res_partner_category_group_user res_partner_category group_user model_res_partner_category group_user 1 0 0 0
65 access_res_partner_category_group_partner_manager res_partner_category group_partner_manager model_res_partner_category group_partner_manager 1 1 1 1
access_res_partner_event_group_user res_partner_event group_user model_res_partner_event group_user 1 0 0 0
access_res_partner_event_group_partner_manager res_partner_event group_partner_manager model_res_partner_event group_partner_manager 1 1 1 1
66 access_res_partner_title_group_user res_partner_title group_user model_res_partner_title group_partner_manager 1 1 1 1
67 access_res_partner_title_group_partner_manager res_partner_title group_partner_manager model_res_partner_title 1 0 0 0
68 access_res_request_group_user res_request group_user model_res_request base.group_user 1 1 1 1
@@ -37,3 +37,4 @@
.oe_module_desc .oe_button {
min-width: 70px;
}
+1 -1
View File
@@ -68,7 +68,7 @@ def initialize(cr):
category_id = create_categories(cr, categories)
if info['installable']:
if info['auto_install'] and not info['depends']:
if info['auto_install']:
state = 'to install'
else:
state = 'uninstalled'
+18 -32
View File
@@ -1859,6 +1859,24 @@ class BaseModel(object):
etree.SubElement(view, 'newline')
return view
def _get_default_search_view(self, cr, user, context=None):
""" Generates a single-field tree view, using _rec_name if
it's one of the columns or the first column it finds otherwise
:param cr: database cursor
:param int user: user id
:param dict context: connection context
:returns: a tree view as an lxml document
:rtype: etree._Element
"""
_rec_name = self._rec_name
if _rec_name not in self._columns:
_rec_name = self._columns.keys()[0] if len(self._columns.keys()) > 0 else "id"
view = etree.Element('search', string=self._description)
etree.SubElement(view, 'field', name=_rec_name)
return view
def _get_default_tree_view(self, cr, user, context=None):
""" Generates a single-field tree view, using _rec_name if
it's one of the columns or the first column it finds otherwise
@@ -1928,38 +1946,6 @@ class BaseModel(object):
return view
def _get_default_search_view(self, cr, uid, context=None):
"""
:param cr: database cursor
:param int user: user id
:param dict context: connection context
:returns: an lxml document of the view
:rtype: etree._Element
"""
form_view = self.fields_view_get(cr, uid, False, 'form', context=context)
tree_view = self.fields_view_get(cr, uid, False, 'tree', context=context)
# TODO it seems _all_columns could be used instead of fields_get (no need for translated fields info)
fields = self.fields_get(cr, uid, context=context)
fields_to_search = set(
field for field, descriptor in fields.iteritems()
if descriptor.get('select'))
for view in (form_view, tree_view):
view_root = etree.fromstring(view['arch'])
# Only care about select=1 in xpath below, because select=2 is covered
# by the custom advanced search in clients
fields_to_search.update(view_root.xpath("//field[@select=1]/@name"))
tree_view_root = view_root # as provided by loop above
search_view = etree.Element("search", string=tree_view_root.get("string", ""))
field_group = etree.SubElement(search_view, "group")
for field_name in fields_to_search:
etree.SubElement(field_group, "field", name=field_name)
return search_view
#
# if view_id, view_type is not required
#