[MERGE]:trunk

bzr revid: apa@tinyerp.com-20120928050433-1gb7lpwwxdfpedlu
This commit is contained in:
Amit Patel 2012-09-28 10:34:33 +05:30
commit ad5a175d8b
214 changed files with 6020 additions and 3313 deletions

View File

@ -159,6 +159,5 @@ for a particular financial year and for preparation of vouchers there is a modul
],
'installable': True,
'auto_install': False,
'certificate': '0080331923549',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -117,6 +117,9 @@ class account_config_settings(osv.osv_memory):
'group_multi_currency': fields.boolean('Allow multi currencies',
implied_group='base.group_multi_currency',
help="Allows you multi currency environment"),
'group_analytic_accounting': fields.boolean('Analytic accounting',
implied_group='analytic.group_analytic_accounting',
help="Allows you to use the analytic accounting."),
}
def _default_company(self, cr, uid, context=None):

View File

@ -129,6 +129,10 @@
<field name="module_account_accountant" class="oe_inline"/>
<label for="module_account_accountant"/>
</div>
<div>
<field name="group_analytic_accounting" class="oe_inline"/>
<label for="group_analytic_accounting"/>
</div>
<div>
<field name="module_account_asset" class="oe_inline"/>
<label for="module_account_asset"/>

View File

