Skip to content

Commit

Permalink
[MERGE]
Browse files Browse the repository at this point in the history
bzr revid: hmo@tinyerp.com-20121030070944-1ylgxy0uz54pf7vc
  • Loading branch information
hmo-odoo committed Oct 30, 2012
2 parents 3860dfe + ac3f0ef commit 0ca0936
Show file tree
Hide file tree
Showing 64 changed files with 2,203 additions and 1,727 deletions.
4 changes: 2 additions & 2 deletions addons/account/account_invoice_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down Expand Up @@ -437,8 +437,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<group col="4">
<field name="date1"/>
<field name="date2"/>
<field name="analytic_account_journal_id" widget="many2many_tags" class="oe_inline" required="1"/>
<field name="analytic_account_journal_id" widget="many2many_tags" class="oe_inline" required="1" colspan="4"/>
</group>
<footer>
<button name="check_report" string="Print" type="object" class="oe_highlight"/>
Expand Down
2 changes: 1 addition & 1 deletion addons/account_voucher/account_voucher_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
4 changes: 2 additions & 2 deletions addons/account_voucher/voucher_payment_receipt_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down Expand Up @@ -512,8 +512,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
4 changes: 2 additions & 2 deletions addons/account_voucher/voucher_sales_purchase_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down Expand Up @@ -303,8 +303,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
28 changes: 24 additions & 4 deletions addons/analytic/analytic.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,29 @@ def _debit_credit_bal_qtty(self, cr, uid, ids, fields, arg, context=None):
res[row['id']][field] = row[field]
return self._compute_level_tree(cr, uid, ids, child_ids, res, fields, context)

def _complete_name_calc(self, cr, uid, ids, prop, unknow_none, unknow_dict):
res = self.name_get(cr, uid, ids)
return dict(res)
def name_get(self, cr, uid, ids, context=None):
res = []
for id in ids:
elmt = self.browse(cr, uid, id, context=context)
res.append((id, self._get_one_full_name(elmt)))
return res

def _get_full_name(self, cr, uid, ids, name=None, args=None, context=None):
if context == None:
context = {}
res = {}
for elmt in self.browse(cr, uid, ids, context=context):
res[elmt.id] = self._get_one_full_name(elmt)
return res

def _get_one_full_name(self, elmt, level=6):
if level<=0:
return '...'
if elmt.parent_id:
parent_path = self._get_one_full_name(elmt.parent_id, level-1) + "/"
else:
parent_path = ''
return parent_path + elmt.name

def _child_compute(self, cr, uid, ids, name, arg, context=None):
result = {}
Expand Down Expand Up @@ -139,7 +159,7 @@ def _currency(self, cr, uid, ids, field_name, arg, context=None):

