[MERGE] Merged lp:~openerp-dev/openobject-addons/trunk-website-al

bzr revid: psa@tinyerp.com-20131224053125-3lrogsrgd3ccp0i6
This commit is contained in:
Paramjit Singh Sahota 2013-12-24 11:01:25 +05:30
commit 18d8368ee1
1076 changed files with 63206 additions and 100592 deletions

View File

@ -28,7 +28,7 @@ import time
import openerp
from openerp import SUPERUSER_ID
from openerp import tools
from openerp.osv import fields, osv
from openerp.osv import fields, osv, expression
from openerp.tools.translate import _
from openerp.tools.float_utils import float_round
@ -579,15 +579,18 @@ class account_account(osv.osv):
except:
pass
if name:
ids = self.search(cr, user, [('code', '=like', name+"%")]+args, limit=limit)
if not ids:
ids = self.search(cr, user, [('shortcut', '=', name)]+ args, limit=limit)
if not ids:
ids = self.search(cr, user, [('name', operator, name)]+ args, limit=limit)
if not ids and len(name.split()) >= 2:
#Separating code and name of account for searching
operand1,operand2 = name.split(' ',1) #name can contain spaces e.g. OpenERP S.A.
ids = self.search(cr, user, [('code', operator, operand1), ('name', operator, operand2)]+ args, limit=limit)
if operator not in expression.NEGATIVE_TERM_OPERATORS:
ids = self.search(cr, user, ['|', ('code', '=like', name+"%"), '|', ('shortcut', '=', name), ('name', operator, name)]+args, limit=limit)
if not ids and len(name.split()) >= 2:
#Separating code and name of account for searching
operand1,operand2 = name.split(' ',1) #name can contain spaces e.g. OpenERP S.A.
ids = self.search(cr, user, [('code', operator, operand1), ('name', operator, operand2)]+ args, limit=limit)
else:
ids = self.search(cr, user, ['&','!', ('code', '=like', name+"%"), ('name', operator, name)]+args, limit=limit)
# as negation want to restric, do if already have results
if ids and len(name.split()) >= 2:
operand1,operand2 = name.split(' ',1) #name can contain spaces e.g. OpenERP S.A.
ids = self.search(cr, user, [('code', operator, operand1), ('name', operator, operand2), ('id', 'in', ids)]+ args, limit=limit)
else:
ids = self.search(cr, user, args, context=context, limit=limit)
return self.name_get(cr, user, ids, context=context)
@ -1447,6 +1450,8 @@ class account_move(osv.osv):
def unlink(self, cr, uid, ids, context=None, check=True):
if context is None:
context = {}
if isinstance(ids, (int, long)):
ids = [ids]
toremove = []
obj_move_line = self.pool.get('account.move.line')
for move in self.browse(cr, uid, ids, context=context):
@ -1571,11 +1576,6 @@ class account_move(osv.osv):
obj_analytic_line = self.pool.get('account.analytic.line')
obj_move_line = self.pool.get('account.move.line')
for move in self.browse(cr, uid, ids, context):
# Unlink old analytic lines on move_lines
for obj_line in move.line_id:
for obj in obj_line.analytic_lines:
obj_analytic_line.unlink(cr,uid,obj.id)
journal = move.journal_id
amount = 0
line_ids = []
@ -1928,7 +1928,7 @@ class account_tax(osv.osv):
'child_depend':fields.boolean('Tax on Children', help="Set if the tax computation is based on the computation of child taxes rather than on the total amount."),
'python_compute':fields.text('Python Code'),
'python_compute_inv':fields.text('Python Code (reverse)'),
'python_applicable':fields.text('Python Code'),
'python_applicable':fields.text('Applicable Code'),
#
# Fields used for the Tax declaration
@ -1942,8 +1942,8 @@ class account_tax(osv.osv):
'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the tax declaration."),
'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the tax declaration."),
'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'ref_base_sign': fields.float('Refund Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Refund Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"),
'company_id': fields.many2one('res.company', 'Company', required=True),
'description': fields.char('Tax Code'),
@ -2833,7 +2833,7 @@ class account_tax_template(osv.osv):
'child_depend':fields.boolean('Tax on Children', help="Set if the tax computation is based on the computation of child taxes rather than on the total amount."),
'python_compute':fields.text('Python Code'),
'python_compute_inv':fields.text('Python Code (reverse)'),
'python_applicable':fields.text('Python Code'),
'python_applicable':fields.text('Applicable Code'),
#
# Fields used for the Tax declaration
@ -2847,8 +2847,8 @@ class account_tax_template(osv.osv):
'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the tax declaration."),
'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the tax declaration."),
'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'ref_base_sign': fields.float('Refund Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Refund Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Include in Base Amount', help="Set if the amount of tax must be included in the base amount before computing the next taxes."),
'description': fields.char('Internal Name'),
'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Use In', required=True,),
@ -3412,6 +3412,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
all the provided information to create the accounts, the banks, the journals, the taxes, the tax codes, the
accounting properties... accordingly for the chosen company.
'''
if uid != SUPERUSER_ID and not self.pool['res.users'].has_group(cr, uid, 'base.group_erp_manager'):
raise openerp.exceptions.AccessError(_("Only administrators can change the settings"))
obj_data = self.pool.get('ir.model.data')
ir_values_obj = self.pool.get('ir.values')
obj_wizard = self.browse(cr, uid, ids[0])
@ -3428,7 +3430,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
self.pool[tmp2[0]].write(cr, uid, tmp2[1], {
'currency_id': obj_wizard.currency_id.id
})
except ValueError, e:
except ValueError:
pass
# If the floats for sale/purchase rates have been filled, create templates from them

View File

@ -26,7 +26,7 @@ from operator import itemgetter
from lxml import etree
from openerp import netsvc
from openerp import workflow
from openerp.osv import fields, osv, orm
from openerp.tools.translate import _
import openerp.addons.decimal_precision as dp
@ -193,6 +193,8 @@ class account_move_line(osv.osv):
if obj_line.analytic_account_id:
if not obj_line.journal_id.analytic_journal_id:
raise osv.except_osv(_('No Analytic Journal!'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name, ))
if obj_line.analytic_lines:
acc_ana_line_obj.unlink(cr,uid,[obj.id for obj in obj_line.analytic_lines])
vals_line = self._prepare_analytic_line(cr, uid, obj_line, context=context)
acc_ana_line_obj.create(cr, uid, vals_line)
return True
@ -311,13 +313,13 @@ class account_move_line(osv.osv):
context = {}
c = context.copy()
c['initital_bal'] = True
sql = """SELECT l2.id, SUM(l1.debit-l1.credit)
FROM account_move_line l1, account_move_line l2
WHERE l2.account_id = l1.account_id
AND l1.id <= l2.id
AND l2.id IN %s AND """ + \
self._query_get(cr, uid, obj='l1', context=c) + \
" GROUP BY l2.id"
sql = """SELECT l1.id, COALESCE(SUM(l2.debit-l2.credit), 0)
FROM account_move_line l1 LEFT JOIN account_move_line l2
ON (l1.account_id = l2.account_id
AND l2.id <= l1.id
AND """ + \
self._query_get(cr, uid, obj='l2', context=c) + \
") WHERE l1.id IN %s GROUP BY l1.id"
cr.execute(sql, [tuple(ids)])
return dict(cr.fetchall())
@ -932,11 +934,10 @@ class account_move_line(osv.osv):
'line_id': map(lambda x: (4, x, False), ids),
'line_partial_ids': map(lambda x: (3, x, False), ids)
})
wf_service = netsvc.LocalService("workflow")
# the id of the move.reconcile is written in the move.line (self) by the create method above
# because of the way the line_id are defined: (4, x, False)
for id in ids:
wf_service.trg_trigger(uid, 'account.move.line', id, cr)
workflow.trg_trigger(uid, 'account.move.line', id, cr)
if lines and lines[0]:
partner_id = lines[0].partner_id and lines[0].partner_id.id or False
@ -1208,20 +1209,6 @@ class account_move_line(osv.osv):
if not ok:
raise osv.except_osv(_('Bad Account!'), _('You cannot use this general account in this journal, check the tab \'Entry Controls\' on the related journal.'))
if vals.get('analytic_account_id',False):
if journal.analytic_journal_id:
vals['analytic_lines'] = [(0,0, {
'name': vals['name'],
'date': vals.get('date', time.strftime('%Y-%m-%d')),
'account_id': vals.get('analytic_account_id', False),
'unit_amount': vals.get('quantity', 1.0),
'amount': vals.get('debit', 0.0) or vals.get('credit', 0.0),
'general_account_id': vals.get('account_id', False),
'journal_id': journal.analytic_journal_id.id,
'ref': vals.get('ref', False),
'user_id': uid
})]
result = super(account_move_line, self).create(cr, uid, vals, context=context)
# CREATE Taxes
if vals.get('account_tax_id', False):

View File

@ -8,7 +8,7 @@
<field name="partner_id" ref="base.res_partner_1"/>
<field name="journal_id" ref="account.sales_journal"/>
<field name="state">draft</field>
<field name="type">out_invoice</field>
<field name="type">in_invoice</field>
<field name="account_id" ref="account.a_recv"/>
<field name="name">Test invoice 1</field>
</record>

View File

@ -16,7 +16,6 @@
</record>
<record id="account_payment_term_line_immediate" model="account.payment.term.line">
<field name="name">Immediate Payment</field>
<field name="value">balance</field>
<field eval="0" name="days"/>
<field eval="0" name="days2"/>

View File

@ -22,7 +22,7 @@
<!--Email template -->
<record id="email_template_edi_invoice" model="email.template">
<field name="name">Invoice - Send by Email</field>
<field name="email_from">${object.user_id.email or object.company_id.email or 'noreply@localhost'}</field>
<field name="email_from">${(object.user_id.email or object.company_id.email or 'noreply@localhost')|safe}</field>
<field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a'})</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="model_id" ref="account.model_account_invoice"/>

10849
addons/account/i18n/am.po Normal file

File diff suppressed because it is too large Load Diff

10849
addons/account/i18n/es_PE.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2012-08-21 06:06+0000\n"
"Last-Translator: Boyce Huang <boyce.huang@cenoq.com>\n"
"PO-Revision-Date: 2013-12-01 17:16+0000\n"
"Last-Translator: Andy Cheng <andy@dobtor.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 05:37+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-12-02 05:23+0000\n"
"X-Generator: Launchpad (build 16856)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@ -32,12 +32,12 @@ msgstr "在相同會計科目中,只能設定一次科目財務狀況。"
msgid ""
"Determine the display order in the report 'Accounting \\ Reporting \\ "
"Generic Reporting \\ Taxes \\ Taxes Report'"
msgstr "確定以下報表的顯示順序:」會計-報表-通用報表-稅-稅報表「"
msgstr "確定以下報表的顯示順序:「會計 \\ 報表 \\ 通用報表 \\ 稅 \\ 稅報表」"
#. module: account
#: view:account.move.reconcile:0
msgid "Journal Entry Reconcile"
msgstr "日記帳分錄調節"
msgstr "帳簿分錄調節"
#. module: account
#: view:account.account:0

View File

@ -107,14 +107,15 @@ class res_partner(osv.osv):
_description = 'Partner'
def _credit_debit_get(self, cr, uid, ids, field_names, arg, context=None):
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
ctx = context.copy()
ctx['all_fiscalyear'] = True
query = self.pool.get('account.move.line')._query_get(cr, uid, context=ctx)
cr.execute("""SELECT l.partner_id, a.type, SUM(l.debit-l.credit)
FROM account_move_line l
LEFT JOIN account_account a ON (l.account_id=a.id)
WHERE a.type IN ('receivable','payable')
AND l.partner_id IN %s
AND (l.reconcile_id IS NULL OR
reconcile_id in (SELECT id FROM account_move_reconcile WHERE opening_reconciliation is TRUE))
AND l.reconcile_id IS NULL
AND """ + query + """
GROUP BY l.partner_id, a.type
""",

View File

@ -170,6 +170,7 @@
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_7" fontName="Helvetica" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>

View File

@ -295,7 +295,7 @@
</para>
</td>
<td>
<para style="terp_tblheader_Details"><b>Total:</b></para>
<para style="terp_default_9"><b>Total:</b></para>
</td>
<td>
<para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>

View File

@ -22,13 +22,12 @@
import time
import datetime
from dateutil.relativedelta import relativedelta
from operator import itemgetter
from os.path import join as opj
import openerp
from openerp import SUPERUSER_ID
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as DF
from openerp.tools.translate import _
from openerp.osv import fields, osv
from openerp import tools
class account_config_settings(osv.osv_memory):
_name = 'account.config.settings'
@ -276,11 +275,13 @@ class account_config_settings(osv.osv_memory):
def set_default_taxes(self, cr, uid, ids, context=None):
""" set default sale and purchase taxes for products """
if uid != SUPERUSER_ID and not self.pool['res.users'].has_group(cr, uid, 'base.group_erp_manager'):
raise openerp.exceptions.AccessError(_("Only administrators can change the settings"))
ir_values = self.pool.get('ir.values')
config = self.browse(cr, uid, ids[0], context)
ir_values.set_default(cr, uid, 'product.product', 'taxes_id',
ir_values.set_default(cr, SUPERUSER_ID, 'product.product', 'taxes_id',
config.default_sale_tax and [config.default_sale_tax.id] or False, company_id=config.company_id.id)
ir_values.set_default(cr, uid, 'product.product', 'supplier_taxes_id',
ir_values.set_default(cr, SUPERUSER_ID, 'product.product', 'supplier_taxes_id',
config.default_purchase_tax and [config.default_purchase_tax.id] or False, company_id=config.company_id.id)
def set_chart_of_accounts(self, cr, uid, ids, context=None):

View File

@ -80,8 +80,13 @@
I validate this account move by using the 'Post Journal Entries' wizard
-
!record {model: validate.account.move, id: validate_account_move_0}:
journal_id: account.bank_journal
period_id: account.period_6
journal_ids:
- bank_journal
- check_journal
period_ids:
- period_6
- period_7
- period_8
-
I click on validate Button
-

View File

@ -1,4 +1,7 @@
from . import test_tax
from . import test_search
fast_suite = [test_tax,
]
fast_suite = [
test_tax,
test_search,
]

View File

@ -0,0 +1,60 @@
from openerp.tests.common import TransactionCase
class TestSearch(TransactionCase):
"""Tests for search on name_search (account.account)
The name search on account.account is quite complexe, make sure
we have all the correct results
"""
def setUp(self):
super(TestSearch, self).setUp()
cr, uid = self.cr, self.uid
self.account_model = self.registry('account.account')
self.account_type_model = self.registry('account.account.type')
ac_ids = self.account_type_model.search(cr, uid, [], limit=1)
self.atax = (int(self.account_model.create(cr, uid, dict(
name="Tax Received",
code="121",
user_type=ac_ids[0],
))), "121 Tax Received")
self.apurchase = (int(self.account_model.create(cr, uid, dict(
name="Purchased Stocks",
code="1101",
user_type=ac_ids[0],
))), "1101 Purchased Stocks")
self.asale = (int(self.account_model.create(cr, uid, dict(
name="Product Sales",
code="200",
user_type=ac_ids[0],
))), "200 Product Sales")
self.all_ids = [self.atax[0], self.apurchase[0], self.asale[0]]
def test_name_search(self):
cr, uid = self.cr, self.uid
atax_ids = self.account_model.name_search(cr, uid, name="Tax", operator='ilike', args=[('id', 'in', self.all_ids)])
self.assertEqual(set([self.atax[0]]), set([a[0] for a in atax_ids]), "name_search 'ilike Tax' should have returned Tax Received account only")
atax_ids = self.account_model.name_search(cr, uid, name="Tax", operator='not ilike', args=[('id', 'in', self.all_ids)])
self.assertEqual(set([self.apurchase[0], self.asale[0]]), set([a[0] for a in atax_ids]), "name_search 'not ilike Tax' should have returned all but Tax Received account")
apur_ids = self.account_model.name_search(cr, uid, name='1101', operator='ilike', args=[('id', 'in', self.all_ids)])
self.assertEqual(set([self.apurchase[0]]), set([a[0] for a in apur_ids]), "name_search 'ilike 1101' should have returned Purchased Stocks account only")
apur_ids = self.account_model.name_search(cr, uid, name='1101', operator='not ilike', args=[('id', 'in', self.all_ids)])
self.assertEqual(set([self.atax[0], self.asale[0]]), set([a[0] for a in apur_ids]), "name_search 'not ilike 1101' should have returned all but Purchased Stocks account")
asale_ids = self.account_model.name_search(cr, uid, name='200 Sales', operator='ilike', args=[('id', 'in', self.all_ids)])
self.assertEqual(set([self.asale[0]]), set([a[0] for a in asale_ids]), "name_search 'ilike 200 Sales' should have returned Product Sales account only")
asale_ids = self.account_model.name_search(cr, uid, name='200 Sales', operator='not ilike', args=[('id', 'in', self.all_ids)])
self.assertEqual(set([self.atax[0], self.apurchase[0]]), set([a[0] for a in asale_ids]), "name_search 'not ilike 200 Sales' should have returned all but Product Sales account")
asale_ids = self.account_model.name_search(cr, uid, name='Product Sales', operator='ilike', args=[('id', 'in', self.all_ids)])
self.assertEqual(set([self.asale[0]]), set([a[0] for a in asale_ids]), "name_search 'ilike Product Sales' should have returned Product Sales account only")
asale_ids = self.account_model.name_search(cr, uid, name='Product Sales', operator='not ilike', args=[('id', 'in', self.all_ids)])
self.assertEqual(set([self.atax[0], self.apurchase[0]]), set([a[0] for a in asale_ids]), "name_search 'not ilike Product Sales' should have returned all but Product Sales account")

View File

@ -52,10 +52,19 @@ class account_invoice_refund(osv.osv_memory):
journal = obj_journal.search(cr, uid, [('type', '=', type), ('company_id','=',company_id)], limit=1, context=context)
return journal and journal[0] or False
def _get_reason(self, cr, uid, context=None):
active_id = context and context.get('active_id', False)
if active_id:
inv = self.pool.get('account.invoice').browse(cr, uid, active_id, context=context)
return inv.name
else:
return ''
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'journal_id': _get_journal,
'filter_refund': 'refund',
'description': _get_reason,
}
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):

View File

@ -25,18 +25,18 @@ class validate_account_move(osv.osv_memory):
_name = "validate.account.move"
_description = "Validate Account Move"
_columns = {
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
'period_id': fields.many2one('account.period', 'Period', required=True, domain=[('state','<>','done')]),
'journal_ids': fields.many2many('account.journal', 'wizard_validate_account_move_journal', 'wizard_id', 'journal_id', 'Journal', required=True),
'period_ids': fields.many2many('account.period', 'wizard_validate_account_move_period', 'wizard_id', 'period_id', 'Period', required=True, domain=[('state','<>','done')]),
}
def validate_move(self, cr, uid, ids, context=None):
obj_move = self.pool.get('account.move')
if context is None:
context = {}
data = self.browse(cr, uid, ids, context=context)[0]
ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','=',data.journal_id.id),('period_id','=',data.period_id.id)])
data = self.read(cr, uid, ids[0], context=context)
ids_move = obj_move.search(cr, uid, [('state','=','draft'),('journal_id','in',tuple(data['journal_ids'])),('period_id','in',tuple(data['period_ids']))])
if not ids_move:
raise osv.except_osv(_('Warning!'), _('Specified journal does not have any account move entries in draft state for this period.'))
raise osv.except_osv(_('Warning!'), _('Specified journals do not have any account move entries in draft state for the specified periods.'))
obj_move.button_validate(cr, uid, ids_move, context=context)
return {'type': 'ir.actions.act_window_close'}

View File

@ -9,8 +9,8 @@
<field name="arch" type="xml">
<form string="Post Journal Entries" version="7.0">
<group>
<field name="journal_id"/>
<field name="period_id"/>
<field name="journal_ids"/>
<field name="period_ids"/>
</group>
<footer>
<button string="Approve" name="validate_move" type="object" class="oe_highlight"/>

View File

@ -0,0 +1,23 @@
# Spanish (Peru) translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2013-12-11 21:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Spanish (Peru) <es_PE@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: 2013-12-12 05:15+0000\n"
"X-Generator: Launchpad (build 16869)\n"
#. module: account_accountant
#: model:ir.actions.client,name:account_accountant.action_client_account_menu
msgid "Open Accounting Menu"
msgstr ""

View File

@ -4,9 +4,9 @@
<record id="account_analytic_cron_email_template" model="email.template">
<field name="name">Contract expiration reminder</field>
<field name="email_from">${object.email or ''}</field>
<field name="email_from">${(object.email or '')|safe}</field>
<field name="subject">Contract expiration reminder ${user.company_id.name}</field>
<field name="email_to">${object.email}</field>
<field name="email_to">${object.email|safe}</field>
<field name="lang">${object.lang}</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="auto_delete" eval="True"/>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2013-10-18 02:59+0000\n"
"Last-Translator: padola <padola@gmail.com>\n"
"PO-Revision-Date: 2013-11-19 06:15+0000\n"
"Last-Translator: Guipo Hao <hrlpool@sohu.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-10-19 04:59+0000\n"
"X-Generator: Launchpad (build 16807)\n"
"X-Launchpad-Export-Date: 2013-11-20 05:25+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -128,7 +128,7 @@ msgstr "业务伙伴"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Contracts that are not assigned to an account manager."
msgstr "没有制定客户经理的合同"
msgstr "没有指派客户经理的合同"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,help:account_analytic_analysis.action_account_analytic_overdue
@ -235,7 +235,7 @@ msgstr "尚未开票,创建"
#. module: account_analytic_analysis
#: model:res.groups,name:account_analytic_analysis.group_template_required
msgid "Mandatory use of templates in contracts"
msgstr ""
msgstr "强制采用模板制订合同"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_quantity:0
@ -394,6 +394,12 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击创建合同模板。\n"
" </p><p>\n"
" 模板用于预先规范合同/项目内容,从而销售人员可以快速配置合同条款及条件。\n"
" </p>\n"
" "
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_user
@ -410,7 +416,7 @@ msgstr "合同"
msgid ""
"Allows you to set the template field as required when creating an analytic "
"account or a contract."
msgstr ""
msgstr "创建成本管理分析或合同时,允许按照需要设置模板域。"
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_invoiced:0
@ -439,6 +445,13 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击创建新合同。\n"
" </p><p>\n"
" 用合同跟踪任务,事务,时间计划或发票的完结,费用及/或销售订单。OpenERP "
"将按销售人员自动提醒管理合同续签。\n"
" </p>\n"
" "
#. module: account_analytic_analysis
#: field:account.analytic.account,toinvoice_total:0
@ -473,7 +486,7 @@ msgstr "最近开票日期"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Units Remaining"
msgstr ""
msgstr "单位保留"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,help:account_analytic_analysis.action_hr_tree_invoiced_all
@ -488,6 +501,10 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p>\n"
" 此处显示可以根据合同向顾客发单的时间计划及采购项目。若想记录创建新的发单活动,你应该使用时间计划菜单。\n"
" </p>\n"
" "
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_non_invoiced:0
@ -510,7 +527,7 @@ msgid ""
"Expectation of remaining income for this contract. Computed as the sum of "
"remaining subtotals which, in turn, are computed as the maximum between "
"'(Estimation - Invoiced)' and 'To Invoice' amounts"
msgstr ""
msgstr "合同预期剩余收入。按照剩余总值,即“预记账”和“应记账”两项的较大者。"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_overdue
@ -521,7 +538,7 @@ msgstr "要续签的合同"
#. module: account_analytic_analysis
#: help:account.analytic.account,toinvoice_total:0
msgid " Sum of everything that could be invoiced for this contract."
msgstr ""
msgstr " 该合同可以记账项目的汇总。"
#. module: account_analytic_analysis
#: field:account.analytic.account,theorical_margin:0
@ -541,7 +558,7 @@ msgstr "计算公式为:发票金额 - 总成本"
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_est:0
msgid "Estimation of Hours to Invoice"
msgstr ""
msgstr "预期记账时数"
#. module: account_analytic_analysis
#: field:account.analytic.account,fix_price_invoices:0
@ -556,12 +573,12 @@ msgstr "这项目的最近的工作完成日期"
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_sale_config_settings
msgid "sale.config.settings"
msgstr ""
msgstr "销售.配置.设置"
#. module: account_analytic_analysis
#: field:sale.config.settings,group_template_required:0
msgid "Mandatory use of templates."
msgstr ""
msgstr "强制采用模板。"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.template_of_contract_action
@ -572,7 +589,7 @@ msgstr "合同模版"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Units Done"
msgstr ""
msgstr "已完成单元。"
#. module: account_analytic_analysis
#: help:account.analytic.account,total_cost:0

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-11-27 16:42+0000\n"
"Last-Translator: 盈通 ccdos <ccdos@intoerp.com>\n"
"PO-Revision-Date: 2013-11-19 05:58+0000\n"
"Last-Translator: Guipo Hao <hrlpool@sohu.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 05:51+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-11-20 05:25+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_partner
@ -39,7 +39,7 @@ msgid ""
"Select a product which will use analytic account specified in analytic "
"default (e.g. create new customer invoice or Sales order if we select this "
"product, it will automatically take this as an analytic account)"
msgstr ""
msgstr "选择一个产品用于默认分析指定的成本管理分析(例如:根据所选产品创建新客户单据或销售订单,系统将自动照此进行成本管理分析)"
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_stock_picking
@ -63,7 +63,7 @@ msgid ""
"Select a partner which will use analytic account specified in analytic "
"default (e.g. create new customer invoice or Sales order if we select this "
"partner, it will automatically take this as an analytic account)"
msgstr ""
msgstr "选择一个伙伴用于默认分析指定的成本管理分析(例如:根据所选伙伴创建新客户单据或销售订单,系统将自动照此进行成本管理分析)"
#. module: account_analytic_default
#: view:account.analytic.default:0
@ -116,7 +116,7 @@ msgid ""
"Select a company which will use analytic account specified in analytic "
"default (e.g. create new customer invoice or Sales order if we select this "
"company, it will automatically take this as an analytic account)"
msgstr ""
msgstr "选择一个公司用于默认分析指定的成本管理分析(例如:根据所选公司创建新客户单据或销售订单,系统将自动照此进行成本管理分析)"
#. module: account_analytic_default
#: view:account.analytic.default:0

View File

@ -21,21 +21,25 @@
#
##############################################################################
from openerp.osv import osv
from openerp.osv import osv, fields
class account_invoice_line(osv.osv):
_inherit = "account.invoice.line"
_columns = {
'move_id': fields.many2one('stock.move', string="Move line", help="If the invoice was generated from a stock.picking, reference to the related move line."),
}
def move_line_get(self, cr, uid, invoice_id, context=None):
res = super(account_invoice_line,self).move_line_get(cr, uid, invoice_id, context=context)
inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context)
company_currency = inv.company_id.currency_id.id
def get_price(cr, uid, inv, company_currency,i_line):
def get_price(cr, uid, inv, company_currency, i_line, price_unit):
cur_obj = self.pool.get('res.currency')
if inv.currency_id.id != company_currency:
price = cur_obj.compute(cr, uid, company_currency, inv.currency_id.id, i_line.product_id.standard_price * i_line.quantity, context={'date': inv.date_invoice})
price = cur_obj.compute(cr, uid, company_currency, inv.currency_id.id, price_unit * i_line.quantity, context={'date': inv.date_invoice})
else:
price = i_line.product_id.standard_price * i_line.quantity
price = price_unit * i_line.quantity
return price
if inv.type in ('out_invoice','out_refund'):
@ -60,12 +64,13 @@ class account_invoice_line(osv.osv):
if not cacc:
cacc = i_line.product_id.categ_id.property_account_expense_categ and i_line.product_id.categ_id.property_account_expense_categ.id
if dacc and cacc:
price_unit = i_line.move_id and i_line.move_id.price_unit or i_line.product_id.standard_price
res.append({
'type':'src',
'name': i_line.name[:64],
'price_unit':i_line.product_id.standard_price,
'price_unit':price_unit,
'quantity':i_line.quantity,
'price':get_price(cr, uid, inv, company_currency, i_line),
'price':get_price(cr, uid, inv, company_currency, i_line, price_unit),
'account_id':dacc,
'product_id':i_line.product_id.id,
'uos_id':i_line.uos_id.id,
@ -76,9 +81,9 @@ class account_invoice_line(osv.osv):
res.append({
'type':'src',
'name': i_line.name[:64],
'price_unit':i_line.product_id.standard_price,
'price_unit':price_unit,
'quantity':i_line.quantity,
'price': -1 * get_price(cr, uid, inv, company_currency, i_line),
'price': -1 * get_price(cr, uid, inv, company_currency, i_line, price_unit),
'account_id':cacc,
'product_id':i_line.product_id.id,
'uos_id':i_line.uos_id.id,

View File

@ -28,6 +28,15 @@ class stock_picking(osv.osv):
_inherit = "stock.picking"
_description = "Picking List"
def _prepare_invoice_line(self, cr, uid, group, picking, move_line, invoice_id,
invoice_vals, context=None):
"""Overwrite to add move_id reference"""
res = super(stock_picking, self)._prepare_invoice_line(cr, uid, group, picking, move_line, invoice_id, invoice_vals, context=context)
res.update({
'move_id': move_line.id,
})
return res
def action_invoice_create(self, cr, uid, ids, journal_id=False,
group=False, type='out_invoice', context=None):
'''Return ids of created invoices for the pickings'''

View File

@ -8,36 +8,36 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2013-08-22 11:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2013-11-18 19:52+0000\n"
"Last-Translator: krnkris <Unknown>\n"
"Language-Team: Hungarian <hu@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: 2013-09-12 06:33+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-11-19 05:27+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Assets in draft and open states"
msgstr ""
msgstr "Tervezet vagy nyitott állapotú eszközök"
#. module: account_asset
#: field:account.asset.category,method_end:0
#: field:account.asset.history,method_end:0
#: field:asset.modify,method_end:0
msgid "Ending date"
msgstr ""
msgstr "Lejárati dátum"
#. module: account_asset
#: field:account.asset.asset,value_residual:0
msgid "Residual Value"
msgstr ""
msgstr "Maradvány érték"
#. module: account_asset
#: field:account.asset.category,account_expense_depreciation_id:0
msgid "Depr. Expense Account"
msgstr ""
msgstr "Értékcsökk. költség számla"
#. module: account_asset
#: view:asset.asset.report:0
@ -67,6 +67,8 @@ msgid ""
"Indicates that the first depreciation entry for this asset have to be done "
"from the purchase date instead of the first January"
msgstr ""
"Azt mutatja, hogy az eszköz értékcsökkenés első bevitelét a vásárlás "
"dátumától számítja az első Január helyett"
#. module: account_asset
#: selection:account.asset.asset,method:0
@ -116,7 +118,7 @@ msgstr "Indoklás"
#: field:account.asset.asset,method_progress_factor:0
#: field:account.asset.category,method_progress_factor:0
msgid "Degressive Factor"
msgstr ""
msgstr "Fokozási együttható"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_normal
@ -141,12 +143,12 @@ msgstr "Értékcsökkénés sorai"
#. module: account_asset
#: help:account.asset.asset,salvage_value:0
msgid "It is the amount you plan to have that you cannot depreciate."
msgstr ""
msgstr "Az az érték, melynek értékét terv szerint már nem tudja csökkenteni."
#. module: account_asset
#: help:account.asset.asset,method_period:0
msgid "The amount of time between two depreciations, in months"
msgstr ""
msgstr "Két értékcsökkenés közt eltelt idő, hónapokban"
#. module: account_asset
#: field:account.asset.depreciation.line,depreciation_date:0
@ -158,12 +160,12 @@ msgstr "Értékcsökkenés dátuma"
#. module: account_asset
#: constraint:account.asset.asset:0
msgid "Error ! You cannot create recursive assets."
msgstr ""
msgstr "Hiba! Nem hozhat létre visszatérő eszközöket."
#. module: account_asset
#: field:asset.asset.report,posted_value:0
msgid "Posted Amount"
msgstr ""
msgstr "Lekönyvelt összeg"
#. module: account_asset
#: view:account.asset.asset:0
@ -178,7 +180,7 @@ msgstr "Eszközök"
#. module: account_asset
#: field:account.asset.category,account_depreciation_id:0
msgid "Depreciation Account"
msgstr ""
msgstr "Értékcsökkenés összege"
#. module: account_asset
#: view:account.asset.asset:0
@ -192,7 +194,7 @@ msgstr "Megjegyzések"
#. module: account_asset
#: field:account.asset.depreciation.line,move_id:0
msgid "Depreciation Entry"
msgstr ""
msgstr "Értékcsökkentés bevitel"
#. module: account_asset
#: view:asset.asset.report:0
@ -208,7 +210,7 @@ msgstr "Hónapok száma az időszakban"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Assets in draft state"
msgstr ""
msgstr "Tervezet állapotú eszközök"
#. module: account_asset
#: field:account.asset.asset,method_end:0
@ -216,7 +218,7 @@ msgstr ""
#: selection:account.asset.category,method_time:0
#: selection:account.asset.history,method_time:0
msgid "Ending Date"
msgstr ""
msgstr "Befejező dátum"
#. module: account_asset
#: field:account.asset.asset,code:0
@ -226,13 +228,13 @@ msgstr "Hivatkozás"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Account Asset"
msgstr ""
msgstr "Eszköz számla"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard
#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard
msgid "Compute Assets"
msgstr ""
msgstr "Eszközök számítása"
#. module: account_asset
#: field:account.asset.category,method_period:0
@ -251,24 +253,24 @@ msgstr "Tervezet"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Date of asset purchase"
msgstr ""
msgstr "Eszköz vásárlás dátuma"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Change Duration"
msgstr ""
msgstr "Időtartam változtatás"
#. module: account_asset
#: help:account.asset.asset,method_number:0
#: help:account.asset.category,method_number:0
#: help:account.asset.history,method_number:0
msgid "The number of depreciations needed to depreciate your asset"
msgstr ""
msgstr "Értékcsökkentések száma az eszköz teljes értékcsökkentéséhez"
#. module: account_asset
#: view:account.asset.category:0
msgid "Analytic Information"
msgstr ""
msgstr "Elemző információk"
#. module: account_asset
#: field:account.asset.category,account_analytic_id:0
@ -291,24 +293,24 @@ msgstr ""
#. module: account_asset
#: field:account.asset.depreciation.line,remaining_value:0
msgid "Next Period Depreciation"
msgstr ""
msgstr "Következő időszak értékcsökkenése"
#. module: account_asset
#: help:account.asset.history,method_period:0
msgid "Time in month between two depreciations"
msgstr ""
msgstr "Két értékcsökkentés közt eltelt idő hónapokban"
#. module: account_asset
#: view:asset.modify:0
#: model:ir.actions.act_window,name:account_asset.action_asset_modify
#: model:ir.model,name:account_asset.model_asset_modify
msgid "Modify Asset"
msgstr ""
msgstr "Eszköz módosítás"
#. module: account_asset
#: field:account.asset.asset,salvage_value:0
msgid "Salvage Value"
msgstr ""
msgstr "Maradvány érték"
#. module: account_asset
#: field:account.asset.asset,category_id:0
@ -321,12 +323,12 @@ msgstr "Eszköz kategória"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Assets in closed state"
msgstr ""
msgstr "Lezárt állapotú eszközök"
#. module: account_asset
#: field:account.asset.asset,parent_id:0
msgid "Parent Asset"
msgstr ""
msgstr "Szülő eszköz"
#. module: account_asset
#: view:account.asset.history:0
@ -337,7 +339,7 @@ msgstr "Esuközök előzménye"
#. module: account_asset
#: view:account.asset.category:0
msgid "Search Asset Category"
msgstr ""
msgstr "Eszköz ketegória keresés"
#. module: account_asset
#: view:asset.modify:0
@ -352,19 +354,19 @@ msgstr "Számlasor"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation Board"
msgstr ""
msgstr "Értékcsökkenési tábla"
#. module: account_asset
#: field:asset.asset.report,unposted_value:0
msgid "Unposted Amount"
msgstr ""
msgstr "Nem könyvelt összeg"
#. module: account_asset
#: field:account.asset.asset,method_time:0
#: field:account.asset.category,method_time:0
#: field:account.asset.history,method_time:0
msgid "Time Method"
msgstr ""
msgstr "Idő módszer"
#. module: account_asset
#: view:asset.depreciation.confirmation.wizard:0
@ -388,6 +390,11 @@ msgid ""
"Ending Date: Choose the time between 2 depreciations and the date the "
"depreciations won't go beyond."
msgstr ""
"Az értékcsökkentés sorai dátumának és számainak számítási módszere.\n"
"Értékcsökkentések száma: Rögzíti az értékcsökkentés sorai számát és kér "
"értékcsökkentés közt eltelt időt.\n"
"Befejezés dátuma: Válasszon 2 értékcsökkentés közti időt és azt a dátumot "
"amit az értékcsökkentés már nem fog meghaladni."
#. module: account_asset
#: help:account.asset.asset,method_time:0
@ -400,11 +407,17 @@ msgid ""
" * Ending Date: Choose the time between 2 depreciations and the date the "
"depreciations won't go beyond."
msgstr ""
"Válassza az értékcsökkentés sorai dátumának és számainak számítási "
"módszerét.\n"
" * Értékcsökkentések száma: Rögzíti az értékcsökkentés sorai számát és kér "
"értékcsökkentés közt eltelt időt.\n"
" * Befejezés dátuma: Válasszon 2 értékcsökkentés közti időt és azt a "
"dátumot amit az értékcsökkentés már nem fog meghaladni."
#. module: account_asset
#: view:asset.asset.report:0
msgid "Assets in running state"
msgstr ""
msgstr "Futó állapotú eszköz"
#. module: account_asset
#: view:account.asset.asset:0
@ -420,12 +433,18 @@ msgid ""
"You can manually close an asset when the depreciation is over. If the last "
"line of depreciation is posted, the asset automatically goes in that status."
msgstr ""
"Ha egy eszközt létrehozott, annak állapota 'Tervezet'.\n"
"Miután az eszköz megerősített, annak állapota 'Futó' és a költségcsökkentés "
"sorait el lehet küldeni a könyvelésre.\n"
"Ha a költségcsökkentés végre lett hajtva akkor kézzel bezárhatja azt. Ha az "
"értékcsökkentés utolsó sora is fel lett adva, akkor automatikusan ebbe az "
"állapotba vált."
#. module: account_asset
#: field:account.asset.asset,state:0
#: field:asset.asset.report,state:0
msgid "Status"
msgstr "Státusz"
msgstr "Állapot"
#. module: account_asset
#: field:account.asset.asset,partner_id:0
@ -436,17 +455,17 @@ msgstr "Partner"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Posted depreciation lines"
msgstr ""
msgstr "Lekönyvelt értékcsökkentési sorok"
#. module: account_asset
#: field:account.asset.asset,child_ids:0
msgid "Children Assets"
msgstr ""
msgstr "Alsóbbrendő eszközök"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Date of depreciation"
msgstr ""
msgstr "Értékcsökkentés dátuma"
#. module: account_asset
#: field:account.asset.history,user_id:0
@ -456,7 +475,7 @@ msgstr "Felhasználó"
#. module: account_asset
#: field:account.asset.category,account_asset_id:0
msgid "Asset Account"
msgstr ""
msgstr "Eszköz számla"
#. module: account_asset
#: view:asset.asset.report:0
@ -472,12 +491,12 @@ msgstr "Kiszámítás"
#. module: account_asset
#: view:account.asset.history:0
msgid "Asset History"
msgstr "Esuközök előzménye"
msgstr "Eszközök előzménye"
#. module: account_asset
#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard
msgid "asset.depreciation.confirmation.wizard"
msgstr ""
msgstr "Eszköz.költségcsökkentés.nyugtázás.varázsló"
#. module: account_asset
#: field:account.asset.asset,active:0
@ -487,12 +506,12 @@ msgstr "Aktív"
#. module: account_asset
#: field:account.asset.depreciation.line,parent_state:0
msgid "State of Asset"
msgstr "Eszköz státusza"
msgstr "Eszköz állapota"
#. module: account_asset
#: field:account.asset.depreciation.line,name:0
msgid "Depreciation Name"
msgstr ""
msgstr "Költségcsökkentés neve"
#. module: account_asset
#: view:account.asset.asset:0
@ -503,7 +522,7 @@ msgstr "Előzmény"
#. module: account_asset
#: view:asset.depreciation.confirmation.wizard:0
msgid "Compute Asset"
msgstr ""
msgstr "Eszköz számítása"
#. module: account_asset
#: field:asset.depreciation.confirmation.wizard,period_id:0
@ -519,7 +538,7 @@ msgstr "Általános"
#: field:account.asset.asset,prorata:0
#: field:account.asset.category,prorata:0
msgid "Prorata Temporis"
msgstr ""
msgstr "Arányos rész késleltetés"
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_invoice
@ -529,7 +548,7 @@ msgstr "Számla"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Set to Close"
msgstr ""
msgstr "Lezártá nyilvánítás"
#. module: account_asset
#: view:asset.depreciation.confirmation.wizard:0
@ -551,7 +570,7 @@ msgstr "Könyvelési tételsorok"
#. module: account_asset
#: view:asset.modify:0
msgid "Asset Durations to Modify"
msgstr ""
msgstr "Eszköz időtartamainak módosítása"
#. module: account_asset
#: field:account.asset.asset,purchase_date:0
@ -564,7 +583,7 @@ msgstr "Vásárlás dátuma"
#: selection:account.asset.asset,method:0
#: selection:account.asset.category,method:0
msgid "Degressive"
msgstr "Degresszív"
msgstr "Fokozatosság"
#. module: account_asset
#: help:asset.depreciation.confirmation.wizard,period_id:0
@ -572,6 +591,8 @@ msgid ""
"Choose the period for which you want to automatically post the depreciation "
"lines of running assets"
msgstr ""
"Válassza ki azt az időszakot amelyben a futó eszközre vonatkozóan "
"automatikusan feladja a költségcsökkentés sorait"
#. module: account_asset
#: view:account.asset.asset:0
@ -581,27 +602,27 @@ msgstr "Jelenlegi"
#. module: account_asset
#: view:account.asset.category:0
msgid "Depreciation Method"
msgstr ""
msgstr "Költségcsökkentés módszere"
#. module: account_asset
#: field:account.asset.depreciation.line,amount:0
msgid "Current Depreciation"
msgstr ""
msgstr "Jelenlegi költségcsökkentés"
#. module: account_asset
#: field:account.asset.asset,name:0
msgid "Asset Name"
msgstr ""
msgstr "Eszköz neve"
#. module: account_asset
#: field:account.asset.category,open_asset:0
msgid "Skip Draft State"
msgstr ""
msgstr "Tervezet állapot átugrása"
#. module: account_asset
#: view:account.asset.category:0
msgid "Depreciation Dates"
msgstr ""
msgstr "Költségcsökkentési dátumok"
#. module: account_asset
#: field:account.asset.asset,currency_id:0
@ -621,7 +642,7 @@ msgstr "Előzmény neve"
#. module: account_asset
#: field:account.asset.depreciation.line,depreciated_value:0
msgid "Amount Already Depreciated"
msgstr ""
msgstr "A már költségcsökkentett összeg"
#. module: account_asset
#: help:account.asset.asset,method:0
@ -631,6 +652,11 @@ msgid ""
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n"
" * Degressive: Calculated on basis of: Residual Value * Degressive Factor"
msgstr ""
"Válassza ki a módszert a költségcsökkentési sorok számításához.\n"
" * Lineáris: Ennek alapján számolt: Teljes érték / Költségcsökkentések "
"száma\n"
" * Fokozatos: Ennek alapján számolt: Maradvány érték * Költségcsökkentési "
"tényező"
#. module: account_asset
#: field:account.asset.depreciation.line,move_check:0
@ -651,6 +677,13 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p>\n"
" Ebből a jelentésből, ráláthat az összes költségcsökkentésre. A\n"
" keresés eszközt használhatja az eszköz jelentések egyénre "
"szabásához és\n"
" így a jelentést igénye szerint alakíthatja ki;\n"
" </p>\n"
" "
#. module: account_asset
#: field:account.asset.asset,purchase_value:0
@ -668,6 +701,8 @@ msgid ""
"Check this if you want to automatically confirm the assets of this category "
"when created by invoices."
msgstr ""
"Jelölje be, ha ennek a kategóriának az eszközeit automatikusan szeretné "
"nyugtázni, ha azokat a számla hozta létre."
#. module: account_asset
#: field:asset.asset.report,name:0
@ -677,7 +712,7 @@ msgstr "Év"
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_asset_depreciation_line
msgid "Asset depreciation line"
msgstr ""
msgstr "Eszköz költségcsökkentési sor"
#. module: account_asset
#: view:account.asset.category:0
@ -690,13 +725,13 @@ msgstr "Eszköz kategória"
#: view:asset.asset.report:0
#: field:asset.asset.report,depreciation_value:0
msgid "Amount of Depreciation Lines"
msgstr ""
msgstr "Költségcsökkentési sorok száma"
#. module: account_asset
#: code:addons/account_asset/wizard/wizard_asset_compute.py:50
#, python-format
msgid "Created Asset Moves"
msgstr ""
msgstr "Létrehozott eszköz mozgások"
#. module: account_asset
#: field:account.asset.depreciation.line,sequence:0
@ -706,7 +741,7 @@ msgstr "Sorszám"
#. module: account_asset
#: help:account.asset.category,method_period:0
msgid "State here the time between 2 depreciations, in months"
msgstr ""
msgstr "Határozza meg itt a 2 költségcsökkentés közt eltelt időt, hónapokban"
#. module: account_asset
#: field:account.asset.history,date:0
@ -722,20 +757,20 @@ msgstr "Dátum"
#: selection:account.asset.history,method_time:0
#: field:asset.modify,method_number:0
msgid "Number of Depreciations"
msgstr ""
msgstr "Költségcsökkentések száma"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Create Move"
msgstr ""
msgstr "Mozgás létrehozása"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Confirm Asset"
msgstr ""
msgstr "Eszköz megerősítése"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_tree
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_tree
msgid "Asset Hierarchy"
msgstr ""
msgstr "Eszköz rangsor"

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2013-01-30 03:54+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"PO-Revision-Date: 2013-11-19 05:49+0000\n"
"Last-Translator: Guipo Hao <hrlpool@sohu.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@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: 2013-09-12 06:34+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-11-20 05:25+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: account_asset
#: view:account.asset.asset:0
@ -146,7 +146,7 @@ msgstr "折旧后资产的剩余价值金额"
#. module: account_asset
#: help:account.asset.asset,method_period:0
msgid "The amount of time between two depreciations, in months"
msgstr ""
msgstr "折旧期间,以月计算"
#. module: account_asset
#: field:account.asset.depreciation.line,depreciation_date:0
@ -426,6 +426,9 @@ msgid ""
"You can manually close an asset when the depreciation is over. If the last "
"line of depreciation is posted, the asset automatically goes in that status."
msgstr ""
"资产创建后,其状态为“草稿”。\n"
"若资产被确认,其状态变为“运行”,并且其折旧账目可以计入会计科目。\n"
"当资产折旧期结束后,可以手工关闭。若最后折旧账目已经发生,该资产自动转至关闭状态。"
#. module: account_asset
#: field:account.asset.asset,state:0
@ -637,6 +640,9 @@ msgid ""
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n"
" * Degressive: Calculated on basis of: Residual Value * Degressive Factor"
msgstr ""
"选择计算折旧账目数量的方法。\n"
" * 线形:按照资产总值/折旧账目数量计算\n"
" * 递减:按照资产残值 X 递减率计算"
#. module: account_asset
#: field:account.asset.depreciation.line,move_check:0
@ -657,6 +663,10 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p>\n"
" 该报告可以显示所有折旧总揽。也可以根据需要用搜索工具个性化资产报告。\n"
" </p>\n"
" "
#. module: account_asset
#: field:account.asset.asset,purchase_value:0

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-11-28 06:47+0000\n"
"Last-Translator: 盈通 ccdos <ccdos@intoerp.com>\n"
"PO-Revision-Date: 2013-11-19 06:22+0000\n"
"Last-Translator: Guipo Hao <hrlpool@sohu.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:01+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-11-20 05:25+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: account_budget
#: view:account.budget.analytic:0
@ -367,6 +367,16 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p> 预算是对公司在未来一段时间里的收入或支出的预测。\n"
"                预算常用在 财务账目和/或分析帐目(可能用于\n"
"                项目,部门,产品类别等)              \n"
" </p><p> \n"
"                通过跟踪你的钱流向,你可能会大大减少\n"
"                超支,从而容易实现您的财务管理\n"
"                的目标。通过为每个分析帐户制订详细的预算来制订预算\n"
"                ,并在预算期间根据实际情况监测其演变。\n"
" </p>\n"
" "
#. module: account_budget
#: report:account.budget:0

View File

@ -182,19 +182,19 @@
<blockTable colWidths="221.0,82.0,83.0,85.0,57.0" style="Table4">
<tr>
<td>
<para style="terp_default_9"><font face="Helvetica" size="9.0" color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica" size="8.0"> [[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>
<para style="terp_default_9"><font face="Helvetica" size="9.0" color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica" size="8.0"> [[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], currency_obj=company.currency_id) ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], currency_obj=company.currency_id) ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], currency_obj=company.currency_id) ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['perc']) ]]%</para>
<para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['perc']) ]]%</para>
</td>
</tr>
</blockTable>

View File

@ -145,19 +145,19 @@
<blockTable colWidths="185.0,79.0,78.0,81.0,59.0" style="Table4">
<tr>
<td>
<para style="terp_default_9"><font color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ a['name'] ]]</para>
<para style="terp_default_9"><font color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] </font>[[ a['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['perc'], digits=2) ]]%</para>
<para style="terp_default_Right_9"><font face="Helvetica">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] </font>[[ formatLang(a['perc'], digits=2) ]]%</para>
</td>
</tr>
</blockTable>

View File

@ -160,19 +160,19 @@
<blockTable colWidths="205.0,88.0,87.0,90.0,66.0" style="Table4">
<tr>
<td>
<para style="terp_default_9"><font face="Helvetica" size="10.0" color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica" size="8.0">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>
<para style="terp_default_9"><font face="Helvetica" size="10.0" color="white">[['.....' *(a['status']-1) ]]</font><font face="Helvetica" size="8.0">[[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ a['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], dp='Account', currency_obj=company.currency_id) ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['theo'], dp='Account', currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], dp='Account', currency_obj=company.currency_id) ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['pln'], dp='Account', currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], dp='Account', currency_obj=company.currency_id) ]]</para>
<para style="terp_default_Right_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['prac'], dp='Account', currency_obj=company.currency_id) ]]</para>
</td>
<td>
<para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['perc'],digits=2) ]]%</para>
<para style="terp_default_Centre_9"><font face="Helvetica" size="8.0">[[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]]</font> [[ formatLang(a['perc'],digits=2) ]]%</para>
</td>
</tr>
</blockTable>

View File

@ -0,0 +1,23 @@
# Hebrew translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-11-26 08:55+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Hebrew <he@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: 2013-11-27 04:37+0000\n"
"X-Generator: Launchpad (build 16845)\n"
#. module: account_cancel
#: view:account.invoice:0
msgid "Cancel"
msgstr ""

View File

@ -6,9 +6,9 @@
<!--Mail template level 0-->
<record id="email_template_account_followup_level0" model="email.template">
<field name="name">First polite payment follow-up reminder email</field>
<field name="email_from">${user.email or ''}</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="subject">${user.company_id.name} Payment Reminder</field>
<field name="email_to">${object.email}</field>
<field name="email_to">${object.email|safe}</field>
<field name="lang">${object.lang}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
@ -45,9 +45,9 @@ ${object.get_followup_table_html() | safe}
<!--Mail template level 1 -->
<record id="email_template_account_followup_level1" model="email.template">
<field name="name">A bit urging second payment follow-up reminder email</field>
<field name="email_from">${user.email or ''}</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="subject">${user.company_id.name} Payment Reminder</field>
<field name="email_to">${object.email}</field>
<field name="email_to">${object.email|safe}</field>
<field name="lang">${object.lang}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
@ -85,9 +85,9 @@ ${object.get_followup_table_html() | safe}
<!--Mail template level 2 -->
<record id="email_template_account_followup_level2" model="email.template">
<field name="name">Urging payment follow-up reminder email</field>
<field name="email_from">${user.email or ''}</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="subject">${user.company_id.name} Payment Reminder</field>
<field name="email_to">${object.email}</field>
<field name="email_to">${object.email|safe}</field>
<field name="lang">${object.lang}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
@ -122,9 +122,9 @@ ${object.get_followup_table_html() | safe}
<!-- Default follow up message -->
<record id="email_template_account_followup_default" model="email.template">
<field name="name">Default payment follow-up reminder e-mail</field>
<field name="email_from">${user.email or ''}</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="subject">${user.company_id.name} Payment Reminder</field>
<field name="email_to">${object.email}</field>
<field name="email_to">${object.email|safe}</field>
<field name="lang">${object.lang}</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="auto_delete" eval="True"/>
@ -162,7 +162,7 @@ ${object.get_followup_table_html() | safe}
<field name="sequence">0</field>
<field name="delay">15</field>
<field name="followup_id" ref="demo_followup1"/>
<field name="send-email">True</field>
<field name="send_email">True</field>
<field name="description">
Dear %(partner_name)s,

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-11-27 10:37+0000\n"
"Last-Translator: 盈通 ccdos <ccdos@intoerp.com>\n"
"PO-Revision-Date: 2013-11-19 06:25+0000\n"
"Last-Translator: Guipo Hao <hrlpool@sohu.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 05:48+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-11-20 05:25+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: account_payment
#: model:ir.actions.act_window,help:account_payment.action_payment_order_tree
@ -128,7 +128,7 @@ msgstr "填充付款声明"
msgid ""
"You cannot cancel an invoice which has already been imported in a payment "
"order. Remove it from the following payment order : %s."
msgstr ""
msgstr "不可取消已被引入付款单据的发票。请先移除下述付款单: %s."
#. module: account_payment
#: code:addons/account_payment/account_invoice.py:43

View File

@ -0,0 +1,283 @@
# Polish translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-11-15 13:14+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Polish <pl@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: 2013-11-16 05:45+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: account_test
#: view:accounting.assert.test:0
msgid ""
"Code should always set a variable named `result` with the result of your "
"test, that can be a list or\n"
"a dictionary. If `result` is an empty list, it means that the test was "
"succesful. Otherwise it will\n"
"try to translate and print what is inside `result`.\n"
"\n"
"If the result of your test is a dictionary, you can set a variable named "
"`column_order` to choose in\n"
"what order you want to print `result`'s content.\n"
"\n"
"Should you need them, you can also use the following variables into your "
"code:\n"
" * cr: cursor to the database\n"
" * uid: ID of the current user\n"
"\n"
"In any ways, the code must be legal python statements with correct "
"indentation (if needed).\n"
"\n"
"Example: \n"
" sql = '''SELECT id, name, ref, date\n"
" FROM account_move_line \n"
" WHERE account_id IN (SELECT id FROM account_account WHERE type "
"= 'view')\n"
" '''\n"
" cr.execute(sql)\n"
" result = cr.dictfetchall()"
msgstr ""
"Kod powinien zawsze zwracać zmienną zwaną `result` z rezultatem "
"przeprowadzonego testu, który\n"
"może być typu list lub a dictionary. Jeśli `result` jest pustą listą, to "
"oznacza że test był zakończony\n"
"sukcesem. W przeciwnym wypadku nastąpi próba tłumaczenia i wydruku "
"zawartości 'result'.\n"
"\n"
"Jeśli rezultatem jest zmienna typu a dictionary, możesz ustawić zmienną "
"nazywaną `column_order`\n"
"żeby wybrać w jakiej kolejności wydrukować zawartość `result`.\n"
"\n"
"Jeśli będziesz potrzebować, możesz również użyć w kodzie zmienne:\n"
" * cr: cursor to the database\n"
" * uid: ID of the current user\n"
"\n"
"W jakikolwiek sposób kod musi być prawdziwymi wyrażeniami języka python z "
"odpowiednimi wcięciami (tam gdzie wymagane).\n"
"\n"
"Przykład: \n"
" sql = '''SELECT id, name, ref, date\n"
" FROM account_move_line \n"
" WHERE account_id IN (SELECT id FROM account_account WHERE type "
"= 'view')\n"
" '''\n"
" cr.execute(sql)\n"
" result = cr.dictfetchall()"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_02
msgid "Test 2: Opening a fiscal year"
msgstr "Test 2: Otwarcie roku podatkowego"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_05
msgid ""
"Check that reconciled invoice for Sales/Purchases has reconciled entries for "
"Payable and Receivable Accounts"
msgstr ""
"Sprawdź czy uzgodnione sprawozdania faktur dla Sprzedaży/Zakupów są "
"uzgodnionymi wpisami dla kont rachunkowych Płatności i Należności"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_03
msgid ""
"Check if movement lines are balanced and have the same date and period"
msgstr "Sprawdź czy przesunięcia są zbalansowane i mają tą samą datę i okres"
#. module: account_test
#: field:accounting.assert.test,name:0
msgid "Test Name"
msgstr "Testowa nazwa"
#. module: account_test
#: report:account.test.assert.print:0
msgid "Accouting tests on"
msgstr "Testy rachunkowe włączone"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_01
msgid "Test 1: General balance"
msgstr "Test 1: Saldo"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_06
msgid "Check that paid/reconciled invoices are not in 'Open' state"
msgstr ""
"Sprawdź czy zapłacone/uzgodnione faktury nie są w 'Otwarte' -ym stanie"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_05_2
msgid ""
"Check that reconciled account moves, that define Payable and Receivable "
"accounts, are belonging to reconciled invoices"
msgstr ""
"Sprawdź czy uzgodnione sprawozdania przesunięć rachunkowych, które określają "
"konta Płatności i Należności, są przynależne do uzgodnianych sprawozdań"
#. module: account_test
#: view:accounting.assert.test:0
msgid "Tests"
msgstr "Testy"
#. module: account_test
#: field:accounting.assert.test,desc:0
msgid "Test Description"
msgstr "Testowy opis"
#. module: account_test
#: view:accounting.assert.test:0
msgid "Description"
msgstr "Opis"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_06_1
msgid "Check that there's no move for any account with « View » account type"
msgstr "Sprawdź czy nie ma przesunięć dla konta typu « View »"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_08
msgid "Test 9 : Accounts and partners on account moves"
msgstr "Test 9: Rachunki i kontrahenci w przesunięciach rachunkowych"
#. module: account_test
#: model:ir.actions.act_window,name:account_test.action_accounting_assert
#: model:ir.actions.report.xml,name:account_test.account_assert_test_report
#: model:ir.ui.menu,name:account_test.menu_action_license
msgid "Accounting Tests"
msgstr "Testy rachunkowe"
#. module: account_test
#: code:addons/account_test/report/account_test_report.py:74
#, python-format
msgid "The test was passed successfully"
msgstr "Test został zdany"
#. module: account_test
#: field:accounting.assert.test,active:0
msgid "Active"
msgstr "Aktywny"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_06
msgid "Test 6 : Invoices status"
msgstr "Test 6: Status faktur"
#. module: account_test
#: model:ir.model,name:account_test.model_accounting_assert_test
msgid "accounting.assert.test"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_05
msgid ""
"Test 5.1 : Payable and Receivable accountant lines of reconciled invoices"
msgstr "Test 5.1: Linijki kont Płatności i Należności uzgadnianych faktur"
#. module: account_test
#: field:accounting.assert.test,code_exec:0
msgid "Python code"
msgstr "Kod języka Python"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_07
msgid ""
"Check on bank statement that the Closing Balance = Starting Balance + sum of "
"statement lines"
msgstr ""
"Sprawdź na wyciągu bankowym Bilans zamknięcia = Saldo początkowe + suma "
"wyciągu bankowego"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_07
msgid "Test 8 : Closing balance on bank statements"
msgstr "Test 8: Saldo końcowe na wyciągu bankowym"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_03
msgid "Test 3: Movement lines"
msgstr "Test 3: Przesunięcia"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_05_2
msgid "Test 5.2 : Reconcilied invoices and Payable/Receivable accounts"
msgstr ""
"Test 5.2: Uzgadniane sprawozdania finansowe faktur i kont "
"Płatności/Należności"
#. module: account_test
#: view:accounting.assert.test:0
msgid "Expression"
msgstr "Wyrażenie"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_04
msgid "Test 4: Totally reconciled mouvements"
msgstr "Test 4: Uzgadnianie sprawozdań finansowych przesunięć"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_04
msgid "Check if the totally reconciled movements are balanced"
msgstr ""
"Sprawdź czy uzgodniane sprawozdania finansowe przesunięć są zbilansowane"
#. module: account_test
#: field:accounting.assert.test,sequence:0
msgid "Sequence"
msgstr "Sekwencja"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_02
msgid ""
"Check if the balance of the new opened fiscal year matches with last year's "
"balance"
msgstr ""
"Sprawdź czy bilans nowo otwartego roku fiskalnego zgadza się z bilansem "
"poprzedniego roku"
#. module: account_test
#: view:accounting.assert.test:0
msgid "Python Code"
msgstr "Kod języka Python"
#. module: account_test
#: model:ir.actions.act_window,help:account_test.action_accounting_assert
msgid ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to create Accounting Test.\n"
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Kliknij aby utworzyć test rachunkowy\n"
" </p>\n"
" "
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_01
msgid "Check the balance: Debit sum = Credit sum"
msgstr "Sprawdź bilans: Suma wydatków = suma kredytowa"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_08
msgid "Check that general accounts and partners on account moves are active"
msgstr "Sprawdź czy główne konta i firmy na kontach są aktywne"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_06_1
msgid "Test 7: « View  » account type"
msgstr "Test 7: Podgląd typu konta"
#. module: account_test
#: view:accounting.assert.test:0
msgid "Code Help"
msgstr "Kod pomocy"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-11-29 14:18+0000\n"
"Last-Translator: 盈通 ccdos <ccdos@intoerp.com>\n"
"PO-Revision-Date: 2013-11-19 09:19+0000\n"
"Last-Translator: Guipo Hao <hrlpool@sohu.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:00+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-11-20 05:25+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: analytic_user_function
#: model:ir.model,name:analytic_user_function.model_account_analytic_line
@ -78,6 +78,8 @@ msgid ""
" of the default values when invoicing the "
"customer."
msgstr ""
"定义为特定用户指定的服务(例如:高级咨询师)\n"
" 以及价格,在为顾客开票时用来取代默认值。"
#. module: analytic_user_function
#: field:analytic.user.funct.grid,uom_id:0
@ -105,6 +107,9 @@ msgid ""
" specific user. This allows to set invoicing\n"
" conditions for a group of contracts."
msgstr ""
"OpenERP 将循环搜索父帐 \n"
" 来检查是否为特定用户定义特定条件。\n"
" 这样做允许为一组合同设置账单条件。"
#. module: analytic_user_function
#: field:analytic.user.funct.grid,user_id:0

