[MERGE] trunk-improve_portal-vta.

bzr revid: vta@openerp.com-20121129090801-mheiq7yb3h24onqf
This commit is contained in:
vta vta@openerp.com 2012-11-29 10:08:01 +01:00
commit 76417f249f
43 changed files with 483 additions and 377 deletions

View File

@ -435,7 +435,7 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread" placeholder="Share a note..."/>
</div>
</form>

View File

@ -8,9 +8,9 @@
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_open'][last()]" position="after">
<button name="invoice_pay_customer" type="object" string="Register Payment"
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',True)]}"/>
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',True)]}" groups="base.group_user"/>
<button name="invoice_pay_customer" type="object" string="Register Payment"
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',False)]}" class="oe_highlight"/>
attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',False)]}" class="oe_highlight" groups="base.group_user"/>
</xpath>
</field>
</record>
@ -20,7 +20,7 @@
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_open'][last()]" position="after">
<button name="invoice_pay_customer" type="object" string="Pay" states="open" class="oe_highlight"/>
<button name="invoice_pay_customer" type="object" string="Pay" states="open" class="oe_highlight" groups="base.group_user"/>
</xpath>
</field>
</record>

View File

@ -41,12 +41,10 @@ class base_stage(object):
"""
if context is None:
context = {}
if not context or not context.get('portal'):
return False
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if hasattr(user, 'partner_address_id') and user.partner_address_id:
return user.partner_address_id
return user.company_id.partner_id.id
if context.get('portal'):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.partner_id.id
return False
def _get_default_email(self, cr, uid, context=None):
""" Gives default email address for current user
@ -54,10 +52,10 @@ class base_stage(object):
"""
if context is None:
context = {}
if not context or not context.get('portal'):
return False
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.email
if context.get('portal'):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.email
return False
def _get_default_user(self, cr, uid, context=None):
""" Gives current user id
@ -65,7 +63,7 @@ class base_stage(object):
"""
if context is None:
context = {}
if not context or not context.get('portal'):
if not context or context.get('portal'):
return False
return uid

View File

@ -104,7 +104,7 @@
<header>
<button name="case_close" string="Settle" type="object" class="oe_highlight"
states="draft,open,pending" groups="base.group_user"/>
<button name="case_cancel" string="Reject" type="object" groups="base.group_user"
<button name="case_cancel" string="Reject" type="object" groups="base.group_user"
states="draft,open,pending"/>
<field name="stage_id" widget="statusbar" clickable="True"/>
</header>
@ -113,9 +113,9 @@
<field name="name"/>
<field name="date"/>
</group>
<group colspan="4" col="4">
<group colspan="4" col="4" groups="base.group_user">
<field name="user_id"/>
<field name="priority" groups="base.group_user"/>
<field name="priority"/>
<field name="section_id"/>
<field name="date_deadline"/>
<field name="state" groups="base.group_no_one"/>
@ -130,17 +130,17 @@
<field name="partner_phone"/>
<field name="email_from" widget="email"/>
</group>
<group colspan="2" col="2">
<group colspan="2" col="2" groups="base.group_user">
<separator colspan="2" string="Responsibilities"/>
<field name="user_fault"/>
<field name="categ_id" widget="selection"
domain="[('object_id.model', '=', 'crm.claim')]"/>
<field name="ref"/>
</group>
<separator colspan="4" string="Claim/Action Description"/>
<separator colspan="4" string="Claim/Action Description" groups="base.group_user"/>
<field name="description" colspan="4" nolabel="1"/>
</page>
<page string="Follow Up">
<page string="Follow Up" groups="base.group_user">
<group colspan="2" col="2">
<separator colspan="2" string="Actions"/>
<field name="date_action_next"/>
@ -167,7 +167,7 @@
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread" placeholder="Share a note..."/>
</div>
</form>

View File

@ -107,7 +107,7 @@
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
</header>
<sheet>
<div class="oe_right oe_button_box">
<div class="oe_right oe_button_box" groups="base.group_user">
<button name="%(event.act_event_list_register_event)d" type="action" string="Registrations" help="Register with this event"/>
</div>
<div class="oe_title">
@ -204,7 +204,7 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread" placeholder="Share a note..."/>
</div>
</form>
@ -538,7 +538,7 @@
<field name="view_mode">tree,form,calendar,graph</field>
<field name="context">{}</field>
<field name="search_view_id" ref="view_registration_search"/>
</record>view_
</record>
<menuitem name="Registrations"
id="menu_action_registration" parent="base.menu_event_main"

View File

@ -105,7 +105,7 @@
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread" options='{"thread_level": 1}' placeholder="Send a message to the group..."/>
</div>
</form>

View File

@ -802,11 +802,12 @@ class mail_thread(osv.AbstractModel):
def message_subscribe(self, cr, uid, ids, partner_ids, subtype_ids=None, context=None):
""" Add partners to the records followers. """
self.write(cr, uid, ids, {'message_follower_ids': [(4, pid) for pid in partner_ids]}, context=context)
self.check_access_rights(cr, uid, 'read')
self.write(cr, SUPERUSER_ID, ids, {'message_follower_ids': [(4, pid) for pid in partner_ids]}, context=context)
# if subtypes are not specified (and not set to a void list), fetch default ones
if subtype_ids is None:
subtype_obj = self.pool.get('mail.message.subtype')
subtype_ids = subtype_obj.search(cr, uid, [('default', '=', True), '|', ('res_model', '=', self._name), ('res_model', '=', False)], context=context)
subtype_ids = subtype_obj.search(cr, SUPERUSER_ID, [('default', '=', True), '|', ('res_model', '=', self._name), ('res_model', '=', False)], context=context)
# update the subscriptions
fol_obj = self.pool.get('mail.followers')
fol_ids = fol_obj.search(cr, SUPERUSER_ID, [('res_model', '=', self._name), ('res_id', 'in', ids), ('partner_id', 'in', partner_ids)], context=context)
@ -823,7 +824,8 @@ class mail_thread(osv.AbstractModel):
def message_unsubscribe(self, cr, uid, ids, partner_ids, context=None):
""" Remove partners from the records followers. """
return self.write(cr, uid, ids, {'message_follower_ids': [(3, pid) for pid in partner_ids]}, context=context)
self.check_access_rights(cr, uid, 'read')
return self.write(cr, SUPERUSER_ID, ids, {'message_follower_ids': [(3, pid) for pid in partner_ids]}, context=context)
#------------------------------------------------------
# Thread state

View File

@ -5,7 +5,7 @@
followers main template
Template used to display the followers, the actions and the subtypes in a record.
-->
<div t-name="mail.followers" class="oe_followers">
<div t-name="mail.followers" class="oe_followers">
<div class="oe_actions">
<button type="button" class="oe_follower oe_notfollow">
<span class="oe_follow">Follow</span>

View File

@ -8,11 +8,29 @@
<field name="public">public</field>
</record>
<record id="action_news" model="ir.actions.act_window">
<record id="action_news" model="ir.actions.client">
<field name="name">News</field>
<field name="res_model">mail.group</field>
<field name="res_id" ref="company_news_feed"/>
<field name="view_mode">form</field>
<field name="tag">mail.wall</field>
<field name="model">mail.group</field>
<field name="params" eval="{
'domain': [
('model', '=', 'mail.group'),
('res_id', '=', ref('company_news_feed'))
],
'context':{
'search_default_message_unread': False,
'default_model': 'mail.group',
'default_res_id': ref('company_news_feed'),
},
'show_link_partner': False,
'res_model': 'mail.message',
'thread_level': 1,
}"/>
<field name="help" type="html">
<p>
Youd don't have unread company's news.
</p>
</field>
</record>
<!-- Mail group for the company's jobs -->
@ -21,11 +39,30 @@
<field name="public">public</field>
</record>
<record id="action_jobs" model="ir.actions.act_window">
<record id="action_jobs" model="ir.actions.client">
<field name="name">Jobs</field>
<field name="res_model">mail.group</field>
<field name="tag">mail.wall</field>
<field name="res_model">mail.message</field>
<field name="res_id" ref="company_jobs"/>
<field name="view_mode">form</field>
<field name="params" eval="{
'domain':[
('model', '=', 'mail.group'),
('res_id', '=', ref('company_jobs'))
],
'context':{
'search_default_message_unread': False,
'default_model': 'mail.group',
'default_res_id': ref('company_jobs'),
},
'show_link_partner': False,
'res_model': 'mail.message',
'thread_level': 1,
}"/>
<field name="help" type="html">
<p>
Youd don't have unread job offers.
</p>
</field>
</record>

View File

@ -8,18 +8,18 @@
groups="base.group_no_one,portal.group_portal"
sequence="15"/>
<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"/>
<menuitem name="Messaging" id="portal_messages" parent="portal_menu" sequence="10"/>
<menuitem name="About Us" id="portal_company" parent="portal_menu" sequence="200"/>
<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
filled up by other portal modules.
-->
<menuitem name="Orders" id="portal_orders" parent="portal_menu" sequence="20"/>
<menuitem name="Invoices and Payments" id="portal_invoices_payements" parent="portal_menu" sequence="30"/>
<menuitem name="Projects" id="portal_projects" parent="portal_menu" sequence="40"/>
<menuitem name="After Sale Services" id="portal_after_sales" parent="portal_menu" sequence="50"/>
<!--
Create menu items that we'll leave empty for now - they'll be
filled up by other portal modules.
-->
<menuitem name="Quotations and Sales Orders" id="portal_orders" parent="portal_menu" sequence="20"/>
<menuitem name="After Sale Services" id="portal_after_sales" parent="portal_menu" sequence="30"/>
<menuitem name="Projects" id="portal_projects" parent="portal_menu" sequence="40"/>
<!-- extend res.groups search view -->
<record id="group_search_view" model="ir.ui.view">
@ -47,5 +47,39 @@
</field>
</record>
<record id="action_mail_inbox_feeds_portal" model="ir.actions.client">
<field name="name">Inbox</field>
<field name="tag">mail.wall</field>
<field name="res_model">mail.message</field>
<field name="context">{
'default_model': 'res.users',
'default_res_id': uid,
}</field>
<field name="params" eval="&quot;{
'domain': [
('notification_ids.partner_id.user_ids', 'in', [uid]),
('to_read', '=', True),
('favorite_user_ids', 'not in', [uid])
],
'show_compose_message': False,
'show_link_partner': False,
'view_mailbox': True,
'view_inbox': True,
'read_action': 'read'
}&quot;"/>
<field name="help" type="html">
<p>
<b>Good Job!</b> Your inbox is empty.
</p><p>
Your inbox contains private messages or emails sent to you
as well as information related to documents or people you
follow.
</p>
</field>
</record>
<menuitem name="Inbox" id="portal_inbox" parent="portal_messages"
action="action_mail_inbox_feeds_portal" sequence="10"/>
</data>
</openerp>

View File

@ -1,5 +1,6 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_mail_message_portal,mail.message.portal,mail.model_mail_message,group_portal,1,0,1,1
access_mail_notification_portal,mail.notification.portal,mail.model_mail_notification,group_portal,1,1,1,0
access_res_partner,res.partner,base.model_res_partner,portal.group_portal,1,0,0,0
access_res_partner_address,res.partner_address,base.model_res_partner_address,portal.group_portal,1,0,0,0
access_res_partner_category,res.partner_category,base.model_res_partner_category,portal.group_portal,1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_mail_message_portal mail.message.portal mail.model_mail_message group_portal 1 0 1 1
3 access_mail_notification_portal mail.notification.portal mail.model_mail_notification group_portal 1 1 1 0
4 access_res_partner res.partner base.model_res_partner portal.group_portal 1 0 0 0
5 access_res_partner_address res.partner_address base.model_res_partner_address portal.group_portal 1 0 0 0
6 access_res_partner_category res.partner_category base.model_res_partner_category portal.group_portal 1 0 0 0

View File

@ -50,10 +50,6 @@ OpenERP - Open Source Business Applications
http://www.openerp.com
""")
def random_password():
# temporary random stuff; user password is reset by signup process
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
return ''.join(random.choice(chars) for i in xrange(12))
def extract_email(email):
""" extract the email address from a user-friendly email address """
@ -180,7 +176,6 @@ class wizard_user(osv.osv_memory):
create_context = dict(context or {}, noshortcut=True) # to prevent shortcut creation
values = {
'login': extract_email(wizard_user.email),
'password': random_password(),
'partner_id': wizard_user.partner_id.id,
'groups_id': [(6, 0, [])],
'share': True,
@ -219,6 +214,7 @@ class wizard_user(osv.osv_memory):
'body_html': '<pre>%s</pre>' % (_(WELCOME_EMAIL_BODY) % data),
'state': 'outgoing',
}
return mail_mail.create(cr, uid, mail_values, context=this_context)
mail_id = mail_mail.create(cr, uid, mail_values, context=this_context)
return mail_mail.send(cr, uid, [mail_id], context=this_context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -6,10 +6,11 @@
<field name="name">Claims</field>
<field name="res_model">crm.claim</field>
<field name="view_type">form</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_id" ref="crm_claim.crm_case_claims_tree_view"/>
<field name="context">{"search_default_user_id":'', "stage_type":'claim'}</field>
<field name="context">{"search_default_user_id":'', "stage_type":'claim', "portal":'True'}</field>
<field name="search_view_id" ref="crm_claim.view_crm_case_claims_filter"/>
<field name="target">current</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to register a new claim.

View File

@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_crm_claim,crm.claim,crm_claim.model_crm_claim,portal.group_portal,1,0,0,0
access_crm_claim,crm.claim,crm_claim.model_crm_claim,portal.group_portal,1,0,1,0
access_crm_claim_stage,crm.claim.stage,crm_claim.model_crm_claim_stage,portal.group_portal,1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_crm_claim crm.claim crm_claim.model_crm_claim portal.group_portal 1 0 0 1 0
3 access_crm_claim_stage crm.claim.stage crm_claim.model_crm_claim_stage portal.group_portal 1 0 0 0

View File

@ -2,7 +2,7 @@
<openerp>
<data noupdate="1">
<record id="portal_stock_picking_user_rule" model="ir.rule">
<record id="portal_claim_rule" model="ir.rule">
<field name="name">Portal Personal Claims</field>
<field ref="crm_claim.model_crm_claim" name="model_id"/>
<field name="domain_force">[('message_follower_ids','in', [user.partner_id.id])]</field>

View File

@ -2,7 +2,7 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -19,4 +19,4 @@
#
##############################################################################
import wizard
import contact

View File

@ -31,7 +31,9 @@ This module adds a contact page (with a contact form creating a lead when submit
""",
'author': 'OpenERP SA',
'depends': ['crm','portal'],
'data': ['wizard/contact_view.xml'],
'data': [
'contact_view.xml',
],
'test': [
'test/contact_form.yml',
],

View File

@ -83,7 +83,7 @@ class crm_contact_us(osv.TransientModel):
Since they are potentially sensitive, we don't want any user to be able
to read datas generated through this module. Therefore we'll write
these information directly in the crm.lead table and leave blank
entries in the portal_crm.crm_contact_us table.
entries in the contact table.
This is why the create() method is overwritten.
"""
crm_lead = self.pool.get('crm.lead')
@ -95,11 +95,11 @@ class crm_contact_us(osv.TransientModel):
it is quite complicated to set proper rights for this object.
Therefore, user SUPERUSER_ID will perform the creation.
"""
values['contact_name'] = values['name']
values['contact_name'] = values['partner_name']
crm_lead.create(cr, SUPERUSER_ID, dict(values,user_id=False), context)
"""
Create an empty record in the portal_crm.crm_contact_us table.
Create an empty record in the contact table.
Since the 'name' field is mandatory, give an empty string to avoid an integrity error.
"""
empty_values = dict((k, False) if k != 'name' else (k, '') for k, v in values.iteritems())
@ -114,7 +114,7 @@ class crm_contact_us(osv.TransientModel):
'res_model': self._name,
'res_id': ids[0],
'view_id': self.pool.get('ir.model.data').get_object_reference(cr, uid, 'portal_crm', 'wizard_contact_form_view_thanks')[1],
'target': 'inline',
'target': 'new',
}
def _needaction_domain_get(self, cr, uid, context=None):

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="contact_form_view" model="ir.ui.view">
<field name="name">Contact form</field>
<field name="model">portal_crm.crm_contact_us</field>
<field name="arch" type="xml">
<form string="Contact form" version="7.0" class="oe_portal_crm_contact">
<h1>Contact us</h1>
<div style="width: 300px; float:right;">
<field name="company_ids" nolabel="1" widget="many2many_kanban" class="oe_portal_crm_office" colspan="2">
<kanban>
<field name="name"/>
<field name="email"/>
<field name="phone"/>
<field name="street"/>
<field name="street2"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id" options='{"no_open": True}'/>
<field name="state_id" options='{"no_open": True}'/>
<templates>
<t t-name="kanban-box">
<h4><field name="name"/></h4>
<ul class="oe_portal_crm_address">
<li t-if="record.street"><field name="street"/></li>
<li t-if="record.street2"><field name="street2"/></li>
<li t-if="record.zip"><field name="zip"/></li>
<li t-if="record.city"><field name="city"/></li>
<li t-if="record.country_id"><field name="country_id"/></li>
</ul>
<ul class="oe_portal_crm_contact_info">
<li t-if="record.phone"><field name="phone"/></li>
<li t-if="record.email.raw_value">
<a title="Mail" t-att-href="'mailto:'+record.email.value">
<field name="email"/>
</a>
</li>
</ul>
</t>
</templates>
</kanban>
</field>
<div class="oe_portal_crm_team">
</div>
</div>
<div style="margin-right: 320px; max-width: 900px;">
<group>
<group>
<field name="partner_name" string="Name" placeholder="Your name..."/>
<field name="email_from" placeholder="Your email..."/>
<field name="phone" placeholder="Your phone number..."/>
</group>
<field name="name" placeholder="Subject..." nolabel="1" colspan="2"/>
<field name="description" String="Content" placeholder="Content..." nolabel="1" colspan="2"/>
</group>
</div>
<div>
<button string="Submit" name="submit" type="object" class="oe_highlight"/>
</div>
</form>
</field>
</record>
<!-- wizard thanks message (shows after submitting the form) -->
<record id="wizard_contact_form_view_thanks" model="ir.ui.view">
<field name="name">Wizard thanks message</field>
<field name="model">portal_crm.crm_contact_us</field>
<!-- give it a low priority to ensure this won't be the default view -->
<field name="priority">99</field>
<field name="arch" type="xml">
<form string="Thank you" version="7.0">
<!--
make sure there is at least one field in the view,
otherwise the orm will try to select all the model's
records and this will result in a permission denied error
-->
<field name="partner_name" invisible="1"/>
<label string="Thank you for your interest, we'll respond to your request shortly."/>
<footer>
<button string="Close" class="oe_link" special="cancel" />
</footer>
</form>
</field>
</record>
<record id="action_contact_us" model="ir.actions.act_window">
<field name="name">Contact Us</field>
<field name="res_model">portal_crm.crm_contact_us</field>
<field name="view_mode">form</field>
<field name="view_id" ref="contact_form_view"/>
<field name="target">inline</field>
</record>
<!-- attach it to the portal menu -->
<menuitem name="Contact" id="portal_company_contact"
parent="portal.portal_company" action="action_contact_us" sequence="40"/>
</data>
</openerp>

View File

@ -1,8 +1,6 @@
/* Root container */
.openerp .oe_portal_crm_contact {
width: 800px;
margin: auto;
padding: 8px 0 0 0;
min-width: 960px;
}
/* Contact form section */

View File

@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
#
# 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 contact

View File

@ -1,110 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- wizard form view -->
<record id="wizard_contact_form_view" model="ir.ui.view">
<field name="name">Wizard form view</field>
<field name="model">portal_crm.crm_contact_us</field>
<field name="arch" type="xml">
<form string="Contact wizard view" version="7.0">
<div class="oe_portal_crm_contact">
<h1>Contact us</h1>
<table>
<tr>
<td width="70%%">
<div class="oe_portal_crm_contact_form">
<group>
<field name="name"/>
<field name="partner_name"/>
<field name="email_from"/>
<field name="phone"/>
<field name="description"/>
<button string="Submit" name="submit" type="object"/>
</group>
</div>
</td>
<td>
<div class="oe_portal_crm_office">
<field name="company_ids" widget="many2many_kanban">
<kanban>
<field name="name"/>
<field name="email"/>
<field name="phone"/>
<field name="street"/>
<field name="street2"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id" options='{"no_open": True}'/>
<field name="state_id" options='{"no_open": True}'/>
<templates>
<t t-name="kanban-box">
<h4><field name="name"/></h4>
<ul class="oe_portal_crm_address">
<li t-if="record.street"><field name="street"/></li>
<li t-if="record.street2"><field name="street2"/></li>
<li t-if="record.zip"><field name="zip"/></li>
<li t-if="record.city"><field name="city"/></li>
<li t-if="record.country_id"><field name="country_id"/></li>
</ul>
<ul class="oe_portal_crm_contact_info">
<li t-if="record.phone"><field name="phone"/></li>
<li t-if="record.email.raw_value">
<a title="Mail" t-att-href="'mailto:'+record.email.value">
<field name="email"/>
</a>
</li>
</ul>
</t>
</templates>
</kanban>
</field>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="oe_portal_crm_team">
</div>
</td>
</tr>
</table>
</div>
</form>
</field>
</record>
<!-- wizard thanks message (shows after submitting the form) -->
<record id="wizard_contact_form_view_thanks" model="ir.ui.view">
<field name="name">Wizard thanks message</field>
<field name="model">portal_crm.crm_contact_us</field>
<!-- give it a low priority to ensure this won't be the default view -->
<field name="priority">99</field>
<field name="arch" type="xml">
<form string="Thank you">
<!--
make sure there is at least one field in the view,
otherwise the orm will try to select all the model's
records and this will result in a permission denied error
-->
<field name="name" invisible="1"/>
<label string="Thank you for your interest, we'll respond to your request shortly."/>
</form>
</field>
</record>
<!-- wizard action -->
<record id="action_wizard_contact_us" model="ir.actions.act_window">
<field name="name">Contact</field>
<field name="res_model">portal_crm.crm_contact_us</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
</record>
<!-- attach it to the portal menu -->
<menuitem name="Contact" id="portal_company_contact"
parent="portal.portal_company" action="action_wizard_contact_us" sequence="30"/>
</data>
</openerp>

View File

@ -10,14 +10,14 @@
<field name="name">Events</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="view_mode">kanban,calendar,tree,form,graph</field>
<field name="view_mode">kanban,calendar,tree,form</field>
<field name="context">{"search_default_upcoming":1}</field>
<field name="search_view_id" ref="event.view_event_search"/>
<field name="help">There are no public events.</field>
</record>
<menuitem name="Events" id="portal_company_events" parent="portal.portal_company"
action="action_event_view" sequence="40"/>
action="action_event_view" sequence="30"/>
</data>
</openerp>

View File

@ -5,7 +5,7 @@
<record id="portal_event_rule" model="ir.rule">
<field name="name">Portal Visible Events</field>
<field ref="event.model_event_event" name="model_id"/>
<field name="domain_force">[('visibility', '=', 'public')]</field>
<field name="domain_force">['|', ('visibility', '=', 'public'), ('message_follower_ids','in', [user.partner_id.id])]</field>
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
</record>

View File

@ -23,8 +23,8 @@ from osv import osv, fields
class crm_contact_us(osv.TransientModel):
""" Add employees list to the portal's contact page """
_description = 'Contact form for the portal'
_inherit = 'portal_crm.crm_contact_us'
_description = 'Contact form for the portal'
_columns = {
'employee_ids' : fields.many2many('hr.employee', string='Employees', readonly=True),
}
@ -51,6 +51,7 @@ class hr_employee(osv.osv):
_columns = {
'visibility': fields.selection([('public', 'Public'),('private', 'Private')],
string='Visibility', help='Employee\'s visibility in the portal\'s contact page'),
'public_info': fields.text(),
}
_defaults = {
'visibility': 'private',

View File

@ -1,56 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<data>
<!-- add visibility field to the employee form view -->
<record id="view_employee_form" model="ir.ui.view">
<field name="name">portal_hr_employees.employee.form</field>
<field name="name">portal_hr_employees_form</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='active']" position="before">
<xpath expr="//field[@name='user_id']" position="after">
<field name="visibility"/>
<field name="public_info" String="Public Notes" placeholder="Here you can write information about you to be shown in the portal..." attrs='{"invisible":[("visibility", "=", "private")]}'/>
</xpath>
</field>
</record>
<!-- a kanban view of the employees to the portal's contact page -->
<record id="wizard_contact_form_view_employees_list" model="ir.ui.view">
<field name="name">portal_hr_employees.employees_list</field>
<record id="portal_view_employee_filter" model="ir.ui.view">
<field name="name">Employees</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<search string="Employees">
<field name="name" string="Employees"/>
<group expand="0" string="Group By...">
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Coach" icon="terp-personal" domain="[]" context="{'group_by':'coach_id'}"/>
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
<filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
<record id="action_team" model="ir.actions.act_window">
<field name="name">Meet the team</field>
<field name="res_model">hr.employee</field>
<field name="view_id" ref="hr.hr_kanban_view_employees"/>
<field name="view_mode">kanban</field>
<field name="view_type">form</field>
<field name="domain">[('visibility','!=','private')]</field>
<field name="search_view_id" ref="portal_view_employee_filter"/>
<field name="target">current</field>
</record>
<record id="crm_contact_us" model="ir.ui.view">
<field name="name">crm_contact_us</field>
<field name="model">portal_crm.crm_contact_us</field>
<field name="inherit_id" ref="portal_crm.wizard_contact_form_view"/>
<field name="inherit_id" ref="portal_crm.contact_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@class='oe_portal_crm_team']" position="inside">
<h1>Meet the team</h1>
<field name="employee_ids" widget="many2many_kanban">
<kanban>
<field name="visibility"/>
<templates>
<t t-name="kanban-box">
<div class="oe_employee_vignette">
<div class="oe_employee_image">
<img t-att-src="kanban_image('hr.employee', 'photo', record.id.value)" class="oe_employee_picture"/>
</div>
<div class="oe_employee_details">
<h4>
<a type="open"><field name="name"/><t t-if="record.login.raw_value"> (<field name="login"/>)</t></a>
</h4>
<ul>
<li t-if="record.job_id.raw_value"><field name="job_id"/></li>
<li t-if="record.work_phone.raw_value">Tel: <field name="work_phone"/></li>
<li t-if="record.mobile_phone.raw_value">Mobile: <field name="mobile_phone"/></li>
<li t-if="record.work_email.raw_value"><a t-attf-href="mailto:#{record.work_email.value}"><field name="work_email"/></a></li>
</ul>
</div>
</div>
</t>
</templates>
</kanban>
</field>
<a href="#action=portal_hr_employees.action_team">Meet the team</a>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -3,14 +3,13 @@
width: 100%;
}
.openerp .oe_portal_crm_contact .oe_portal_crm_team {
padding: 8px 0 0 0;
margin-top: 30px;
padding-top: 30px;
}
.openerp .oe_portal_crm_contact .oe_portal_crm_team .oe_employee_details {
width: 170px;
}
.openerp .oe_portal_crm_contact .oe_portal_crm_team .oe_employee_image {
width: 65px;
height: 65px;
}
.openerp .oe_employee_vignette ul, .openerp .oe_employee_vignette li {

View File

@ -2,8 +2,24 @@
<openerp>
<data>
<menuitem name="Tasks" id="portal_services_tasks" parent="portal.portal_projects"
action="project.action_view_task" sequence="20"/>
<record id="open_view_project" model="ir.actions.act_window">
<field name="name">Projects</field>
<field name="res_model">project.project</field>
<field name="view_type">form</field>
<field name="domain">[]</field>
<field name="view_mode">kanban,gantt</field>
<field name="view_id" ref="project.view_project_kanban"/>
<field name="search_view_id" ref="project.view_project_project_filter"/>
<field name="context">{}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to start a new project.
</p>
</field>
</record>
<menuitem name="Projects" id="portal_services_projects" parent="portal.portal_projects"
action="open_view_project" sequence="10"/>
</data>
</openerp>

View File

@ -1,5 +1,7 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_task,tasks,project.model_project_task,portal.group_portal,1,0,0,0
access_project,project,project.model_project_project,portal.group_portal,1,0,0,0
access_task,task,project.model_project_task,portal.group_portal,1,0,0,0
access_task_type,task_type,project.model_project_task_type,portal.group_portal,1,0,0,0
access_task_work,task_work,project.model_project_task_work,portal.group_portal,1,0,0,0
access_project_category,project_category,project.model_project_category,portal.group_portal,1,0,0,0
access_account_analytic_account,account_analytic_account,analytic.model_account_analytic_account,portal.group_portal,1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_task access_project tasks project project.model_project_task project.model_project_project portal.group_portal 1 0 0 0
3 access_task task project.model_project_task portal.group_portal 1 0 0 0
4 access_task_type task_type project.model_project_task_type portal.group_portal 1 0 0 0
5 access_task_work task_work project.model_project_task_work portal.group_portal 1 0 0 0
6 access_project_category project_category project.model_project_category portal.group_portal 1 0 0 0
7 access_account_analytic_account account_analytic_account analytic.model_account_analytic_account portal.group_portal 1 0 0 0

View File

@ -2,15 +2,18 @@
<openerp>
<data noupdate="1">
<record id="portal_project_rule" model="ir.rule">
<field name="name">Portal Projects</field>
<field ref="project.model_project_project" name="model_id"/>
<field name="domain_force">['|', ('privacy_visibility', '=', 'public'), ('message_follower_ids', 'in', [user.partner_id.id])]</field>
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
</record>
<record id="portal_task_rule" model="ir.rule">
<field name="name">Portal Personal Task</field>
<field name="name">Portal Tasks</field>
<field ref="project.model_project_task" name="model_id"/>
<field name="domain_force">[('message_follower_ids','in', [user.partner_id.id])]</field>
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
<field eval="1" name="perm_unlink"/>
<field eval="1" name="perm_write"/>
<field eval="1" name="perm_read"/>
<field eval="0" name="perm_create"/>
</record>
</data>

View File

@ -18,4 +18,3 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

View File

@ -18,6 +18,17 @@
<t t-name="kanban-box">
<div class="oe_kanban_card oe_kanban_global_click">
<div class="oe_kanban_content">
<div class="oe_portal_project_issue">
<div><h1><field name="name"/></h1></div>
<div class="oe_kanban_footer_left">
<field name="partner_id" context="{'portal':1}"/> <br/>
<field name="version_id"/>
</div>
<div><field name="categ_ids" widget="many2many_tags" class="oe_left"/></div>
<div class="oe_text_right">
<h1><field name="state" readonly="1"/></h1>
</div>
</div>
<div>
<h1><a type="open"><field name="name"/></a></h1>
<field name="partner_id"/> <br/>
@ -49,7 +60,7 @@
</div>
</div>
</div>
<div class="oe_clear"></div>
<div class="oe_clear"/>
</div>
</t>
</templates>
@ -64,20 +75,18 @@
<field name="view_mode">kanban,form</field>
<field name="view_id" ref="portal_project_issue_kanban_view"/>
<field name="domain" eval=""/>
<field name="context">{"search_default_user_id":'', "search_default_draft":'', "search_default_todo":''}</field>
<field name="context">{"search_default_user_id":'', "search_default_draft":'', "search_default_todo":'', "portal":'True'}</field>
<field name="search_view_id" ref="project_issue.view_project_issue_filter"/>
<field name="target">current</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create an issue.
</p><p>
OpenERP's kanban view will help you track easily your current
pipeline of issues to fix.
You can track your issues from this menu and the action we
will take.
</p>
</field>
</record>
<menuitem name="Issues" id="portal_after_sales_issues" parent="portal.portal_projects"
action="project_issue_categ_act0" sequence="10"/>
</data>
</openerp>

View File

@ -1,5 +1,4 @@
.oe_portal_project_issue {
width: 960px;
margin: 0 auto;
}
@ -10,7 +9,6 @@
.oe_portal_project_issue .oe_fold_column.oe_kanban_record {
float: none;
display: block;
width: 100%;
border-width: 1px;
border-radius: 4px;
border-style: solid;
@ -27,6 +25,6 @@
.oe_portal_project_issue .oe_fold_column.oe_kanban_record h1 {
margin: 0;
font-size: 1.2em;
font-size: 1.1em;
font-weight: bold;
}

View File

@ -19,5 +19,7 @@
#
##############################################################################
import account_invoice
import sale
import portal_sale
import res_config
import res_config

View File

@ -44,7 +44,7 @@ pay online on their Sale Orders and Invoices that are not paid yet. Paypal is in
by default, you simply need to configure a Paypal account in the Accounting/Invoicing settings.
""",
'author': 'OpenERP SA',
'depends': ['sale_stock','portal'],
'depends': ['sale','portal'],
'data': [
'security/portal_security.xml',
'portal_sale_view.xml',

View File

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
#
# 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
class account_invoice(osv.osv):
_inherit = 'account.invoice'
def invoice_validate(self, cr, uid, ids, context=None):
# fetch the partner's id and subscribe the partner to the sale order
partner = self.browse(cr, uid, ids[0], context=context)['partner_id']
if partner.id not in self.browse(cr, uid, ids[0], context=context)['message_follower_ids']:
self.message_subscribe(cr, uid, ids, [partner.id], context=context)
document = self.browse(cr, uid, ids[0], context=context)
mail_values = {
'email_from': self.pool.get('res.users').browse(cr, uid, uid, context=context)['partner_id']['email'],
'email_to': partner.email,
'subject': 'Invitation to follow %s' % document.name_get()[0][1],
'body_html': 'You have been invited to follow %s' % document.name_get()[0][1],
'auto_delete': True,
}
mail_obj = self.pool.get('mail.mail')
mail_id = mail_obj.create(cr, uid, mail_values, context=context)
mail_obj.send(cr, uid, [mail_id], recipient_ids=[partner.id], context=context)
return super(account_invoice, self).invoice_validate(cr, uid, ids, context=context)

View File

@ -33,59 +33,39 @@
<field name="name">Quotations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sale.order</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="view_mode">tree,form</field>
<field name="context">{"search_default_draft":1}</field>
<field name="search_view_id" ref="sale.view_sales_order_filter"/>
<field name="help">You don't have any quotation.</field>
<field name="help">We haven't sent you any quotation.</field>
</record>
<record id="action_orders_portal" model="ir.actions.act_window">
<field name="name">Sale Orders</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sale.order</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="sale.view_sales_order_filter"/>
<field name="context">{"search_default_sales":1}</field>
<field name="help">You don't have any sale order.</field>
</record>
<record id="action_picking_tree" model="ir.actions.act_window">
<field name="name">Delivery Orders</field>
<field name="res_model">stock.picking.out</field>
<field name="type">ir.actions.act_window</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('type','=','out')]</field>
<field name="context">{'default_type': 'out', 'contact_display': 'partner_address'}</field>
<field name="search_view_id" ref="stock.view_picking_out_search"/>
<field name="help">You don't have any delivery order.</field>
</record>
<record id="product_normal_action" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="view_id" ref="product.product_kanban_view"/>
<field name="search_view_id" ref="product.product_search_form_view"/>
<field name="help">There are no public products.</field>
<field name="help">We haven't sent you any sale order.</field>
</record>
<record id="portal_action_invoices" model="ir.actions.act_window">
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="domain">[('type','=','out_invoice')]</field>
<field name="context">{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'}</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('type','in',['out_invoice','out_refund'])]</field>
<field name="context">{'type':['out_invoice','out_refund'], 'journal_type': 'sale'}</field>
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
<field name="help">You don't have any invoice.</field>
<field name="help">We haven't sent you any invoice.</field>
</record>
<record id="portal_action_invoices_tree_spec" model="ir.actions.act_window.view">
<field name="act_window_id" ref="portal_action_invoices"/>
<field name="view_id" ref="account.invoice_tree"/>
<field name="view_mode">tree</field>
<field name="sequence" eval="0"/>
</record>
<record id="portal_action_invoices_form_spec" model="ir.actions.act_window.view">
<field name="act_window_id" ref="portal_action_invoices"/>
<field name="view_id" ref="account.invoice_form"/>
@ -93,27 +73,12 @@
<field name="sequence" eval="1"/>
</record>
<record id="portal_action_vouchers" model="ir.actions.act_window">
<field name="name">Refunds/Payments</field>
<field name="res_model">account.voucher</field>
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt')]</field>
<field name="context">{'type':'receipt'}</field>
<field name="search_view_id" ref="account_voucher.view_voucher_filter_customer_pay"/>
<field name="target">current</field>
<field name="help">You don't have any refunds or payments.</field>
</record>
<menuitem id="portal_quotations" parent="portal.portal_orders"
<menuitem name="Quotations" id="portal_quotations" parent="portal.portal_orders"
action="action_quotations_portal" sequence="10"/>
<menuitem id="portal_sales_orders" parent="portal.portal_orders"
<menuitem name="Sales Orders" id="portal_sales_orders" parent="portal.portal_orders"
action="action_orders_portal" sequence="20"/>
<menuitem id="portal_delivery" parent="portal.portal_orders"
action="action_picking_tree" sequence="30"/>
<menuitem id="portal_products" parent="portal.portal_orders"
action="product_normal_action" sequence="40"/>
<menuitem id="portal_invoices" parent="portal.portal_invoices_payements"
action="portal_action_invoices" sequence="10"/>
<menuitem id="portal_payments" parent="portal.portal_invoices_payements"
action="portal_action_vouchers" sequence="20"/>
<menuitem name="Invoices" id="portal_invoices" parent="portal.portal_orders"
action="portal_action_invoices" sequence="30"/>
</data>
</openerp>

View File

@ -0,0 +1,58 @@
# -*- 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
class sale_order(osv.osv):
_inherit = 'sale.order'
def action_button_confirm(self, cr, uid, ids, context=None):
# fetch the partner's id and subscribe the partner to the sale order
partner = self.browse(cr, uid, ids[0], context=context)['partner_id']
if partner.id not in self.browse(cr, uid, ids[0], context=context)['message_follower_ids']:
self.message_subscribe(cr, uid, ids, [partner.id], context=context)
document = self.browse(cr, uid, ids[0], context=context)
mail_values = {
'email_from': self.pool.get('res.users').browse(cr, uid, uid, context=context)['partner_id']['email'],
'email_to': partner.email,
'subject': 'Invitation to follow %s' % document.name_get()[0][1],
'body_html': 'You have been invited to follow %s' % document.name_get()[0][1],
'auto_delete': True,
}
mail_obj = self.pool.get('mail.mail')
mail_id = mail_obj.create(cr, uid, mail_values, context=context)
mail_obj.send(cr, uid, [mail_id], recipient_ids=[partner.id], context=context)
return super(sale_order, self).action_button_confirm(cr, uid, ids, context=context)
sale_order()
class mail_mail(osv.osv):
_inherit = 'mail.mail'
def _postprocess_sent_message(self, cr, uid, mail, context=None):
if mail.model == 'sale.order':
so_obj = self.pool.get('sale.order')
partner = so_obj.browse(cr, uid, mail.res_id, context=context)['partner_id']
if partner.id not in so_obj.browse(cr, uid, mail.res_id, context=context)['message_follower_ids']:
so_obj.message_subscribe(cr, uid, [mail.res_id], [partner.id], context=context)
return super(mail_mail, self)._postprocess_sent_message(cr, uid, mail=mail, context=context)
mail_mail()

View File

@ -1,10 +1,6 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_sale_order,sale.order,sale.model_sale_order,portal.group_portal,1,0,0,0
access_sale_order_line,sale.order.line,sale.model_sale_order_line,portal.group_portal,1,0,0,0
access_stock_picking,stock.picking,stock.model_stock_picking,portal.group_portal,1,0,0,0
access_stock_picking.out,stock.picking.out,stock.model_stock_picking_out,portal.group_portal,1,0,0,0
access_stock_move,stock.move,stock.model_stock_move,portal.group_portal,1,0,0,0
access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,procurement.model_stock_warehouse_orderpoint,portal.group_portal,1,0,0,0
access_account_invoice,account.invoice,account.model_account_invoice,portal.group_portal,1,0,0,0
access_account_invoice_tax,account.invoice.tax,account.model_account_invoice_tax,portal.group_portal,1,0,0,0
access_account_invoice_line,account.invoice.line,account.model_account_invoice_line,portal.group_portal,1,0,0,0
@ -17,17 +13,9 @@ access_account_move_reconcile,account.move.reconcile,account.model_account_move_
access_account_fiscalyear,account.sequence.fiscalyear,account.model_account_sequence_fiscalyear,portal.group_portal,1,0,0,0
access_sale_shop,sale.shop,sale.model_sale_shop,portal.group_portal,1,0,0,0
access_product_list,product.pricelist,product.model_product_pricelist,portal.group_portal,1,0,0,0
access_product,product.product,product.model_product_product,portal.group_portal,1,0,0,0
access_res_partner,res.partner,base.model_res_partner,portal.group_portal,1,0,0,0
access_product_uom,product.uom,product.model_product_uom,portal.group_portal,1,0,0,0
access_account_tax,account.tax,account.model_account_tax,portal.group_portal,1,0,0,0
access_mrp_property,mrp.property,procurement.model_mrp_property,portal.group_portal,1,0,0,0
access_product_template,product.template,product.model_product_template,portal.group_portal,1,0,0,0
access_stock_warehouse,stock.warehouse,stock.model_stock_warehouse,portal.group_portal,1,0,0,0
access_stock_location,stock.location,stock.model_stock_location,portal.group_portal,1,0,0,0
access_account_fiscalyear,account.fiscalyear,account.model_account_fiscalyear,portal.group_portal,1,0,0,0
access_res_partner_category,res.partner.category,base.model_res_partner_category,portal.group_portal,1,0,0,0
access_product_supplierinfo,product.supplierinfo,product.model_product_supplierinfo,portal.group_portal,1,0,0,0
access_product_packaging,product.packaging,product.model_product_packaging,portal.group_portal,1,0,0,0
access_account_period,account.period,account.model_account_period,portal.group_portal,1,0,0,0
access_account_account,account.account,account.model_account_account,portal.group_portal,1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_sale_order sale.order sale.model_sale_order portal.group_portal 1 0 0 0
3 access_sale_order_line sale.order.line sale.model_sale_order_line portal.group_portal 1 0 0 0
access_stock_picking stock.picking stock.model_stock_picking portal.group_portal 1 0 0 0
access_stock_picking.out stock.picking.out stock.model_stock_picking_out portal.group_portal 1 0 0 0
access_stock_move stock.move stock.model_stock_move portal.group_portal 1 0 0 0
access_stock_warehouse_orderpoint stock.warehouse.orderpoint procurement.model_stock_warehouse_orderpoint portal.group_portal 1 0 0 0
4 access_account_invoice account.invoice account.model_account_invoice portal.group_portal 1 0 0 0
5 access_account_invoice_tax account.invoice.tax account.model_account_invoice_tax portal.group_portal 1 0 0 0
6 access_account_invoice_line account.invoice.line account.model_account_invoice_line portal.group_portal 1 0 0 0
13 access_account_fiscalyear account.sequence.fiscalyear account.model_account_sequence_fiscalyear portal.group_portal 1 0 0 0
14 access_sale_shop sale.shop sale.model_sale_shop portal.group_portal 1 0 0 0
15 access_product_list product.pricelist product.model_product_pricelist portal.group_portal 1 0 0 0
access_product product.product product.model_product_product portal.group_portal 1 0 0 0
16 access_res_partner res.partner base.model_res_partner portal.group_portal 1 0 0 0
access_product_uom product.uom product.model_product_uom portal.group_portal 1 0 0 0
17 access_account_tax account.tax account.model_account_tax portal.group_portal 1 0 0 0
access_mrp_property mrp.property procurement.model_mrp_property portal.group_portal 1 0 0 0
access_product_template product.template product.model_product_template portal.group_portal 1 0 0 0
access_stock_warehouse stock.warehouse stock.model_stock_warehouse portal.group_portal 1 0 0 0
access_stock_location stock.location stock.model_stock_location portal.group_portal 1 0 0 0
18 access_account_fiscalyear account.fiscalyear account.model_account_fiscalyear portal.group_portal 1 0 0 0
19 access_res_partner_category res.partner.category base.model_res_partner_category portal.group_portal 1 0 0 0
access_product_supplierinfo product.supplierinfo product.model_product_supplierinfo portal.group_portal 1 0 0 0
access_product_packaging product.packaging product.model_product_packaging portal.group_portal 1 0 0 0
20 access_account_period account.period account.model_account_period portal.group_portal 1 0 0 0
21 access_account_account account.account account.model_account_account portal.group_portal 1 0 0 0

View File

@ -26,20 +26,6 @@ their documents through the portal.</field>
<field eval="0" name="perm_create"/>
</record>
<record id="portal_stock_picking_user_rule" model="ir.rule">
<field name="name">Portal Personal Delivery Orders</field>
<field name="model_id" ref="stock.model_stock_picking"/>
<field name="domain_force">[('message_follower_ids','in',[user.partner_id.id])]</field>
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
</record>
<record id="portal_stock_picking_user_rule" model="ir.rule">
<field name="name">Portal Personal Delivery Orders Out</field>
<field name="model_id" ref="stock.model_stock_picking_out"/>
<field name="domain_force">[('message_follower_ids','in',[user.partner_id.id])]</field>
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
</record>
<record id="portal_account_invoice_user_rule" model="ir.rule">
<field name="name">Portal Personal Account Invoices</field>
<field name="model_id" ref="account.model_account_invoice"/>
@ -47,13 +33,6 @@ their documents through the portal.</field>
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
</record>
<record id="portal_personal_payment" model="ir.rule">
<field name="name">Portal Personal Payments</field>
<field name="model_id" ref="account_voucher.model_account_voucher"/>
<field name="domain_force">[('message_follower_ids','in',[user.partner_id.id])]</field>
<field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
</record>
<record id="portal_personal_contact" model="ir.rule">
<field name="name">Portal Personal Contacts</field>
<field name="model_id" ref="base.model_res_partner"/>

View File

@ -63,14 +63,14 @@
<field name="arch" type="xml">
<form string="Project" version="7.0">
<header>
<button name="set_open" string="Re-open project" type="object" states="pending" class="oe_highlight"/>
<button name="set_done" string="Close Project" type="object" states="open,pending"/>
<button name="set_open" string="Re-open project" type="object" states="cancelled,close"/>
<button name="set_pending" string="Pending" type="object" states="open"/>
<button name="set_template" string="Set as Template" type="object" states="open"/>
<button string="New Project Based on Template" name="duplicate_template" type="object" states="template" context="{'parent_id':parent_id}" class="oe_highlight"/>
<button name="reset_project" string="Reset as Project" type="object" states="template" class="oe_highlight"/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending"/>
<button name="set_open" string="Re-open project" type="object" states="pending" class="oe_highlight" groups="base.group_user"/>
<button name="set_done" string="Close Project" type="object" states="open,pending" groups="base.group_user"/>
<button name="set_open" string="Re-open project" type="object" states="cancelled,close" groups="base.group_user"/>
<button name="set_pending" string="Pending" type="object" states="open" groups="base.group_user"/>
<button name="set_template" string="Set as Template" type="object" states="open" groups="base.group_user"/>
<button string="New Project Based on Template" name="duplicate_template" type="object" states="template" context="{'parent_id':parent_id}" class="oe_highlight" groups="base.group_user"/>
<button name="reset_project" string="Reset as Project" type="object" states="template" class="oe_highlight" groups="base.group_user"/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending" groups="base.group_user"/>
<field name="state" widget="statusbar" statusbar_visible="open,close" statusbar_colors='{"pending":"blue"}' readonly="1"/>
</header>
<sheet string="Project">
@ -85,7 +85,7 @@
<label for="use_tasks"/>
</div>
</div>
<div class="oe_right oe_button_box" name="buttons">
<div class="oe_right oe_button_box" name="buttons" groups="base.group_user">
<button name="%(act_project_project_2_project_task_all)d" string="Tasks"
type="action" attrs="{'invisible':[('use_tasks','=', 0)]}"/>
<button name="attachment_tree_view" string="Documents" type="object"/>
@ -152,7 +152,7 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" help="Follow this project to automatically follow all related tasks and issues."/>
<field name="message_follower_ids" widget="mail_followers" help="Follow this project to automatically follow all related tasks and issues." groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
@ -227,7 +227,7 @@
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Project Settings</a></li></t>
@ -474,7 +474,7 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
@ -488,7 +488,7 @@
<field name="arch" type="xml">
<kanban default_group_by="stage_id" >
<field name="color"/>
<field name="priority" groups="base.group_user"/>
<field name="priority"/>
<field name="stage_id"/>
<field name="user_id"/>
<field name="user_email"/>
@ -504,7 +504,7 @@
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
@ -531,12 +531,14 @@
<span t-attf-class="#{red || ''}"><i><field name="date_deadline"/></i></span>
</div>
<div class="oe_kanban_bottom_right">
<a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready for next stage" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a>
<a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a>
<a t-if="record.priority.raw_value == 2" type="object" string="Important" name="set_very_high_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value == 1 or record.priority.raw_value == 3 or record.priority.raw_value == 4" type="object" string="Normal" name="set_normal_priority" class="oe_e oe_star_off">7</a>
<a t-if="record.priority.raw_value == 0" type="object" string="Very Important" name="set_high_priority" class="oe_e oe_star_very_high_priority">7</a>
<div groups="base.group_user">
<a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready for next stage" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a>
<a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a>
<a t-if="record.priority.raw_value == 2" type="object" string="Important" name="set_very_high_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value == 1 or record.priority.raw_value == 3 or record.priority.raw_value == 4" type="object" string="Normal" name="set_normal_priority" class="oe_e oe_star_off">7</a>
<a t-if="record.priority.raw_value == 0" type="object" string="Very Important" name="set_high_priority" class="oe_e oe_star_very_high_priority">7</a>
</div>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
<div class="oe_kanban_footer_left">

View File

@ -107,25 +107,25 @@
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<group>
<group>
<group groups="base.group_user">
<field name="user_id"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
<field name="email_from"/>
</group>
<group>
<field name="priority"/>
<label for="project_id"/>
<div>
<field name="project_id" required="True" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/>
<field name="priority" groups="base.group_user"/>
<label for="project_id" groups="base.group_user"/>
<div groups="base.group_user">
<field name="project_id" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/>
<button name="case_escalate" string="Escalate" type="object" states="draft,open,pending" class="oe_inline"/>
</div>
<label for="task_id"/>
<div>
<label for="task_id" groups="base.group_user"/>
<div groups="base.group_user">
<field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/>
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}" class="oe_inline"/>
</div>
<field name="categ_ids" widget="many2many_tags"/>
<field name="version_id"/>
<field name="version_id" groups="base.group_user"/>
</group>
</group>
<notebook>
@ -155,7 +155,7 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
@ -249,7 +249,7 @@
</t>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_semantic_html_override">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
<span class="oe_e">i</span>
<ul class="oe_dropdown_menu">
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
@ -266,7 +266,7 @@
<div class="oe_kanban_footer_left">
<field name="categ_ids"/>
<div class="oe_right">
<span class="oe_kanban_highlight">
<span class="oe_kanban_highlight" groups="base.group_user">
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority">
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>

View File

@ -310,7 +310,7 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread" placeholder="Share a message..."/>
</div>
</form>