[MERGE] Merged with addons/trunk.

bzr revid: tde@openerp.com-20120813193029-jsilsux051e53van
This commit is contained in:
Thibault Delavallée 2012-08-13 21:30:29 +02:00
commit 0c3e1607de
22 changed files with 118 additions and 111 deletions

View File

@ -277,18 +277,22 @@
<form string="Interview Appraisal" version="7.0">
<header>
<button string="Send Request" name="survey_req_waiting_answer" states="draft" type="object" icon="gtk-yes" class="oe_highlight"/>
<button string="Done" name="survey_req_done" states="waiting_answer" type="object" icon="gtk-jump-to" class="oe_highlight"/>
<button string="Done" name="survey_req_done" states="waiting_answer" type="object" icon="gtk-jump-to"/>
<button string="Cancel" name="survey_req_cancel" states="draft,waiting_answer" type="object" icon="gtk-cancel"/>
<button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>
<button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>
<button name="action_print_survey" string="Print Survey" type="object" states="draft" icon="gtk-print" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}" attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>
<button string="Send Reminder Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action" states="waiting_answer" class="oe_highlight"/>
<field name="state" widget="statusbar" statusbar_visible="waiting_answer,done"/>
</header>
<sheet>
<div class="oe_right oe_button_box" name="button_box">
<button string="Send Reminder Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action" states="waiting_answer" class="oe_link"/>
</div>
<group>
<group>
<group col="3" colspan="1">
<field name="survey_id"/>
<button name="action_print_survey" string="Print Survey" type="object" states="draft" icon="gtk-print" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}" attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>
<field name="user_to_review_id"/>
<label string=""/>
<field name="user_id" string="Interviewer"/>
</group>
<group>

View File

@ -340,7 +340,7 @@
<field name="name">Requests Approve</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="context">{'default_type': 'add', 'search_default_approve':1}</field>
<field name="context">{'default_type': 'remove', 'search_default_approve':1}</field>
<field name="domain">[('type','=','remove')]</field>
<field name="view_id" ref="edit_holiday_new"/>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
@ -507,7 +507,17 @@
</record>
<!-- Shortcuts -->
<act_window name="Leaves" domain="[('type','=','remove')]" context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}" res_model="hr.holidays" src_model="hr.employee" view_id="view_holiday" id="act_hr_employee_holiday_request"/>
<record id="act_hr_employee_holiday_request" model="ir.actions.act_window">
<field name="name">Leaves</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.holidays</field>
<field name="src_model">hr.employee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_employee_id': [active_id], 'default_employee_id': active_id}</field>
<field name="domain">[('type','=','remove')]</field>
<field name="view_id" eval="view_holiday"/>
</record>
<!-- Assing leave -->

View File

@ -14,7 +14,7 @@
<field name="name"/>
<field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1}"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
<field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
<field name="amount" sum="Total cost" invisible="1"/>
<field name="general_account_id" invisible="1"/>
@ -42,7 +42,7 @@
<group>
<group string="Product">
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
<label string="Quantity" for="unit_amount"/>
<label string="Duration" for="unit_amount"/>
<div>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>

View File

@ -20,6 +20,18 @@
<field name="view_mode">form</field>
</record>
<!-- Mail group for the company's jobs -->
<record id="company_jobs" model="mail.group">
<field name="name">Company's jobs</field>
</record>
<record id="action_jobs" model="ir.actions.act_window">
<field name="name">Jobs</field>
<field name="res_model">mail.group</field>
<field name="res_id" ref="company_jobs"/>
<field name="view_mode">form</field>
</record>
<!-- Top menu item -->
<menuitem name="Portal"
id="portal_menu"
@ -28,6 +40,7 @@
<menuitem name="Our company" id="portal_company" parent="portal_menu" sequence="10"/>
<menuitem name="News" id="portal_company_news" parent="portal_company" sequence="10" action="action_news"/>
<menuitem name="Jobs" id="portal_jobs" parent="portal_company" sequence="20" action="action_jobs"/>
<!--
Create menu items that we'll leave empty for now - they'll be

View File