View File

@ -19,7 +19,7 @@ _logger = logging.getLogger(__name__)
#----------------------------------------------------------
def fragment_to_query_string(func):
@functools.wraps(func)
def wrapper(self, **kw):
def wrapper(self, *a, **kw):
if not kw:
return """<html><head><script>
var l = window.location;
@ -31,7 +31,7 @@ def fragment_to_query_string(func):
}
window.location = r;
</script></head><body></body></html>"""
return func(self, **kw)
return func(self, *a, **kw)
return wrapper

View File

@ -0,0 +1,23 @@
# Arabic translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-11-26 18:16+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Arabic <ar@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: 2013-11-27 04:37+0000\n"
"X-Generator: Launchpad (build 16845)\n"
#. module: auth_oauth_signup
#: model:ir.model,name:auth_oauth_signup.model_res_users
msgid "Users"
msgstr "المستخدمين"

View File

@ -11,6 +11,8 @@
<field name="active" eval="False"/>
<!-- Avoid auto-including this user in any default group, just like a typical portal member -->
<field name="groups_id" eval="[(5,)]"/>
<!-- allow signuped users to have a alias -->
<field name="alias_name">_usertemplate</field>
</record>
<record id="default_template_user_config" model="ir.config_parameter">
@ -22,8 +24,8 @@
<record id="reset_password_email" model="email.template">
<field name="name">Reset Password</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email or user.email}>]]></field>
<field name="email_to">${object.email}</field>
<field name="email_from"><![CDATA[${object.company_id.name} <${(object.company_id.email or user.email)|safe}>]]></field>
<field name="email_to">${object.email|safe}</field>
<field name="subject">Password reset</field>
<field name="body_html"><![CDATA[
<p>A password reset was requested for the OpenERP account linked to this email.</p>
@ -37,8 +39,8 @@
<record id="set_password_email" model="email.template">
<field name="name">OpenERP Enterprise Connection</field>
<field name="model_id" ref="base.model_res_users"/>
<field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email or user.email}>]]></field>
<field name="email_to">${object.email}</field>
<field name="email_from"><![CDATA[${object.company_id.name} <${(object.company_id.email or user.email)|safe}>]]></field>
<field name="email_to">${object.email|safe}</field>
<field name="subject"><![CDATA[${object.company_id.name} invitation to connect on OpenERP]]></field>
<field name="body_html">
<![CDATA[

View File

@ -234,6 +234,7 @@ class res_users(osv.Model):
# create a copy of the template user (attached to a specific partner_id if given)
values['active'] = True
context = dict(context or {}, no_reset_password=True)
return self.copy(cr, uid, template_user_id, values, context=context)
def reset_password(self, cr, uid, login, context=None):
@ -260,10 +261,9 @@ class res_users(osv.Model):
# send email to users with their signup url
template = False
if context.get('create_user'):
try:
template = self.pool.get('ir.model.data').get_object(cr, uid, 'auth_signup', 'set_password_email')
except ValueError:
pass
template = self.pool.get('ir.model.data').get_object(cr, uid, 'auth_signup', 'set_password_email')
if not template.exists():
template = False
if not bool(template):
template = self.pool.get('ir.model.data').get_object(cr, uid, 'auth_signup', 'reset_password_email')
assert template._name == 'email.template'

View File

@ -2,11 +2,6 @@
<openerp>
<data>
<!-- add context in action to enable automatic reset password -->
<record id="base.action_res_users" model="ir.actions.act_window">
<field name="context">{'reset_password': True}</field>
</record>
<record id="res_users_form_view" model="ir.ui.view">
<field name="name">user.form.state</field>
<field name="model">res.users</field>

View File

@ -39,12 +39,6 @@ openerp.auth_signup = function(instance) {
delete self.params.error_message;
}
// in case of a signup, retrieve the user information from the token
if (dbname && self.params.token) {
self.rpc("/auth_signup/retrieve", {dbname: dbname, token: self.params.token})
.done(self.on_token_loaded)
.fail(self.on_token_failed);
}
if (dbname && self.params.login) {
self.$("form input[name=login]").val(self.params.login);
}
@ -53,7 +47,7 @@ openerp.auth_signup = function(instance) {
self.$('a.oe_signup_reset_password').click(self.do_reset_password);
if (dbname) {
self.rpc("/auth_signup/get_config", {dbname: dbname}).done(function(result) {
self.rpc("/auth_signup/get_config", {dbname: dbname}).then(function(result) {
self.signup_enabled = result.signup;
self.reset_password_enabled = result.reset_password;
if (!self.signup_enabled || self.$("form input[name=login]").val()){
@ -61,6 +55,13 @@ openerp.auth_signup = function(instance) {
} else {
self.set('login_mode', 'signup');
}
// in case of a signup, retrieve the user information from the token
if (self.params.token) {
self.rpc("/auth_signup/retrieve", {dbname: dbname, token: self.params.token})
.then(self.on_token_loaded, self.on_token_failed);
}
});
} else {
// TODO: support multiple database mode

View File

@ -1,3 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_base_action_rule,base.action.rule,model_base_action_rule,,1,0,0,0
access_base_action_rule_config,base.action.rule config,model_base_action_rule,base.group_system,1,1,1,1
access_base_action_rule_lead_test,access_base_action_rule_lead_test,model_base_action_rule_lead_test,base.group_system,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_base_action_rule base.action.rule model_base_action_rule 1 0 0 0
3 access_base_action_rule_config base.action.rule config model_base_action_rule base.group_system 1 1 1 1
4 access_base_action_rule_lead_test access_base_action_rule_lead_test model_base_action_rule_lead_test base.group_system 1 1 1 1

View File

@ -424,11 +424,8 @@ property or property parameter."),
event.add('location').value = event_obj.location
if event_obj.rrule:
event.add('rrule').value = event_obj.rrule
if event_obj.organizer:
event_org = event.add('organizer')
event_org.params['CN'] = [event_obj.organizer]
event_org.value = 'MAILTO:' + (event_obj.organizer)
elif event_obj.user_id or event_obj.organizer_id:
if event_obj.user_id or event_obj.organizer_id:
event_org = event.add('organizer')
organizer = event_obj.organizer_id
if not organizer:
@ -1037,7 +1034,8 @@ rule or repeating pattern of time to exclude from the recurring rule."),
'recurrent_id_date': fields.datetime('Recurrent ID date'),
'vtimezone': fields.selection(_tz_get, size=64, string='Timezone'),
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
'organizer': fields.char("Organizer", size=256, states={'done': [('readonly', True)]}), # Map with organizer attribute of VEvent.
'organizer': fields.char("Organizer (deprecated)", size=256, states={'done': [('readonly', True)]},
deprecated='Will be removed with OpenERP v8; use organizer_id field instead'), # Map with organizer attribute of VEvent.
'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
'end_type' : fields.selection([('count', 'Number of repetitions'), ('end_date','End date')], 'Recurrence Termination'),
'interval': fields.integer('Repeat Every', help="Repeat every (Days/Week/Month/Year)"),
@ -1112,6 +1110,10 @@ rule or repeating pattern of time to exclude from the recurring rule."),
return True
def default_organizer(self, cr, uid, context=None):
"""
.. deprecated:: 8.0
Use organizer_id field and its default value instead.
"""
user_pool = self.pool.get('res.users')
user = user_pool.browse(cr, uid, uid, context=context)
res = user.name
@ -1130,7 +1132,6 @@ rule or repeating pattern of time to exclude from the recurring rule."),
'interval': 1,
'active': 1,
'user_id': lambda self, cr, uid, ctx: uid,
'organizer': default_organizer,
}
def _check_closing_date(self, cr, uid, ids, context=None):

View File

@ -71,7 +71,6 @@
<field name="user_id" groups="base.group_no_one" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="categ_ids" widget="many2many_tags"/>
<field name="location"/>
<field name="organizer" groups="base.group_no_one"/>
</group>
</group>

View File

@ -0,0 +1,264 @@
# Polish translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-11-16 19:53+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Polish <pl@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: 2013-11-17 05:21+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: base_gengo
#: view:res.company:0
msgid "Comments for Translator"
msgstr "Komentarze dla tłumacza"
#. module: base_gengo
#: field:ir.translation,job_id:0
msgid "Gengo Job ID"
msgstr "Identyfikator Gengo Job"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:114
#, python-format
msgid "This language is not supported by the Gengo translation services."
msgstr "Ten język nie jest wspierany przez usługi tłumaczeń Gengo."
#. module: base_gengo
#: field:res.company,gengo_comment:0
msgid "Comments"
msgstr "Komentarze"
#. module: base_gengo
#: field:res.company,gengo_private_key:0
msgid "Gengo Private Key"
msgstr "Prywatny klucz Gengo"
#. module: base_gengo
#: model:ir.model,name:base_gengo.model_base_gengo_translations
msgid "base.gengo.translations"
msgstr ""
#. module: base_gengo
#: help:res.company,gengo_auto_approve:0
msgid "Jobs are Automatically Approved by Gengo."
msgstr "Prace są automatycznie zatwierdzane przez Gengo."
#. module: base_gengo
#: field:base.gengo.translations,lang_id:0
msgid "Language"
msgstr "Język"
#. module: base_gengo
#: field:ir.translation,gengo_comment:0
msgid "Comments & Activity Linked to Gengo"
msgstr "Komentarze i Aktywność powiązana z Gengo"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:124
#, python-format
msgid "Gengo Sync Translation (Response)"
msgstr "Gengo Sync Tłumaczenie (Odpowiedź)"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:72
#, python-format
msgid ""
"Gengo `Public Key` or `Private Key` are missing. Enter your Gengo "
"authentication parameters under `Settings > Companies > Gengo Parameters`."
msgstr ""
"Brakuje Gengo 'Klucz publiczny' i 'Klucz prywatny'. Wprowadź twoje parametry "
"uwierzytelnienia Gengo pod 'Ustawienia > Firmy > Parametry Gengo'."
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Translation By Machine"
msgstr "Tłumaczenie przez maszynę"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:155
#, python-format
msgid ""
"%s\n"
"\n"
"--\n"
" Commented on %s by %s."
msgstr ""
"%s\n"
"\n"
"--\n"
" Komentowane %s przez %s."
#. module: base_gengo
#: field:ir.translation,gengo_translation:0
msgid "Gengo Translation Service Level"
msgstr "Poziom usług tłumaczeń Gengo"
#. module: base_gengo
#: constraint:ir.translation:0
msgid ""
"The Gengo translation service selected is not supported for this language."
msgstr "Usługi tłumaczenia Gengo nie są obsługiwane dla tego języka."
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Standard"
msgstr "Standardowe"
#. module: base_gengo
#: help:ir.translation,gengo_translation:0
msgid ""
"You can select here the service level you want for an automatic translation "
"using Gengo."
msgstr ""
"Możesz tu wybrać poziom usług, który chcesz dla automatycznych tłumaczeń "
"Gengo."
#. module: base_gengo
#: field:base.gengo.translations,restart_send_job:0
msgid "Restart Sending Job"
msgstr "Restartuj wysyłanie zadań"
#. module: base_gengo
#: view:ir.translation:0
msgid "To Approve In Gengo"
msgstr "Do zatwierdzenia w Gengo"
#. module: base_gengo
#: view:res.company:0
msgid "Private Key"
msgstr "Prywatny klucz"
#. module: base_gengo
#: view:res.company:0
msgid "Public Key"
msgstr "Publiczny Klucz"
#. module: base_gengo
#: field:res.company,gengo_public_key:0
msgid "Gengo Public Key"
msgstr "Publiczny klucz Gengo"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:123
#, python-format
msgid "Gengo Sync Translation (Request)"
msgstr "Gengo Sync Tlumaczenie (zapotrzebowanie)"
#. module: base_gengo
#: view:ir.translation:0
msgid "Translations"
msgstr "Tłumaczenia"
#. module: base_gengo
#: field:res.company,gengo_auto_approve:0
msgid "Auto Approve Translation ?"
msgstr "Automatycznie zatwierdźić tłumaczenie?"
#. module: base_gengo
#: model:ir.actions.act_window,name:base_gengo.action_wizard_base_gengo_translations
#: model:ir.ui.menu,name:base_gengo.menu_action_wizard_base_gengo_translations
msgid "Gengo: Manual Request of Translation"
msgstr "Gengo: Manualne zapotrzebowanie tłumaczenia"
#. module: base_gengo
#: code:addons/base_gengo/ir_translation.py:62
#: code:addons/base_gengo/wizard/base_gengo_translations.py:109
#, python-format
msgid "Gengo Authentication Error"
msgstr "Błąd uwierzytelnienia Gengo"
#. module: base_gengo
#: model:ir.model,name:base_gengo.model_res_company
msgid "Companies"
msgstr "Firmy"
#. module: base_gengo
#: view:ir.translation:0
msgid ""
"Note: If the translation state is 'In Progress', it means that the "
"translation has to be approved to be uploaded in this system. You are "
"supposed to do that directly by using your Gengo Account"
msgstr ""
"Informacja: Jeśli status tłumaczenia jest 'W toku', to oznacza, że "
"tlumaczenie musi zostać zatwierdzone do załadowania w tym systemie. "
"Przewidywane jest, że to zrobisz bezpośrednio poprzez twoje konto Gento."
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:82
#, python-format
msgid ""
"Gengo connection failed with this message:\n"
"``%s``"
msgstr ""
"Połączenie Gengo zawiodło z następującą wiadomością:\n"
"``%s``"
#. module: base_gengo
#: view:res.company:0
msgid "Gengo Parameters"
msgstr "Parametry Gengo"
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "Send"
msgstr "Wyślij"
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Ultra"
msgstr "Ultra"
#. module: base_gengo
#: model:ir.model,name:base_gengo.model_ir_translation
msgid "ir.translation"
msgstr ""
#. module: base_gengo
#: view:ir.translation:0
msgid "Gengo Translation Service"
msgstr "Usługi tłumaczeń Gengo"
#. module: base_gengo
#: selection:ir.translation,gengo_translation:0
msgid "Pro"
msgstr "Pro"
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "Gengo Request Form"
msgstr "Formularz zapotrzebowania Gengo"
#. module: base_gengo
#: code:addons/base_gengo/wizard/base_gengo_translations.py:114
#, python-format
msgid "Warning"
msgstr "Ostrzeżenie"
#. module: base_gengo
#: help:res.company,gengo_comment:0
msgid ""
"This comment will be automatically be enclosed in each an every request sent "
"to Gengo"
msgstr ""
"Ten komentarz zostanie automatycznie zawarty w każdym zapotrzebowaniu "
"wysłanym do Gengo"
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "Cancel"
msgstr "Anuluj"
#. module: base_gengo
#: view:base.gengo.translations:0
msgid "or"
msgstr "lub"

View File

@ -24,18 +24,16 @@ Re-implement openerp's file import system:
'category': 'Uncategorized',
'website': 'http://www.openerp.com',
'author': 'OpenERP SA',
'depends': ['web'],
'depends': ['web', 'select2'],
'installable': True,
'auto_install': True,
'data': [
'security/ir.model.access.csv',
],
'css': [
'static/lib/select2/select2.css',
'static/src/css/import.css',
],
'js': [
'static/lib/select2/select2.js',
'static/lib/javascript-state-machine/state-machine.js',
'static/src/js/import.js',
],

View File

@ -1,12 +1,14 @@
.oe_import > p {
margin-left: 8px;
margin-right: 8px;
margin-top: 13px; /* Customize space according bootstrap3 */
text-align: justify
}
.oe_import h2 {
margin-top: 0;
margin-bottom: 5px;
font-size: 1.5em; /* Customize according bootstrap3 */
}
.oe_padding {
@ -22,6 +24,14 @@
border: solid 1px #dddddd;
width: 600px;
}
/* Customize according bootstrap3 */
.oe_import .oe_import_box label{
font-weight: normal;
}
.oe_import .oe_import_box .oe_import_file {
display: inline-block;
}
/* End of Customize */
.oe_import .oe_import_toggle{
margin-top: 8px;
}
@ -40,7 +50,7 @@
}
.oe_import .oe_import_options p {
margin: 0;
margin: 0 0 -7px 0; /* Customize margin-bottom of <p> according bootstrap3 */
padding: 0;
}
.oe_import .oe_import_options label {
@ -69,6 +79,14 @@
.oe_import .oe_import_report_more {
display: none;
}
/* Customize dd and label according bootstrap3 */
.oe_import dd {
-webkit-margin-start: 40px;
}
.oe_import .oe_import_with_file label {
font-weight: normal;
}
/* End of customize */
.oe_import.oe_import_preview .oe_import_grid {
display: table;

View File

@ -51,7 +51,12 @@ openerp.base_import = function (instance) {
type: 'ir.actions.client',
tag: 'import',
params: {
model: self.dataset.model
model: self.dataset.model,
// self.dataset.get_context() could be a compound?
// not sure. action's context should be evaluated
// so safer bet. Odd that timezone & al in it
// though
context: self.getParent().action.context,
}
}, {
on_reverse_breadcrumb: function () {
@ -127,6 +132,7 @@ openerp.base_import = function (instance) {
var self = this;
this._super.apply(this, arguments);
this.res_model = action.params.model;
this.parent_context = action.params.context || {};
// import object id
this.id = null;
this.Import = new instance.web.Model('base_import.import');
@ -353,11 +359,12 @@ openerp.base_import = function (instance) {
},
//- import itself
call_import: function (options) {
call_import: function (kwargs) {
var fields = this.$('.oe_import_fields input.oe_import_match_field').map(function (index, el) {
return $(el).select2('val') || false;
}).get();
return this.Import.call('do', [this.id, fields, this.import_options()], options)
kwargs.context = this.parent_context;
return this.Import.call('do', [this.id, fields, this.import_options()], kwargs)
.then(undefined, function (error, event) {
// In case of unexpected exception, convert
// "JSON-RPC error" to an import failure, and
@ -366,7 +373,7 @@ openerp.base_import = function (instance) {
return $.when([{
type: 'error',
record: false,
message: error.data.fault_code,
message: error.data.arguments[1],
}]);
}) ;
},

View File

@ -68,7 +68,7 @@ class base_config_settings(osv.osv_memory):
def set_base_defaults(self, cr, uid, ids, context=None):
ir_model_data = self.pool.get('ir.model.data')
wizard = self.browse(cr, uid, ids)[0]
wizard = self.browse(cr, uid, ids, context)[0]
if wizard.font:
user = self.pool.get('res.users').browse(cr, uid, uid, context)
font_name = wizard.font.name
@ -76,7 +76,7 @@ class base_config_settings(osv.osv_memory):
return {}
def act_discover_fonts(self, cr, uid, ids, context=None):
return self.pool.get("res.font").discover_fonts(cr, uid, ids, context)
return self.pool.get("res.font").font_scan(cr, uid, context=context)
# Preferences wizard for Sales & CRM.
# It is defined here because it is inherited independently in modules sale, crm,

View File

@ -94,7 +94,7 @@
<label for="font" />
<div>
<div>
<field name="font" class="oe_inline"/>
<field name="font" class="oe_inline" domain="[('mode', 'in', ('normal', 'regular', 'all', 'book'))]" />
<button string="(reload fonts)" name="act_discover_fonts" type="object" class="oe_link"/>
</div>
</div>

View File

@ -0,0 +1,75 @@
# Spanish (Peru) translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-12-09 17:26+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Spanish (Peru) <es_PE@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: 2013-12-11 05:32+0000\n"
"X-Generator: Launchpad (build 16869)\n"
#. module: base_vat
#: view:res.partner:0
msgid "Check Validity"
msgstr ""
#. module: base_vat
#: code:addons/base_vat/base_vat.py:152
#, python-format
msgid ""
"This VAT number does not seem to be valid.\n"
"Note: the expected format is %s"
msgstr "El RUC no es válido. El formato esperado es %s"
#. module: base_vat
#: field:res.company,vat_check_vies:0
msgid "VIES VAT Check"
msgstr ""
#. module: base_vat
#: model:ir.model,name:base_vat.model_res_company
msgid "Companies"
msgstr ""
#. module: base_vat
#: code:addons/base_vat/base_vat.py:113
#, python-format
msgid "Error!"
msgstr ""
#. module: base_vat
#: help:res.partner,vat_subjected:0
msgid ""
"Check this box if the partner is subjected to the VAT. It will be used for "
"the VAT legal statement."
msgstr ""
"Marque esta opción si la empresa está sujeta a Impuestos. Será utilizado "
"para la declaración legal de Impuestos."
#. module: base_vat
#: model:ir.model,name:base_vat.model_res_partner
msgid "Partner"
msgstr ""
#. module: base_vat
#: help:res.company,vat_check_vies:0
msgid ""
"If checked, Partners VAT numbers will be fully validated against EU's VIES "
"service rather than via a simple format validation (checksum)."
msgstr ""
"Si se marca, el RUC de la empresa se validará contra el servicio europeo "
"VIES VAT en lugar de sólo validar el formato."
#. module: base_vat
#: field:res.partner,vat_subjected:0
msgid "VAT Legal Statement"
msgstr "Sujeto a Impuestos"

View File

@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
# Copyright (C) 2010-2013 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
@ -49,6 +49,7 @@ class board_board(osv.osv):
('value', 'in', refs),
], context=context)
menu_ids = map(itemgetter('res_id'), IrValues.read(cr, uid, irv_ids, ['res_id'], context=context))
menu_ids = Menus._filter_visible_menus(cr, uid, menu_ids, context=context)
menu_names = Menus.name_get(cr, uid, menu_ids, context=context)
return [dict(id=m[0], name=m[1]) for m in menu_names]

View File

@ -1,22 +1,22 @@
# -*- coding: utf-8 -*-
from xml.etree import ElementTree
import openerp
from openerp.addons.web.controllers.main import load_actions_from_ir_values
from openerp.addons.web.http import Controller, route, request
class Board(openerp.http.Controller):
@openerp.http.route('/board/add_to_dashboard', type='json', auth='user')
class Board(Controller):
@route('/board/add_to_dashboard', type='json', auth='user')
def add_to_dashboard(self, menu_id, action_id, context_to_save, domain, view_mode, name=''):
req = openerp.http.request
# FIXME move this method to board.board model
dashboard_action = load_actions_from_ir_values('action', 'tree_but_open', [('ir.ui.menu', menu_id)], False)
dashboard_action = load_actions_from_ir_values('action', 'tree_but_open',
[('ir.ui.menu', menu_id)], False)
if dashboard_action:
action = dashboard_action[0][2]
if action['res_model'] == 'board.board' and action['views'][0][1] == 'form':
# Maybe should check the content instead of model board.board ?
view_id = action['views'][0][0]
board = req.session.model(action['res_model']).fields_view_get(view_id, 'form')
board = request.session.model(action['res_model']).fields_view_get(view_id, 'form')
if board and 'arch' in board:
xml = ElementTree.fromstring(board['arch'])
column = xml.find('./board/column')
@ -30,10 +30,10 @@ class Board(openerp.http.Controller):
})
column.insert(0, new_action)
arch = ElementTree.tostring(xml, 'utf-8')
return req.session.model('ir.ui.view.custom').create({
'user_id': req.session._uid,
return request.session.model('ir.ui.view.custom').create({
'user_id': request.session.uid,
'ref_id': view_id,
'arch': arch
}, req.context)
}, request.context)
return False

View File

@ -20,10 +20,7 @@
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_opportunity_stage_graph"/>
<!-- avoid done / cancelled -->
<field name="domain">['|',
'!', '&amp;', ('probability', '=', 100), ('stage_id.on_change', '=', 1),
'!', '&amp;', ('probability', '=', 0), ('stage_id.sequence', '!=', 1),
('type', '=', 'opportunity')]</field>
<field name="domain">['&amp;', ('stage_id.fold', '=', False), ('type', '=', 'opportunity')]</field>
<field name="context">{'search_default_Stage':1}</field>
</record>
@ -48,7 +45,7 @@
<field name="view_mode">graph,tree,form</field>
<field name="view_id" ref="view_crm_opportunity_user_stage_graph"/>
<!-- avoid cancelled -->
<field name="domain">['!', '&amp;', ('probability', '=', 0), ('stage_id.sequence', '!=', 1)]</field>
<field name="domain">['|', ('stage_id.fold', '=', False), ('stage_id.probability', '=', 100)]</field>
<field name="context">{'search_default_user': 1, 'search_default_Stage': 1}</field>
</record>

View File

@ -68,8 +68,9 @@ class crm_case_stage(osv.osv):
help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."),
'case_default': fields.boolean('Default to New Sales Team',
help="If you check this field, this stage will be proposed by default on each sales team. It will not assign this stage to existing teams."),
'fold': fields.boolean('Fold by Default',
help="This stage is not visible, for example in status bar or kanban view, when there are no records in that stage to display."),
'fold': fields.boolean('Folded in Kanban View',
help='This stage is folded in the kanban view when'
'there are no records in that stage to display.'),
'type': fields.selection([('lead', 'Lead'),
('opportunity', 'Opportunity'),
('both', 'Both')],
@ -78,8 +79,8 @@ class crm_case_stage(osv.osv):
}
_defaults = {
'sequence': lambda *args: 1,
'probability': lambda *args: 0.0,
'sequence': 1,
'probability': 0.0,
'on_change': True,
'fold': False,
'type': 'both',

View File

@ -13,7 +13,6 @@
<field name="search_view_id" ref="crm.view_crm_case_leads_filter"/>
<field name="context">{
'search_default_section_id': [active_id],
'search_default_open': 1,
'default_section_id': active_id,
'default_type': 'lead',
'stage_type': 'lead',
@ -43,7 +42,6 @@
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
<field name="context">{
'search_default_section_id': [active_id],
'search_default_assigned_to_me': 1,
'default_section_id': active_id,
'stage_type': 'opportunity',
'default_type': 'opportunity',
@ -64,6 +62,26 @@
</field>
</record>
<record id="action_report_crm_lead_salesteam" model="ir.actions.act_window">
<field name="name">Leads Analysis</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="context">{"search_default_month":1}</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('type','=', 'lead'),('section_id', '=', active_id)]</field>
<field name="help">Leads Analysis allows you to check different CRM related information like the treatment delays or number of leads per state. You can sort out your leads analysis by different groups to get accurate grained analysis.</field>
</record>
<record id="action_report_crm_opportunity_salesteam" model="ir.actions.act_window">
<field name="name">Opportunities Analysis</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="context">{"search_default_month":1}</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('type','=', 'opportunity'), ('section_id', '=', active_id)]</field>
<field name="help">Opportunities Analysis gives you an instant access to your opportunities with information such as the expected revenue, planned cost, missed deadlines or the number of interactions per opportunity. This report is mainly used by the sales manager in order to do the periodic review with the teams of the sales pipeline.</field>
</record>
<!-- Case Sections Salesteams kanban view -->
<record model="ir.ui.view" id="crm_case_section_salesteams_view_kanban">
@ -99,13 +117,25 @@
<div class="oe_items_list">
<div class="oe_salesteams_leads" t-if="record.use_leads.raw_value">
<a name="%(crm_case_form_view_salesteams_lead)d" type="action">Leads</a>
<a name="%(action_report_crm_lead)d" type="action" class="oe_sparkline_bar_link"><field name="monthly_open_leads" widget="sparkline_bar" options="{'height': '20px', 'barWidth': 4, 'barSpacing': 1}">Open Leads per Month<br/>Click to see a detailed analysis of leads.</field></a>
<a name="%(action_report_crm_lead_salesteam)d" type="action" class="oe_sparkline_bar_link">
<field name="monthly_open_leads" widget="sparkline_bar"
options="{'height': '20px', 'barWidth': 4, 'barSpacing': 1, 'delayIn': '3000', 'tooltip_suffix': 'Leads'}">Open Leads per Month<br/>Click to see a detailed analysis of leads.</field>
</a>
</div>
<div class="oe_salesteams_opportunities">
<a name="%(crm_case_form_view_salesteams_opportunity)d" type="action">Opportunities</a>
<a name="%(action_report_crm_opportunity)d" type="action"><field name="monthly_planned_revenue" widget="sparkline_bar" height="20px" barWidth="4" barSpacing="1">Planned Revenue per Month<br/>Click to see a detailed analysis of opportunities.</field></a>
<a name="%(action_report_crm_opportunity_salesteam)d" type="action">
<field name="monthly_planned_revenue" widget="sparkline_bar"
options="{'height': '20px', 'barWidth': '4', 'barSpacing': '1', 'delayIn': '3000', 'tooltip_suffix': 'Opportunities'}">Planned Revenue per Month<br/>Click to see a detailed analysis of opportunities.</field>
</a>
</div>
</div>
<div class="oe_clear"></div>
<div class="oe_kanban_salesteams_avatars">
<t t-foreach="record.member_ids.raw_value.slice(0,10)" t-as="member">
<img t-att-src="kanban_image('res.users', 'image_small', member)" t-att-data-member_id="member"/>
</t>
</div>
</div>
</div>
</t>

View File

@ -6,14 +6,20 @@
<field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/>
</record>
<record id="crm.section_sales_department" model="crm.case.section">
<field name="member_ids" eval="[(4, ref('base.user_demo'))]"/>
</record>
<record model="crm.case.section" id="crm_case_section_1">
<field name="name">Indirect Sales</field>
<field name="code">IM</field>
<field name="member_ids" eval="[(4, ref('base.user_root')),(4, ref('base.user_demo'))]"/>
</record>
<record model="crm.case.section" id="crm_case_section_2">
<field name="name">Marketing</field>
<field name="code">SPD</field>
<field name="member_ids" eval="[(4, ref('base.user_root')),(4, ref('base.user_demo'))]"/>
</record>
<record model="crm.segmentation" id="crm_segmentation0">

View File

@ -72,10 +72,11 @@ class crm_lead(format_address, osv.osv):
_track = {
'stage_id': {
'crm.mt_lead_create': lambda self, cr, uid, obj, ctx=None: obj.probability == 0 and obj.stage_id and obj.stage_id.sequence == 1,
'crm.mt_lead_stage': lambda self, cr, uid, obj, ctx=None: (obj.stage_id and obj.stage_id.sequence != 1) and obj.probability < 100,
'crm.mt_lead_won': lambda self, cr, uid, obj, ctx=None: obj.probability == 100 and obj.stage_id and obj.stage_id.on_change,
'crm.mt_lead_lost': lambda self, cr, uid, obj, ctx=None: obj.probability == 0 and obj.stage_id and obj.stage_id.sequence != 1,
# this is only an heuristics; depending on your particular stage configuration it may not match all 'new' stages
'crm.mt_lead_create': lambda self, cr, uid, obj, ctx=None: obj.probability == 0 and obj.stage_id and obj.stage_id.sequence <= 1,
'crm.mt_lead_stage': lambda self, cr, uid, obj, ctx=None: (obj.stage_id and obj.stage_id.sequence > 1) and obj.probability < 100,
'crm.mt_lead_won': lambda self, cr, uid, obj, ctx=None: obj.probability == 100 and obj.stage_id and obj.stage_id.fold,
'crm.mt_lead_lost': lambda self, cr, uid, obj, ctx=None: obj.probability == 0 and obj.stage_id and obj.stage_id.fold and obj.stage_id.sequence > 1,
},
}
@ -93,7 +94,7 @@ class crm_lead(format_address, osv.osv):
def _get_default_stage_id(self, cr, uid, context=None):
""" Gives default stage_id """
section_id = self._get_default_section_id(cr, uid, context=context)
return self.stage_find(cr, uid, [], section_id, [('sequence', '=', '1')], context=context)
return self.stage_find(cr, uid, [], section_id, [('fold', '=', False)], context=context)
def _resolve_section_id_from_context(self, cr, uid, context=None):
""" Returns ID of section based on the value of 'section_id'
@ -382,34 +383,52 @@ class crm_lead(format_address, osv.osv):
# AND with the domain in parameter
search_domain += list(domain)
# perform search, return the first found
stage_ids = self.pool.get('crm.case.stage').search(cr, uid, search_domain, order=order, context=context)
stage_ids = self.pool.get('crm.case.stage').search(cr, uid, search_domain, order=order, limit=1, context=context)
if stage_ids:
return stage_ids[0]
return False
def case_mark_lost(self, cr, uid, ids, context=None):
""" Mark the case as lost: state=cancel and probability=0 """
for lead in self.browse(cr, uid, ids):
stage_id = self.stage_find(cr, uid, [lead], lead.section_id.id or False, [('probability', '=', 0.0), ('on_change', '=', True), ('sequence', '>', 1)], context=context)
""" Mark the case as lost: state=cancel and probability=0
:deprecated: this method will be removed in OpenERP v8.
"""
stages_leads = {}
for lead in self.browse(cr, uid, ids, context=context):
stage_id = self.stage_find(cr, uid, [lead], lead.section_id.id or False, [('probability', '=', 0.0), ('fold', '=', True), ('sequence', '>', 1)], context=context)
if stage_id:
return self.write(cr, uid, [lead.id], {'stage_id': stage_id}, context=context)
if stages_leads.get(stage_id):
stages_leads[stage_id].append(lead.id)
else:
stages_leads[stage_id] = [lead.id]
else:
raise osv.except_osv(_('Warning!'),
_('To relieve your sales pipe and group all Lost opportunities, configure one of your sales stage as follow:\n'
'probability = 0 %, select "Change Probability Automatically".\n'
'Create a specific stage or edit an existing one by editing columns of your opportunity pipe.'))
for stage_id, lead_ids in stages_leads.items():
self.write(cr, uid, lead_ids, {'stage_id': stage_id}, context=context)
return True
def case_mark_won(self, cr, uid, ids, context=None):
""" Mark the case as won: state=done and probability=100 """
for lead in self.browse(cr, uid, ids):
stage_id = self.stage_find(cr, uid, [lead], lead.section_id.id or False, [('probability', '=', 100.0), ('on_change', '=', True), ('sequence', '>', 1)], context=context)
""" Mark the case as won: state=done and probability=100
:deprecated: this method will be removed in OpenERP v8.
"""
stages_leads = {}
for lead in self.browse(cr, uid, ids, context=context):
stage_id = self.stage_find(cr, uid, [lead], lead.section_id.id or False, [('probability', '=', 100.0), ('fold', '=', True)], context=context)
if stage_id:
return self.write(cr, uid, [lead.id], {'stage_id': stage_id}, context=context)
if stages_leads.get(stage_id):
stages_leads[stage_id].append(lead.id)
else:
stages_leads[stage_id] = [lead.id]
else:
raise osv.except_osv(_('Warning!'),
_('To relieve your sales pipe and group all Won opportunities, configure one of your sales stage as follow:\n'
'probability = 100 % and select "Change Probability Automatically".\n'
'Create a specific stage or edit an existing one by editing columns of your opportunity pipe.'))
for stage_id, lead_ids in stages_leads.items():
self.write(cr, uid, lead_ids, {'stage_id': stage_id}, context=context)
return True
def case_escalate(self, cr, uid, ids, context=None):
""" Escalates case to parent level """
@ -617,7 +636,7 @@ class crm_lead(format_address, osv.osv):
# An Opportunity always has higher confidence level than a lead, unless its stage probability is 0.0
for opportunity in opportunities:
sequence = -1
if opportunity.stage_id and (opportunity.stage_id.probability != 0 or opportunity.stage_id.sequence == 1):
if opportunity.stage_id and not opportunity.stage_id.fold:
sequence = opportunity.stage_id.sequence
sequenced_opps.append(((int(sequence != -1 and opportunity.type == 'opportunity'), sequence, -opportunity.id), opportunity))
@ -678,7 +697,7 @@ class crm_lead(format_address, osv.osv):
'phone': customer and customer.phone or lead.phone,
}
if not lead.stage_id or lead.stage_id.type=='lead':
val['stage_id'] = self.stage_find(cr, uid, [lead], section_id, [('sequence', '=', '1'), ('type', 'in', ('opportunity','both'))], context=context)
val['stage_id'] = self.stage_find(cr, uid, [lead], section_id, [('type', 'in', ('opportunity', 'both'))], context=context)
return val
def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, section_id=False, context=None):
@ -688,7 +707,7 @@ class crm_lead(format_address, osv.osv):
customer = partner.browse(cr, uid, partner_id, context=context)
for lead in self.browse(cr, uid, ids, context=context):
# TDE: was if lead.state in ('done', 'cancel'):
if (lead.probability == '100') or (lead.probability == '0' and lead.stage_id.sequence != '1'):
if lead.probability == 100 or (lead.probability == 0 and lead.stage_id.fold):
continue
vals = self._convert_opportunity_data(cr, uid, lead, customer, section_id, context=context)
self.write(cr, uid, [lead.id], vals, context=context)
@ -818,9 +837,11 @@ class crm_lead(format_address, osv.osv):
model_data = self.pool.get('ir.model.data')
phonecall_dict = {}
if not categ_id:
res_id = model_data._get_id(cr, uid, 'crm', 'categ_phone2')
if res_id:
try:
res_id = model_data._get_id(cr, uid, 'crm', 'categ_phone2')
categ_id = model_data.browse(cr, uid, res_id, context=context).res_id
except ValueError:
pass
for lead in self.browse(cr, uid, ids, context=context):
if not section_id:
section_id = lead.section_id and lead.section_id.id or False
@ -927,6 +948,23 @@ class crm_lead(format_address, osv.osv):
vals.update(onchange_stage_values)
return super(crm_lead, self).write(cr, uid, ids, vals, context=context)
def copy(self, cr, uid, id, default=None, context=None):
if not default:
default = {}
if not context:
context = {}
lead = self.browse(cr, uid, id, context=context)
local_context = dict(context)
local_context.setdefault('default_type', lead.type)
local_context.setdefault('default_section_id', lead.section_id)
if lead.type == 'opportunity':
default['date_open'] = fields.datetime.now()
else:
default['date_open'] = False
default['date_closed'] = False
default['stage_id'] = self._get_default_stage_id(cr, uid, local_context)
return super(crm_lead, self).copy(cr, uid, id, default, context=context)
# ----------------------------------------
# Mail Gateway
# ----------------------------------------

View File

@ -44,6 +44,7 @@
<record model="crm.case.stage" id="stage_lead6">
<field name="name">Won</field>
<field name="case_default">1</field>
<field name="fold">1</field>
<field name="probability">100</field>
<field name="on_change">1</field>
<field name="sequence">70</field>
@ -203,7 +204,7 @@
<field name="model_id" ref="crm.model_crm_lead"/>
<field name="auto_delete" eval="True"/>
<field name="partner_to">${object.partner_id != False and object.partner_id.id}</field>
<field name="email_to">${not object.partner_id and object.email_from}</field>
<field name="email_to">${(not object.partner_id and object.email_from)|safe}</field>
<field name="body_html"></field>
</record>
<record id="email_template_opportunity_reminder_mail" model="email.template">
@ -211,7 +212,7 @@
<field name="model_id" ref="crm.model_crm_lead"/>
<field name="auto_delete" eval="True"/>
<field name="email_from">admin@example.com</field>
<field name="email_to">${object.user_id != False and object.user_id.email}</field>
<field name="email_to">${(object.user_id != False and object.user_id.email)|safe}</field>
<field name="subject">Reminder on Lead: ${object.id} from ${object.partner_id != False and object.partner_id.name or object.contact_name}</field>
<field name="body_html"><![CDATA[<p>This opportunity did not have any activity since at least 5 days. Here are some details:</p>
<ul>

View File

@ -99,6 +99,7 @@
help="Convert to Opportunity" class="oe_highlight"/>
<field name="stage_id" widget="statusbar" clickable="True"
domain="['&amp;', '|', ('case_default', '=', True), ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'both')]"
options="{'fold_field': 'fold'}"
on_change="onchange_stage_id(stage_id)"/>
</header>
<sheet>
@ -323,7 +324,7 @@
<field name="model">crm.lead</field>
<field name="arch" type="xml">
<search string="Search Leads">
<field name="name" string="Lead / Customer" filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
<field name="name" string="Lead / Customer" filter_domain="['|','|','|',('partner_name','ilike',self),('email_from','ilike',self),('contact_name','ilike',self),('name','ilike',self)]"/>
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike',self)]"/>
<field name="section_id" context="{'invisible_section': False}" groups="base.group_multi_salesteams"/>
<field name="user_id"/>
@ -334,14 +335,14 @@
<filter string="Unassigned" name="unassigned"
domain="[('user_id','=', False)]"
help="No salesperson"/>
<filter string="Assigned to Me"
<filter string="My Leads"
domain="[('user_id','=',uid)]" context="{'invisible_section': False}"
help="Leads that are assigned to me"/>
<filter string="Assigned to My Team(s)" groups="base.group_multi_salesteams"
<filter string="My Team(s)" groups="base.group_multi_salesteams"
domain="[('section_id.member_ids', 'in', [uid])]" context="{'invisible_section': False}"
help="Leads that are assigned to any sales teams I am member of"/>
<filter string="Dead" name="dead"
domain="[('probability', '=', '0'), ('stage_id.sequence', '!=', 1)]"/>
domain="[('probability', '=', '0'), ('stage_id.fold', '=', True)]"/>
<separator />
<filter string="Available for mass mailing"
name='not_opt_out' domain="[('opt_out', '=', False)]"
@ -379,12 +380,11 @@
<field name="arch" type="xml">
<form string="Opportunities" version="7.0">
<header>
<button name="case_mark_won" string="Mark Won" type="object" class="oe_highlight"
attrs="{'invisible': [('probability', '=', 100)]}"/>
<button name="case_mark_lost" string="Mark Lost" type="object" class="oe_highlight"
attrs="{'invisible': ['|', ('probability', '=', 0), ('probability', '=', 100)]}"/>
<button name="case_mark_won" string="Mark Won" type="object" class="oe_highlight"/>
<button name="case_mark_lost" string="Mark Lost" type="object" class="oe_highlight"/>
<field name="stage_id" widget="statusbar" clickable="True"
domain="['&amp;', ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'both')]"/>
options="{'fold_field': 'fold'}"
domain="['&amp;', ('section_ids', '=', section_id), '|', ('type', '=', type), ('type', '=', 'both')]"/>
</header>
<sheet>
<div class="oe_right oe_button_box">
@ -550,18 +550,16 @@
<field name="stage_id" domain="[]"/>
<field name="probability"/>
<separator/>
<filter string="New" name="new"
domain="[('probability', '=', 0), ('stage_id.sequence', '=', 1)]"/>
<filter string="Won" name="won"
domain="[('probability', '=', 100), ('stage_id.on_change', '=', 1)]"/>
domain="[('probability', '=', 100), ('stage_id.fold', '=', True)]"/>
<filter string="Lost" name="lost"
domain="[('probability', '=', 0), ('stage_id.sequence', '!=', 1)]"/>
domain="[('probability', '=', 0), ('stage_id.fold', '=', True)]"/>
<filter string="Unassigned" name="unassigned"
domain="[('user_id','=', False)]" help="No salesperson"/>
<filter string="My Opportunities" name="assigned_to_me"
domain="[('user_id', '=', uid)]" context="{'invisible_section': False}"
help="Opportunities that are assigned to me"/>
<filter string="Assigned to My Team(s)"
<filter string="My Team(s)"
domain="[('section_id.member_ids', 'in', [uid])]" context="{'invisible_section': False}"
help="Opportunities that are assigned to any sales teams I am member of"/>
<separator/>
@ -600,7 +598,7 @@
id="crm.action_lead_mass_mail"
context="{
'default_composition_mode': 'mass_mail',
'default_email_to':'{$object.email or \'\'}',
'default_email_to':'{($object.email or \'\')|safe}',
'default_use_template': True,
'default_template_id': ref('crm.email_template_opportunity_mail'),
}"
@ -621,7 +619,6 @@
if context.get('active_model') == 'crm.lead' and context.get('active_ids'):
self.case_mark_lost(cr, uid, context['active_ids'], context=context)
</field>
<field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/>
</record>
<record id="ir_mark_as_lost" model="ir.values">

View File

@ -117,9 +117,11 @@ class crm_phonecall(osv.osv):
model_data = self.pool.get('ir.model.data')
phonecall_dict = {}
if not categ_id:
res_id = model_data._get_id(cr, uid, 'crm', 'categ_phone2')
if res_id:
try:
res_id = model_data._get_id(cr, uid, 'crm', 'categ_phone2')
categ_id = model_data.browse(cr, uid, res_id, context=context).res_id
except ValueError:
pass
for call in self.browse(cr, uid, ids, context=context):
if not section_id:
section_id = call.section_id and call.section_id.id or False

View File

@ -120,7 +120,7 @@
<field name="date"/>
<field name="name"/>
<field name="partner_id"
on_change="onchange_partner_id(partner_id)"/>
on_change="on_change_partner_id(partner_id)"/>
<field name="partner_phone"
invisible="1"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>

View File

@ -93,14 +93,19 @@
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<form string="Stage" version="7.0">
<group col="4">
<field name="name"/>
<field name="probability"/>
<field name="type"/>
<field name="on_change"/>
<field name="sequence"/>
<field name="case_default" groups="base.group_multi_salesteams"/>
<field name="fold"/>
<group>
<group>
<field name="name"/>
<field name="sequence"/>
<field name="type"/>
<field name="probability"/>
</group>
<group>
<field name="fold"/>
<field name="on_change"/>
<field name="case_default" groups="base.group_multi_salesteams"/>
</group>
</group>
<separator string="Requirements"/>
<field name="requirements" nolabel="1"/>

View File

@ -66,9 +66,6 @@
<field name="model">crm.lead.report</field>
<field name="arch" type="xml">
<search string="Leads Analysis">
<filter icon="terp-personal" name="lead" string="Lead" domain="[('type','=', 'lead')]" help="Show only lead"/>
<filter icon="terp-personal+" string="Opportunity" name="opportunity" domain="[('type','=','opportunity')]" help="Show only opportunity"/>
<separator/>
<filter string="New" name="new"
domain="[('probability', '=', 0), ('stage_id.sequence', '=', 1)]"/>
<filter string="Won" name="won"
@ -115,7 +112,7 @@
<separator orientation="vertical" />
<filter string="Year" icon="terp-go-year"
domain="[]" context="{'group_by':'creation_year'}"/>
<filter string="Month" icon="terp-go-month"
<filter string="Month" name="month" icon="terp-go-month"
domain="[]" context="{'group_by':'creation_month'}"/>
<filter string="Day" icon="terp-go-today"
domain="[]" context="{'group_by':'creation_day'}"/>
@ -168,9 +165,9 @@
<field name="name">Leads Analysis</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="context">{'search_default_year': 1,'search_default_lead': 1, "search_default_user":1, "search_default_this_month":1, 'group_by_no_leaf':1, 'group_by':[]}</field>
<field name="context">{'search_default_year': 1, "search_default_user":1, "search_default_month":1, 'group_by_no_leaf':1, 'group_by':[]}</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[]</field>
<field name="domain">[('type','=', 'lead')]</field>
<field name="help">Leads Analysis allows you to check different CRM related information like the treatment delays or number of leads per state. You can sort out your leads analysis by different groups to get accurate grained analysis.</field>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_lead_tree">
@ -190,8 +187,9 @@
<field name="name">Opportunities Analysis</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="context">{"search_default_year":1,"search_default_opportunity":1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{"search_default_year":1, "search_default_user":1,"search_default_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('type','=', 'opportunity')]</field>
<field name="help">Opportunities Analysis gives you an instant access to your opportunities with information such as the expected revenue, planned cost, missed deadlines or the number of interactions per opportunity. This report is mainly used by the sales manager in order to do the periodic review with the teams of the sales pipeline.</field>
</record>

View File

@ -91,5 +91,19 @@
<field name="groups" eval="[(4, ref('base.group_sale_salesman_all_leads'))]"/>
</record>
<record id="crm_rule_personal_lead_report" model="ir.rule">
<field name="name">Personal Leads Analysis</field>
<field ref="model_crm_lead_report" name="model_id"/>
<field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
<field name="groups" eval="[(4, ref('base.group_sale_salesman'))]"/>
</record>
<record id="crm_rule_all_lead_report" model="ir.rule">
<field name="name">All Leads Analysis</field>
<field ref="model_crm_lead_report" name="model_id"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('base.group_sale_salesman_all_leads'))]"/>
</record>
</data>
</openerp>

View File

@ -35,5 +35,3 @@ access_crm_lead_partner_manager,crm.lead.partner.manager,model_crm_lead,base.gro
access_crm_phonecall_partner_manager,crm.phonecall.partner.manager,model_crm_phonecall,base.group_partner_manager,1,1,1,1
access_crm_payment_mode_user,crm.payment.mode,model_crm_payment_mode,base.group_sale_salesman,1,0,0,0
access_crm_payment_mode,crm.payment.mode,model_crm_payment_mode,base.group_sale_manager,1,1,1,1
access_base_partner_merge_line_manager,base_partner_merge_line.manager,model_base_partner_merge_line,base.group_system,1,1,1,1
access_base_partner_merge_manager,base_partner_merge.manager,model_base_partner_merge_automatic_wizard,base.group_system,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
35 access_crm_phonecall_partner_manager crm.phonecall.partner.manager model_crm_phonecall base.group_partner_manager 1 1 1 1
36 access_crm_payment_mode_user crm.payment.mode model_crm_payment_mode base.group_sale_salesman 1 0 0 0
37 access_crm_payment_mode crm.payment.mode model_crm_payment_mode base.group_sale_manager 1 1 1 1
access_base_partner_merge_line_manager base_partner_merge_line.manager model_base_partner_merge_line base.group_system 1 1 1 1
access_base_partner_merge_manager base_partner_merge.manager model_base_partner_merge_automatic_wizard base.group_system 1 1 1 1

View File

@ -0,0 +1,2 @@
crm.css: crm.sass
sass --trace -t expanded crm.sass:crm.css

View File

@ -1,64 +1,62 @@
@charset "utf-8";
.openerp .oe_kanban_view .oe_kanban_crm_salesteams {
width: 345px;
/* Customize width and height of kanban according bootstrap3 */
width: 357px;
min-height: 254px !important;
/* End of customize */
cursor: default;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_avatars {
text-align: right;
margin: -5px 0 -10px 0;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_avatars img {
width: 30px;
height: 30px;
padding-left: 0px;
margin-top: 3px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list {
position: relative;
margin: 10px;
position: relative;
/* Improved margin to set alignment of list items according bootstrap3 */
margin: 10px 0 10px 9px;
min-height: 10px;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div {
width: 160px;
height: 22px;
margin: 0 !important;
position: relative;
display: inline-block;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list a:hover {
text-decoration: underline !important;
width: 160px;
height: 22px;
margin: 0 !important;
position: relative;
display: inline-block;
float: left;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div a:nth-child(2n) {
position: absolute;
left: 90px;
top: 0;
position: absolute;
left: 90px;
top: 0;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div:nth-child(2n) a:nth-child(2n) {
left: 110px;
left: 110px;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list a:hover {
text-decoration: underline !important;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_center {
text-align: center;
margin: 3px 0;
text-align: center;
margin: 3px 0;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_center .oe_sum {
margin: 0;
font-size: 40px;
margin: 0;
font-size: 40px;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_center .oe_subsum {
font-size: 10px;
font-size: 10px;
}
.openerp .oe_kanban_view .oe_justgage {
color: black;
display: inline-block;
.openerp .oe_kanban_view .oe_salesteams_help {
display: inline-block;
}
.openerp .oe_kanban_view .oe_kanban_salesteams_avatars {
margin-top: 20px;
}
.openerp .oe_kanban_view .oe_kanban_salesteams_avatars img {
width: 30px;
height: 30px;
padding-left: 0px;
margin-top: 3px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.openerp .oe_kanban_view .oe_sparkline_bar {
height: 20px;
width: 36px;
}

View File

@ -0,0 +1,55 @@
@charset "utf-8"
.openerp
.oe_kanban_view
.oe_kanban_crm_salesteams
/* Customize width and height of kanban according bootstrap3 */
width: 357px
min-height: 254px !important
/* End of customize */
cursor: default
.oe_items_list
position: relative
/* Improved margin to set alignment of list items according bootstrap3 */
margin: 10px 0 10px 9px
min-height: 10px
div
width: 160px
height: 22px
margin: 0 !important
position: relative
display: inline-block
float: left
a:nth-child(2n)
position: absolute
left: 90px
top: 0
div:nth-child(2n)
a:nth-child(2n)
left: 110px
a:hover
text-decoration: underline !important
.oe_center
text-align: center
margin: 3px 0
.oe_sum
margin: 0
font-size: 40px
.oe_subsum
font-size: 10px
.oe_salesteams_help
display: inline-block
.oe_kanban_salesteams_avatars
margin-top: 20px
.oe_kanban_salesteams_avatars
img
width: 30px
height: 30px
padding-left: 0px
margin-top: 3px
-moz-border-radius: 2px
-webkit-border-radius: 2px
border-radius: 2px
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2)
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2)
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2)

View File

@ -1,4 +1,40 @@
openerp.crm = function(openerp) {
openerp.web_kanban.KanbanView.include({
crm_display_members_names: function() {
/*
* Set avatar title for members.
* In kanban views, many2many fields only return a list of ids.
* We can implement return value of m2m fields like [(1,"Adminstration"),...].
*/
var self = this;
var members_ids = [];
// Collect members ids
self.$el.find('img[data-member_id]').each(function() {
members_ids.push($(this).data('member_id'));
});
// Find their matching names
var dataset = new openerp.web.DataSetSearch(self, 'res.users', self.session.context, [['id', 'in', _.uniq(members_ids)]]);
dataset.read_slice(['id', 'name']).done(function(result) {
_.each(result, function(v, k) {
// Set the proper value in the DOM
self.$el.find('img[data-member_id=' + v.id + ']').attr('title', v.name).tipsy({
offset: 10
});
});
});
},
on_groups_started: function() {
var self = this;
self._super.apply(self, arguments);
if (self.dataset.model === 'crm.case.section') {
self.crm_display_members_names();
}
},
});
openerp.web_kanban.KanbanRecord.include({
on_card_clicked: function() {
if (this.view.dataset.model === 'crm.case.section') {
@ -8,5 +44,4 @@ openerp.crm = function(openerp) {
}
},
});
};

View File

@ -38,6 +38,9 @@ class crm_lead2opportunity_partner(osv.osv_memory):
'section_id': fields.many2one('crm.case.section', 'Sales Team', select=True),
}
def onchange_action(self, cr, uid, ids, action, context=None):
return {'value': {'partner_id': False if action != 'exist' else self._find_matching_partner(cr, uid, context=context)}}
def default_get(self, cr, uid, fields, context=None):
"""
Default get for name, opportunity_ids.
@ -59,11 +62,11 @@ class crm_lead2opportunity_partner(osv.osv_memory):
if partner_id:
# Search for opportunities that have the same partner and that arent done or cancelled
ids = lead_obj.search(cr, uid, [('partner_id', '=', partner_id), ('probability', '<', '100')])
ids = lead_obj.search(cr, uid, [('partner_id', '=', partner_id), '|', ('probability', '=', False), ('probability', '<', '100')])
for id in ids:
tomerge.add(id)
if email:
ids = lead_obj.search(cr, uid, [('email_from', '=ilike', email[0]), ('probability', '<', '100')])
ids = lead_obj.search(cr, uid, [('email_from', '=ilike', email[0]), '|', ('probability', '=', False), ('probability', '<', '100')])
for id in ids:
tomerge.add(id)

View File

@ -31,7 +31,7 @@
</field>
</group>
<group name="action" attrs="{'invisible': [('name', '!=', 'convert')]}">
<field name="action" class="oe_inline"/>
<field name="action" on_change="onchange_action(action, context)" class="oe_inline"/>
<field name="partner_id"
attrs="{'required': [('action', '=', 'exist')], 'invisible':[('action','!=','exist')]}"
class="oe_inline"/>

View File

@ -34,9 +34,11 @@ class crm_opportunity2phonecall(osv.osv_memory):
opp_obj = self.pool.get('crm.lead')
categ_id = False
data_obj = self.pool.get('ir.model.data')
res_id = data_obj._get_id(cr, uid, 'crm', 'categ_phone2')
if res_id:
try:
res_id = data_obj._get_id(cr, uid, 'crm', 'categ_phone2')
categ_id = data_obj.browse(cr, uid, res_id, context=context).res_id
except ValueError:
pass
record_ids = context and context.get('active_ids', []) or []
res = {}

View File

@ -78,9 +78,11 @@ class crm_phonecall2phonecall(osv.osv_memory):
categ_id = False
data_obj = self.pool.get('ir.model.data')
res_id = data_obj._get_id(cr, uid, 'crm', 'categ_phone2')
if res_id:
try:
res_id = data_obj._get_id(cr, uid, 'crm', 'categ_phone2')
categ_id = data_obj.browse(cr, uid, res_id, context=context).res_id
except ValueError:
pass
if 'name' in fields:
res.update({'name': phonecall.name})

View File

@ -173,7 +173,8 @@ class crm_claim(osv.osv):
through message_process.
This override updates the document according to the email.
"""
if custom_values is None: custom_values = {}
if custom_values is None:
custom_values = {}
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
@ -185,33 +186,7 @@ class crm_claim(osv.osv):
if msg.get('priority'):
defaults['priority'] = msg.get('priority')
defaults.update(custom_values)
return super(crm_claim,self).message_new(cr, uid, msg, custom_values=defaults, context=context)
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
""" Overrides mail_thread message_update that is called by the mailgateway
through message_process.
This method updates the document according to the email.
"""
if isinstance(ids, (str, int, long)):
ids = [ids]
if update_vals is None: update_vals = {}
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
update_vals['priority'] = msg.get('priority')
maps = {
'cost':'planned_cost',
'revenue': 'planned_revenue',
'probability':'probability'
}
for line in msg['body'].split('\n'):
line = line.strip()
res = tools.command_re.match(line)
if res and maps.get(res.group(1).lower()):
key = maps.get(res.group(1).lower())
update_vals[key] = res.group(2).lower()
return super(crm_claim,self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context)
return super(crm_claim, self).message_new(cr, uid, msg, custom_values=defaults, context=context)
class res_partner(osv.osv):
_inherit = 'res.partner'

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-12-14 13:47+0000\n"
"Last-Translator: 盈通 ccdos <ccdos@intoerp.com>\n"
"PO-Revision-Date: 2013-11-19 09:33+0000\n"
"Last-Translator: Guipo Hao <hrlpool@sohu.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@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: 2013-09-12 06:21+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-11-20 05:25+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: crm_claim
#: help:crm.claim.stage,fold:0
@ -91,6 +91,13 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击创建投诉类别。\n"
" </p><p>\n"
" 创建投诉类别来更好地对投诉进行管理和分类。\n"
" 例如:预防措施,纠正措施等。\n"
" </p>\n"
" "
#. module: crm_claim
#: view:crm.claim.report:0
@ -352,6 +359,7 @@ msgid ""
"is related to the status 'Close', when your document reaches this stage, it "
"will be automatically have the 'closed' status."
msgstr ""
"与此阶段对应的相关状态。文档的状态将根据所选阶段自动变更。例如:某阶段与状态“关闭”相关,当文档处于该阶段时,该文档自动设为“关闭”状态。"
#. module: crm_claim
#: view:crm.claim:0
@ -567,6 +575,13 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" 点击创建处理投诉的新阶段。 \n"
" </p><p>\n"
" 能够创建投诉阶段来分类管理每个进入系统的投诉。\n"
" 阶段可以定义解决投诉的所有必要的步骤。\n"
" </p>\n"
" "
#. module: crm_claim
#: help:crm.claim,state:0

View File

@ -51,7 +51,9 @@
<search string="Search">
<filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]" help="My Sales Team(s)" groups="base.group_multi_salesteams"/>
<separator/>
<filter string="My Company" icon="terp-go-home" context="{'invisible_section': False}" domain="[('section_id.user_id.company_id','=',uid)]" help="My company"/>
<!-- A 'My Company' filter makes no sense regarding record rules, and is not possible to do (uid is not a company): remove me in 8.0 -->
<filter string="My Company" icon="terp-go-home" context="{'invisible_section': False}" domain="[]" help="My company"
invisible="1"/>
<separator/>
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
<field name="company_id" groups="base.group_multi_company"/>

View File

@ -127,7 +127,8 @@ class crm_helpdesk(osv.osv):
through message_process.
This override updates the document according to the email.
"""
if custom_values is None: custom_values = {}
if custom_values is None:
custom_values = {}
desc = html2plaintext(msg.get('body')) if msg.get('body') else ''
defaults = {
'name': msg.get('subject') or _("No Subject"),
@ -138,32 +139,6 @@ class crm_helpdesk(osv.osv):
'partner_id': msg.get('author_id', False),
}
defaults.update(custom_values)
return super(crm_helpdesk,self).message_new(cr, uid, msg, custom_values=defaults, context=context)
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
""" Overrides mail_thread message_update that is called by the mailgateway
through message_process.
This method updates the document according to the email.
"""
if isinstance(ids, (str, int, long)):
ids = [ids]
if update_vals is None: update_vals = {}
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
update_vals['priority'] = msg.get('priority')
maps = {
'cost':'planned_cost',
'revenue': 'planned_revenue',
'probability':'probability'
}
for line in msg['body'].split('\n'):
line = line.strip()
res = tools.command_re.match(line)
if res and maps.get(res.group(1).lower()):
key = maps.get(res.group(1).lower())
update_vals[key] = res.group(2).lower()
return super(crm_helpdesk,self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context)
return super(crm_helpdesk, self).message_new(cr, uid, msg, custom_values=defaults, context=context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -21,20 +21,17 @@
{
'name': 'Partner Assignation',
'name': 'Partner Assignation & Geolocation',
'version': '1.0',
'category': 'Customer Relationship Management',
'description': """
This is the module used by OpenERP SA to redirect customers to its partners, based on geolocalization.
This is the module used by OpenERP SA to redirect customers to its partners, based on geolocation.
======================================================================================================
You can geolocalize your opportunities by using this module.
This modules lets you geolocate Leads, Opportunities and Partners based on their address.
Use geolocalization when assigning opportunities to partners.
Determine the GPS coordinates according to the address of the partner.
The most appropriate partner can be assigned.
You can also use the geolocalization without using the GPS coordinates.
Once the coordinates of the Lead/Opportunity is known, they can be automatically assigned
to an appropriate local partner, based on the distance and the weight that was assigned to the partner.
""",
'author': 'OpenERP SA',
'depends': ['base_geolocalize', 'crm', 'account', 'portal'],

View File

@ -42,3 +42,17 @@ class crm_lead(osv.osv):
def case_disinterested(self, cr, uid, ids, context=None):
return self.get_interested_action(cr, uid, False, context=context)
def assign_salesman_of_assigned_partner(self, cr, uid, ids, context=None):
salesmans_leads = {}
for lead in self.browse(cr, uid, ids, context=context):
if (lead.stage_id.probability > 0 and lead.stage_id.probability < 100) or lead.stage_id.sequence == 1:
if lead.partner_assigned_id and lead.partner_assigned_id.user_id and lead.partner_assigned_id.user_id != lead.user_id:
salesman_id = lead.partner_assigned_id.user_id.id
if salesmans_leads.get(salesman_id):
salesmans_leads[salesman_id].append(lead.id)
else:
salesmans_leads[salesman_id] = [lead.id]
for salesman_id, lead_ids in salesmans_leads.items():
salesteam_id = self.on_change_user(cr, uid, lead_ids, salesman_id, context=None)['value'].get('section_id')
self.write(cr, uid, lead_ids, {'user_id': salesman_id, 'section_id': salesteam_id}, context=context)

View File

@ -65,6 +65,9 @@
domain="[]" context="{'group_by':'date_assign'}"/>
</filter>
<filter string="My Team(s)" position="after">
<filter string="My Assigned Partners" domain="[('partner_assigned_id.user_id', '=', uid)]"/>
</filter>
<field name="partner_id" position="after">
<field name="partner_assigned_id"/>
</field>
@ -131,11 +134,39 @@
<filter string="Team" position="after">
<filter string="Assigned Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_assigned_id'}"/>
</filter>
<filter string="My Team(s)" position="after">
<filter string="My Assigned Partners" domain="[('partner_assigned_id.user_id', '=', uid)]"/>
</filter>
<field name="partner_id" position="after">
<field name="partner_assigned_id"/>
</field>
</field>
</record>
<record id="action_assign_salesman_according_assigned_partner" model="ir.actions.server">
<field name="name">Assign salesman of assigned partner</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="state">code</field>
<field name="code">
if context.get('active_model') == 'crm.lead':
ids = []
if context.get('active_domain'):
ids = self.search(cr, uid, context['active_domain'], context=context)
elif context.get('active_ids'):
ids = context['active_ids']
if ids:
self.assign_salesman_of_assigned_partner(cr, uid, ids, context=context)
</field>
</record>
<record model="ir.values" id="ir_assign_salesman_according_assigned_partner">
<field name="model_id" ref="model_crm_lead" />
<field name="name">Assign salesman of assigned partner</field>
<field name="key2">client_action_multi</field>
<field eval="'ir.actions.server,%d'%action_assign_salesman_according_assigned_partner" name="value"/>
<field name="key">action</field>
<field name="model">crm.lead</field>
</record>
</data>
</openerp>

View File

@ -134,23 +134,27 @@ class crm_lead(osv.osv):
return res
def assign_geo_localize(self, cr, uid, ids, latitude=False, longitude=False, context=None):
# Don't pass context to browse()! We need country name in english below
for lead in self.browse(cr, uid, ids):
if not lead.country_id:
continue
result = geo_find(geo_query_address(street=lead.street,
zip=lead.zip,
city=lead.city,
state=lead.state_id.name,
country=lead.country_id.name))
if not latitude and result:
latitude = result[0]
if not longitude and result:
longitude = result[1]
self.write(cr, uid, [lead.id], {
if latitude and longitude:
self.write(cr, uid, ids, {
'partner_latitude': latitude,
'partner_longitude': longitude
}, context=context)
return True
# Don't pass context to browse()! We need country name in english below
for lead in self.browse(cr, uid, ids):
if lead.partner_latitude and lead.partner_longitude:
continue
if lead.country_id:
result = geo_find(geo_query_address(street=lead.street,
zip=lead.zip,
city=lead.city,
state=lead.state_id.name,
country=lead.country_id.name))
if result:
self.write(cr, uid, [lead.id], {
'partner_latitude': result[0],
'partner_longitude': result[1]
}, context=context)
return True
def search_geo_partner(self, cr, uid, ids, context=None):

View File

@ -4,14 +4,14 @@
<record model="crm.case.stage" id="stage_portal_lead_assigned">
<field name="name">Assigned</field>
<field eval="1" name="case_default"/>
<field eval="0" name="probability"/>
<field eval="10" name="probability"/>
<field eval="12" name="sequence"/>
<field name="type">lead</field>
</record>
<record model="crm.case.stage" id="stage_portal_lead_recycle">
<field name="name">To Recycle</field>
<field eval="1" name="case_default"/>
<field eval="0" name="probability"/>
<field eval="5" name="probability"/>
<field eval="11" name="sequence"/>
<field name="type">lead</field>
</record>
@ -19,8 +19,8 @@
<field name="name">Lead Mass Mail</field>
<field name="model_id" model="ir.model" search="[('name', '=', 'crm.lead.forward.to.partner')]"></field>
<field name="auto_delete" eval="True"/>
<field name="email_to">${ctx['partner_id'].email}</field>
<field name="email_from">${user.email or ''}</field>
<field name="email_to">${ctx['partner_id'].email|safe}</field>
<field name="email_from">${(user.email or '')|safe}</field>
<field name="subject">Fwd: Lead: ${ctx['partner_id'].name}</field>
<field name="body_html"><![CDATA[
@ -31,7 +31,7 @@
<ol>
% for lead in ctx['partner_leads']:
<li><a href="${lead.lead_link}">${lead.lead_id.name or 'Subject Undefined'}</a>, ${lead.lead_id.contact_name or 'Contact Name Undefined'}, ${lead.lead_id.country_id and lead.lead_id.country_id.name or 'Country Undefined' }, ${lead.lead_id.email_from or 'Email Undefined'}, ${lead.lead_id.phone or ''} </li></br>
<li><a href="${lead.lead_link}">${lead.lead_id.name or 'Subject Undefined'}</a>, ${lead.lead_id.partner_name or lead.lead_id.contact_name or 'Contact Name Undefined'}, ${lead.lead_id.country_id and lead.lead_id.country_id.name or 'Country Undefined' }, ${lead.lead_id.email_from or 'Email Undefined'}, ${lead.lead_id.phone or ''} </li></br>
% endfor
</ol>
@ -56,4 +56,4 @@ PS: It looks like you do not have an account manager assigned to you, please con
]]></field>
</record>
</data>
</openerp>
</openerp>

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-07-23 06:22+0000\n"
"Last-Translator: fanvil <fanvil@hotmail.com>\n"
"PO-Revision-Date: 2013-11-19 09:36+0000\n"
"Last-Translator: Tom <feiyu5323@163.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@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: 2013-09-12 06:28+0000\n"
"X-Generator: Launchpad (build 16761)\n"
"X-Launchpad-Export-Date: 2013-11-20 05:25+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,delay_close:0
@ -85,7 +85,7 @@ msgstr "发送者的Email地址。当收取的email没有对应的合作伙伴
#. module: crm_partner_assign
#: view:crm.partner.report.assign:0
msgid "Date Partnership"
msgstr ""
msgstr "合作伙伴日期"
#. module: crm_partner_assign
#: selection:crm.lead.report.assign,type:0
@ -144,7 +144,7 @@ msgstr "消息唯一编号"
#. module: crm_partner_assign
#: field:res.partner,date_review_next:0
msgid "Next Partner Review"
msgstr ""
msgstr "下一个合作伙伴评价"
#. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,history_mode:0
@ -559,7 +559,7 @@ msgstr "8月"
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,record_name:0
msgid "Name get of the related document."
msgstr ""
msgstr "获得相关文档的名称"
#. module: crm_partner_assign
#: selection:crm.lead.report.assign,priority:0
@ -656,7 +656,7 @@ msgstr "计划收入"
#. module: crm_partner_assign
#: view:res.partner:0
msgid "Partner Review"
msgstr ""
msgstr "合作伙伴评价"
#. module: crm_partner_assign
#: field:crm.partner.report.assign,period_id:0
@ -857,7 +857,7 @@ msgstr "业务伙伴分析"
msgid ""
"Technical field holding the message notifications. Use notified_partner_ids "
"to access notified partners."
msgstr ""
msgstr "技术字段支持消息提醒使用notified_partner_ids 来访问被提醒的合作伙伴。"
#. module: crm_partner_assign
#: view:crm.partner.report.assign:0
@ -877,7 +877,7 @@ msgstr "写作模式"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,model:0
msgid "Related Document Model"
msgstr ""
msgstr "相关单据模型"
#. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,history_mode:0
@ -889,7 +889,7 @@ msgstr "业务信息"
msgid ""
"Author of the message. If not set, email_from may hold an email address that "
"did not match any partner."
msgstr ""
msgstr "消息的作者。如未设置email_from 可能保存一个不匹配任何合作伙伴的 email地址。"
#. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_partner_report_assign
@ -904,12 +904,12 @@ msgstr "高"
#. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,partner_ids:0
msgid "Additional contacts"
msgstr ""
msgstr "附加的联系人"
#. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,parent_id:0
msgid "Initial thread message."
msgstr ""
msgstr "初始化线索消息"
#. module: crm_partner_assign
#: field:crm.lead.report.assign,create_date:0

View File

@ -1,17 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="res_partner_grade_first" model="res.partner.grade">
<field name="name">First</field>
<record id="res_partner_grade_platinium" model="res.partner.grade">
<field name="name">Platinum</field>
<field name="sequence">4</field>
</record>
<record id="res_partner_grade_gold" model="res.partner.grade">
<field name="name">Gold</field>
<field name="sequence">3</field>
</record>
<record id="res_partner_grade_silver" model="res.partner.grade">
<field name="name">Silver</field>
<field name="sequence">2</field>
</record>
<record id="res_partner_grade_bronze" model="res.partner.grade">
<field name="name">Bronze</field>
<field name="sequence">1</field>
</record>
<record id="base.res_partner_15" model="res.partner">
<field name="grade_id" ref="res_partner_grade_first"/>
<field name="grade_id" ref="res_partner_grade_bronze"/>
<field name="partner_weight">10</field>
</record>
<record model="res.partner" id="base.res_partner_13">
<field name="assigned_partner_id" eval="ref('base.res_partner_15')"/>
</record>
<record id="base.res_partner_14" model="res.partner">
<field name="grade_id" ref="res_partner_grade_bronze"/>
<field name="partner_weight">10</field>
</record>
<record id="base.res_partner_23" model="res.partner">
<field name="grade_id" ref="res_partner_grade_bronze"/>
<field name="partner_weight">10</field>
</record>
<record id="base.res_partner_11" model="res.partner">
<field name="grade_id" ref="res_partner_grade_silver"/>
<field name="partner_weight">10</field>
</record>
<record id="base.res_partner_17" model="res.partner">
<field name="grade_id" ref="res_partner_grade_silver"/>
<field name="partner_weight">10</field>
</record>
<record id="base.res_partner_8" model="res.partner">
<field name="grade_id" ref="res_partner_grade_silver"/>
<field name="partner_weight">10</field>
</record>
<record id="base.res_partner_10" model="res.partner">
<field name="grade_id" ref="res_partner_grade_gold"/>
<field name="partner_weight">10</field>
</record>
<record id="base.res_partner_18" model="res.partner">
<field name="grade_id" ref="res_partner_grade_gold"/>
<field name="partner_weight">10</field>
</record>
<record id="base.res_partner_26" model="res.partner">
<field name="grade_id" ref="res_partner_grade_gold"/>
<field name="partner_weight">10</field>
</record>
<record id="base.res_partner_12" model="res.partner">
<field name="grade_id" ref="res_partner_grade_platinium"/>
<field name="partner_weight">10</field>
</record>
<record id="base.res_partner_4" model="res.partner">
<field name="grade_id" ref="res_partner_grade_platinium"/>
<field name="partner_weight">10</field>
</record>
<record model="res.partner" id="base.res_partner_24">
<field name="assigned_partner_id" eval="ref('base.res_partner_21')"/>
</record>
<record model="res.partner" id="base.res_partner_12">
<field name="assigned_partner_id" eval="ref('base.res_partner_10')"/>
</record>
<record model="res.partner" id="base.res_partner_7">
<field name="assigned_partner_id" eval="ref('base.res_partner_4')"/>
</record>
<record model="res.partner" id="base.res_partner_10">
<field name="assigned_partner_id" eval="ref('base.res_partner_23')"/>
</record>
<record model="res.partner" id="base.res_partner_3">
<field name="assigned_partner_id" eval="ref('base.res_partner_5')"/>
</record>
<record model="res.partner" id="base.res_partner_19">
<field name="assigned_partner_id" eval="ref('base.res_partner_22')"/>
</record>
<record model="res.partner" id="base.res_partner_14">
<field name="assigned_partner_id" eval="ref('base.res_partner_18')"/>
</record>
<record model="res.partner" id="base.res_partner_4">
<field name="assigned_partner_id" eval="ref('base.res_partner_11')"/>
</record>
<record model="res.partner" id="base.res_partner_6">
<field name="assigned_partner_id" eval="ref('base.res_partner_9')"/>
</record>
<record model="res.partner" id="base.res_partner_1">
<field name="assigned_partner_id" eval="ref('base.res_partner_2')"/>
</record>
<record model="res.partner" id="base.res_partner_6">
<field name="assigned_partner_id" eval="ref('base.res_partner_13')"/>
</record>
<record model="res.partner" id="base.res_partner_9">
<field name="assigned_partner_id" eval="ref('base.res_partner_12')"/>
</record>
</data>
</openerp>

View File

@ -32,7 +32,7 @@ You can define your own carrier and delivery grids for prices. When creating
invoices from picking, OpenERP is able to add and compute the shipping line.
""",
'author': 'OpenERP SA',
'depends': ['sale', 'stock'],
'depends': ['sale_stock'],
'data': [
'security/ir.model.access.csv',
'delivery_report.xml',

View File

@ -20,29 +20,69 @@
##############################################################################
import time
from openerp.osv import fields,osv
from openerp.addons import decimal_precision
from openerp.addons.sale.sale import sale_order as OriginalSaleOrder
from openerp.osv import fields, osv
from openerp.tools.translate import _
class sale_order_line(osv.osv):
_inherit = 'sale.order.line'
_columns = {
'is_delivery':fields.boolean("Is a Delivery"),
'is_delivery': fields.boolean("Is a Delivery"),
}
_defaults = {
'is_delivery': False
}
class sale_order(osv.osv):
class sale_order(osv.Model):
_inherit = 'sale.order'
def _amount_all_wrapper(self, cr, uid, ids, field_name, arg, context=None):
""" Wrapper because of direct method passing as parameter for function fields """
return self._amount_all(cr, uid, ids, field_name, arg, context=context)
def _amount_all(self, cr, uid, ids, field_name, arg, context=None):
res = super(sale_order, self)._amount_all(cr, uid, ids, field_name, arg, context=context)
Currency = self.pool.get('res.currency')
for order in self.browse(cr, uid, ids, context=context):
line_amount = sum([line.price_subtotal for line in order.order_line if line.is_delivery])
currency = order.pricelist_id.currency_id
res[order.id]['amount_delivery'] = Currency.round(cr, uid, currency, line_amount)
return res
def _get_order(self, cr, uid, ids, context=None):
result = {}
for line in self.pool.get('sale.order.line').browse(cr, uid, ids, context=context):
result[line.order_id.id] = True
return result.keys()
_columns = {
'carrier_id':fields.many2one("delivery.carrier", "Delivery Method", help="Complete this field if you plan to invoice the shipping based on picking."),
'carrier_id': fields.many2one(
"delivery.carrier", string="Delivery Method",
help="Complete this field if you plan to invoice the shipping based on picking."),
'amount_delivery': fields.function(
_amount_all_wrapper, type='float', digits_compute=decimal_precision.get_precision('Account'),
string='Delivery Amount',
store={
'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
},
multi='sums', help="The amount without tax.", track_visibility='always'
),
}
def onchange_partner_id(self, cr, uid, ids, part, context=None):
result = super(sale_order, self).onchange_partner_id(cr, uid, ids, part, context=context)
if part:
dtype = self.pool.get('res.partner').browse(cr, uid, part, context=context).property_delivery_carrier.id
result['value']['carrier_id'] = dtype
# TDE NOTE: not sure the aded 'if dtype' is valid
if dtype:
result['value']['carrier_id'] = dtype
return result
def _prepare_order_picking(self, cr, uid, order, context=None):
@ -57,7 +97,6 @@ class sale_order(osv.osv):
return True
def delivery_set(self, cr, uid, ids, context=None):
order_obj = self.pool.get('sale.order')
line_obj = self.pool.get('sale.order.line')
grid_obj = self.pool.get('delivery.grid')
carrier_obj = self.pool.get('delivery.carrier')
@ -85,14 +124,10 @@ class sale_order(osv.osv):
'product_uom': grid.carrier_id.product_id.uom_id.id,
'product_id': grid.carrier_id.product_id.id,
'price_unit': grid_obj.get_price(cr, uid, grid.id, order, time.strftime('%Y-%m-%d'), context),
'tax_id': [(6,0,taxes_ids)],
'tax_id': [(6, 0, taxes_ids)],
'type': 'make_to_stock',
'is_delivery': True
})
#remove the value of the carrier_id field on the sale order
return self.write(cr, uid, ids, {'carrier_id': False}, context=context)
#return {'type': 'ir.actions.act_window_close'} action reload?
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# remove the value of the carrier_id field on the sale order
# TDE NOTE: why removing it ?? seems weird
# return self.write(cr, uid, ids, {'carrier_id': False}, context=context)

View File

@ -187,6 +187,9 @@ class stock_move(osv.osv):
# Redefinition of the new fields in order to update the model stock.picking.out in the orm
# FIXME: this is a temporary workaround because of a framework bug (ref: lp996816). It should be removed as soon as
# the bug is fixed
# TODO in trunk: Remove the duplication below using a mixin class!
class stock_picking_out(osv.osv):
_inherit = 'stock.picking.out'
@ -212,6 +215,7 @@ class stock_picking_out(osv.osv):
}),
'carrier_tracking_ref': fields.char('Carrier Tracking Ref', size=32),
'number_of_packages': fields.integer('Number of Packages'),
'weight_uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True,readonly="1",help="Unit of measurement for Weight",),
}
class stock_picking_in(osv.osv):
@ -224,6 +228,8 @@ class stock_picking_in(osv.osv):
return self.pool.get('stock.picking')._get_picking_line(cr, uid, ids, context=context)
_columns = {
'carrier_id':fields.many2one("delivery.carrier","Carrier"),
'volume': fields.float('Volume'),
'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
store={
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
@ -234,6 +240,9 @@ class stock_picking_in(osv.osv):
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
}),
'carrier_tracking_ref': fields.char('Carrier Tracking Ref', size=32),
'number_of_packages': fields.integer('Number of Packages'),
'weight_uom_id': fields.many2one('product.uom', 'Unit of Measure', required=True,readonly="1",help="Unit of measurement for Weight",),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -69,7 +69,11 @@ class document_file(osv.osv):
def check(self, cr, uid, ids, mode, context=None, values=None):
"""Overwrite check to verify access on directory to validate specifications of doc/access_permissions.rst"""
if not isinstance(ids, list):
ids = [ids]
super(document_file, self).check(cr, uid, ids, mode, context=context, values=values)
if ids:
self.pool.get('ir.model.access').check(cr, uid, 'document.directory', mode)

View File

@ -15,3 +15,4 @@ access_report_document_user_group_document_manager,report.document.user document
access_report_document_file_group_document_manager,report.document.file document manager,model_report_document_file,base.group_system,1,0,0,0
access_report_document_file_group_document,report.document.file document manager,model_report_document_file,base.group_document_user,1,0,0,0
access_report_document_user_knowledgeuser,report.document.user knowledgeuser,document.model_report_document_user,base.group_document_user,1,0,0,0
access_document_storage,access_document_storage,model_document_storage,base.group_system,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
15 access_report_document_file_group_document_manager report.document.file document manager model_report_document_file base.group_system 1 0 0 0
16 access_report_document_file_group_document report.document.file document manager model_report_document_file base.group_document_user 1 0 0 0
17 access_report_document_user_knowledgeuser report.document.user knowledgeuser document.model_report_document_user base.group_document_user 1 0 0 0
18 access_document_storage access_document_storage model_document_storage base.group_system 1 1 1 1

View File

@ -9,7 +9,7 @@ openerp.document = function (instance) {
on_attachments_loaded: function(attachments) {
//to display number in name if more then one attachment which has same name.
var self = this;
_.chain(attachments.reverse())
_.chain(attachments)
.groupBy(function(attachment) { return attachment.name})
.each(function(attachment){
if(attachment.length > 1)

View File

@ -34,6 +34,9 @@ def start_server():
if openerp.multi_process:
_logger.info("FTP disabled in multiprocess mode")
return
if openerp.evented:
_logger.info("FTP disabled in evented mode")
return
HOST = config.get('ftp_server_host', '127.0.0.1')
PORT = int(config.get('ftp_server_port', '8021'))
PASSIVE_PORTS = None

View File

@ -55,7 +55,7 @@ class res_partner(osv.osv, EDIMixin):
res_partner_bank_type = self.pool.get('res.partner.bank.type')
try:
return self.pool.get('ir.model.data').get_object(cr, uid, 'base', 'bank_normal', context=context).code
except ValueError:
except:
pass
# second option: create a new custom type for EDI or use it if already created, as IBAN type is
# not always appropriate: we need a free-form bank type for max flexibility (users can correct

View File

@ -369,7 +369,7 @@ class email_template(osv.osv):
attachment_ids=[attach.id for attach in template.attachment_ids],
)
# Add report in attachments
# Add report in attachments: generate once for all template_res_ids
if template.report_template:
for res_id in template_res_ids:
attachments = []
@ -378,7 +378,7 @@ class email_template(osv.osv):
# Ensure report is rendered using template's language
ctx = context.copy()
if template.lang:
ctx['lang'] = self.render_template_batch(cr, uid, template.lang, template.model, res_id, context) # take 0 ?
ctx['lang'] = self.render_template_batch(cr, uid, template.lang, template.model, [res_id], context)[res_id] # take 0 ?
result, format = openerp.report.render_report(cr, uid, [res_id], report_service, {'model': template.model}, ctx)
result = base64.b64encode(result)
if not report_name:
@ -387,8 +387,7 @@ class email_template(osv.osv):
if not report_name.endswith(ext):
report_name += ext
attachments.append((report_name, result))
values['attachments'] = attachments
results[res_id]['attachments'] = attachments
return results

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-11-07 09:37+0000\n"
"Last-Translator: dengwei <250100785@qq.com>\n"
"PO-Revision-Date: 2013-11-19 10:18+0000\n"
"Last-Translator: Guipo Hao <hrlpool@sohu.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@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: 2013-11-08 05:41+0000\n"
"X-Generator: Launchpad (build 16820)\n"
"X-Launchpad-Export-Date: 2013-11-20 05:25+0000\n"
"X-Generator: Launchpad (build 16831)\n"
#. module: email_template
#: field:email.template,email_from:0
@ -275,7 +275,7 @@ msgstr "邮件预览"
#: view:email.template:0
msgid ""
"Remove the contextual action to use this template on related documents"
msgstr ""
msgstr "移除上下文内容,以将模板用于相关的文档。"
#. module: email_template
#: field:email.template,copyvalue:0

View File

@ -41,6 +41,20 @@ def _reopen(self, res_id, model):
class mail_compose_message(osv.TransientModel):
_inherit = 'mail.compose.message'
def default_get(self, cr, uid, fields, context=None):
""" Override to pre-fill the data when having a template in single-email mode """
if context is None:
context = {}
res = super(mail_compose_message, self).default_get(cr, uid, fields, context=context)
if res.get('composition_mode') != 'mass_mail' and context.get('default_template_id') and res.get('model') and res.get('res_id'):
res.update(
self.onchange_template_id(
cr, uid, [], context['default_template_id'], res.get('composition_mode'),
res.get('model'), res.get('res_id'), context=context
)['value']
)
return res
_columns = {
'template_id': fields.many2one('email.template', 'Use template', select=True),
'partner_to': fields.char('To (Partner IDs)',

View File

@ -39,7 +39,7 @@ Key Features
* Use emails to automatically confirm and send acknowledgements for any event registration
""",
'author': 'OpenERP SA',
'depends': ['base_setup', 'board', 'email_template'],
'depends': ['base_setup', 'board', 'email_template', 'marketing'],
'data': [
'security/event_security.xml',
'security/ir.model.access.csv',

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