_columns = {
'name': fields.char('Account/Contract Name', size=128, required=True),
'complete_name': fields.function(_complete_name_calc, type='char', string='Full Account Name'),
'complete_name': fields.function(_get_full_name, type='char', string='Full Account Name'),
'code': fields.char('Reference', size=24, select=True),
'type': fields.selection([('view','Analytic View'), ('normal','Analytic Account'),('contract','Contract or Project'),('template','Template of Contract')], 'Type of Account', required=True,
help="If you select the View Type, it means you won\'t allow to create journal entries using that account.\n"\
Expand Down
2 changes: 1 addition & 1 deletion addons/analytic/analytic_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
12 changes: 11 additions & 1 deletion addons/auth_openid/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import logging
import os
import tempfile
import getpass
import urllib

import werkzeug.urls
Expand All @@ -43,7 +44,16 @@
_logger = logging.getLogger(__name__)
oidutil.log = _logger.debug

_storedir = os.path.join(tempfile.gettempdir(), 'openerp-auth_openid-store')
def get_system_user():
"""Return system user info string, such as USERNAME-EUID"""
info = getpass.getuser()
euid = getattr(os, 'geteuid', None) # Non available on some platforms
if euid is not None:
info = '%s-%d' % (info, euid())
return info

_storedir = os.path.join(tempfile.gettempdir(),
'openerp-auth_openid-%s-store' % get_system_user())

class GoogleAppsAwareConsumer(consumer.GenericConsumer):
def complete(self, message, endpoint, return_to):
Expand Down
2 changes: 1 addition & 1 deletion addons/base_calendar/base_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ def get_recurrent_ids(self, cr, uid, select, domain, limit=100, context=None):
context = {}

result = []
for data in super(calendar_event, self).read(cr, uid, select, context=context):
for data in super(calendar_event, self).read(cr, uid, select, ['rrule', 'exdate', 'exrule', 'date'], context=context):
if not data['rrule']:
result.append(data['id'])
continue
Expand Down
2 changes: 1 addition & 1 deletion addons/base_calendar/crm_meeting_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
4 changes: 2 additions & 2 deletions addons/crm/crm_lead_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down Expand Up @@ -525,8 +525,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
2 changes: 1 addition & 1 deletion addons/crm/crm_phonecall_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@
<field name="description" placeholder="Description..."/>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
2 changes: 1 addition & 1 deletion addons/crm/crm_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
</page>
</notebook>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers" help="Followers of this salesteam follow automatically all opportunities related to this salesteam."/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
2 changes: 1 addition & 1 deletion addons/crm_claim/crm_claim_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@
</group>
</sheet>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
Expand Down
11 changes: 4 additions & 7 deletions addons/email_template/tests/test_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,8 @@ def test_00_message_compose_wizard(self):
self.assertEqual(message_pigs.body, _body_html1, 'mail.message body on Pigs incorrect')
self.assertEqual(message_bird.body, _body_html2, 'mail.message body on Bird incorrect')
# Test: partner_ids: p_a_id (default) + 3 newly created partners
message_pigs_pids = [partner.id for partner in message_pigs.partner_ids]
message_bird_pids = [partner.id for partner in message_bird.partner_ids]
message_pigs_pids = [partner.id for partner in message_pigs.notified_partner_ids]
message_bird_pids = [partner.id for partner in message_bird.notified_partner_ids]
partner_ids = self.res_partner.search(cr, uid, [('email', 'in', ['b@b.b', 'c@c.c', 'd@d.d'])])
self.assertEqual(len(message_pigs_pids), len(partner_ids), 'mail.message on pigs incorrect number of partner_ids')
self.assertEqual(set(message_pigs_pids), set(partner_ids), 'mail.message on pigs incorrect number of partner_ids')

self.assertEqual(len(message_bird_pids), len(partner_ids), 'mail.message on bird partner_ids incorrect')
self.assertEqual(set(message_bird_pids), set(partner_ids), 'mail.message on bird partner_ids incorrect')
self.assertEqual(set(message_pigs_pids), set(partner_ids), 'mail.message on pigs incorrect number of notified_partner_ids')
self.assertEqual(set(message_bird_pids), set(partner_ids), 'mail.message on bird notified_partner_ids incorrect')
2 changes: 1 addition & 1 deletion addons/email_template/wizard/mail_compose_message_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<field name="inherit_id" ref="mail.email_compose_message_wizard_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//form/notebook" position="after">
<xpath expr="//form/group" position="after">
<group attrs="{'invisible':[('use_template','=',False)]}">
<field name="use_template" invisible="1"
on_change="onchange_use_template(use_template, template_id, composition_mode, model, res_id, context)"/>
Expand Down
4 changes: 2 additions & 2 deletions addons/event/event_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
Expand Down Expand Up @@ -486,8 +486,8 @@
</group>
</sheet>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
Expand Down
2 changes: 1 addition & 1 deletion addons/hr/hr_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@
</div>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
2 changes: 1 addition & 1 deletion addons/hr/res_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class hr_config_settings(osv.osv_memory):
help ="""This installs the module hr_contract."""),
'module_hr_evaluation': fields.boolean('Organize employees periodic evaluation',
help ="""This installs the module hr_evaluation."""),
'module_account_analytic_analysis': fields.boolean('Allow invoicing based on timesheets (will install the sale application)',
'module_account_analytic_analysis': fields.boolean('Allow invoicing based on timesheets (the sale application will be installed)',
help ="""This installs the module account_analytic_analysis, which will install sales management too."""),
'module_hr_payroll': fields.boolean('Manage payroll',
help ="""This installs the module hr_payroll."""),
Expand Down
2 changes: 1 addition & 1 deletion addons/hr_evaluation/hr_evaluation_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@
</group>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
2 changes: 1 addition & 1 deletion addons/hr_expense/hr_expense_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
4 changes: 2 additions & 2 deletions addons/hr_holidays/hr_holidays_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
</group>
</sheet>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
Expand Down Expand Up @@ -158,8 +158,8 @@
<field name="notes" nolabel="1" colspan="4" placeholder="Add a reason..."/>
</sheet>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
</div>
</form>
</field>
Expand Down
2 changes: 1 addition & 1 deletion addons/hr_recruitment/hr_recruitment_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@
<field name="description" placeholder="Feedback of interviews..."/>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
Expand Down
4 changes: 2 additions & 2 deletions addons/hr_timesheet_sheet/hr_timesheet_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def write(self, cr, uid, ids, vals, *args, **argv):
if not new_user_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must assign it to a user.'))
if not self._sheet_date(cr, uid, ids, forced_user_id=new_user_id):
raise osv.except_osv(_('Error!'), _('You cannot have 2 timesheets that overlaps!\nYou should use the menu \'My Timesheet\' to avoid this problem.'))
raise osv.except_osv(_('Error!'), _('You cannot have 2 timesheets that overlap!\nYou should use the menu \'My Timesheet\' to avoid this problem.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).product_id:
raise osv.except_osv(_('Error!'), _('In order to create a timesheet for this employee, you must link the employee to a product.'))
if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).journal_id:
Expand Down Expand Up @@ -187,7 +187,7 @@ def _sheet_date(self, cr, uid, ids, forced_user_id=False, context=None):


_constraints = [
(_sheet_date, 'You cannot have 2 timesheets that overlaps !\nPlease use the menu \'My Current Timesheet\' to avoid this problem.', ['date_from','date_to']),
(_sheet_date, 'You cannot have 2 timesheets that overlap!\nPlease use the menu \'My Current Timesheet\' to avoid this problem.', ['date_from','date_to']),
]

def action_set_to_draft(self, cr, uid, ids, *args):
Expand Down
Loading

0 comments on commit 0ca0936

Please sign in to comment.