@ -13,6 +13,7 @@
</tree>
</field>
</record>
<!-- portal form view -->
<record id="portal_form_view" model="ir.ui.view">
<field name="name">Portal Form</field>
@ -47,6 +48,7 @@
</page>
</field>
</record>
<!-- action Administration/Portals/Portals -->
<record id="portal_list_action" model="ir.actions.act_window">
<field name="name">Portals</field>
@ -57,7 +59,7 @@
<field name="context">{'form_view_ref': 'portal.portal_form_view'}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a new portal.
Click to create a new portal.
</p><p>
A portal helps defining specific views and rules for a group of
users (the portal group). A portal menu, widgets and specific
@ -65,6 +67,7 @@
</p>
</field>
</record>
<!-- menu Administration/Portals/Portals -->
<menuitem name="Portals Settings" id="portal_menu_settings" parent="base.menu_administration" groups="group_portal_manager"/>
<menuitem name="Portals" id="portal_list_menu" parent="portal_menu_settings" action="portal_list_action"/>

View File

@ -1,21 +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/>.
#
##############################################################################

View File

@ -1,41 +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/>.
#
##############################################################################
{
'name': 'Portal HR recruitment',
'version': '0.1',
'category': 'Tools',
'complexity': "easy",
'description': """
This module adds a jobs page to your portal if hr and portal are installed.
""",
'author': 'OpenERP SA',
'depends': ['hr','portal'],
'data': [
'portal_jobs_view.xml',
'security/ir.model.access.csv',
],
'installable': True,
'auto_install':True,
'category':'Hidden',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem name="Jobs" id="portal_company_jobs"
parent="portal.portal_company" action="hr.action_hr_job"
sequence="20"/>
</data>
</openerp>

View File

@ -1,3 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_job,job,hr.model_hr_job,portal.group_portal_member,1,0,0,0
access_hr_department_employee,hr_department_employee,hr.model_hr_department,portal.group_portal_member,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_job job hr.model_hr_job portal.group_portal_member 1 0 0 0
3 access_hr_department_employee hr_department_employee hr.model_hr_department portal.group_portal_member 1 0 0 0

View File

@ -309,5 +309,18 @@
</field>
</record>
<record model="ir.ui.view" id="product_form_view_procurement_button">
<field name="name">product.product.procurement</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='image_medium']" position="after">
<div class='oe_right oe_button_box'>
<button string="Procurement Request" name="%(act_make_procurement)d" type="action"/>
</div>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -110,12 +110,24 @@ class make_procurement(osv.osv_memory):
"""
if context is None:
context = {}
record_id = context and context.get('active_id', False) or False
record_id = context.get('active_id')
res = super(make_procurement, self).default_get(cr, uid, fields, context=context)
product_id = self.pool.get('product.product').browse(cr, uid, record_id, context=context).id
if 'product_id' in fields:
res.update({'product_id':product_id})
if record_id and 'product_id' in fields:
proxy = self.pool.get('product.product')
product_ids = proxy.search(cr, uid, [('id', '=', record_id)], context=context, limit=1)
if product_ids:
product_id = product_ids[0]
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
res['product_id'] = product.id
res['uom_id'] = product.uom_id.id
if 'warehouse_id' in fields:
warehouse_id = self.pool.get('stock.warehouse').search(cr, uid, [], context=context)
res['warehouse_id'] = warehouse_id[0] if warehouse_id else False
return res
make_procurement()

View File

@ -14,9 +14,9 @@
<group>
<field name="product_id" on_change="onchange_product_id(product_id)"/>
<field name="qty"/>
<field name="uom_id"/>
<field name="uom_id" groups="product.group_uom"/>
<field name="date_planned"/>
<field name="warehouse_id"/>
<field name="warehouse_id" groups="stock.group_locations"/>
</group>
<footer>
<button name="make_procurement" string="Ask New Products" type="object" class="oe_highlight" />

View File

@ -602,6 +602,8 @@ class product_product(osv.osv):
def name_get(self, cr, user, ids, context=None):
if context is None:
context = {}
if isinstance(ids, (int, long)):
ids = [ids]
if not len(ids):
return []
def _name_get(d):

View File

@ -57,6 +57,28 @@
</field>
</record>
<record id="res_partner_address_type" model="ir.ui.view">
<field name="name">res.partner.view.address_type</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<xpath expr="//label[@for='type']" position="attributes">
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
</xpath>
<xpath expr="//label[@for='type']" position="attributes">
<attribute name="invisible">False</attribute>
</xpath>
<xpath expr="//div[@name='div_type']" position="attributes">
<attribute name="invisible">False</attribute>
</xpath>
<xpath expr="//div[@name='div_type']" position="attributes">
<attribute name="groups">sale.group_delivery_invoice_address</attribute>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -11,7 +11,7 @@
<form string="Convert to Quotation" version="7.0">
<group col="4">
<field name="partner_id" required="1"/>
<field name="shop_id" required="1" widget="selection"/>
<field name="shop_id" required="1" widget="selection" groups="stock.group_locations"/>
<field name="close"/>
</group>
<footer>

View File

@ -133,7 +133,7 @@
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('product_id','=',active_id),('picking_id.type','=','in')]</field>
<field name="domain">[('picking_id.type','=','in')]</field>
<field name="view_id" ref="view_move_tree_reception_picking"/>
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
<field name="search_view_id" ref="view_move_search_reception_incoming_picking"/>
@ -154,7 +154,7 @@
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('product_id','=',active_id),('picking_id.type','=','out')]</field>
<field name="domain">[('picking_id.type','=','out')]</field>
<field name="view_id" ref="view_move_tree_reception_picking"/>
<field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
<field name="search_view_id" ref="view_move_search_reception_outcoming_picking"/>
@ -190,7 +190,7 @@
<div class="oe_product_desc">
<h4><a type="edit"><field name="name"></field></a></h4>
<ul>
<li>Code: <field name="code"/></li>
<li t-if="record.code.raw_value">Code: <field name="code"/></li>
<li t-if="record.type.raw_value != 'service'">Stock on hand: <field name="qty_available"/> <field name="uom_id"/></li>
<li t-if="record.type.raw_value != 'service'">Stock available: <field name="virtual_available"/> <field name="uom_id"/></li>
<li>Price: <field name="lst_price"></field></li>

View File

@ -22,6 +22,7 @@ access_stock_production_lot_user,stock.production.lot user,model_stock_productio
access_stock_production_lot_revision,stock.production.lot.revision,model_stock_production_lot_revision,stock.group_stock_user,1,1,1,1
access_stock_move_manager,stock.move manager,model_stock_move,stock.group_stock_manager,1,1,0,0
access_stock_move_user,stock.move user,model_stock_move,stock.group_stock_user,1,0,0,0
access_stock_move_warehouse_manager,stock.move.manager,model_stock_move,stock.group_stock_manager,1,1,1,1
access_stock_inventory_user,stock.inventory user,model_stock_inventory,stock.group_stock_user,1,0,0,0
access_stock_inventory_manager,stock.inventory manager,model_stock_inventory,stock.group_stock_manager,1,1,1,1
access_stock_inventory_line_user,stock.inventory.line user,model_stock_inventory_line,stock.group_stock_user,1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
22 access_stock_production_lot_revision stock.production.lot.revision model_stock_production_lot_revision stock.group_stock_user 1 1 1 1
23 access_stock_move_manager stock.move manager model_stock_move stock.group_stock_manager 1 1 0 0
24 access_stock_move_user stock.move user model_stock_move stock.group_stock_user 1 0 0 0
25 access_stock_move_warehouse_manager stock.move.manager model_stock_move stock.group_stock_manager 1 1 1 1
26 access_stock_inventory_user stock.inventory user model_stock_inventory stock.group_stock_user 1 0 0 0
27 access_stock_inventory_manager stock.inventory manager model_stock_inventory stock.group_stock_manager 1 1 1 1
28 access_stock_inventory_line_user stock.inventory.line user model_stock_inventory_line stock.group_stock_user 1 0 0 0

View File

@ -3,13 +3,11 @@
<data>
<menuitem name="Surveys" id="menu_surveys" parent="base.menu_tools" sequence="2" groups="base.group_tool_user,base.group_tool_manager,base.group_survey_user"/>
<menuitem name="Define Surveys" id="menu_define_survey"
groups="base.group_tool_manager"
parent="menu_surveys" />
<menuitem id="menu_answer_surveys" name="Answer Surveys" parent="menu_surveys" groups="base.group_tool_user,base.group_tool_manager,base.group_survey_user"/>
<menuitem name="Reporting" parent="base.menu_tools"
id="base.menu_lunch_reporting" sequence="6"/>
<menuitem name="Reporting" id="menu_reporting" parent="menu_surveys" sequence="60"/>
<menuitem id="base.next_id_10" name="Survey" parent="base.menu_reporting" sequence="1" />
<!--
Survey
@ -314,7 +312,7 @@
</ul>
</div>
<div class="oe_kanban_content">
<h3 class="oe_kanban_ellipsis"><t t-esc="record.title.raw_value.toString()"><field name="title"/></t></h3>
<h3 class="oe_kanban_ellipsis"><t t-esc="record.title.raw_value.toString()"></t></h3>
<div class="oe_survey_responsible">
<t t-if="record.responsible_id.raw_value">By: <field name="responsible_id"/></t>
</div><br/>
@ -361,8 +359,8 @@
<menuitem name="Surveys" id="menu_survey_form"
action="action_survey_form1" parent="menu_define_survey"
groups="base.group_tool_manager"/>
action="action_survey_form1" parent="menu_surveys"
groups="base.group_tool_manager" sequence="1"/>
<!--
Survey Pages
@ -576,8 +574,8 @@
</record>
<menuitem name="Survey Pages" id="menu_survey_page_form1"
action="action_survey_page_form" parent='menu_define_survey'
groups="base.group_tool_manager"/>
action="action_survey_page_form" parent="menu_surveys"
groups="base.group_no_one"/>
<record model="ir.ui.view" id="survey_page_wizard_test1">
<field name="name">survey_page_wizard_test</field>
@ -1210,8 +1208,8 @@
</record>
<menuitem name="Survey Requests" id="menu_survey_type_form1"
action="action_survey_request_tree" parent='menu_answer_surveys'
groups="base.group_tool_manager"/>
action="action_survey_request_tree" parent="menu_surveys"
groups="base.group_tool_manager" sequence="3"/>
<!--
Survey Type
@ -1277,8 +1275,12 @@
res_model="survey.answer"
src_model="survey.question"/>
<menuitem name="Answer a Survey" id="menu_run_survey_form" sequence="2"
action="action_view_survey_name" parent="menu_answer_surveys" groups="base.group_tool_user,base.group_tool_manager,base.group_survey_user" icon="STOCK_INDEX"/>
<act_window
context="{'search_default_survey_id': active_id, 'default_survey_id': active_id}"
id="act_survey_request"
name="Survey Requests"
res_model="survey.request"
src_model="survey"/>
</data>
</openerp>

View File

@ -36,7 +36,7 @@
</record>
<menuitem name="Browse Answers" id="menu_browse_survey_response"
action="action_browse_survey_response" parent="menu_reporting"
action="action_browse_survey_response" parent="base.next_id_10"
groups="base.group_tool_manager" icon="STOCK_PRINT_PREVIEW"/>
</data>

View File

@ -39,7 +39,7 @@
</record>
<menuitem name="Print Surveys" id="menu_print_survey_form" sequence="1"
action="action_view_survey_print" parent="menu_reporting"
action="action_view_survey_print" parent="base.next_id_10"
groups="base.group_tool_manager" icon="STOCK_PRINT"/>
</data>

View File

@ -40,7 +40,7 @@
</record>
<menuitem name="Surveys Answers" action="action_view_survey_print_answer" id="menu_print_survey_answer"
parent="menu_reporting" icon="STOCK_PRINT" groups="base.group_tool_manager"/>
parent="base.next_id_10" icon="STOCK_PRINT" groups="base.group_tool_manager"/>
</data>
</openerp>

View File

@ -32,7 +32,7 @@
</record>
<menuitem name="Surveys Statistics" action="action_view_survey_print_statistics" id="menu_print_survey_statistics"
parent="menu_reporting" icon="STOCK_PRINT" groups="base.group_tool_manager"/>
parent="base.next_id_10" icon="STOCK_PRINT" groups="base.group_tool_manager"/>
</data>
</openerp>