@ -43,6 +43,5 @@ It assigns manager and user access rights to the Administrator and only user rig
'installable': True,
'auto_install': False,
'application': True,
'certificate': '00395091383933390541',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -47,7 +47,6 @@ Adds menu to show relevant information to each manager.You can also view the rep
'demo': [],
'installable': True,
'auto_install': False,
'certificate': '0042927202589',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -47,7 +47,6 @@ Allows to automatically select analytic accounts based on criterions:
'demo': [],
'installable': True,
'auto_install': False,
'certificate': '0074229833581',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -79,7 +79,6 @@ The analytic plan validates the minimum and maximum percentage at the time of cr
'test': ['test/acount_analytic_plans_report.yml'],
'installable': True,
'auto_install': False,
'certificate': '0036417675373',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -46,7 +46,6 @@ account.""",
'data': ['product_view.xml',],
'auto_install': False,
'installable': True,
'certificate':'00557423080410733581',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -69,6 +69,5 @@ Three reports are available:
],
'installable': True,
'auto_install': False,
'certificate': '0043819694157',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,9 +38,6 @@ If set to true it allows user to cancel entries & invoices.
'demo': [],
'installable': True,
'auto_install': False,
'certificate': '001101250473177981989',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -36,6 +36,5 @@ Deactivates minimal chart of accounts.
'data': [],
'demo': [],
'installable': True,
'certificate': '0073332443901',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

File diff suppressed because it is too large Load Diff

View File

@ -64,7 +64,6 @@ Note that if you want to check the follow-up level for a given partner/account e
],
'installable': True,
'auto_install': False,
'certificate': '0072481076453',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -65,6 +65,5 @@ have a new option to import payment orders as bank statement lines.
],
'installable': True,
'auto_install': False,
'certificate': '0061703998541',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -49,7 +49,6 @@ You can customize the following attributes of the sequence:
'demo': [],
'installable': True,
'auto_install': False,
'certificate': '00475376442024623469',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -72,7 +72,6 @@ This module manages:
'test/case4_cad_chf.yml',
'test/case_eur_usd.yml',
],
'certificate': '0037580727101',
'auto_install': False,
'application': True,
'installable': True,

View File

@ -782,9 +782,16 @@ class account_voucher(osv.osv):
vals[key].update(res[key])
return vals
def button_proforma_voucher(self, cr, uid, ids, context=None):
context = context or {}
wf_service = netsvc.LocalService("workflow")
for vid in ids:
wf_service.trg_validate(uid, 'account.voucher', vid, 'proforma_voucher', cr)
return {'type': 'ir.actions.act_window_close'}
def proforma_voucher(self, cr, uid, ids, context=None):
self.action_move_line_create(cr, uid, ids, context=context)
return {'type': 'ir.actions.act_window_close'}
return True
def action_cancel_draft(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")

View File

@ -27,11 +27,12 @@ class invoice(osv.osv):
def invoice_pay_customer(self, cr, uid, ids, context=None):
if not ids: return []
mod,modid = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_dialog_form')
inv = self.browse(cr, uid, ids[0], context=context)
return {
'name':_("Pay Invoice"),
'view_mode': 'form',
'view_id': False,
'view_id': modid,
'view_type': 'form',
'res_model': 'account.voucher',
'type': 'ir.actions.act_window',
@ -41,13 +42,13 @@ class invoice(osv.osv):
'context': {
'default_partner_id': inv.partner_id.id,
'default_amount': inv.type in ('out_refund', 'in_refund') and -inv.residual or inv.residual,
'default_name':inv.name,
'default_number':inv.name,
'close_after_process': True,
'invoice_type':inv.type,
'invoice_id':inv.id,
'invoice_type': inv.type,
'invoice_id': inv.id,
'default_type': inv.type in ('out_invoice','out_refund') and 'receipt' or 'payment',
'type': inv.type in ('out_invoice','out_refund') and 'receipt' or 'payment'
}
}
}
invoice()

View File

@ -284,6 +284,111 @@
<menuitem action="action_vendor_payment" icon="STOCK_JUSTIFY_FILL" sequence="12"
id="menu_action_vendor_payment" parent="account.menu_finance_payables"/>
<record model="ir.ui.view" id="view_vendor_receipt_dialog_form">
<field name="name">account.voucher.receipt.dialog.form</field>
<field name="model">account.voucher</field>
<field name="priority">30</field>
<field name="arch" type="xml">
<form string="Payment" version="7.0">
<group>
<group>
<field name="state" invisible="1"/>
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<label for="amount" string="Paid Amount"/>
<div>
<field name="amount" class="oe_inline"
invisible="context.get('line_type', False)"
on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<field name="currency_id" class="oe_inline"/>
</div>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
widget="selection"
on_change="onchange_journal(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)"
string="Payment Method"/>
</group>
<group>
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="e.g. 003/10"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="e.g. Invoice SAJ/0042"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="account_id"
widget="selection"
invisible="True"/>
<field name="pre_line" invisible="1"/>
<field name="type" invisible="True"/>
</group>
</group>
<notebook invisible="1">
<page string="Payment Information" groups="base.group_user">
<label for="line_cr_ids"/>
<field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Invoices and outstanding transactions" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
required="1"
groups="account.group_account_user"/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','receivable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" readonly="1" groups="account.group_account_user"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)" groups="account.group_account_user"/>
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation"/>
</tree>
</field>
<label for="line_dr_ids" attrs="{'invisible': [('pre_line','=',False)]}"/>
<field name="line_dr_ids" attrs="{'invisible': [('pre_line','=',False)]}" context="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Credits" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
required="1"/>
<field name="account_id" groups="base.group_no_one" domain="[('type','=','receivable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="reconcile" on_change="onchange_reconcile(reconcile, amount, amount_unreconciled, context)"/>
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation"/>
</tree>
</field>
<group col="3">
<group>
<field name="narration" colspan="2" nolabel="1"/>
</group>
<group col="4" attrs="{'invisible':[('currency_id','=',False),('is_multi_currency','=',False)]}">
<field name="is_multi_currency" invisible="1"/>
<field name="payment_rate" required="1" on_change="onchange_rate(payment_rate, amount, currency_id, payment_rate_currency_id, company_id, context)" colspan="3"/>
<field name="payment_rate_currency_id" colspan="1" nolabel="1" on_change="onchange_payment_rate_currency(currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context)" groups="base.group_multi_currency"/>
<field name="paid_amount_in_company_currency" colspan="4" invisible="1"/>
</group>
<group>
<field name="writeoff_amount"/>
<field name="payment_option" required="1"/>
<field name="writeoff_acc_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"
domain="[('type','=','other')]"/>
<field name="comment"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="analytic_id"
groups="analytic.group_analytic_accounting"/>
</group>
</group>
</page>
</notebook>
<footer>
<button name="button_proforma_voucher" string="Pay" class="oe_highlight" type="object"/> or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_vendor_receipt_form">
<field name="name">account.voucher.receipt.form</field>
<field name="model">account.voucher</field>
@ -297,7 +402,7 @@
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet>
<h1><field name="number"/></h1>
<h1 attrs="{'invisible': [('number','=',False)]}"><field name="number"/></h1>
<group>
<group>
<field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
@ -329,7 +434,6 @@
<field name="type" invisible="True"/>
</group>
</group>
<notebook>
<page string="Payment Information" groups="base.group_user">
<label for="line_cr_ids"/>

View File

@ -43,6 +43,5 @@ that have no counterpart in the general financial accounts.
'demo': [],
'installable': True,
'auto_install': False,
'certificate' : '00462253285027988541',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -45,6 +45,5 @@ compatible with older configurations.
'demo': [],
'installable': True,
'auto_install': False,
'certificate': '0082277138269',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -48,7 +48,6 @@ anonymization process to recover your previous data.
],
'installable': True,
'auto_install': False,
'certificate': '00719010980872226045',
'images': ['images/anonymization1.jpeg','images/anonymization2.jpeg','images/anonymization3.jpeg'],
}

View File

@ -37,7 +37,6 @@ membership products (schemes).
'demo': [],
'installable': True,
'auto_install': False,
'certificate': '0078696047261',
'images': ['images/association1.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -42,7 +42,6 @@ and can check logs.
'demo': ['audittrail_demo.xml'],
'installable': True,
'auto_install': False,
'certificate': '0062572348749',
'images': ['images/audittrail1.jpeg','images/audittrail2.jpeg','images/audittrail3.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -107,7 +107,6 @@ authentication if installed at the same time.
],
'auto_install': False,
'installable': True,
'certificate' : '001141446349334700221',
'external_dependencies' : {
'python' : ['ldap'],
}

View File

@ -44,7 +44,6 @@ trigger an automatic reminder email.
'demo': [],
'installable': True,
'auto_install': False,
'certificate' : '001017908446466333429',
'images': ['images/base_action_rule1.jpeg','images/base_action_rule2.jpeg','images/base_action_rule3.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,6 +21,5 @@
import base_calendar
import crm_meeting
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,7 +23,7 @@
'name': 'Calendar',
'version': '1.0',
'depends': ['base', 'base_status', 'mail', 'base_action_rule'],
'summary': 'Personnal & Shared Agenda',
'summary': 'Personal & Shared Calendar',
'description': """
This is a full-featured calendar system.
========================================
@ -32,7 +32,6 @@ It supports:
------------
- Calendar of events
- Recurring events
- Invitations to people
If you need to manage your meetings, you should install the CRM module.
""",
@ -43,7 +42,6 @@ If you need to manage your meetings, you should install the CRM module.
'data': [
'security/calendar_security.xml',
'security/ir.model.access.csv',
'wizard/base_calendar_invite_attendee_view.xml',
'base_calendar_view.xml',
'crm_meeting_view.xml',
'base_calendar_data.xml',
@ -53,7 +51,6 @@ If you need to manage your meetings, you should install the CRM module.
'installable': True,
'application': True,
'auto_install': False,
'certificate': '00694071962960352821',
'images': ['images/base_calendar1.jpeg','images/base_calendar2.jpeg','images/base_calendar3.jpeg','images/base_calendar4.jpeg',],
}

View File

@ -1058,8 +1058,40 @@ rule or repeating pattern of time to exclude from the recurring rule."),
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it."),
'recurrency': fields.boolean('Recurrent', help="Recurrent Meeting"),
'partner_ids': fields.many2many('res.partner', string='Attendees', states={'done': [('readonly', True)]}),
}
def create_attendees(self, cr, uid, ids, context):
att_obj = self.pool.get('calendar.attendee')
user_obj = self.pool.get('res.users')
current_user = user_obj.browse(cr, uid, uid, context=context)
for event in self.browse(cr, uid, ids, context):
attendees = {}
for att in event.attendee_ids:
attendees[att.partner_id.id] = True
new_attendees = []
mail_to = []
for partner in event.partner_ids:
if partner.id in attendees:
continue
att_id = self.pool.get('calendar.attendee').create(cr, uid, {
'partner_id': partner.id,
'user_id': partner.user_ids and partner.user_ids[0].id or False,
'ref': self._name+','+str(event.id),
'email': partner.email
}, context=context)
if partner.email:
mail_to.append(partner.email)
self.write(cr, uid, [event.id], {
'attendee_ids': [(4, att_id)]
}, context=context)
new_attendees.append(att_id)
if mail_to and current_user.email:
att_obj._send_mail(cr, uid, new_attendees, mail_to,
email_from = current_user.email)
return True
def default_organizer(self, cr, uid, context=None):
user_pool = self.pool.get('res.users')
user = user_pool.browse(cr, uid, uid, context=context)
@ -1366,6 +1398,8 @@ rule or repeating pattern of time to exclude from the recurring rule."),
vals['vtimezone'] = vals['vtimezone'][40:]
res = super(calendar_event, self).write(cr, uid, ids, vals, context=context)
if vals.get('partner_ids', False):
self.create_attendees(cr, uid, ids, context)
if ('alarm_id' in vals or 'base_calendar_alarm_id' in vals)\
or ('date' in vals or 'duration' in vals or 'date_deadline' in vals):
@ -1489,17 +1523,10 @@ rule or repeating pattern of time to exclude from the recurring rule."),
if vals.get('vtimezone', '') and vals.get('vtimezone', '').startswith('/freeassociation.sourceforge.net/tzfile/'):
vals['vtimezone'] = vals['vtimezone'][40:]
#updated_vals = self.onchange_dates(cr, uid, [],
# vals.get('date', False),
# vals.get('duration', False),
# vals.get('date_deadline', False),
# vals.get('allday', False),
# context=context)
#vals.update(updated_vals.get('value', {}))
res = super(calendar_event, self).create(cr, uid, vals, context)
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
self.create_attendees(cr, uid, [res], context)
return res
def do_tentative(self, cr, uid, ids, context=None, *args):

View File

@ -11,7 +11,6 @@
<header>
<button name="do_tentative" states="needs-action,declined,accepted" string="Uncertain" type="object" class="oe_highlight"/>
<button name="do_accept" string="Accept" states="needs-action,tentative,declined" type="object" class="oe_highlight"/>
<button name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d" string="Delegate" type="action" states="needs-action,tentative,declined,accepted" context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}"/>
<button name="do_decline" string="Decline" states="needs-action,tentative,accepted" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar"
statusbar_visible="tentative,needs-action,accepted" statusbar_colors='{"proforma":"blue"}'/>
@ -226,10 +225,6 @@
<field name="description"/>
</page>
<page string="Invitation Detail">
<button string="Invite People"
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
icon="terp-partner" type="action"
context="{'model' : 'calendar.event', 'attendee_field':'attendee_ids'}" colspan="2"/>
<field name="attendee_ids" colspan="4"
nolabel="1" widget="one2many" mode="tree">
<tree string="Invitation details" editable="top">
@ -248,12 +243,6 @@
<button name="do_decline" string="Decline"
states="needs-action,tentative,accepted"
type="object" icon="gtk-cancel"/>
<button
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
string="Delegate" type="action"
icon="gtk-sort-descending"
states="needs-action,tentative,declined,accepted"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}"/>
</tree>
<form string="Invitation details" version="7.0">
<notebook colspan="4">
@ -281,13 +270,6 @@
states="needs-action,tentative,accepted"
type="object"
icon="gtk-cancel"/>
<button
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
string="Delegate"
type="action"
icon="gtk-sort-descending"
states="needs-action,tentative,declined,accepted"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}"/>
</group>
</page>
</notebook>

View File

@ -71,6 +71,34 @@ class crm_meeting(base_state, osv.Model):
default['attendee_ids'] = False
return super(crm_meeting, self).copy(cr, uid, id, default, context)
def onchange_partner_ids(self, cr, uid, ids, value, context=None):
""" The basic purpose of this method is to check that destination partners
effectively have email addresses. Otherwise a warning is thrown.
:param value: value format: [[6, 0, [3, 4]]]
"""
res = {'value': {}}
if not value or not value[0] or not value[0][0] == 6:
return
res.update(self.check_partners_email(cr, uid, value[0][2], context=context))
return res
def check_partners_email(self, cr, uid, partner_ids, context=None):
""" Verify that selected partner_ids have an email_address defined.
Otherwise throw a warning. """
partner_wo_email_lst = []
for partner in self.pool.get('res.partner').browse(cr, uid, partner_ids, context=context):
if not partner.email:
partner_wo_email_lst.append(partner)
if not partner_wo_email_lst:
return {}
warning_msg = _('The following contacts have no email address :')
for partner in partner_wo_email_lst:
warning_msg += '\n- %s' % (partner.name)
return {'warning': {
'title': _('Email addresses not found'),
'message': warning_msg,
}
}
# ----------------------------------------
# OpenChatter
# ----------------------------------------
@ -80,7 +108,7 @@ class crm_meeting(base_state, osv.Model):
return [('date','<=',time.strftime('%Y-%M-%D 23:59:59')), ('date_deadline','>=', time.strftime('%Y-%M-%D 00:00:00')), ('user_id','=',uid)]
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
return 'Meeting'
return _('Meeting')
def case_open_send_note(self, cr, uid, ids, context=None):
return self.message_post(cr, uid, ids, body=_("Meeting <b>confirmed</b>."), context=context)

View File

@ -80,7 +80,9 @@
</h1>
<label for="partner_ids" class="oe_edit_only"/>
<h2>
<field name="partner_ids" widget="many2many_tags"/>
<field name="partner_ids" widget="many2many_tags"
context="{'force_email':True}"
on_change="onchange_partner_ids(partner_ids)"/>
</h2>
</div>
<notebook>
@ -88,11 +90,12 @@
<group>
<group>
<field name="date" string="Starting at"/>
<label for="duration" attrs="{'invisible': [('allday','=',True)]}"/>
<div attrs="{'invisible': [('allday','=',True)]}">
<label for="duration"/>
<div>
<field name="duration" widget="float_time"
on_change="onchange_dates(date,duration,False,allday)"
class="oe_inline"/> hours
class="oe_inline" attrs="{'invisible': [('allday','=',True)]}"/>
<label string="hours" attrs="{'invisible': [('allday','=',True)]}"/>
(<field name="allday" on_change="onchange_dates(date,False,False,allday)" class="oe_inline"/>
<label for="allday" string="All Day?"/>)
</div>
@ -165,18 +168,16 @@
</group>
</group>
</page>
<page string="Invitation Detail">
<button string="Invite People"
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
type="action"
attrs="{'readonly': [('state', '=', 'done')]}"
context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/>
<!--
Temporarily removing invitation feature as the implementation
was not clean. Invitation should be trigerred automatically
based on partner_ids.
-->
<page string="Invitations">
<field name="attendee_ids" widget="one2many" mode="tree">
<tree string="Invitation details" editable="top">
<field name="sent_by_uid" string="From"/>
<field name="user_id" string="To"/>
<field name="partner_id"/>
<field name="email" string="Mail To"/>
<field name="role" />
<field name="state" />
<button name="do_tentative"
states="needs-action,declined,accepted"
@ -188,11 +189,6 @@
<button name="do_decline" string="Decline"
states="needs-action,tentative,accepted"
type="object" />
<button
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
string="Delegate" type="action"
states="needs-action,tentative,declined,accepted"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
</tree>
<form string="Invitation details" version="7.0">
<header>
@ -205,10 +201,6 @@
<button name="do_decline" type="object"
states="needs-action,tentative,accepted"
string="Decline" />
<button name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d" type="action"
states="needs-action,tentative,declined,accepted"
string="Delegate"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
<field name="state" widget="statusbar" statusbar_visible="draft,open,done"/>
</header>
<group>
@ -219,6 +211,7 @@
<field name="role" />
</group>
<group>
<field name="partner_id"/>
<field name="user_id"/>
</group>
</group>
@ -307,7 +300,7 @@
<p class="oe_view_nocontent_create">
Click to schedule a new meeting.
</p><p>
The agenda is shared between employees and fully integrated with
The calendar is shared between employees and fully integrated with
other applications such as the employee holidays or the business
opportunities.
</p>
@ -339,10 +332,10 @@
</record>
<menuitem id="menu_crm_meeting" parent="base.menu_sales" sequence="8"
name="Agenda" action="action_crm_meeting"/>
name="Calendar" action="action_crm_meeting"/>
<menuitem name="Agenda"
id="mail_menu_agenda" parent="mail.mail_my_stuff"
<menuitem name="Calendar"
id="mail_menu_calendar" parent="mail.mail_my_stuff"
sequence="10" action="action_crm_meeting"/>
</data>

View File

@ -54,24 +54,3 @@
-
!python {model: calendar.event}: |
self.write(cr, uid, [ref("calendar_event_alldaytestevent0")], {'alarm_id': ref("res_alarm_daybeforeeventstarts0")})
-
In order to assign attendee I will invite Demo user
-
!record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}:
type: internal
send_mail: False
partner_id: base.res_partner_9 # Put bcz of problem in read
user_ids:
- base.user_demo
-
Then I click on Invite Button
-
!python {model: base_calendar.invite.attendee}: |
self.do_invite(cr, uid, [ref("base_calendar_invite_attendee_0")], {'active_id': ref("calendar_event_alldaytestevent0"), 'model' : 'calendar.event', 'attendee_field':'attendee_ids'})
-
Now I will Accept this invitation
-
!python {model: calendar.attendee}: |
ids = self.search(cr, uid, [('ref', '=', 'calendar.event' + ',' + str(ref("calendar_event_alldaytestevent0")))])
if ids:
self.do_accept(cr, uid, ids, context=context)

View File

@ -1,170 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from .. import base_calendar
from osv import fields, osv
from tools.translate import _
import tools
class base_calendar_invite_attendee(osv.osv_memory):
"""
Invite attendee.
"""
_name = "base_calendar.invite.attendee"
_description = "Invite Attendees"
_columns = {
'type': fields.selection([('internal', 'Internal User'), \
('external', 'External Email'), \
('partner', 'Partner Contacts')], 'Type', required=True, help="Select whom you want to Invite"),
'user_ids': fields.many2many('res.users', 'invite_user_rel',
'invite_id', 'user_id', 'Users'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'email': fields.char('Email', size=124, help="Provide external email address who will receive this invitation."),
'contact_ids': fields.many2many('res.partner', 'invite_contact_rel',
'invite_id', 'contact_id', 'Contacts'),
'send_mail': fields.boolean('Send mail?', help='Check this if you want to \
send an Email to Invited Person')
}
_defaults = {
'type': 'internal',
'send_mail': True
}
def do_invite(self, cr, uid, ids, context=None):
"""
Invites attendee for meeting..
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of base calendar invite attendees IDs.
@param context: A standard dictionary for contextual values
@return: Dictionary of {}.
"""
if context is None:
context = {}
model = False
context_id = context and context.get('active_id', False) or False
if not context or not context.get('model'):
return {'type': 'ir.actions.act_window_close'}
else:
model = context.get('model')
model_field = context.get('attendee_field', False)
obj = self.pool.get(model)
res_obj = obj.browse(cr, uid, context_id, context=context)
att_obj = self.pool.get('calendar.attendee')
user_obj = self.pool.get('res.users')
current_user = user_obj.browse(cr, uid, uid, context=context)
for datas in self.read(cr, uid, ids, context=context):
type = datas.get('type')
vals = []
mail_to = []
attendees = []
ref = {}
if not model == 'calendar.attendee':
if context_id:
ref = {'ref': '%s,%s' % (model, base_calendar.base_calendar_id2real_id(context_id))}
else:
return {'type': 'ir.actions.act_window_close'}
if type == 'internal':
if not datas.get('user_ids'):
raise osv.except_osv(_('Error!'), ("Please select any user."))
for user_id in datas.get('user_ids'):
user = user_obj.browse(cr, uid, user_id)
res = {
'user_id': user_id,
'email': user.email
}
res.update(ref)
vals.append(res)
if user.email:
mail_to.append(user.email)
elif type == 'external' and datas.get('email'):
res = {'email': datas['email']}
res.update(ref)
vals.append(res)
mail_to.append(datas['email'])
elif type == 'partner':
add_obj = self.pool.get('res.partner')
for contact in add_obj.browse(cr, uid, datas['contact_ids']):
res = {
'partner_id': contact.id,
'email': contact.email
}
res.update(ref)
vals.append(res)
if contact.email:
mail_to.append(contact.email)
for att_val in vals:
if model == 'calendar.attendee':
att = att_obj.browse(cr, uid, context_id)
att_val.update({
'parent_ids': [(4, att.id)],
'ref': att.ref and (att.ref._name + ',' +str(att.ref.id)) or False
})
attendees.append(att_obj.create(cr, uid, att_val))
if model_field:
for attendee in attendees:
obj.write(cr, uid, res_obj.id, {model_field: [(4, attendee)]})
if datas.get('send_mail'):
if not mail_to:
name = map(lambda x: x[1], filter(lambda x: type==x[0], \
self._columns['type'].selection))
raise osv.except_osv(_('Error!'), _("%s must have an email address to send mail.") %(name[0]))
att_obj._send_mail(cr, uid, attendees, mail_to, \
email_from = current_user.email or tools.config.get('email_from', False))
return {'type': 'ir.actions.act_window_close'}
def onchange_partner_id(self, cr, uid, ids, partner_id, *args, **argv):
"""
Make entry on contact_ids on change of partner_id field.
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of base calendar invite attendees IDs.
@param partner_id: id of Partner
@return: dictionary of value.
"""
if not partner_id:
return {'value': {'contact_ids': []}}
cr.execute('SELECT id FROM res_partner \
WHERE id=%s or parent_id =%s' , (partner_id,partner_id,))
contacts = map(lambda x: x[0], cr.fetchall())
return {'value': {'contact_ids': contacts}}
base_calendar_invite_attendee()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Attendee invite wizard-->
<record id="view_calendar_invite_attendee_wizard"
model="ir.ui.view">
<field name="name">Invite Attendees</field>
<field name="model">base_calendar.invite.attendee</field>
<field name="arch" type="xml">
<form string="Invite People" version="7.0">
<separator string="Invite People" colspan="4"/>
<field name="type"/>
<field name="send_mail"/>
<notebook colspan="4">
<page string="Data">
<group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'external')]}">
<field name="email" colspan="4" attrs="{'required': [('type', '=', 'external')]}"/>
</group>
<group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'internal')]}">
<separator string="Users" colspan="4"/>
<field name="user_ids" colspan="4" nolabel="1" height="180"/>
<newline/>
</group>
<group col="2" colspan="6" attrs="{'invisible': [('type', '!=', 'partner')]}">
<field name="partner_id" colspan="2" on_change="onchange_partner_id(partner_id)" attrs="{'required': [('type', '=', 'partner')]}"/>
<newline/>
<separator string="Partner Contacts" colspan="6"/>
<field name="contact_ids" colspan="4" nolabel="1" domain="[('id', 'child_of', [partner_id])]" attrs="{'readonly': [('type', '!=', 'partner')]}"/>
</group>
</page>
</notebook>
<footer>
<button name="do_invite" string="Invite" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field>
</record>
<!-- Attendee invite action-->
<record id="action_view_calendar_invite_attendee_wizard" model="ir.actions.act_window">
<field name="name">Invite Attendees</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">base_calendar.invite.attendee</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -58,7 +58,6 @@ will disable LDAP authentication completely if installed at the same time.
'data': [],
'auto_install': False,
'installable': True,
'certificate': '00721290471310299725',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -35,7 +35,6 @@ with a single statement.
'data': ['base_iban_data.xml' , 'base_iban_view.xml'],
'installable': True,
'auto_install': False,
'certificate': '0050014379549',
'images': ['images/base_iban1.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -42,7 +42,6 @@ This module generates the Technical Guides of selected modules in Restructured T
],
'demo': [],
'installable': True,
'certificate': '001288481437217734509',
'images': ['images/base_module_doc_rst1.jpeg'],
}

View File

@ -53,7 +53,6 @@ Select datetime criteria of recording and objects to be recorded and Record modu
],
'demo': [],
'installable': True,
'certificate': '0083134865813',
'images': ['images/base_module_record1.jpeg','images/base_module_record2.jpeg','images/base_module_record3.jpeg',]
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -38,7 +38,6 @@ Once you have modified it you can upload the report using the same wizard.
'demo': [],
'installable': True,
'auto_install': False,
'certificate': '0056379010493',
'images': ['images/base_report_designer1.jpeg','images/base_report_designer2.jpeg',],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -43,7 +43,6 @@ Shows you a list of applications features to install from.
'demo': [],
'installable': True,
'auto_install': False,
'certificate': '0086711085869',
'images': ['images/base_setup1.jpeg','images/base_setup2.jpeg','images/base_setup3.jpeg','images/base_setup4.jpeg',],
'js': ['static/src/js/base_setup.js'],
'css': ['static/src/css/base_setup.css'],

View File

@ -13,7 +13,6 @@ Creates menu link for Tools from where tools like survey, lunch, idea are access
""",
'data': ['tools_view.xml'],
'installable': True,
'certificate' : '00571588675379342237'
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -58,7 +58,6 @@ only the country code will be validated.
'data': ['base_vat_view.xml'],
'installable': True,
'auto_install': False,
'certificate': '0084849360989',
'images': ['images/1_partner_vat.jpeg'],
}

