parent
bc35c05961
commit
27c672b1fc
|
@ -377,9 +377,8 @@ class account_asset_depreciation_line(osv.osv):
|
|||
move_line_obj = self.pool.get('account.move.line')
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
created_move_ids = []
|
||||
asset_ids = []
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if currency_obj.is_zero(cr, uid, line.asset_id.currency_id, line.remaining_value):
|
||||
can_close = True
|
||||
depreciation_date = time.strftime('%Y-%m-%d')
|
||||
period_ids = period_obj.find(cr, uid, depreciation_date, context=context)
|
||||
company_currency = line.asset_id.company_id.currency_id.id
|
||||
|
@ -409,8 +408,8 @@ class account_asset_depreciation_line(osv.osv):
|
|||
'period_id': period_ids and period_ids[0] or False,
|
||||
'journal_id': journal_id,
|
||||
'partner_id': partner_id,
|
||||
'currency_id': company_currency <> current_currency and current_currency or False,
|
||||
'amount_currency': company_currency <> current_currency and - sign * line.amount or 0.0,
|
||||
'currency_id': company_currency != current_currency and current_currency or False,
|
||||
'amount_currency': company_currency != current_currency and - sign * line.amount or 0.0,
|
||||
'date': depreciation_date,
|
||||
})
|
||||
move_line_obj.create(cr, uid, {
|
||||
|
@ -423,16 +422,19 @@ class account_asset_depreciation_line(osv.osv):
|
|||
'period_id': period_ids and period_ids[0] or False,
|
||||
'journal_id': journal_id,
|
||||
'partner_id': partner_id,
|
||||
'currency_id': company_currency <> current_currency and current_currency or False,
|
||||
'amount_currency': company_currency <> current_currency and sign * line.amount or 0.0,
|
||||
'currency_id': company_currency != current_currency and current_currency or False,
|
||||
'amount_currency': company_currency != current_currency and sign * line.amount or 0.0,
|
||||
'analytic_account_id': line.asset_id.category_id.account_analytic_id.id,
|
||||
'date': depreciation_date,
|
||||
'asset_id': line.asset_id.id
|
||||
})
|
||||
self.write(cr, uid, line.id, {'move_id': move_id}, context=context)
|
||||
created_move_ids.append(move_id)
|
||||
if can_close:
|
||||
asset_obj.write(cr, uid, [line.asset_id.id], {'state': 'close'}, context=context)
|
||||
asset_ids.append(line.asset_id.id)
|
||||
# we re-evaluate the assets to determine whether we can close them
|
||||
for asset in asset_obj.browse(cr, uid, list(set(asset_ids)), context=context):
|
||||
if currency_obj.is_zero(cr, uid, asset.currency_id, asset.value_residual):
|
||||
asset.write({'state': 'close'})
|
||||
return created_move_ids
|
||||
|
||||
account_asset_depreciation_line()
|
||||
|
|
|
@ -43,7 +43,6 @@ import pooler
|
|||
from tools.translate import _
|
||||
from service import security
|
||||
import logging
|
||||
import pdb
|
||||
|
||||
magic_md5 = '$1$'
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
@ -184,8 +183,7 @@ class users(osv.osv):
|
|||
cr = None
|
||||
try:
|
||||
cr = pooler.get_db(db).cursor()
|
||||
test = self._login(cr, db, login, password)
|
||||
return test
|
||||
return self._login(cr, db, login, password)
|
||||
except Exception:
|
||||
_logger.exception('Cannot authenticate.')
|
||||
return Exception('Access denied.')
|
||||
|
@ -203,23 +201,6 @@ class users(osv.osv):
|
|||
# Return early if no one has a login name like that.
|
||||
return False
|
||||
|
||||
cr.execute('SELECT id FROM ir_module_module WHERE name = \'auth_openid\' and state = \'installed\'')
|
||||
if cr.rowcount:
|
||||
cr.execute( 'SELECT password, id FROM res_users WHERE login=%s AND openid_key = %s AND active',
|
||||
(login.encode('utf-8'),password.encode('utf-8')))
|
||||
if cr.rowcount:
|
||||
# Check if the encrypted password matches against the one in the db.
|
||||
cr.execute("""UPDATE res_users
|
||||
SET login_date=now() AT TIME ZONE 'UTC'
|
||||
WHERE id=%s AND openid_key=%s AND active
|
||||
RETURNING id""",
|
||||
(int(id), password.encode('utf-8')))
|
||||
res = cr.fetchone()
|
||||
cr.commit()
|
||||
|
||||
if res:
|
||||
return res[0]
|
||||
|
||||
stored_pw = self.maybe_encrypt(cr, stored_pw, id)
|
||||
|
||||
if not stored_pw:
|
||||
|
@ -252,6 +233,7 @@ class users(osv.osv):
|
|||
if not passwd:
|
||||
# empty passwords disallowed for obvious security reasons
|
||||
raise security.ExceptionNoTb('AccessDenied')
|
||||
|
||||
# Get a chance to hash all passwords in db before using the uid_cache.
|
||||
obj = pooler.get_pool(db).get('res.users')
|
||||
if not hasattr(obj, "_salt_cache"):
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">CRM application installed!</field>
|
||||
<field name="body"><![CDATA[<p>From the top Sales menu you can track leads and opportunities, get accurate forecast on your sales pipeline, plan meetings and phonecalls, get realtime statistics and efficiently organize the communication with your prospects.</p>
|
||||
<br />To manage quotations and sale orders, install the "Sales Management" application.</p>]]></field>
|
||||
<p>To manage quotations and sale orders, install the "Sales Management" application.</p>]]></field>
|
||||
</record>
|
||||
|
||||
<record model="mail.alias" id="default_sales_alias">
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 22 KiB |
|
@ -19,8 +19,8 @@
|
|||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Welcome to OpenERP!</field>
|
||||
<field name="body"><![CDATA[<p>Your homepage is a summary of messages you received and key information about documents you follow.<br />
|
||||
The top menu bar contains all applications you installed. You can use this <i>Settings</i> menu to install more applications, activate others features or give access to new users.<br />
|
||||
<field name="body"><![CDATA[<p>Your homepage is a summary of messages you received and key information about documents you follow.</p><p>
|
||||
The top menu bar contains all applications you installed. You can use the <i>Settings</i> menu to install more applications, activate others features or give access to new users.</p><p>
|
||||
To setup your preferences (name, email signature, avatar), click on the top right corner.</p>]]></field>
|
||||
</record>
|
||||
</data>
|
||||
|
|
|
@ -130,7 +130,7 @@ class mail_group(osv.Model):
|
|||
params = {
|
||||
'search_view_id': search_ref and search_ref[1] or False,
|
||||
'domain': [('model', '=', 'mail.group'), ('res_id', '=', mail_group_id)],
|
||||
'context': {'default_model': 'mail.group', 'default_res_id': mail_group_id},
|
||||
'context': {'default_model': 'mail.group', 'default_res_id': mail_group_id, 'search_default_message_unread': True},
|
||||
'res_model': 'mail.message',
|
||||
'thread_level': 1,
|
||||
}
|
||||
|
|
|
@ -87,8 +87,11 @@
|
|||
margin-bottom: 0px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_body p{
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_body p:first-of-type {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_body p {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
border-collapse: separate;
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 0 1px 4px 3px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
-o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">MRP application installed!</field>
|
||||
<field name="body"><![CDATA[<p>Manage your manufacturing process with OpenERP by defining your bills of materials (BoM), routings and work centers.<br />
|
||||
<field name="body"><![CDATA[<p>Manage your manufacturing process with OpenERP by defining your bills of materials (BoM), routings and work centers.</p><p>
|
||||
This application supports complete integration and production scheduling for stockable goods, consumables, and services.</p>
|
||||
<p>From the Manufacturing Settings, you can choose to compute production schedules periodically or just-in-time.</p>]]></field>
|
||||
</record>
|
||||
|
|
|
@ -38,6 +38,7 @@ Notes can be found in the 'Home' menu.
|
|||
'author': 'OpenERP SA',
|
||||
'website': 'http://openerp.com',
|
||||
'summary': 'Sticky notes, Collaborative, Memos',
|
||||
'sequence': 9,
|
||||
'depends': [
|
||||
'mail',
|
||||
],
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Project Management application installed!</field>
|
||||
<field name="body"><![CDATA[<p>Manage multi-level projects and tasks. You can delegate tasks, track task work, and review your planning.</p>
|
||||
<p>You can manage todo lists on tasks by installing the "Todo Lists" application, supporting the Getting Things Done (GTD) methodology.</p>
|
||||
<p>You can manage todo lists on tasks by installing the <i>Todo Lists</i> application, supporting the Getting Things Done (GTD) methodology.</p>
|
||||
<p>You can also manage issues/bugs in projects by installing the "Issue Tracker" application.</p>]]></field>
|
||||
</record>
|
||||
</data>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
'name': 'Todo Lists',
|
||||
'version': '1.0',
|
||||
'category': 'Project Management',
|
||||
'sequence': 9,
|
||||
'sequence': 100,
|
||||
'summary': 'Personal Tasks, Contexts, Timeboxes',
|
||||
'description': """
|
||||
Implement concepts of the "Getting Things Done" methodology
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Todo Lists application installed!</field>
|
||||
<field name="body"><![CDATA[<p>Add todo items on project tasks, to help you organize your work.
|
||||
<field name="body"><![CDATA[<p>Add todo items on project tasks, to help you organize your work.</p><p>
|
||||
This application supports the Getting Things Done (GTD) methodology, based on David Allen's book.</p>]]></field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Issue Tracker application installed!</field>
|
||||
<field name="body"><![CDATA[<p>Manage the issues you might face in a project, such as bugs in a system, client complaints or material breakdowns.
|
||||
You can record issues, assign them to a responsible person, and keep track of their status as they evolve over time.
|
||||
<field name="body"><![CDATA[<p>Manage the issues you might face in a project, such as bugs in a system, client complaints or material breakdowns.</p><p>
|
||||
You can record issues, assign them to a responsible person, and keep track of their status as they evolve over time.</p><p>
|
||||
Access all issues from the top Project menu, and access the issues of a specific project via the projects gallery view.</p>]]></field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="project_project_1" model="project.project">
|
||||
<record id="project.project_project_1" model="project.project">
|
||||
<field name="use_issues" eval="True"/>
|
||||
</record>
|
||||
<record id="project_project_2" model="project.project">
|
||||
<record id="project.project_project_2" model="project.project">
|
||||
<field name="use_issues" eval="True"/>
|
||||
</record>
|
||||
<record id="project_project_3" model="project.project">
|
||||
<record id="project.project_project_3" model="project.project">
|
||||
<field name="use_issues" eval="True"/>
|
||||
</record>
|
||||
<record id="project_project_4" model="project.project">
|
||||
<record id="project.project_project_4" model="project.project">
|
||||
<field name="use_issues" eval="True"/>
|
||||
</record>
|
||||
<record id="project_project_5" model="project.project">
|
||||
<record id="project.project_project_5" model="project.project">
|
||||
<field name="use_issues" eval="True"/>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Sales Management application installed!</field>
|
||||
<field name="body"><![CDATA[<p>This application lets you create and send quotations and process your sales orders; from delivery to invoicing.</p>
|
||||
<p>If you need to manage your sales pipeline (leads, opportunities, phonecalls), the <i>CRM</i> application may be useful. Use the Settings menu to install it.</p>]]></field>
|
||||
<p>If you need to manage your sales pipeline (leads, opportunities, phonecalls), the <i>CRM</i> application may be useful. Use the Settings menu to install it.</p>]]></field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -20,7 +20,7 @@ openerp.web_linkedin = function(instance) {
|
|||
var tag = document.createElement('script');
|
||||
tag.type = 'text/javascript';
|
||||
tag.src = "http://platform.linkedin.com/in.js";
|
||||
tag.innerHTML = 'api_key : ' + self.api_key + '\nauthorize : true';
|
||||
tag.innerHTML = 'api_key : ' + self.api_key + '\nauthorize : true\nscope: r_network r_contactinfo';
|
||||
document.getElementsByTagName('head')[0].appendChild(tag);
|
||||
self.linkedin_added = true;
|
||||
$(tag).load(function() {
|
||||
|
@ -107,7 +107,7 @@ openerp.web_linkedin = function(instance) {
|
|||
}
|
||||
to_change.website = entity.websiteUrl;
|
||||
to_change.phone = false;
|
||||
_.each(entity.locations.values || [], function(el) {
|
||||
_.each((entity.locations || {}).values || [], function(el) {
|
||||
to_change.phone = el.contactInfo.phone1;
|
||||
});
|
||||
var children_def = $.Deferred();
|
||||
|
|
Loading…
Reference in New Issue