View File

@ -42,7 +42,6 @@ Allows users to create custom dashboard.
'qweb': ['static/src/xml/*.xml'],
'installable': True,
'auto_install': False,
'certificate': '0076912305725',
'images': ['images/1_dashboard_definition.jpeg','images/2_publish_note.jpeg','images/3_admin_dashboard.jpeg',],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -69,7 +69,6 @@ To access OpenERP Calendar using WebCal to remote site use the URL like:
],
'installable': True,
'auto_install': False,
'certificate': '00924841426645403741',
'images': ['images/calendar_collections.jpeg','images/calendars.jpeg','images/export_ics_file.jpeg'],
}

View File

@ -35,7 +35,6 @@ Adds a Claim link to the delivery order.
'claim_delivery_data.xml',],
'auto_install': False,
'installable': True,
'certificate' : '001101649349223746957',
'images': ['images/1_claim_link_delivery_order.jpeg'],
}

View File

@ -122,7 +122,6 @@ Dashboard for CRM will include:
'installable': True,
'application': True,
'auto_install': False,
'certificate': '0079056041421',
'images': ['images/sale_crm_crm_dashboard.png', 'images/crm_dashboard.jpeg','images/leads.jpeg','images/meetings.jpeg','images/opportunities.jpeg','images/outbound_calls.jpeg','images/stages.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -102,6 +102,7 @@ class crm_case_section(osv.osv):
""" Model for sales teams. """
_name = "crm.case.section"
_inherits = {'mail.alias': 'alias_id'}
_inherit = "mail.thread"
_description = "Sales Teams"
_order = "complete_name"

View File

@ -277,6 +277,10 @@ class crm_lead(base_stage, format_address, osv.osv):
def create(self, cr, uid, vals, context=None):
obj_id = super(crm_lead, self).create(cr, uid, vals, context)
section_id = self.browse(cr, uid, obj_id, context=context).section_id
if section_id:
followers = [follow.id for follow in section_id.message_follower_ids]
self.message_subscribe(cr, uid, [obj_id], followers, context=context)
self.create_send_note(cr, uid, [obj_id], context=context)
return obj_id
@ -790,7 +794,12 @@ class crm_lead(base_stage, format_address, osv.osv):
stage = self.pool.get('crm.case.stage').browse(cr, uid, vals['stage_id'], context=context)
if stage.on_change:
vals['probability'] = stage.probability
return super(crm_lead,self).write(cr, uid, ids, vals, context)
if vals.get('section_id'):
section_id = self.pool.get('crm.case.section').browse(cr, uid, vals.get('section_id'), context=context)
if section_id:
vals.setdefault('message_follower_ids', [])
vals['message_follower_ids'] += [(4, follower.id) for follower in section_id.message_follower_ids]
return super(crm_lead,self).write(cr, uid, ids, vals, context)
# ----------------------------------------
# Mail Gateway

View File

@ -115,6 +115,10 @@
<field name="note"/>
</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."/>
</div>
</form>
</field>
</record>

View File

@ -42,7 +42,6 @@ Caldav features in Meeting.
'demo': [],
'installable': True,
'auto_install': False,
'certificate' : '001088048737252670109',
'images': ['images/caldav_browse_step1.jpeg','images/caldav_browse_step2.jpeg'],
}

View File

@ -48,7 +48,6 @@ automatically new claims based on incoming emails.
],
'installable': True,
'auto_install': False,
'certificate' : '00612027414703404749',
'images': ['images/claim_categories.jpeg','images/claim_stages.jpeg','images/claims.jpeg'],
}

View File

@ -47,7 +47,6 @@ and categorize your interventions with a channel and a priority level.
'test': ['test/process/help-desk.yml'],
'installable': True,
'auto_install': False,
'certificate' : '00830691522781519309',
'images': ['images/helpdesk_analysis.jpeg','images/helpdesk_categories.jpeg','images/helpdesk_requests.jpeg'],
}

View File

@ -50,7 +50,6 @@ You can also use the geolocalization without using the GPS coordinates.
'test': ['test/partner_assign.yml'],
'installable': True,
'auto_install': False,
'certificate': '00503409558942442061',
'images': ['images/partner_geo_localization.jpeg','images/partner_grade.jpeg'],
}

View File

@ -47,7 +47,6 @@ were overlapping.
],
'installable': True,
'auto_install': False,
'certificate': '0033984979005',
'images': ['images/profiling_questionnaires.jpeg','images/profiling_questions.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -37,7 +37,6 @@ The decimal precision is configured per company.
],
'demo': [],
'installable': True,
'certificate' : '001307317809612974621',
'images': ['images/1_decimal_accuracy_form.jpeg','images/1_decimal_accuracy_list.jpeg'],
}

View File

@ -44,7 +44,6 @@ invoices from picking, OpenERP is able to add and compute the shipping line.
'test': ['test/delivery_cost.yml'],
'installable': True,
'auto_install': False,
'certificate': '0033981912253',
'images': ['images/1_delivery_method.jpeg','images/2_delivery_pricelist.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -57,9 +57,9 @@ ATTENTION:
],
'demo': [ 'document_demo.xml','board_document_demo.xml'],
'test': ['test/document_test2.yml'],
'js': ['static/src/js/document.js'],
'installable': True,
'auto_install': False,
'certificate': '0070515416461',
'images': ['images/1_directories.jpeg','images/2_storage_media.jpeg','images/3_directories_structure.jpeg'],
}

View File

@ -0,0 +1,10 @@
openerp.document = function (instance) {
_t = instance.web._t;
instance.web.Sidebar.include({
init : function(){
this._super.apply(this, arguments);
this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), });
this.items['files'] = [];
}
});
};

View File

@ -48,7 +48,6 @@ FTP client.
],
'installable': True,
'auto_install': False,
'certificate': '00934787762705016005',
'images': ['images/1_configure_ftp.jpeg','images/2_document_browse.jpeg','images/3_document_ftp.jpeg'],
'post_load': 'post_load',
}

View File

@ -42,7 +42,6 @@ Web pages
'test': ['test/document_page_test00.yml'],
'installable': True,
'auto_install': False,
'certificate': '0086363630317',
'images': [],
'css' : ['static/src/css/document_page.css'],
}

View File

@ -70,7 +70,6 @@ which needs explicit configuration in openerp-server.conf too.
],
'auto_install': False,
'installable': True,
'certificate' : '001236490750845657973',
'images': ['images/dav_properties.jpeg','images/directories_structure_principals.jpeg'],
}

View File

@ -43,7 +43,6 @@ documentation at http://doc.openerp.com.
'qweb': ['static/src/xml/*.xml'],
'installable': True,
'auto_install': False,
'certificate': '002046536359186',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -65,7 +65,6 @@ campaigns on any OpenERP document.
'demo': ['res_partner_demo.yml'],
'installable': True,
'auto_install': False,
'certificate' : '00817073628967384349',
'images': ['images/1_email_account.jpeg','images/2_email_template.jpeg','images/3_emails.jpeg'],
}

View File

@ -1,15 +1,14 @@
<?xml version="1.0"?>
<openerp>
<data>
<act_window
id="act_event_list_register_event"
name="Registration"
res_model="event.registration"
src_model="event.event"
view_mode="calendar,tree,form,graph"
context="{'search_default_event_id': active_id, 'default_event_id': active_id}"
view_type="form"/>
<record id="act_event_list_register_event" model="ir.actions.act_window">
<field name="res_model">event.registration</field>
<field name="view_type">form</field>
<field name="name">Registrations</field>
<field name="view_mode">calendar,tree,form,graph</field>
<field name="context">{'search_default_event_id': active_id, 'default_event_id': active_id}</field>
</record>
<!-- Top menu item -->
<menuitem name="Events"

View File

@ -3,7 +3,7 @@
<data>
<record model="ir.module.category" id="module_category_event_management">
<field name="name">Event</field>
<field name="name">Events</field>
<field name="description">Helps you manage your Events.</field>
<field name="sequence">3</field>
</record>

View File

@ -36,7 +36,6 @@ This module allows you to create retro planning for managing your events.
'demo': [],
'installable': True,
'auto_install': False,
'certificate': '0069726863885',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -6,7 +6,7 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
<field name="purchase_ok" position="after">
<field name="purchase_ok" position="before">
<field name="event_ok" on_change="onchange_event_ok(event_ok, context)"/>
<label for="event_ok"/>
</field>

View File

@ -64,7 +64,6 @@ For more specific needs, you may also assign custom-defined actions
'demo': [],
'installable': True,
'auto_install': False,
'certificate' : '00692978332890137453',
'images': ['images/1_email_servers.jpeg'],
}

View File

@ -0,0 +1,123 @@
# Russian translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-09-26 14:25+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-27 04:36+0000\n"
"X-Generator: Launchpad (build 16033)\n"
#. module: google_base_account
#: field:res.users,gmail_user:0
msgid "Username"
msgstr "Имя пользователя"
#. module: google_base_account
#: model:ir.actions.act_window,name:google_base_account.act_google_login_form
msgid "Google Login"
msgstr "Логин Google"
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:29
#, python-format
msgid "Google Contacts Import Error!"
msgstr "Ошибка импорта контактов Google!"
#. module: google_base_account
#: view:res.users:0
msgid " Synchronization "
msgstr " Синхронизация "
#. module: google_base_account
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr "Вы не можете создать двух пользователей с одним логином!"
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:75
#, python-format
msgid "Error"
msgstr "Ошибка"
#. module: google_base_account
#: view:google.login:0
msgid "Google login"
msgstr "Логин Google"
#. module: google_base_account
#: model:ir.model,name:google_base_account.model_res_users
msgid "res.users"
msgstr "res.users"
#. module: google_base_account
#: field:google.login,password:0
msgid "Google Password"
msgstr "Пароль Google"
#. module: google_base_account
#: view:google.login:0
msgid "_Cancel"
msgstr "_Отмена"
#. module: google_base_account
#: view:res.users:0
msgid "Google Account"
msgstr "Аккаунт Google"
#. module: google_base_account
#: field:google.login,user:0
msgid "Google Username"
msgstr "Имя пользователя Google"
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:29
#, python-format
msgid ""
"Please install gdata-python-client from http://code.google.com/p/gdata-"
"python-client/downloads/list"
msgstr ""
"Установите, пожалуйста, gdata-python-client с http://code.google.com/p/gdata-"
"python-client/downloads/list"
#. module: google_base_account
#: model:ir.model,name:google_base_account.model_google_login
msgid "Google Contact"
msgstr "Контакт Google"
#. module: google_base_account
#: view:google.login:0
msgid "_Login"
msgstr "_Логин"
#. module: google_base_account
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
"Выбранная компания отсутствует в списке разрешённых компаний для этого "
"пользователя"
#. module: google_base_account
#: field:res.users,gmail_password:0
msgid "Password"
msgstr "Пароль"
#. module: google_base_account
#: code:addons/google_base_account/wizard/google_login.py:75
#, python-format
msgid "Authentication fail check the user and password !"
msgstr "Ошибка авторизации, проверьте имя пользователя и пароля!"
#. module: google_base_account
#: view:google.login:0
msgid "ex: user@gmail.com"
msgstr "пример: user@gmail.com"

View File

@ -134,8 +134,8 @@ class config(osv.osv):
_description = "Google Docs templates config"
_columns = {
'model_id': fields.many2one('ir.model', 'Model'),
'gdocs_resource_id': fields.char('Google resource ID', size=64,help='''
'model_id': fields.many2one('ir.model', 'Model', required=True),
'gdocs_resource_id': fields.char('Google Resource ID to Use as Template', size=64,help='''
This is the id of the template document, on google side. You can find it thanks to its URL:
*for a text document with url like `https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is `document:123456789`
*for a spreadsheet document with url like `https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, the ID is `spreadsheet:123456789`
@ -143,7 +143,7 @@ This is the id of the template document, on google side. You can find it thanks
*for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789`
...
'''),
'name_template': fields.char('GDoc name template ', size=64, help='This is the name which appears on google side'),
'name_template': fields.char('Google Doc Name Pattern', size=64, help='Choose how the new google docs will be named, on google side'),
}
_defaults = {

View File

@ -13,7 +13,7 @@ var _t = instance.web._t;
});
if (! flag) {
this.add_items('files', [
{ label: _t('Google Doc'), callback: self.on_google_doc },
{ label: _t('Add Google Doc...'), callback: self.on_google_doc },
]);
}
},

View File

@ -40,6 +40,5 @@ Using this you can directly open Google Map from the URL widget.""",
'js': ['static/src/js/google_map.js'],
'installable': True,
'auto_install': False,
'certificate': '0029498930765',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -68,7 +68,6 @@ You can manage:
'installable': True,
'application': True,
'auto_install': False,
'certificate': '0086710558965',
'css': [ 'static/src/css/hr.css' ],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -350,10 +350,8 @@
<field name="arch" type="xml">
<form string="Job" version="7.0">
<header>
<span groups="base.group_user">
<button name="job_recruitement" string="In Recruitement" states="open" type="object" class="oe_highlight"/>
<button name="job_open" string="Recruitment Done" states="recruit" type="object" class="oe_highlight"/>
</span>
<button name="job_recruitement" string="In Recruitement" states="open" type="object" class="oe_highlight" groups="base.group_user"/>
<button name="job_open" string="Recruitment Done" states="recruit" type="object" class="oe_highlight" groups="base.group_user"/>
<field name="state" widget="statusbar" statusbar_visible="recruit,open"/>
</header>
<sheet>

View File

@ -69,7 +69,7 @@
<field name="module_hr_timesheet_sheet" class="oe_inline"/>
<label for="module_hr_timesheet_sheet"/>
</div>
<div>
<div name="hr_attendance">
<field name="module_hr_attendance" on_change="onchange_hr_attendance(module_hr_attendance)" class="oe_inline"/>
<label for="module_hr_attendance"/>
</div>

View File

@ -22,5 +22,6 @@
import hr_attendance
import wizard
import report
import res_config
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -35,14 +35,14 @@ actions(Sign in/Sign out) performed by them.
'images': ['images/hr_attendances.jpeg'],
'depends': ['hr'],
'data': [
'security/ir_rule.xml',
'security/ir.model.access.csv',
'hr_attendance_view.xml',
'hr_attendance_report.xml',
'security/ir.model.access.csv',
'security/ir_rule.xml',
'wizard/hr_attendance_bymonth_view.xml',
'wizard/hr_attendance_byweek_view.xml',
'wizard/hr_attendance_error_view.xml',
'res_config_view.xml',
],
'demo': ['hr_attendance_demo.xml'],
'test': [
@ -51,7 +51,6 @@ actions(Sign in/Sign out) performed by them.
],
'installable': True,
'auto_install': False,
'certificate': '0063495605613',
#web
"js": ["static/src/js/attendance.js"],

View File

@ -126,9 +126,18 @@ class hr_employee(osv.osv):
result[id] = res[0]
return result
def _attendance_access(self, cr, uid, ids, name, args, context=None):
# this function field use to hide attendance button to singin/singout from menu
group = self.pool.get('ir.model.data').get_object(cr, uid, 'base', 'group_hr_attendance')
visible = False
if uid in [user.id for user in group.users]:
visible = True
return dict([(x, visible) for x in ids])
_columns = {
'state': fields.function(_state, type='selection', selection=[('absent', 'Absent'), ('present', 'Present')], string='Attendance'),
'last_sign': fields.function(_last_sign, type='datetime', string='Last Sign'),
'attendance_access': fields.function(_attendance_access, type='boolean'),
}
def _action_check(self, cr, uid, emp_id, dt=False, context=None):

View File

@ -76,9 +76,9 @@
<menuitem id="menu_hr_time_tracking" name="Time Tracking" parent="hr.menu_hr_root" sequence="5" groups="base.group_user,base.group_hr_user,base.group_hr_manager"/>
<menuitem id="menu_hr_attendance" name="Attendances" parent="hr.menu_hr_root" sequence="10" groups="base.group_user,base.group_hr_user,base.group_hr_manager"/>
<menuitem id="menu_hr_attendance" name="Attendances" parent="hr.menu_hr_root" sequence="10" groups="base.group_hr_attendance"/>
<menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_attendance" sequence="20"/>
<menuitem action="open_view_attendance" id="menu_open_view_attendance" parent="menu_hr_attendance" sequence="20" groups="base.group_hr_attendance"/>
<record id="edit_attendance_reason" model="ir.ui.view">
<field name="name">hr.action.reason.form</field>
@ -114,9 +114,8 @@
</record>
<menuitem
sequence="35" id="hr.menu_open_view_attendance_reason_new_config" parent="hr.menu_hr_configuration" name="Attendance"
groups="base.group_no_one"/>
<menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_new_config" groups="base.group_no_one"/>
sequence="35" id="hr.menu_open_view_attendance_reason_new_config" parent="hr.menu_hr_configuration" groups="base.group_hr_attendance" name="Attendance"/>
<menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_new_config" groups="base.group_hr_attendance"/>
<record id="hr_attendance_employee" model="ir.ui.view">
<field name="name">hr.employee.form1</field>
@ -124,8 +123,8 @@
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="active" position="before">
<label for="state"/>
<div>
<label for="state" groups="base.group_hr_attendance"/>
<div groups="base.group_hr_attendance">
<field name="state" class="oe_inline"/> -
<button class="oe_link" name="attendance_action_change" states="present" string="Sign Out" type="object" context="{'type':'sign_out'}" groups="base.group_hr_user"/>
<button class="oe_link" name="attendance_action_change" states="absent" string="Sign In" type="object" context="{'type':'sign_in'}" groups="base.group_hr_user"/>

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://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,7 +19,15 @@
#
##############################################################################
import base_calendar_invite_attendee
from osv import fields, osv
class hr_attendance_config_settings(osv.osv_memory):
_inherit = 'hr.config.settings'
_columns = {
'group_hr_attendance': fields.boolean('Track attendances',
implied_group='base.group_hr_attendance',
help="Allocates attendance group to all users."),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="hr_attendace_group" model="ir.ui.view">
<field name="name">hr.config.settings.inherit</field>
<field name="model">hr.config.settings</field>
<field name="inherit_id" ref="hr.view_human_resources_configuration"/>
<field name="arch" type="xml">
<data>
<xpath expr="//div[@name='hr_attendance']" position="after">
<div>
<field name="group_hr_attendance" class="oe_inline"/>
<label for="group_hr_attendance"/>
</div>
</xpath>
</data>
</field>
</record>
</data>
</openerp>

View File

@ -2,6 +2,11 @@
<openerp>
<data noupdate="True">
<record id="base.group_hr_attendance" model="res.groups">
<field name="name">Attendances</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="property_rule_attendace_manager" model="ir.rule">
<field name="name">Manager Attendance</field>
<field model="ir.model" name="model_id" ref="model_hr_attendance"/>

View File

@ -57,9 +57,12 @@ openerp.hr_attendance = function (instance) {
var employee = new instance.web.DataSetSearch(self, 'hr.employee', self.session.user_context, [
['user_id', '=', self.session.uid]
]);
return employee.read_slice(['id', 'name', 'state', 'last_sign']).pipe(function (res) {
if (_.isEmpty(res))
return employee.read_slice(['id', 'name', 'state', 'last_sign', 'attendance_access']).pipe(function (res) {
if (_.isEmpty(res) )
return;
if (res[0].attendance_access == false){
return;
}
self.$el.show();
self.employee = res[0];
self.last_sign = instance.web.str_to_datetime(self.employee.last_sign);

View File

@ -48,6 +48,5 @@ You can assign several contracts per employee.
'test': ['test/test_hr_contract.yml'],
'installable': True,
'auto_install': False,
'certificate': '0046298028637',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -5,13 +5,13 @@
<!-- Contracts Button on Employee Form -->
<act_window
context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
id="act_hr_employee_2_hr_contract"
name="Contracts"
res_model="hr.contract"
src_model="hr.employee"
groups="base.group_hr_manager"/>
<record id="act_hr_employee_2_hr_contract" model="ir.actions.act_window">
<field name="res_model">hr.contract</field>
<field name="view_type">form</field>
<field name="name">Contracts</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_employee_id': [active_id], 'default_employee_id': active_id}</field>
</record>
<menuitem id="next_id_56" name="Contract" parent="hr.menu_hr_configuration" sequence="30" groups="base.group_no_one"/>
<record id="hr_hr_employee_view_form2" model="ir.ui.view">

View File

@ -62,7 +62,6 @@ Key Features
],
'auto_install': False,
'installable': True,
'certificate' : '00883207679172998429',
'application': True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -141,6 +141,7 @@ hr_employee()
class hr_evaluation(osv.osv):
_name = "hr_evaluation.evaluation"
_inherit = "mail.thread"
_description = "Employee Appraisal"
_rec_name = 'employee_id'
_columns = {
@ -242,8 +243,10 @@ class hr_evaluation(osv.osv):
def button_final_validation(self, cr, uid, ids, context=None):
request_obj = self.pool.get('hr.evaluation.interview')
self.write(cr, uid, ids, {'state':'progress'}, context=context)
for id in self.browse(cr, uid, ids, context=context):
if len(id.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', id.id),('state', 'in', ['done','cancel'])], context=context)):
for evaluation in self.browse(cr, uid, ids, context=context):
if evaluation.employee_id and evaluation.employee_id.parent_id and evaluation.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [evaluation.id], user_ids=[evaluation.employee_id.parent_id.user_id.id], context=context)
if len(evaluation.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', evaluation.id),('state', 'in', ['done','cancel'])], context=context)):
raise osv.except_osv(_('Warning!'),_("You cannot change state, because some appraisal(s) are in waiting answer or draft state."))
return True
@ -263,6 +266,10 @@ class hr_evaluation(osv.osv):
return True
def write(self, cr, uid, ids, vals, context=None):
if vals.get('employee_id'):
employee_id = self.pool.get('hr.employee').browse(cr, uid, vals.get('employee_id'), context=context)
if employee_id.parent_id and employee_id.parent_id.user_id:
vals['message_follower_ids'] = [(4, employee_id.parent_id.user_id.partner_id.id)]
if 'date' in vals:
new_vals = {'date_deadline': vals.get('date')}
obj_hr_eval_iterview = self.pool.get('hr.evaluation.interview')

View File

@ -58,6 +58,16 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Appraisal Interviews Action -->
<record id="act_hr_employee_2_hr__evaluation_interview" model="ir.actions.act_window">
<field name="res_model">hr.evaluation.interview</field>
<field name="view_type">form</field>
<field name="name">Interviews</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_user_to_review_id': [active_id], 'default_user_to_review_id': active_id}</field>
</record>
<menuitem name="Appraisal" parent="hr.menu_hr_root" id="menu_eval_hr" sequence="25"/>
<menuitem name="Periodic Appraisal" parent="hr.menu_hr_configuration" id="menu_eval_hr_config" sequence="4"/>
@ -134,6 +144,9 @@
<field name="evaluation_date"/>
</group>
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button name="%(act_hr_employee_2_hr__evaluation_interview)d" string="Appraisal Interviews" type="action"/>
</xpath>
</field>
</record>
@ -196,6 +209,10 @@
<field nolabel="1" name="note_summary" placeholder="Action Plan..."/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
</div>
</form>
</field>
</record>
@ -408,13 +425,5 @@
'default_body_text': 'Hello,\n\nKindly post your response for the survey interview.\n\nThanks',
'default_subject': 'Reminder to fill up Survey'}"/>
<!-- Appraisal Interviews Button on Employee Form -->
<act_window
context="{'search_default_user_to_review_id': [active_id], 'default_user_to_review_id': active_id}"
id="act_hr_employee_2_hr__evaluation_interview"
name="Appraisal Interviews"
res_model="hr.evaluation.interview"
src_model="hr.employee"/>
</data>
</openerp>

View File

@ -67,7 +67,6 @@ This module also uses analytic accounting and is compatible with the invoice on
],
'installable': True,
'auto_install': False,
'certificate': '0062479841789',
'application': True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -118,6 +118,9 @@ class hr_expense_expense(osv.osv):
return {'value': {'department_id': department_id, 'company_id': company_id}}
def expense_confirm(self, cr, uid, ids, *args):
for expense in self.browse(cr, uid, ids):
if expense.employee_id and expense.employee_id.parent_id.user_id:
self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
self.write(cr, uid, ids, {
'state':'confirm',
'date_confirm': time.strftime('%Y-%m-%d')

View File

@ -195,9 +195,10 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="purchase_ok" position="after">
<field name="hr_expense_ok" on_change="on_change_hr_expense_ok(hr_expense_ok)"/>
</field>
<field name="purchase_ok" position="before">
<field name="hr_expense_ok" on_change="on_change_hr_expense_ok(hr_expense_ok)"/>
<label for="hr_expense_ok"/>
</field>
</field>
</record>

View File

@ -66,6 +66,5 @@ A synchronization with an internal agenda (Meetings of the CRM module) is also p
'installable': True,
'application': True,
'auto_install': False,
'certificate': '0086579209325',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -303,7 +303,7 @@ class hr_holidays(osv.osv):
self.check_holidays(cr, uid, ids, context=context)
for record in self.browse(cr, uid, ids, context=context):
if record.employee_id and record.employee_id.parent_id and record.employee_id.parent_id.user_id:
self.message_subscribe(cr, uid, [record.id], user_ids=[record.employee_id.parent_id.user_id.id], context=context)
self.message_subscribe_users(cr, uid, [record.id], user_ids=[record.employee_id.parent_id.user_id.id], context=context)
self.holidays_confirm_notificate(cr, uid, ids, context=context)
return self.write(cr, uid, ids, {'state':'confirm'})

View File

@ -67,7 +67,6 @@ Generic Payroll system.
'demo': ['hr_payroll_demo.xml'],
'installable': True,
'auto_install': False,
'certificate' : '001046261404562128861',
'application': False,
}

View File

@ -369,14 +369,16 @@
<field name="view_id" ref="view_hr_payslip_tree"/>
<field name="search_view_id" ref="view_hr_payslip_filter"/>
</record>
<menuitem action="action_view_hr_payslip_form" id="menu_department_tree" parent="menu_hr_root_payroll" groups="base.group_hr_user"/>
<act_window name="Payslips"
context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
res_model="hr.payslip"
src_model="hr.employee"
view_id ="view_hr_payslip_tree"
id="act_hr_employee_payslip_list"
groups="base.group_hr_manager"/>
<menuitem action="action_view_hr_payslip_form" id="menu_department_tree" parent="menu_hr_root_payroll" groups="base.group_hr_user"/>
<record id="act_hr_employee_payslip_list" model="ir.actions.act_window">
<field name="res_model">hr.payslip</field>
<field name="name">Payslips</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>
</record>
<!-- Employee View -->
<record id="payroll_hr_employee_view_form" model="ir.ui.view">

View File

@ -44,7 +44,6 @@ Generic Payroll system Integrated with Accounting.
'test': ['test/hr_payroll_account.yml'],
'installable': True,
'auto_install': False,
'certificate' : '00923971112835220957',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -64,7 +64,6 @@ You can define the different phases of interviews and easily rate the applicant
'test': ['test/recruitment_process.yml'],
'installable': True,
'auto_install': False,
'certificate': '001073437025460275621',
'application': True,
}

View File

@ -62,6 +62,5 @@ up a management by affair.
],
'installable': True,
'auto_install': False,
'certificate': '0071405533469',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -54,6 +54,5 @@ reports.""",
],
'installable': True,
'auto_install': False,
'certificate': '0056091842381',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Some files were not shown because too many files have changed in this diff Show More