[MEGRGE] merged with trunk addons

bzr revid: ara@tinyerp.com-20110705061128-z9o4rijiam0x54ca
This commit is contained in:
ARA (OpenERP) 2011-07-05 11:41:28 +05:30
commit 097962f9f9
346 changed files with 39341 additions and 6063 deletions

View File

@ -368,16 +368,16 @@ class account_account(osv.osv):
'parent_id': fields.many2one('account.account', 'Parent', ondelete='cascade', domain=[('type','=','view')]),
'child_parent_ids': fields.one2many('account.account','parent_id','Children'),
'child_consol_ids': fields.many2many('account.account', 'account_account_consol_rel', 'child_id', 'parent_id', 'Consolidated Children'),
'child_id': fields.function(_get_child_ids, method=True, type='many2many', relation="account.account", string="Child Accounts"),
'balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), method=True, string='Balance', multi='balance'),
'credit': fields.function(__compute, digits_compute=dp.get_precision('Account'), method=True, string='Credit', multi='balance'),
'debit': fields.function(__compute, digits_compute=dp.get_precision('Account'), method=True, string='Debit', multi='balance'),
'child_id': fields.function(_get_child_ids, type='many2many', relation="account.account", string="Child Accounts"),
'balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Balance', multi='balance'),
'credit': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Credit', multi='balance'),
'debit': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Debit', multi='balance'),
'reconcile': fields.boolean('Reconcile', help="Check this if the user is allowed to reconcile entries in this account."),
'shortcut': fields.char('Shortcut', size=12),
'tax_ids': fields.many2many('account.tax', 'account_account_tax_default_rel',
'account_id', 'tax_id', 'Default Taxes'),
'note': fields.text('Note'),
'company_currency_id': fields.function(_get_company_currency, method=True, type='many2one', relation='res.currency', string='Company Currency'),
'company_currency_id': fields.function(_get_company_currency, type='many2one', relation='res.currency', string='Company Currency'),
'company_id': fields.many2one('res.company', 'Company', required=True),
'active': fields.boolean('Active', select=2, help="If the active field is set to False, it will allow you to hide the account without removing it."),
@ -390,7 +390,7 @@ class account_account(osv.osv):
'manage this. So if you import from another software system you may have to use the rate at date. ' \
'Incoming transactions always use the rate at date.', \
required=True),
'level': fields.function(_get_level, string='Level', method=True, store=True, type='integer'),
'level': fields.function(_get_level, string='Level', store=True, type='integer'),
}
_defaults = {
@ -587,7 +587,7 @@ class account_journal_column(osv.osv):
_description = "Journal Column"
_columns = {
'name': fields.char('Column Name', size=64, required=True),
'field': fields.selection(_col_get, 'Field Name', method=True, required=True, size=32),
'field': fields.selection(_col_get, 'Field Name', required=True, size=32),
'view_id': fields.many2one('account.journal.view', 'Journal View', select=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order to journal column.", readonly=True),
'required': fields.boolean('Required'),
@ -985,7 +985,7 @@ class account_journal_period(osv.osv):
'name': fields.char('Journal-Period Name', size=64, required=True),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, ondelete="cascade"),
'period_id': fields.many2one('account.period', 'Period', required=True, ondelete="cascade"),
'icon': fields.function(_icon_get, method=True, string='Icon', type='char', size=32),
'icon': fields.function(_icon_get, string='Icon', type='char', size=32),
'active': fields.boolean('Active', required=True, help="If the active field is set to False, it will allow you to hide the journal period without removing it."),
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'State', required=True, readonly=True,
help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'),
@ -1139,7 +1139,7 @@ class account_move(osv.osv):
'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}),
'to_check': fields.boolean('To Review', help='Check this box if you are unsure of that journal entry and if you want to note it as \'to be reviewed\' by an accounting expert.'),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True),
'amount': fields.function(_amount_compute, method=True, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),
'amount': fields.function(_amount_compute, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),
'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True),
'narration':fields.text('Narration'),
'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
@ -1331,6 +1331,7 @@ class account_move(osv.osv):
def _centralise(self, cr, uid, move, mode, context=None):
assert mode in ('debit', 'credit'), 'Invalid Mode' #to prevent sql injection
currency_obj = self.pool.get('res.currency')
if context is None:
context = {}
@ -1381,6 +1382,34 @@ class account_move(osv.osv):
cr.execute('SELECT SUM(%s) FROM account_move_line WHERE move_id=%%s AND id!=%%s' % (mode,), (move.id, line_id2))
result = cr.fetchone()[0] or 0.0
cr.execute('update account_move_line set '+mode2+'=%s where id=%s', (result, line_id))
#adjust also the amount in currency if needed
cr.execute("select currency_id, sum(amount_currency) as amount_currency from account_move_line where move_id = %s and currency_id is not null group by currency_id", (move.id,))
for row in cr.dictfetchall():
currency_id = currency_obj.browse(cr, uid, row['currency_id'], context=context)
if not currency_obj.is_zero(cr, uid, currency_id, row['amount_currency']):
amount_currency = row['amount_currency'] * -1
account_id = amount_currency > 0 and move.journal_id.default_debit_account_id.id or move.journal_id.default_credit_account_id.id
cr.execute('select id from account_move_line where move_id=%s and centralisation=\'currency\' and currency_id = %slimit 1', (move.id, row['currency_id']))
res = cr.fetchone()
if res:
cr.execute('update account_move_line set amount_currency=%s , account_id=%s where id=%s', (amount_currency, account_id, res[0]))
else:
context.update({'journal_id': move.journal_id.id, 'period_id': move.period_id.id})
line_id = self.pool.get('account.move.line').create(cr, uid, {
'name': _('Currency Adjustment'),
'centralisation': 'currency',
'account_id': account_id,
'move_id': move.id,
'journal_id': move.journal_id.id,
'period_id': move.period_id.id,
'date': move.period_id.date_stop,
'debit': 0.0,
'credit': 0.0,
'currency_id': row['currency_id'],
'amount_currency': amount_currency,
}, context)
return True
#
@ -1617,8 +1646,8 @@ class account_tax_code(osv.osv):
'name': fields.char('Tax Case Name', size=64, required=True, translate=True),
'code': fields.char('Case Code', size=64),
'info': fields.text('Description'),
'sum': fields.function(_sum_year, method=True, string="Year Sum"),
'sum_period': fields.function(_sum_period, method=True, string="Period Sum"),
'sum': fields.function(_sum_year, string="Year Sum"),
'sum_period': fields.function(_sum_period, string="Period Sum"),
'parent_id': fields.many2one('account.tax.code', 'Parent Code', select=True),
'child_ids': fields.one2many('account.tax.code', 'parent_id', 'Child Codes'),
'line_ids': fields.one2many('account.move.line', 'tax_code_id', 'Lines'),
@ -2473,7 +2502,7 @@ class account_tax_template(osv.osv):
'name': fields.char('Tax Name', size=64, required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."),
'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."),
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code')], 'Tax Type', required=True),
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True),
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
'account_collected_id':fields.many2one('account.account.template', 'Invoice Tax Account'),

View File

@ -137,7 +137,7 @@ class account_bank_statement(osv.osv):
states={'confirm':[('readonly',True)]}),
'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'),
states={'confirm':[('readonly', True)]}),
'balance_end': fields.function(_end_balance, method=True, string='Balance'),
'balance_end': fields.function(_end_balance, string='Balance'),
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
'line_ids': fields.one2many('account.bank.statement.line',
'statement_id', 'Statement lines',
@ -149,7 +149,7 @@ class account_bank_statement(osv.osv):
states={'confirm': [('readonly', True)]}, readonly="1",
help='When new statement is created the state will be \'Draft\'. \
\n* And after getting confirmation from the bank it will be in \'Confirmed\' state.'),
'currency': fields.function(_currency, method=True, string='Currency',
'currency': fields.function(_currency, string='Currency',
type='many2one', relation='res.currency'),
'account_id': fields.related('journal_id', 'default_debit_account_id', type='many2one', relation='account.account', string='Account used in this journal', readonly=True, help='used in statement reconciliation domain, but shouldn\'t be used elswhere.'),
}

View File

@ -58,7 +58,7 @@ class account_cashbox_line(osv.osv):
_columns = {
'pieces': fields.float('Values', digits_compute=dp.get_precision('Account')),
'number': fields.integer('Number'),
'subtotal': fields.function(_sub_total, method=True, string='Sub Total', type='float', digits_compute=dp.get_precision('Account')),
'subtotal': fields.function(_sub_total, string='Sub Total', type='float', digits_compute=dp.get_precision('Account')),
'starting_id': fields.many2one('account.bank.statement', ondelete='cascade'),
'ending_id': fields.many2one('account.bank.statement', ondelete='cascade'),
}
@ -223,10 +223,10 @@ class account_cash_statement(osv.osv):
[('draft', 'Draft'),
('confirm', 'Closed'),
('open','Open')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"),
'total_entry_encoding': fields.function(_get_sum_entry_encoding, method=True, store=True, string="Cash Transaction", help="Total cash transactions"),
'total_entry_encoding': fields.function(_get_sum_entry_encoding, store=True, string="Cash Transaction", help="Total cash transactions"),
'closing_date': fields.datetime("Closed On"),
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on Starting Balance and Cash Transactions"),
'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', help="Closing balance based on cashBox"),
'balance_end': fields.function(_end_balance, store=True, string='Balance', help="Closing balance based on Starting Balance and Cash Transactions"),
'balance_end_cash': fields.function(_balance_end_cash, store=True, string='Balance', help="Closing balance based on cashBox"),
'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'),
'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
'name': fields.char('Name', size=64, required=True, states={'draft': [('readonly', False)]}, readonly=True, help='if you give the Name other then /, its created Accounting Entries Move will be with same name as statement name. This allows the statement entries to have the same references than the statement itself'),

View File

@ -489,8 +489,8 @@ class account_move_line(osv.osv):
'reconcile_id': fields.many2one('account.move.reconcile', 'Reconcile', readonly=True, ondelete='set null', select=2),
'reconcile_partial_id': fields.many2one('account.move.reconcile', 'Partial Reconcile', readonly=True, ondelete='set null', select=2),
'amount_currency': fields.float('Amount Currency', help="The amount expressed in an optional other currency if it is a multi-currency entry.", digits_compute=dp.get_precision('Account')),
'amount_residual_currency': fields.function(_amount_residual, method=True, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual': fields.function(_amount_residual, method=True, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
'amount_residual_currency': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in its currency (maybe different of the company currency)."),
'amount_residual': fields.function(_amount_residual, string='Residual Amount', multi="residual", help="The residual amount on a receivable or payable of a journal entry expressed in the company currency."),
'currency_id': fields.many2one('res.currency', 'Currency', help="The optional other currency if it is a multi-currency entry."),
'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1),
@ -503,14 +503,14 @@ class account_move_line(osv.osv):
}),
'date_created': fields.date('Creation date', select=True),
'analytic_lines': fields.one2many('account.analytic.line', 'move_id', 'Analytic lines'),
'centralisation': fields.selection([('normal','Normal'),('credit','Credit Centralisation'),('debit','Debit Centralisation')], 'Centralisation', size=6),
'balance': fields.function(_balance, fnct_search=_balance_search, method=True, string='Balance'),
'centralisation': fields.selection([('normal','Normal'),('credit','Credit Centralisation'),('debit','Debit Centralisation'),('currency','Currency Adjustment')], 'Centralisation', size=8),
'balance': fields.function(_balance, fnct_search=_balance_search, string='Balance'),
'state': fields.selection([('draft','Unbalanced'), ('valid','Valid')], 'State', readonly=True,
help='When new move line is created the state will be \'Draft\'.\n* When all the payments are done it will be in \'Valid\' state.'),
'tax_code_id': fields.many2one('account.tax.code', 'Tax Account', help="The Account can either be a base tax code or a tax code account."),
'tax_amount': fields.float('Tax/Base Amount', digits_compute=dp.get_precision('Account'), select=True, help="If the Tax account is a tax code account, this field will contain the taxed amount.If the tax account is base tax code, "\
"this field will contain the basic amount(without tax)."),
'invoice': fields.function(_invoice, method=True, string='Invoice',
'invoice': fields.function(_invoice, string='Invoice',
type='many2one', relation='account.invoice', fnct_search=_invoice_search),
'account_tax_id':fields.many2one('account.tax', 'Tax'),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),

View File

@ -19,7 +19,6 @@
rml="account/report/account_print_invoice.rml"
string="Invoices"
attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/',''))"
attachment_use="1"
multi="True"/>
<report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
<report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>

View File

@ -897,6 +897,7 @@
<field name="name"/>
<field name="price_include" groups="base.group_extended"/>
<field name="description"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</tree>
</field>
</record>
@ -909,6 +910,7 @@
<group col="10" colspan="4">
<field name="name"/>
<field name="description"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
</search>
</field>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-05-11 04:07+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2011-06-06 18:06+0000\n"
"Last-Translator: Hector Rojas (doingIT.cl) <Unknown>\n"
"Language-Team: Spanish (Chile) <es_CL@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: 2011-05-12 04:35+0000\n"
"X-Launchpad-Export-Date: 2011-06-07 04:35+0000\n"
"X-Generator: Launchpad (build 12959)\n"
#. module: account
@ -44,7 +44,7 @@ msgstr ""
#. module: account
#: view:account.move.reconcile:0
msgid "Journal Entry Reconcile"
msgstr ""
msgstr "Conciliar asiento contable"
#. module: account
#: field:account.installer.modules,account_voucher:0
@ -63,7 +63,7 @@ msgstr ""
#: field:account.invoice,residual:0
#: field:report.invoice.created,residual:0
msgid "Residual"
msgstr ""
msgstr "Pendiente"
#. module: account
#: code:addons/account/invoice.py:793
@ -89,7 +89,7 @@ msgstr ""
#. module: account
#: model:ir.model,name:account.model_report_aged_receivable
msgid "Aged Receivable Till Today"
msgstr ""
msgstr "A cobrar vencidos hasta hoy"
#. module: account
#: field:account.partner.ledger,reconcil:0
@ -124,11 +124,14 @@ msgid ""
"If you unreconciliate transactions, you must also verify all the actions "
"that are linked to those transactions because they will not be disabled"
msgstr ""
"Si rompe la conciliación de transacciones, también debe verificar todas la "
"acciones que están relacionadas con esas transacciones porque no serán "
"deshabilitadas."
#. module: account
#: report:account.tax.code.entries:0
msgid "Accounting Entries-"
msgstr ""
msgstr "Asientos contables -"
#. module: account
#: code:addons/account/account.py:1305
@ -140,7 +143,7 @@ msgstr ""
#: report:account.invoice:0
#: field:account.invoice.line,origin:0
msgid "Origin"
msgstr ""
msgstr "Origen"
#. module: account
#: view:account.account:0
@ -150,7 +153,7 @@ msgstr ""
#: view:account.move.line.reconcile:0
#: view:account.move.line.reconcile.writeoff:0
msgid "Reconcile"
msgstr ""
msgstr "Conciliar"
#. module: account
#: field:account.bank.statement.line,ref:0
@ -178,7 +181,7 @@ msgstr ""
#: code:addons/account/invoice.py:1436
#, python-format
msgid "Warning!"
msgstr ""
msgstr "¡Advertencia!"
#. module: account
#: field:account.fiscal.position.account,account_src_id:0
@ -199,7 +202,7 @@ msgstr ""
#. module: account
#: selection:account.account.type,sign:0
msgid "Negative"
msgstr ""
msgstr "Negativo"
#. module: account
#: code:addons/account/wizard/account_move_journal.py:95
@ -224,7 +227,7 @@ msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_tax
msgid "account.tax"
msgstr ""
msgstr "account.tax"
#. module: account
#: code:addons/account/account.py:915
@ -317,7 +320,7 @@ msgstr ""
#. module: account
#: field:account.journal.column,field:0
msgid "Field Name"
msgstr ""
msgstr "Nombre del Campo"
#. module: account
#: help:account.installer,charts:0
@ -351,7 +354,7 @@ msgstr ""
#: view:account.installer:0
#: view:account.installer.modules:0
msgid "Configure"
msgstr ""
msgstr "Configurar"
#. module: account
#: selection:account.entries.report,month:0
@ -360,7 +363,7 @@ msgstr ""
#: selection:report.account.sales,month:0
#: selection:report.account_type.sales,month:0
msgid "June"
msgstr ""
msgstr "Junio"
#. module: account
#: model:ir.actions.act_window,help:account.action_account_moves_bank
@ -373,18 +376,18 @@ msgstr ""
#. module: account
#: model:ir.model,name:account.model_account_tax_template
msgid "account.tax.template"
msgstr ""
msgstr "account.tax.template"
#. module: account
#: model:ir.model,name:account.model_account_bank_accounts_wizard
msgid "account.bank.accounts.wizard"
msgstr ""
msgstr "account.bank.accounts.wizard"
#. module: account
#: field:account.move.line,date_created:0
#: field:account.move.reconcile,create_date:0
msgid "Creation date"
msgstr ""
msgstr "Fecha de creación"
#. module: account
#: selection:account.journal,type:0
@ -416,17 +419,17 @@ msgstr ""
#. module: account
#: field:account.journal,default_debit_account_id:0
msgid "Default Debit Account"
msgstr ""
msgstr "Cuenta debito por defecto"
#. module: account
#: view:account.move:0
msgid "Total Credit"
msgstr ""
msgstr "Total crédito"
#. module: account
#: selection:account.account.type,sign:0
msgid "Positive"
msgstr ""
msgstr "Positivo"
#. module: account
#: view:account.move.line.unreconcile.select:0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -227,21 +227,21 @@ class account_invoice(osv.osv):
'tax_line': fields.one2many('account.invoice.tax', 'invoice_id', 'Tax Lines', readonly=True, states={'draft':[('readonly',False)]}),
'move_id': fields.many2one('account.move', 'Journal Entry', readonly=True, select=1, ondelete='restrict', help="Link to the automatically generated Journal Items."),
'amount_untaxed': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Untaxed',
'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Untaxed',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
'account.invoice.tax': (_get_invoice_tax, None, 20),
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
},
multi='all'),
'amount_tax': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Tax',
'amount_tax': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Tax',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
'account.invoice.tax': (_get_invoice_tax, None, 20),
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
},
multi='all'),
'amount_total': fields.function(_amount_all, method=True, digits_compute=dp.get_precision('Account'), string='Total',
'amount_total': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Total',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
'account.invoice.tax': (_get_invoice_tax, None, 20),
@ -252,7 +252,7 @@ class account_invoice(osv.osv):
'journal_id': fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True, change_default=True, readonly=True, states={'draft':[('readonly',False)]}),
'check_total': fields.float('Total', digits_compute=dp.get_precision('Account'), states={'open':[('readonly',True)],'close':[('readonly',True)]}),
'reconciled': fields.function(_reconciled, method=True, string='Paid/Reconciled', type='boolean',
'reconciled': fields.function(_reconciled, string='Paid/Reconciled', type='boolean',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ?
'account.move.line': (_get_invoice_from_line, None, 50),
@ -260,17 +260,17 @@ class account_invoice(osv.osv):
}, help="The Journal Entry of the invoice have been totally reconciled with one or several Journal Entries of payment."),
'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account',
help='Bank Account Number, Company bank account if Invoice is customer or supplier refund, otherwise Partner bank account number.', readonly=True, states={'draft':[('readonly',False)]}),
'move_lines':fields.function(_get_lines, method=True, type='many2many', relation='account.move.line', string='Entry Lines'),
'residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual',
'move_lines':fields.function(_get_lines, type='many2many', relation='account.move.line', string='Entry Lines'),
'residual': fields.function(_amount_residual, digits_compute=dp.get_precision('Account'), string='Residual',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 50),
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line','move_id'], 50),
'account.invoice.tax': (_get_invoice_tax, None, 50),
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 50),
'account.move.line': (_get_invoice_from_line, None, 50),
'account.move.reconcile': (_get_invoice_from_reconcile, None, 50),
},
help="Remaining amount due."),
'payment_ids': fields.function(_compute_lines, method=True, relation='account.move.line', type="many2many", string='Payments'),
'payment_ids': fields.function(_compute_lines, relation='account.move.line', type="many2many", string='Payments'),
'move_name': fields.char('Journal Entry', size=64, readonly=True, states={'draft':[('readonly',False)]}),
'user_id': fields.many2one('res.users', 'Salesman', readonly=True, states={'draft':[('readonly',False)]}),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True, states={'draft':[('readonly',False)]})
@ -1282,7 +1282,7 @@ class account_invoice_line(osv.osv):
'product_id': fields.many2one('product.product', 'Product', ondelete='set null'),
'account_id': fields.many2one('account.account', 'Account', required=True, domain=[('type','<>','view'), ('type', '<>', 'closed')], help="The income or expense account related to the selected product."),
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Account')),
'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', type="float",
'price_subtotal': fields.function(_amount_line, string='Subtotal', type="float",
digits_compute= dp.get_precision('Account'), store=True),
'quantity': fields.float('Quantity', required=True),
'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Account')),
@ -1505,8 +1505,8 @@ class account_invoice_tax(osv.osv):
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Account')),
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
'factor_base': fields.function(_count_factor, method=True, string='Multipication factor for Base code', type='float', multi="all"),
'factor_tax': fields.function(_count_factor, method=True, string='Multipication factor Tax code', type='float', multi="all")
'factor_base': fields.function(_count_factor, string='Multipication factor for Base code', type='float', multi="all"),
'factor_tax': fields.function(_count_factor, string='Multipication factor Tax code', type='float', multi="all")
}
def base_change(self, cr, uid, ids, base, currency_id=False, company_id=False, date_invoice=False):

View File

@ -142,8 +142,8 @@ class res_partner(osv.osv):
_columns = {
'credit': fields.function(_credit_debit_get,
fnct_search=_credit_search, method=True, string='Total Receivable', multi='dc', help="Total amount this customer owes you."),
'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, method=True, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."),
fnct_search=_credit_search, string='Total Receivable', multi='dc', help="Total amount this customer owes you."),
'debit': fields.function(_credit_debit_get, fnct_search=_debit_search, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."),
'debit_limit': fields.float('Payable Limit'),
'property_account_payable': fields.property(
'account.account',

View File

@ -88,10 +88,10 @@ class account_balance(report_sxw.rml_parse, common_report_header):
}
self.sum_debit += account_rec['debit']
self.sum_credit += account_rec['credit']
if disp_acc == 'bal_movement':
if disp_acc == 'movement':
if not currency_obj.is_zero(self.cr, self.uid, currency, res['credit']) or not currency_obj.is_zero(self.cr, self.uid, currency, res['debit']) or not currency_obj.is_zero(self.cr, self.uid, currency, res['balance']):
self.result_acc.append(res)
elif disp_acc == 'bal_solde':
elif disp_acc == 'not_zero':
if not currency_obj.is_zero(self.cr, self.uid, currency, res['balance']):
self.result_acc.append(res)
else:

View File

@ -233,7 +233,7 @@
<td>
<para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td> <para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="60.0,60.0" style="Table5">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<tr>

View File

@ -137,16 +137,17 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
'name': account.name,
'level': account.level,
'balance':account.balance,
'type': account.type,
}
currency = account.currency_id and account.currency_id or account.company_id.currency_id
if typ == 'liability' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_dr += account.balance
if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_cr += account.balance
if data['form']['display_account'] == 'bal_movement':
if data['form']['display_account'] == 'movement':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.credit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.debit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account_dict)
elif data['form']['display_account'] == 'bal_solde':
elif data['form']['display_account'] == 'not_zero':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account_dict)
else:
@ -163,10 +164,12 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
for i in range(0,max(len(cal_list['liability']),len(cal_list['asset']))):
if i < len(cal_list['liability']) and i < len(cal_list['asset']):
temp={
'type': cal_list['liability'][i]['type'],
'code': cal_list['liability'][i]['code'],
'name': cal_list['liability'][i]['name'],
'level': cal_list['liability'][i]['level'],
'balance':cal_list['liability'][i]['balance'],
'type1': cal_list['asset'][i]['type'],
'code1': cal_list['asset'][i]['code'],
'name1': cal_list['asset'][i]['name'],
'level1': cal_list['asset'][i]['level'],
@ -176,10 +179,12 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
else:
if i < len(cal_list['asset']):
temp={
'type': '',
'code': '',
'name': '',
'level': False,
'balance':False,
'type1': cal_list['asset'][i]['type'],
'code1': cal_list['asset'][i]['code'],
'name1': cal_list['asset'][i]['name'],
'level1': cal_list['asset'][i]['level'],
@ -188,10 +193,12 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
self.result_temp.append(temp)
if i < len(cal_list['liability']):
temp={
'type': cal_list['liability'][i]['type'],
'code': cal_list['liability'][i]['code'],
'name': cal_list['liability'][i]['name'],
'level': cal_list['liability'][i]['level'],
'balance':cal_list['liability'][i]['balance'],
'type1': '',
'code1': '',
'name1': '',
'level1': False,

View File

@ -26,7 +26,6 @@
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,1" stop="-1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table5">
<blockAlignment value="LEFT"/>
@ -115,7 +114,7 @@
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Left" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -124,6 +123,36 @@
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_1_code" fontName="Helvetica-Bold" fontSize="9.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_1_name" fontName="Helvetica-Bold" fontSize="9.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_1_balance" fontName="Helvetica-Bold" fontSize="9.0" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_2_code" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="0.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_2_name" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="10.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_2_balance" fontName="Helvetica-Bold" fontSize="8.0" leftIndent=".0" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_code" fontName="Helvetica" fontSize="8.0" leftIndent="0.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_code_bold" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="0.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_name" fontName="Helvetica" fontSize="8.0" leftIndent="20.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_name_bold" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="20.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_balance" fontName="Helvetica" fontSize="8.0" leftIndent="0.0" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_balance_bold" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="0.0" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_4_name" fontName="Helvetica" fontSize="8.0" leftIndent="30.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_4_name_bold" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="30.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<blockTableStyle id="Table1">
<blockTopPadding start="0,0" stop="-1,0" length="15"/>
<blockFont name="Helvetica-Bold" size="10.0" />
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,1" thickness="1"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockTopPadding start="0,0" stop="-1,0" length="10"/>
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#666666" start="1,1" stop="1,1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockValign value="TOP"/>
</blockTableStyle>
</stylesheet>
<images/>
<story>
@ -174,7 +203,7 @@
</tr>
</blockTable>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ get_target_move(data) ]] </para></td>
</tr>
</blockTable>
@ -187,35 +216,32 @@
<blockTable colWidths="539.0" style="Table_Company_Name">
<tr>
<td>
<para style="terp_header_Centre">Assets</para>
<para style="terp_header_Left">Assets</para>
</td>
</tr>
</blockTable>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="100.0,326.0,113.0" style="Table1" repeatRows="1">
<blockTable colWidths="100.0,326.0,113.0" style="Table_Account_Line_Title" repeatRows="1">
<tr>
<td>
<para style="terp_default_Bold_9">Code</para>
</td>
<td>
<para style="terp_default_Bold_9">Assets</para>
<para style="terp_default_Bold_9">Account</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('asset'), 'a') ]]</font>[[ a['code'] ]]<font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font></para>
</td>
<td>
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font></para>
</td>
<td>
<para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font></para>
</td>
<tr style="Table3">
[[ repeatIn(get_lines_another('asset'),'a' ) ]]
[[ setTag('tr','tr',{'style': 'Table'+str(min(3,a['level']))}) ]]
<td><para style="terp_level_3_code">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_code'}) ]]<i>[[ a['code'] ]]</i></para></td>
<td><para style="terp_level_3_name">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a['level']))+'_name'}) ]][[ a['name'] ]]</para></td>
<td>[[ (a['level'] &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_balance'}) ]][[ formatLang(a['balance']) ]] [[company.currency_id.symbol ]]</para></td>
<td>[[ a['level'] == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a['balance']) ]] [[company.currency_id.symbol ]]</u></para></td>
</tr>
</blockTable>
<blockTable colWidths="426.0,113.0" style="Table_Net_Profit_Loss">
@ -235,7 +261,7 @@
<blockTable colWidths="539.0" style="Table_Company_Name">
<tr>
<td>
<para style="terp_header_Centre">Liabilities</para>
<para style="terp_header_Left">Liabilities</para>
</td>
</tr>
</blockTable>
@ -245,22 +271,19 @@
<para style="terp_default_Bold_9">Code</para>
</td>
<td>
<para style="terp_default_Bold_9">Liabilities</para>
<para style="terp_default_Bold_9">Account</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(get_lines_another('liability'), 'a') ]]</font>[[ a['code'] ]]<font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] </font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td>
<td>
<para style="terp_default_9"><font color="white">[[ '. '*(a['level']-1) ]]</font><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]]</font></para>
</td>
<td>
<para style="terp_default_Right_9"><font>[[ a['level']&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]]</font><font>[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Right_9_Bold'}) or removeParentNode('font') ]]</font></para>
</td>
<tr style="Table3">
[[ repeatIn(get_lines_another('liability'),'a' ) ]]
[[ setTag('tr','tr',{'style': 'Table'+str(min(3,a['level']))}) ]]
<td><para style="terp_level_3_code">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_code'}) ]]<i>[[ a['code'] ]]</i></para></td>
<td><para style="terp_level_3_name">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a['level']))+'_name'}) ]][[ a['name'] ]]</para></td>
<td>[[ (a['level'] &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a['type'] =='view' and a['level'] &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a['level']))+'_balance'}) ]][[ formatLang(a['balance']) ]] [[company.currency_id.symbol ]]</para></td>
<td>[[ a['level'] == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a['balance']) ]] [[company.currency_id.symbol ]]</u></para></td>
</tr>
</blockTable>
<blockTable colWidths="426.0,113.0" style="Table_Net_Profit_Loss">

View File

@ -163,7 +163,7 @@
</tr>
</blockTable>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para></td>
</tr>
</blockTable>

View File

@ -117,10 +117,10 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
num_entry = self.cr.fetchone()[0] or 0
sold_account = self._sum_balance_account(child_account)
self.sold_accounts[child_account.id] = sold_account
if self.display_account == 'bal_movement':
if self.display_account == 'movement':
if child_account.type != 'view' and num_entry <> 0:
res.append(child_account)
elif self.display_account == 'bal_solde':
elif self.display_account == 'not_zero':
if child_account.type != 'view' and num_entry <> 0:
if not currency_obj.is_zero(self.cr, self.uid, currency, sold_account):
res.append(child_account)

View File

@ -395,7 +395,7 @@
<para style="terp_default_Centre_7">[[', '.join([ lt or '' for lt in get_journal(data) ]) ]]</para>
</td>
<td>
<para style="terp_default_Centre_7">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para>
<para style="terp_default_Centre_7">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para>
</td>
<td>
<para style="terp_default_Centre_7">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]]</para>

View File

@ -180,7 +180,7 @@
</tr>
</blockTable>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para></td>
</tr>
</blockTable>

View File

@ -101,6 +101,7 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
cal_list = {}
account_id = data['form'].get('chart_account_id', False)
company_currency = account_pool.browse(self.cr, self.uid, account_id).company_id.currency_id
account_ids = account_pool._get_children_and_consol(cr, uid, account_id, context=ctx)
accounts = account_pool.browse(cr, uid, account_ids, context=ctx)
@ -113,15 +114,18 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
self.result_sum_dr += account.debit - account.credit
if typ == 'income' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_cr += account.credit - account.debit
if data['form']['display_account'] == 'bal_movement':
if data['form']['display_account'] == 'movement':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.credit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.debit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account)
elif data['form']['display_account'] == 'bal_solde':
elif data['form']['display_account'] == 'not_zero':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account)
else:
accounts_temp.append(account)
if self.result_sum_dr > self.result_sum_cr:
if currency_pool.is_zero(self.cr, self.uid, company_currency, (self.result_sum_dr-self.result_sum_cr)):
self.res_pl['type'] = None
self.res_pl['balance'] = 0.0
elif self.result_sum_dr > self.result_sum_cr:
self.res_pl['type'] = _('Net Loss')
self.res_pl['balance'] = (self.result_sum_dr - self.result_sum_cr)
else:

View File

@ -24,9 +24,8 @@
</blockTableStyle>
<blockTableStyle id="Table_Account_Line_Title">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockValign value="MIDDLE"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,1" stop="-1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
@ -41,17 +40,6 @@
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,1" stop="-1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -136,7 +124,38 @@
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<paraStyle name="terp_level_1_code" fontName="Helvetica-Bold" fontSize="9.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_1_name" fontName="Helvetica-Bold" fontSize="9.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_1_balance" fontName="Helvetica-Bold" fontSize="9.0" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_2_code" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="0.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_2_name" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="10.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_2_balance" fontName="Helvetica-Bold" fontSize="8.0" leftIndent=".0" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_code" fontName="Helvetica" fontSize="8.0" leftIndent="0.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_code_bold" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="0.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_name" fontName="Helvetica" fontSize="8.0" leftIndent="20.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_name_bold" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="20.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_balance" fontName="Helvetica" fontSize="8.0" leftIndent="0.0" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_3_balance_bold" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="0.0" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_4_name" fontName="Helvetica" fontSize="8.0" leftIndent="30.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_level_4_name_bold" fontName="Helvetica-Bold" fontSize="8.0" leftIndent="30.0" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<blockTableStyle id="Table1">
<blockTopPadding start="0,0" stop="-1,0" length="15"/>
<blockFont name="Helvetica-Bold" size="10.0" />
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,1" thickness="1"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockTopPadding start="0,0" stop="-1,0" length="10"/>
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEBELOW" colorName="#666666" start="1,1" stop="1,1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockValign value="TOP"/>
</blockTableStyle>
</stylesheet>
<images/>
<story>
<blockTable colWidths="539.0" style="Table_Company_Name">
@ -156,7 +175,7 @@
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>
<td><para style="terp_tblheader_General_Centre">Target Moves</para></td>
</tr>
<tr>
@ -184,42 +203,33 @@
</tr>
</blockTable>
</td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']]</para></td>
<td><para style="terp_default_Centre_8">[[ get_target_move(data) ]] </para></td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="terp_header">Expenses</para>
<blockTable colWidths="100.0,326.0,113.0" style="Table_Account_Line_Title" repeatRows="1">
<tr>
<td>
<para style="terp_default_Bold_9">Code</para>
</td>
<td>
<para style="terp_default_Bold_9">Expenses</para>
<para style="terp_default_Bold_9">Account</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Balance</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9">
<font face="Times-Roman">[[ repeatIn(get_lines_another('expense'),'a' ) ]] </font>[[ a.code ]]<font>[[ a.level&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white">[[ '. '*(a.level-1) ]]</font><font>[[ a.level&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a.name ]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_9"><font>[[ a.level&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(a.balance) ]] [[ company.currency_id.symbol ]]</font></para>
</td>
<tr style="Table3">
[[ repeatIn(get_lines_another('expense'),'a' ) ]]
[[ setTag('tr','tr',{'style': 'Table'+str(min(3,a.level))}) ]]
<td><para style="terp_level_3_code">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_code'}) ]]<i>[[ a.code ]]</i></para></td>
<td><para style="terp_level_3_name">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.level))+'_name'}) ]][[ a.name ]]</para></td>
<td>[[ (a.level &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]]</para></td>
<td>[[ a.level == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a.balance) ]] [[company.currency_id.symbol ]]</u></para></td>
</tr>
</blockTable>
<blockTable colWidths="100.0,326.0,113.0" style="Table_Net_Profit_Loss">
@ -249,32 +259,26 @@
<para style="terp_default_Right_9_Bold">
<font color="white"> </font>
</para>
<blockTable colWidths="100.0,326.0,113.0" style="Table2" repeatRows="1">
<para style="terp_header">Incomes</para>
<blockTable colWidths="100.0,326.0,113.0" style="Table_Account_Line_Title" repeatRows="1">
<tr>
<td>
<para style="terp_default_Bold_9">Code</para>
</td>
<td>
<para style="terp_default_Bold_9">Incomes</para>
<para style="terp_default_Bold_9">Account</para>
</td>
<td>
<para style="P1">Balance</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9">
<font face="Times-Roman">[[ repeatIn(get_lines_another('income'),'a') ]] </font>[[ a.code ]]<font>[[ a.level&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]]</font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white">[[ '. '*(a.level-1) ]]</font><font>[[ a.level&lt;4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a.name ]]</font>
</para>
</td>
<td>
<para style="terp_default_Right_9"><font>[[ a.level&lt;4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]]</font><font>[[ formatLang(a.balance) ]] [[ company.currency_id.symbol ]]</font></para>
</td>
<tr style="Table3">
[[ repeatIn(get_lines_another('income'),'a' ) ]]
[[ setTag('tr','tr',{'style': 'Table'+str(min(3,a.level))}) ]]
<td><para style="terp_level_3_code">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_code'}) ]]<i>[[ a.code ]]</i></para></td>
<td><para style="terp_level_3_name">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.level))+'_name'}) ]][[ a.name ]]</para></td>
<td>[[ (a.level &lt;&gt;2) or removeParentNode('td') ]]<para style="terp_level_3_balance">[[ (a.type =='view' and a.level &gt;= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]]</para></td>
<td>[[ a.level == 2 or removeParentNode('td') ]]<para style="terp_level_2_balance"><u>[[ formatLang(a.balance) ]] [[company.currency_id.symbol ]]</u></para></td>
</tr>
</blockTable>
<blockTable colWidths="100.0,326.0,113.0" style="Table4">

View File

@ -114,7 +114,7 @@ class report_aged_receivable(osv.osv):
_columns = {
'name': fields.char('Month Range', size=7, readonly=True),
'balance': fields.function(_calc_bal, method=True, string='Balance', readonly=True),
'balance': fields.function(_calc_bal, string='Balance', readonly=True),
}
def init(self, cr, uid=1):

View File

@ -31,12 +31,13 @@ class account_treasury_report(osv.osv):
def _compute_balances(self, cr, uid, ids, field_names, arg=None, context=None,
query='', query_params=()):
all_treasury_lines = self.search(cr, uid, [], context=context)
current_sum = 0
all_companies = self.pool.get('res.company').search(cr, uid, [], context=context)
current_sum = dict((company, 0.0) for company in all_companies)
res = dict((id, dict((fn, 0.0) for fn in field_names)) for id in all_treasury_lines)
for record in self.browse(cr, uid, all_treasury_lines, context=context):
res[record.id]['starting_balance'] = current_sum
current_sum += record.balance
res[record.id]['ending_balance'] = current_sum
res[record.id]['starting_balance'] = current_sum[record.company_id.id]
current_sum[record.company_id.id] += record.balance
res[record.id]['ending_balance'] = current_sum[record.company_id.id]
return res
_columns = {
@ -46,8 +47,8 @@ class account_treasury_report(osv.osv):
'credit': fields.float('Credit', readonly=True),
'balance': fields.float('Balance', readonly=True),
'date': fields.date('Beginning of Period Date', readonly=True),
'starting_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), method=True, string='Starting Balance', multi='balance'),
'ending_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), method=True, string='Ending Balance', multi='balance'),
'starting_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), string='Starting Balance', multi='balance'),
'ending_balance': fields.function(_compute_balances, digits_compute=dp.get_precision('Account'), string='Ending Balance', multi='balance'),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
}

View File

@ -97,6 +97,13 @@
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="invoice_analysis_comp_rule" model="ir.rule">
<field name="name">Invoice Analysis multi-company</field>
<field model="ir.model" name="model_id" ref="model_account_invoice_report"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="account_fiscal_position_comp_rule" model="ir.rule">
<field name="name">Account fiscal Mapping company rule</field>
<field model="ir.model" name="model_id" ref="model_account_fiscal_position"/>

View File

@ -103,6 +103,14 @@ class account_fiscalyear_close(osv.osv_memory):
if accnt_type_data.close_method=='none' or account.type == 'view':
continue
if accnt_type_data.close_method=='balance':
balance_in_currency = 0.0
if account.currency_id:
cr.execute('SELECT sum(amount_currency) as balance_in_currency FROM account_move_line ' \
'WHERE account_id = %s ' \
'AND ' + query_line + ' ' \
'AND currency_id = %s', (account.id, account.currency_id.id))
balance_in_currency = cr.dictfetchone()['balance_in_currency']
if abs(account.balance)>0.0001:
obj_acc_move_line.create(cr, uid, {
'debit': account.balance>0 and account.balance,
@ -111,7 +119,9 @@ class account_fiscalyear_close(osv.osv_memory):
'date': period.date_start,
'journal_id': new_journal.id,
'period_id': period.id,
'account_id': account.id
'account_id': account.id,
'currency_id': account.currency_id and account.currency_id.id or False,
'amount_currency': balance_in_currency,
}, {'journal_id': new_journal.id, 'period_id':period.id})
if accnt_type_data.close_method == 'unreconciled':
offset = 0

View File

@ -48,7 +48,7 @@ class account_bs_report(osv.osv_memory):
}
_defaults={
'display_type': True,
'display_type': False,
'journal_ids': [],
'reserve_account_id': _get_def_reserve_account,
}

View File

@ -26,13 +26,13 @@ class account_common_account_report(osv.osv_memory):
_description = 'Account Common Account Report'
_inherit = "account.common.report"
_columns = {
'display_account': fields.selection([('bal_all','All'), ('bal_movement','With movements'),
('bal_solde','With balance is not equal to 0'),
'display_account': fields.selection([('all','All'), ('movement','With movements'),
('not_zero','With balance is not equal to 0'),
],'Display Accounts', required=True),
}
_defaults = {
'display_account': 'bal_all',
'display_account': 'movement',
}
def pre_print_report(self, cr, uid, ids, data, context=None):

View File

@ -33,7 +33,7 @@ class account_pl_report(osv.osv_memory):
}
_defaults = {
'display_type': True,
'display_type': False,
'journal_ids': [],
'target_move': False
}

View File

@ -38,6 +38,7 @@ user rights to Demo user.
"depends" : ["account"],
'update_xml': [
'security/account_security.xml',
'account_accountant_data.xml'
],
'demo_xml': ['account_accountant_demo.xml'],
'test': [],

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--
It's easier for new users to not activate this (ex: they misconfigure
header and footer.)
<record model="ir.actions.report.xml" id="account.account_invoices">
<field name="attachment_use">1</field>
</record>
-->
</data>
</openerp>

View File

@ -0,0 +1,33 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-22 05:51+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-23 04:56+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: account_accountant
#: model:ir.module.module,description:account_accountant.module_meta_information
msgid ""
"\n"
"This module gives the admin user the access to all the accounting features "
"like the journal\n"
"items and the chart of accounts.\n"
" "
msgstr ""
#. module: account_accountant
#: model:ir.module.module,shortdesc:account_accountant.module_meta_information
msgid "Accountant"
msgstr "Kirjanpitäjä"

View File

@ -375,49 +375,49 @@ class account_analytic_account(osv.osv):
return res
_columns ={
'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced Amount',
'ca_invoiced': fields.function(_ca_invoiced_calc, type='float', string='Invoiced Amount',
help="Total customer invoiced amount for this account.",
digits_compute=dp.get_precision('Account')),
'total_cost': fields.function(_total_cost_calc, method=True, type='float', string='Total Costs',
'total_cost': fields.function(_total_cost_calc, type='float', string='Total Costs',
help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets.",
digits_compute=dp.get_precision('Account')),
'ca_to_invoice': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Amount',
'ca_to_invoice': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Uninvoiced Amount',
help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs.",
digits_compute=dp.get_precision('Account')),
'ca_theorical': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Theoretical Revenue',
'ca_theorical': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Theoretical Revenue',
help="Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist.",
digits_compute=dp.get_precision('Account')),
'hours_quantity': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Hours Tot',
'hours_quantity': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Hours Tot',
help="Number of hours you spent on the analytic account (from timesheet). It computes on all journal of type 'general'."),
'last_invoice_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Last Invoice Date',
'last_invoice_date': fields.function(_analysis_all, multi='analytic_analysis', type='date', string='Last Invoice Date',
help="If invoice from the costs, this is the date of the latest invoiced."),
'last_worked_invoiced_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Invoiced Cost',
'last_worked_invoiced_date': fields.function(_analysis_all, multi='analytic_analysis', type='date', string='Date of Last Invoiced Cost',
help="If invoice from the costs, this is the date of the latest work or cost that have been invoiced."),
'last_worked_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Cost/Work',
'last_worked_date': fields.function(_analysis_all, multi='analytic_analysis', type='date', string='Date of Last Cost/Work',
help="Date of the latest work done on this account."),
'hours_qtt_non_invoiced': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Hours',
'hours_qtt_non_invoiced': fields.function(_analysis_all, multi='analytic_analysis', type='float', string='Uninvoiced Hours',
help="Number of hours (from journal of type 'general') that can be invoiced if you invoice based on analytic account."),
'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, method=True, type='float', string='Invoiced Hours',
'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, type='float', string='Invoiced Hours',
help="Number of hours that can be invoiced plus those that already have been invoiced."),
'remaining_hours': fields.function(_remaining_hours_calc, method=True, type='float', string='Remaining Hours',
'remaining_hours': fields.function(_remaining_hours_calc, type='float', string='Remaining Hours',
help="Computed using the formula: Maximum Quantity - Hours Tot."),
'remaining_ca': fields.function(_remaining_ca_calc, method=True, type='float', string='Remaining Revenue',
'remaining_ca': fields.function(_remaining_ca_calc, type='float', string='Remaining Revenue',
help="Computed using the formula: Max Invoice Price - Invoiced Amount.",
digits_compute=dp.get_precision('Account')),
'revenue_per_hour': fields.function(_revenue_per_hour_calc, method=True, type='float', string='Revenue per Hours (real)',
'revenue_per_hour': fields.function(_revenue_per_hour_calc, type='float', string='Revenue per Hours (real)',
help="Computed using the formula: Invoiced Amount / Hours Tot.",
digits_compute=dp.get_precision('Account')),
'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real Margin',
'real_margin': fields.function(_real_margin_calc, type='float', string='Real Margin',
help="Computed using the formula: Invoiced Amount - Total Costs.",
digits_compute=dp.get_precision('Account')),
'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theoretical Margin',
'theorical_margin': fields.function(_theorical_margin_calc, type='float', string='Theoretical Margin',
help="Computed using the formula: Theorial Revenue - Total Costs",
digits_compute=dp.get_precision('Account')),
'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real Margin Rate (%)',
'real_margin_rate': fields.function(_real_margin_rate_calc, type='float', string='Real Margin Rate (%)',
help="Computes using the formula: (Real Margin / Total Costs) * 100.",
digits_compute=dp.get_precision('Account')),
'month_ids': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),
'user_ids': fields.function(_analysis_all, method=True, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'),
'month_ids': fields.function(_analysis_all, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),
'user_ids': fields.function(_analysis_all, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'),
}
account_analytic_account()
@ -456,7 +456,7 @@ class account_analytic_account_summary_user(osv.osv):
_columns = {
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'unit_amount': fields.function(_unit_amount, method=True, type='float',
'unit_amount': fields.function(_unit_amount, type='float',
string='Total Time'),
'user': fields.many2one('res.users', 'User'),
}
@ -620,7 +620,7 @@ class account_analytic_account_summary_month(osv.osv):
_columns = {
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'unit_amount': fields.function(_unit_amount, method=True, type='float', string='Total Time'),
'unit_amount': fields.function(_unit_amount, type='float', string='Total Time'),
'month': fields.char('Month', size=32, readonly=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: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-09-29 09:13+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
"PO-Revision-Date: 2011-07-01 10:20+0000\n"
"Last-Translator: digitalsatori <digisatori@gmail.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: 2011-04-29 05:25+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-07-02 05:06+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: account_analytic_default
#: model:ir.module.module,shortdesc:account_analytic_default.module_meta_information
@ -49,7 +49,7 @@ msgstr ""
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Group By..."
msgstr ""
msgstr "分组..."
#. module: account_analytic_default
#: help:account.analytic.default,date_stop:0
@ -59,7 +59,7 @@ msgstr ""
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_stock_picking
msgid "Picking List"
msgstr ""
msgstr "领料/提货单"
#. module: account_analytic_default
#: view:account.analytic.default:0

View File

@ -61,7 +61,7 @@ class account_analytic_line(osv.osv):
return res
_columns = {
'amount_currency': fields.function(_get_amount, string="Amount Currency", type="float", method=True, store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True),
'amount_currency': fields.function(_get_amount, string="Amount Currency", type="float", store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True),
'percentage': fields.float('Percentage')
}

View File

@ -0,0 +1,111 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-29 08:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-30 04:34+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: account_anglo_saxon
#: view:product.category:0
msgid " Accounting Property"
msgstr " Kirjanpito-ominaisuus"
#. module: account_anglo_saxon
#: sql_constraint:purchase.order:0
msgid "Order Reference must be unique !"
msgstr "Tilauksen viite tulee olla yksilöllinen!"
#. module: account_anglo_saxon
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
msgstr "Virhe ! Et voi luoda rekursiivisia luokkia."
#. module: account_anglo_saxon
#: constraint:product.template:0
msgid ""
"Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
"Virhe: Oletus mittayksikkö ja ostojen mittayksikkö täytyy olla samassa "
"kategoriassa."
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_account_invoice_line
msgid "Invoice Line"
msgstr "Laskun rivi"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_purchase_order
msgid "Purchase Order"
msgstr "Ostotilaus"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_product_template
msgid "Product Template"
msgstr "Tuotteen malli"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_product_category
msgid "Product Category"
msgstr "Tuotteen kategoria"
#. module: account_anglo_saxon
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
msgid "Stock Accounting for Anglo Saxon countries"
msgstr "Varastokirjanpito anglosaksalaisille maille"
#. module: account_anglo_saxon
#: field:product.category,property_account_creditor_price_difference_categ:0
#: field:product.template,property_account_creditor_price_difference:0
msgid "Price Difference Account"
msgstr "Hintaerotuksen tili"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_account_invoice
msgid "Invoice"
msgstr "Lasku"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_stock_picking
msgid "Picking List"
msgstr "Keräilylista"
#. module: account_anglo_saxon
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
msgid ""
"This module will support the Anglo-Saxons accounting methodology by\n"
" changing the accounting logic with stock transactions. The difference "
"between the Anglo-Saxon accounting countries\n"
" and the Rhine or also called Continental accounting countries is the "
"moment of taking the Cost of Goods Sold versus Cost of Sales.\n"
" Anglo-Saxons accounting does take the cost when sales invoice is "
"created, Continental accounting will take the cost at the moment the goods "
"are shipped.\n"
" This module will add this functionality by using a interim account, to "
"store the value of shipped goods and will contra book this interim account\n"
" when the invoice is created to transfer this amount to the debtor or "
"creditor account.\n"
" Secondly, price differences between actual purchase price and fixed "
"product standard price are booked on a separate account"
msgstr ""
#. module: account_anglo_saxon
#: help:product.category,property_account_creditor_price_difference_categ:0
#: help:product.template,property_account_creditor_price_difference:0
msgid ""
"This account will be used to value price difference between purchase price "
"and cost price."
msgstr ""
"Tätä tiliä käytetään arvostamaan hintaeroa ostohinnan ja kustannushinnan "
"välillä"

View File

@ -196,9 +196,9 @@ class crossovered_budget_lines(osv.osv):
'date_to': fields.date('End Date', required=True),
'paid_date': fields.date('Paid Date'),
'planned_amount':fields.float('Planned Amount', required=True, digits_compute=dp.get_precision('Account')),
'practical_amount':fields.function(_prac, method=True, string='Practical Amount', type='float', digits_compute=dp.get_precision('Account')),
'theoritical_amount':fields.function(_theo, method=True, string='Theoretical Amount', type='float', digits_compute=dp.get_precision('Account')),
'percentage':fields.function(_perc, method=True, string='Percentage', type='float'),
'practical_amount':fields.function(_prac, string='Practical Amount', type='float', digits_compute=dp.get_precision('Account')),
'theoritical_amount':fields.function(_theo, string='Theoretical Amount', type='float', digits_compute=dp.get_precision('Account')),
'percentage':fields.function(_perc, string='Percentage', type='float'),
'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
}

View File

@ -0,0 +1,261 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-28 09:19+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-29 04:43+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
#: field:account.coda.import,journal_id:0
msgid "Bank Journal"
msgstr "Pankkitapahtumat"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda.import,note:0
msgid "Log"
msgstr "Loki"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda_import
msgid "Account Coda Import"
msgstr "Tilien Coda tuonti"
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr "Coda tiedosto"
#. module: account_coda
#: view:account.coda:0
msgid "Group By..."
msgstr "Ryhmittely.."
#. module: account_coda
#: field:account.coda.import,awaiting_account:0
msgid "Default Account for Unrecognized Movement"
msgstr "Oletustili tuntemattomille siirroille"
#. module: account_coda
#: help:account.coda,date:0
msgid "Import Date"
msgstr "Tuontipäivä"
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr "Tuontiloki"
#. module: account_coda
#: view:account.coda.import:0
msgid "Import"
msgstr "Tuo"
#. module: account_coda
#: view:account.coda:0
msgid "Coda import"
msgstr "Coda tuonti"
#. module: account_coda
#: code:addons/account_coda/account_coda.py:51
#, python-format
msgid "Coda file not found for bank statement !!"
msgstr "Coda tiedostoa ei löytynyt tiliotteelle"
#. module: account_coda
#: help:account.coda.import,awaiting_account:0
msgid ""
"Set here the default account that will be used, if the partner is found but "
"does not have the bank account, or if he is domiciled"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,company_id:0
msgid "Company"
msgstr "Yritys"
#. module: account_coda
#: help:account.coda.import,def_payable:0
msgid ""
"Set here the payable account that will be used, by default, if the partner "
"is not found"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Search Coda"
msgstr "Hae coda"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,user_id:0
msgid "User"
msgstr "Käyttäjä"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,date:0
msgid "Date"
msgstr "Päiväys"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_statement
msgid "Coda Import Logs"
msgstr "Coda tuontilokit"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr "Coda tilille"
#. module: account_coda
#: field:account.coda.import,def_payable:0
msgid "Default Payable Account"
msgstr "Oletus maksutili"
#. module: account_coda
#: help:account.coda,name:0
msgid "Store the detail of bank statements"
msgstr "Talleta tiliotteiden yksityiskohdat"
#. module: account_coda
#: view:account.coda.import:0
msgid "Cancel"
msgstr "Peruuta"
#. module: account_coda
#: view:account.coda.import:0
msgid "Open Statements"
msgstr "Avaa tiliotteet"
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:167
#, python-format
msgid "The bank account %s is not defined for the partner %s.\n"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_import
msgid "Import Coda Statements"
msgstr "Tuo Coda tiedot"
#. module: account_coda
#: view:account.coda.import:0
#: model:ir.actions.act_window,name:account_coda.action_account_coda_import
msgid "Import Coda Statement"
msgstr "Tuo Coda tiedot"
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
msgid ""
"\n"
" Module provides functionality to import\n"
" bank statements from coda files.\n"
" "
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Statements"
msgstr "Tiliotteet"
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
msgstr "Coda"
#. module: account_coda
#: view:account.coda.import:0
msgid "Results :"
msgstr "Tulokset :"
#. module: account_coda
#: view:account.coda.import:0
msgid "Result of Imported Coda Statements"
msgstr "Tulos tuoduista Coda tiliotteista"
#. module: account_coda
#: help:account.coda.import,def_receivable:0
msgid ""
"Set here the receivable account that will be used, by default, if the "
"partner is not found"
msgstr ""
"Valitse tähän oletustili jota käytetään jos saapuneen maksun kumppania ei "
"löydetä"
#. module: account_coda
#: field:account.coda.import,coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
msgid "Coda File"
msgstr "Coda tiedosto"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_bank_statement
msgid "Bank Statement"
msgstr "Pankin tiliote"
#. module: account_coda
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda Logs"
msgstr "Coda lokit"
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:311
#, python-format
msgid "Result"
msgstr "Tulos"
#. module: account_coda
#: view:account.coda.import:0
msgid "Click on 'New' to select your file :"
msgstr "Valitse 'uusi' valitaksesi tiedostosi :"
#. module: account_coda
#: field:account.coda.import,def_receivable:0
msgid "Default Receivable Account"
msgstr "Oletus saamistili"
#. module: account_coda
#: view:account.coda.import:0
msgid "Close"
msgstr "Sulje"
#. module: account_coda
#: field:account.coda,statement_ids:0
msgid "Generated Bank Statements"
msgstr "Luodut tiliotteet"
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA - import bank statements from coda file"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Configure Your Journal and Account :"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Coda Import"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,journal_id:0
msgid "Journal"
msgstr ""

View File

@ -161,7 +161,7 @@ class account_invoice_line(osv.osv):
('break','Page Break'),]
,'Type', select=True, required=True),
'sequence': fields.integer('Sequence Number', help="Gives the sequence order when displaying a list of invoice lines."),
'functional_field': fields.function(_fnct, arg=None, fnct_inv=None, fnct_inv_arg=None, type='char', fnct_search=None, obj=None, method=True, store=False, string="Source Account"),
'functional_field': fields.function(_fnct, arg=None, fnct_inv=None, fnct_inv_arg=None, type='char', fnct_search=None, obj=None, store=False, string="Source Account"),
}
def _default_account(self, cr, uid, context=None):

View File

@ -42,7 +42,7 @@ class Invoice(osv.osv):
return res
_columns = {
'amount_to_pay': fields.function(_amount_to_pay, method=True,
'amount_to_pay': fields.function(_amount_to_pay,
type='float', string='Amount to be paid',
help='The amount which should be paid at the current date\n' \
'minus the amount which is already in payment order'),

View File

@ -111,7 +111,7 @@ class account_move_line(osv.osv):
return line2bank
_columns = {
'amount_to_pay': fields.function(amount_to_pay, method=True,
'amount_to_pay': fields.function(amount_to_pay,
type='float', string='Amount to pay', fnct_search=_to_pay_search),
}

View File

@ -96,7 +96,7 @@ class payment_order(osv.osv):
('done', 'Done')], 'State', select=True,
help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'),
'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
'total': fields.function(_total, string="Total", method=True, type='float'),
'total': fields.function(_total, string="Total", type='float'),
'user_id': fields.many2one('res.users', 'User', required=True, states={'done': [('readonly', True)]}),
'date_prefered': fields.selection([
('now', 'Directly'),
@ -348,10 +348,10 @@ class payment_line(osv.osv):
help='Payment amount in the company currency'),
'ml_date_created': fields.function(_get_ml_created_date, string="Effective Date",
method=True, type='date', help="Invoice Effective Date"),
'ml_maturity_date': fields.function(_get_ml_maturity_date, method=True, type='date', string='Due Date'),
'ml_inv_ref': fields.function(_get_ml_inv_ref, method=True, type='many2one', relation='account.invoice', string='Invoice Ref.'),
'info_owner': fields.function(info_owner, string="Owner Account", method=True, type="text", help='Address of the Main Partner'),
'info_partner': fields.function(info_partner, string="Destination Account", method=True, type="text", help='Address of the Ordering Customer.'),
'ml_maturity_date': fields.function(_get_ml_maturity_date, type='date', string='Due Date'),
'ml_inv_ref': fields.function(_get_ml_inv_ref, type='many2one', relation='account.invoice', string='Invoice Ref.'),
'info_owner': fields.function(info_owner, string="Owner Account", type="text", help='Address of the Main Partner'),
'info_partner': fields.function(info_partner, string="Destination Account", type="text", help='Address of the Ordering Customer.'),
'date': fields.date('Payment Date', help="If no payment date is specified, the bank will treat this payment line directly"),
'create_date': fields.datetime('Created', readonly=True),
'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True),

View File

@ -0,0 +1,221 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-24 11:23+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@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: 2011-06-25 04:59+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: account_sequence
#: view:account.sequence.installer:0
#: model:ir.actions.act_window,name:account_sequence.action_account_seq_installer
msgid "Account Sequence Application Configuration"
msgstr ""
#. module: account_sequence
#: constraint:account.move:0
msgid ""
"You cannot create entries on different periods/journals in the same move"
msgstr ""
#. module: account_sequence
#: help:account.move,internal_sequence_number:0
#: help:account.move.line,internal_sequence_number:0
msgid "Internal Sequence Number"
msgstr "Internt sekvensnummer"
#. module: account_sequence
#: help:account.sequence.installer,number_next:0
msgid "Next number of this sequence"
msgstr "Neste nummer på denne sekvensen"
#. module: account_sequence
#: field:account.sequence.installer,number_next:0
msgid "Next Number"
msgstr "Neste nummer"
#. module: account_sequence
#: field:account.sequence.installer,number_increment:0
msgid "Increment Number"
msgstr ""
#. module: account_sequence
#: model:ir.module.module,description:account_sequence.module_meta_information
msgid ""
"\n"
" This module maintains internal sequence number for accounting entries.\n"
" "
msgstr ""
#. module: account_sequence
#: model:ir.module.module,shortdesc:account_sequence.module_meta_information
msgid "Entries Sequence Numbering"
msgstr ""
#. module: account_sequence
#: help:account.sequence.installer,number_increment:0
msgid "The next number of the sequence will be incremented by this number"
msgstr ""
#. module: account_sequence
#: view:account.sequence.installer:0
msgid "Configure Your Account Sequence Application"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,progress:0
msgid "Configuration Progress"
msgstr ""
#. module: account_sequence
#: help:account.sequence.installer,suffix:0
msgid "Suffix value of the record for the sequence"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,company_id:0
msgid "Company"
msgstr ""
#. module: account_sequence
#: help:account.journal,internal_sequence_id:0
msgid ""
"This sequence will be used to maintain the internal number for the journal "
"entries related to this journal."
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,padding:0
msgid "Number padding"
msgstr ""
#. module: account_sequence
#: model:ir.model,name:account_sequence.model_account_move_line
msgid "Journal Items"
msgstr ""
#. module: account_sequence
#: field:account.move,internal_sequence_number:0
#: field:account.move.line,internal_sequence_number:0
msgid "Internal Number"
msgstr ""
#. module: account_sequence
#: constraint:account.move.line:0
msgid "Company must be same for its related account and period."
msgstr ""
#. module: account_sequence
#: help:account.sequence.installer,padding:0
msgid ""
"OpenERP will automatically adds some '0' on the left of the 'Next Number' to "
"get the required padding size."
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,name:0
msgid "Name"
msgstr ""
#. module: account_sequence
#: constraint:account.move.line:0
msgid "You can not create move line on closed account."
msgstr ""
#. module: account_sequence
#: constraint:account.move:0
msgid ""
"You cannot create more than one move per period on centralized journal"
msgstr ""
#. module: account_sequence
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr ""
#. module: account_sequence
#: field:account.journal,internal_sequence_id:0
msgid "Internal Sequence"
msgstr ""
#. module: account_sequence
#: model:ir.model,name:account_sequence.model_account_sequence_installer
msgid "account.sequence.installer"
msgstr ""
#. module: account_sequence
#: view:account.sequence.installer:0
msgid "Configure"
msgstr ""
#. module: account_sequence
#: help:account.sequence.installer,prefix:0
msgid "Prefix value of the record for the sequence"
msgstr ""
#. module: account_sequence
#: model:ir.model,name:account_sequence.model_account_move
msgid "Account Entry"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,suffix:0
msgid "Suffix"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,config_logo:0
msgid "Image"
msgstr ""
#. module: account_sequence
#: view:account.sequence.installer:0
msgid "title"
msgstr ""
#. module: account_sequence
#: sql_constraint:account.journal:0
msgid "The name of the journal must be unique per company !"
msgstr ""
#. module: account_sequence
#: field:account.sequence.installer,prefix:0
msgid "Prefix"
msgstr ""
#. module: account_sequence
#: sql_constraint:account.journal:0
msgid "The code of the journal must be unique per company !"
msgstr ""
#. module: account_sequence
#: constraint:account.move.line:0
msgid ""
"You can not create move line on receivable/payable account without partner"
msgstr ""
#. module: account_sequence
#: model:ir.model,name:account_sequence.model_account_journal
msgid "Journal"
msgstr ""
#. module: account_sequence
#: view:account.sequence.installer:0
msgid "You can enhance the Account Sequence Application by installing ."
msgstr ""
#. module: account_sequence
#: constraint:account.move.line:0
msgid "You can not create move line on view account."
msgstr ""

View File

@ -226,7 +226,7 @@ class account_voucher(osv.osv):
'writeoff_acc_id': fields.many2one('account.account', 'Write-Off account', readonly=True, states={'draft': [('readonly', False)]}),
'comment': fields.char('Write-Off Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),
'analytic_id': fields.many2one('account.analytic.account','Write-Off Analytic Account', readonly=True, states={'draft': [('readonly', False)]}),
'writeoff_amount': fields.function(_get_writeoff_amount, method=True, string='Write-Off Amount', type='float', readonly=True),
'writeoff_amount': fields.function(_get_writeoff_amount, string='Write-Off Amount', type='float', readonly=True),
}
_defaults = {
'period_id': _get_period,
@ -845,8 +845,8 @@ class account_voucher_line(osv.osv):
'move_line_id': fields.many2one('account.move.line', 'Journal Item'),
'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1),
'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
'amount_original': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Original Amount', store=True),
'amount_unreconciled': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Open Balance', store=True),
'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True),
'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True),
'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),
}
_defaults = {
@ -991,7 +991,7 @@ class account_bank_statement_line(osv.osv):
_columns = {
'amount_reconciled': fields.function(_amount_reconciled,
string='Amount reconciled', method=True, type='float'),
string='Amount reconciled', type='float'),
'voucher_id': fields.many2one('account.voucher', 'Payment'),
}

View File

@ -149,18 +149,18 @@ class account_analytic_account(osv.osv):
_columns = {
'name': fields.char('Account Name', size=128, required=True),
'complete_name': fields.function(_complete_name_calc, method=True, type='char', string='Full Account Name'),
'complete_name': fields.function(_complete_name_calc, type='char', string='Full Account Name'),
'code': fields.char('Account Code', size=24, select=True),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Account Type', help='If you select the View Type, it means you won\'t allow to create journal entries using that account.'),
'description': fields.text('Description'),
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),
'child_complete_ids': fields.function(_child_compute, relation='account.analytic.account', method=True, string="Account Hierarchy", type='many2many'),
'child_complete_ids': fields.function(_child_compute, relation='account.analytic.account', string="Account Hierarchy", type='many2many'),
'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),
'balance': fields.function(_debit_credit_bal_qtty, method=True, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
'debit': fields.function(_debit_credit_bal_qtty, method=True, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
'credit': fields.function(_debit_credit_bal_qtty, method=True, type='float', string='Credit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
'quantity': fields.function(_debit_credit_bal_qtty, method=True, type='float', string='Quantity', multi='debit_credit_bal_qtty'),
'balance': fields.function(_debit_credit_bal_qtty, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
'debit': fields.function(_debit_credit_bal_qtty, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
'credit': fields.function(_debit_credit_bal_qtty, type='float', string='Credit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
'quantity': fields.function(_debit_credit_bal_qtty, type='float', string='Quantity', multi='debit_credit_bal_qtty'),
'quantity_max': fields.float('Maximum Quantity', help='Sets the higher limit of quantity of hours.'),
'partner_id': fields.many2one('res.partner', 'Partner'),
'contact_id': fields.many2one('res.partner.address', 'Contact'),
@ -175,7 +175,7 @@ class account_analytic_account(osv.osv):
\n* And finally when all the transactions are over, it can be in \'Close\' state. \
\n* The project can be in either if the states \'Template\' and \'Running\'.\n If it is template then we can make projects based on the template projects. If its in \'Running\' state it is a normal project.\
\n If it is to be reviewed then the state is \'Pending\'.\n When the project is completed the state is set to \'Done\'.'),
'currency_id': fields.function(_currency, fnct_inv=_set_company_currency, method=True,
'currency_id': fields.function(_currency, fnct_inv=_set_company_currency,
store = {
'res.company': (_get_analytic_account, ['currency_id'], 10),
}, string='Currency', type='many2one', relation='res.currency'),
@ -202,8 +202,8 @@ class account_analytic_account(osv.osv):
'currency_id': _get_default_currency,
}
def check_recursion(self, cr, uid, ids, parent=None):
return super(account_analytic_account, self)._check_recursion(cr, uid, ids, parent=parent)
def check_recursion(self, cr, uid, ids, context=None, parent=None):
return super(account_analytic_account, self)._check_recursion(cr, uid, ids, context=context, parent=parent)
_order = 'name asc'
_constraints = [

261
addons/analytic/i18n/fi.po Normal file
View File

@ -0,0 +1,261 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-29 06:16+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-30 04:34+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr "Alatason tilit"
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
msgstr "Tilin nimi"
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
msgstr "Määrittelee laskettavan määrän"
#. module: analytic
#: model:ir.module.module,description:analytic.module_meta_information
msgid ""
"Module for defining analytic accounting object.\n"
" "
msgstr ""
"Moduuli analyyttisten tilien määrittelyyn.\n"
" "
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
msgstr "Tila"
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
msgstr "Asiakas päällikkö"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Draft"
msgstr "Luonnos"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
msgstr "Suljettu"
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
msgstr "Debet"
#. module: analytic
#: help:account.analytic.account,state:0
msgid ""
"* When an account is created its in 'Draft' state. "
" \n"
"* If any associated partner is there, it can be in 'Open' state. "
" \n"
"* If any pending balance is there it can be in 'Pending'. "
" \n"
"* And finally when all the transactions are over, it can be in 'Close' "
"state. \n"
"* The project can be in either if the states 'Template' and 'Running'.\n"
" If it is template then we can make projects based on the template projects. "
"If its in 'Running' state it is a normal project. "
" \n"
" If it is to be reviewed then the state is 'Pending'.\n"
" When the project is completed the state is set to 'Done'."
msgstr ""
#. module: analytic
#: field:account.analytic.account,type:0
msgid "Account Type"
msgstr "Tilityyppi"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
msgstr "Mallipohja"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
msgstr "Odottava"
#. module: analytic
#: model:ir.model,name:analytic.model_account_analytic_line
msgid "Analytic Line"
msgstr "Analyyttinen rivi"
#. module: analytic
#: field:account.analytic.account,description:0
#: field:account.analytic.line,name:0
msgid "Description"
msgstr "Kuvaus"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
msgstr "Tavallinen"
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
msgstr "Yritys"
#. module: analytic
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Quantity"
msgstr "Maksimimäärä"
#. module: analytic
#: field:account.analytic.line,user_id:0
msgid "User"
msgstr "Käyttäjä"
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr "Ylempi analyyttinen tili"
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
msgstr "Päiväys"
#. module: analytic
#: field:account.analytic.account,currency_id:0
msgid "Account currency"
msgstr "Tilin valuutta"
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
msgstr "Määrä"
#. module: analytic
#: help:account.analytic.line,amount:0
msgid ""
"Calculated by multiplying the quantity and the price given in the Product's "
"cost price. Always expressed in the company main currency."
msgstr ""
"Laskettu kertomalla määrä ja tuotteen kustannushinta. Yrityksen "
"päävaluutassa."
#. module: analytic
#: help:account.analytic.account,quantity_max:0
msgid "Sets the higher limit of quantity of hours."
msgstr "Asettaa tuntien määrän ylärajan"
#. module: analytic
#: field:account.analytic.account,credit:0
msgid "Credit"
msgstr "Kredit"
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
msgstr "Määrä"
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr "Yhteyshenkilö"
#. module: analytic
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr "Virhe! Valuutan tulee olla sama kun valitun yrityksen valutta."
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
msgstr "Peruttu"
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
msgstr "Saldo"
#. module: analytic
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr "Virhe! Et voi luoda sisäkkäisiä analyyttisiä tilejä."
#. module: analytic
#: help:account.analytic.account,type:0
msgid ""
"If you select the View Type, it means you won't allow to create journal "
"entries using that account."
msgstr ""
"Jos valitset näkymätyypin, se tarkoittaa että et voi luoda "
"päiväkirjamerkintöjä käyttäen sitä tiliä."
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
msgstr "Loppupäiväys"
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Account Code"
msgstr "Tilikoodi"
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
msgstr "Tilin kokonimi"
#. module: analytic
#: field:account.analytic.line,account_id:0
#: model:ir.model,name:analytic.model_account_analytic_account
#: model:ir.module.module,shortdesc:analytic.module_meta_information
msgid "Analytic Account"
msgstr "Analyyttinen tili"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
msgstr "Näkymä"
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Partner"
msgstr "Kumppani"
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
msgstr "Aloituspäivämäärä"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
msgstr "Avoin"
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
msgstr "Analyyttiset viennit"

View File

@ -0,0 +1,103 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-03 16:56+0000\n"
"PO-Revision-Date: 2011-06-29 05:53+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-30 04:34+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: analytic_user_function
#: field:analytic_user_funct_grid,product_id:0
msgid "Product"
msgstr "Tuote"
#. module: analytic_user_function
#: code:addons/analytic_user_function/analytic_user_function.py:96
#: code:addons/analytic_user_function/analytic_user_function.py:131
#, python-format
msgid "Error !"
msgstr "Virhe !"
#. module: analytic_user_function
#: model:ir.model,name:analytic_user_function.model_hr_analytic_timesheet
msgid "Timesheet Line"
msgstr "Tuntilistan rivi"
#. module: analytic_user_function
#: field:analytic_user_funct_grid,account_id:0
#: model:ir.model,name:analytic_user_function.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analyyttinen tili"
#. module: analytic_user_function
#: view:account.analytic.account:0
#: field:account.analytic.account,user_product_ids:0
msgid "Users/Products Rel."
msgstr "Käyttäjän/Tuotteen suhde"
#. module: analytic_user_function
#: field:analytic_user_funct_grid,user_id:0
msgid "User"
msgstr "Käyttäjä"
#. module: analytic_user_function
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr "Virhe! Valuutan tulee olla sama kun valitun yrityksen valutta."
#. module: analytic_user_function
#: code:addons/analytic_user_function/analytic_user_function.py:97
#: code:addons/analytic_user_function/analytic_user_function.py:132
#, python-format
msgid "There is no expense account define for this product: \"%s\" (id:%d)"
msgstr "Tuotteelle ei ole määritelty kulutiliä: \"%s\" (id:%d)"
#. module: analytic_user_function
#: model:ir.model,name:analytic_user_function.model_analytic_user_funct_grid
msgid "Relation table between users and products on a analytic account"
msgstr "Viitetaulu käyttäjien ja tuotteiden välillä analyyttisellä tilillä"
#. module: analytic_user_function
#: model:ir.module.module,description:analytic_user_function.module_meta_information
msgid ""
"\n"
"\n"
" This module allows you to define what is the default function of a "
"specific user on a given account. This is mostly used when a user encodes "
"his timesheet: the values are retrieved and the fields are auto-filled... "
"but the possibility to change these values is still available.\n"
"\n"
" Obviously if no data has been recorded for the current account, the "
"default value is given as usual by the employee data so that this module is "
"perfectly compatible with older configurations.\n"
"\n"
" "
msgstr ""
#. module: analytic_user_function
#: model:ir.module.module,shortdesc:analytic_user_function.module_meta_information
msgid "Analytic User Function"
msgstr "Analyyttinen käyttäjätoiminto"
#. module: analytic_user_function
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr "Virhe! Et voi luoda sisäkkäisiä analyyttisiä tilejä."
#. module: analytic_user_function
#: view:analytic_user_funct_grid:0
msgid "User's Product for this Analytic Account"
msgstr "Käyttäjän tuote tälle analyyttiselle tilille"

View File

@ -240,10 +240,10 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
_columns = {
'name': fields.char(size='64', string='File Name'),
'summary': fields.function(_get_summary, method=True, type='text', string='Summary'),
'summary': fields.function(_get_summary, type='text', string='Summary'),
'file_export': fields.binary(string='Export'),
'file_import': fields.binary(string='Import'),
'state': fields.function(_get_state, method=True, string='State', type='selection', selection=ANONYMIZATION_STATES, readonly=False),
'state': fields.function(_get_state, string='State', type='selection', selection=ANONYMIZATION_STATES, readonly=False),
'msg': fields.text(string='Message'),
}

View File

@ -0,0 +1,227 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-30 09:52+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-07-01 04:54+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard
msgid "ir.model.fields.anonymize.wizard"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization,field_name:0
msgid "Field Name"
msgstr "Kentän nimi"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_id:0
msgid "Field"
msgstr "Kenttä"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,state:0
#: field:ir.model.fields.anonymize.wizard,state:0
msgid "State"
msgstr "Tila"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_import:0
msgid "Import"
msgstr "Tuo"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization
msgid "ir.model.fields.anonymization"
msgstr ""
#. module: anonymization
#: model:ir.module.module,shortdesc:anonymization.module_meta_information
msgid "Database anonymization module"
msgstr "Tietokannan anonymisointi moduuli"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,direction:0
msgid "Direction"
msgstr "suunta"
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_tree
#: view:ir.model.fields.anonymization:0
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_fields
msgid "Anonymized Fields"
msgstr "Anonymisoidut kentät"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization
msgid "Database anonymization"
msgstr "Tietokannan anonymisointi"
#. module: anonymization
#: code:addons/anonymization/anonymization.py:55
#: sql_constraint:ir.model.fields.anonymization:0
#, python-format
msgid "You cannot have two records having the same model and the same field"
msgstr ""
"Sinulla ei voi olla kahta tietuetta joilla on sama malli ja sama kenttä"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Anonymized"
msgstr "Anonymisoitu"
#. module: anonymization
#: field:ir.model.fields.anonymization,state:0
msgid "unknown"
msgstr "Tuntematon"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_id:0
msgid "Object"
msgstr "Objekti"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,filepath:0
msgid "File path"
msgstr "Tiedoston polku"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,date:0
msgid "Date"
msgstr "Päiväys"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_export:0
msgid "Export"
msgstr "Vie"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Reverse the Database Anonymization"
msgstr "Poista tietokannan anonymisointi"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Database Anonymization"
msgstr "Tietokannan anonymisointi"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard
msgid "Anonymize database"
msgstr "Anonymisoi tietokanta"
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,field_ids:0
msgid "Fields"
msgstr "Kentät"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Clear"
msgstr "Tyhjennä"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "clear -> anonymized"
msgstr "näkyvä -> anonymisoitu"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
#: field:ir.model.fields.anonymize.wizard,summary:0
msgid "Summary"
msgstr "Yhteenveto"
#. module: anonymization
#: view:ir.model.fields.anonymization:0
msgid "Anonymized Field"
msgstr ""
#. module: anonymization
#: model:ir.module.module,description:anonymization.module_meta_information
msgid ""
"\n"
"This module allows you to anonymize a database.\n"
" "
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Unstable"
msgstr "Epävakaa"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Exception occured"
msgstr "Poikkeus tapahtui"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Not Existing"
msgstr "Ei ole olemassa"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_name:0
msgid "Object Name"
msgstr "Objektin nimi"
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_history_tree
#: view:ir.model.fields.anonymization.history:0
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_history
msgid "Anonymization History"
msgstr "Anonymisoinnin historia"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history
msgid "ir.model.fields.anonymization.history"
msgstr ""
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymize_wizard
#: view:ir.model.fields.anonymize.wizard:0
msgid "Anonymize Database"
msgstr "Anonymisoi tietokanta"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,name:0
msgid "File Name"
msgstr "Tiedostonimi"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "anonymized -> clear"
msgstr "Anonymisoitu -> näkyvä"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Started"
msgstr "Käynnistetty"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Done"
msgstr "Valmis"
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,msg:0
#: field:ir.model.fields.anonymize.wizard,msg:0
msgid "Message"
msgstr "Viesti"

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: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-05-20 02:08+0000\n"
"PO-Revision-Date: 2011-07-02 18:49+0000\n"
"Last-Translator: Gustavo T <Unknown>\n"
"Language-Team: Brazilian Portuguese <pt_BR@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: 2011-05-21 05:02+0000\n"
"X-Generator: Launchpad (build 12959)\n"
"X-Launchpad-Export-Date: 2011-07-03 04:47+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard
@ -25,7 +25,7 @@ msgstr "ir.model.fields.anonymize.wizard"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_name:0
msgid "Field Name"
msgstr "Nome do Campo"
msgstr "Nome do campo"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_id:0
@ -138,7 +138,7 @@ msgstr "Limpar"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "clear -> anonymized"
msgstr ""
msgstr "em branco -> anonimizado"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
@ -149,7 +149,7 @@ msgstr "Resumo"
#. module: anonymization
#: view:ir.model.fields.anonymization:0
msgid "Anonymized Field"
msgstr ""
msgstr "Campo Anonimizado"
#. module: anonymization
#: model:ir.module.module,description:anonymization.module_meta_information
@ -158,6 +158,9 @@ msgid ""
"This module allows you to anonymize a database.\n"
" "
msgstr ""
"\n"
"Este módulo permite que você anonimize um banco de dados\n"
" "
#. module: anonymization
#: selection:ir.model.fields.anonymize.wizard,state:0
@ -196,7 +199,7 @@ msgstr "ir.model.fields.anonymization.history"
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymize_wizard
#: view:ir.model.fields.anonymize.wizard:0
msgid "Anonymize Database"
msgstr ""
msgstr "Anonimizar Banco de Dados"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,name:0
@ -206,21 +209,21 @@ msgstr "Nome do Arquivo"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "anonymized -> clear"
msgstr ""
msgstr "anonimizado -> em branco"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Started"
msgstr ""
msgstr "Iniciada"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Done"
msgstr ""
msgstr "Concluído"
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,msg:0
#: field:ir.model.fields.anonymize.wizard,msg:0
msgid "Message"
msgstr ""
msgstr "Mensagem"

View File

@ -0,0 +1,141 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-27 10:43+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-28 04:40+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: association
#: field:profile.association.config.install_modules_wizard,wiki:0
msgid "Wiki"
msgstr ""
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Event Management"
msgstr "Tapahtumienhallinta"
#. module: association
#: field:profile.association.config.install_modules_wizard,project_gtd:0
msgid "Getting Things Done"
msgstr "Saada asiat tehtyä"
#. module: association
#: model:ir.module.module,description:association.module_meta_information
msgid "This module is to create Profile for Associates"
msgstr "Tämä moduuli mahdollistaa yhdistysjäsenprofiilien luonnin"
#. module: association
#: field:profile.association.config.install_modules_wizard,progress:0
msgid "Configuration Progress"
msgstr "Konfiguraation eteneminen"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid ""
"Here are specific applications related to the Association Profile you "
"selected."
msgstr ""
"Tässä on määritellyt ohjelmat jotka liittyvät valitsemaasi "
"yhdistysprofiiliin."
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "title"
msgstr "otsikko"
#. module: association
#: help:profile.association.config.install_modules_wizard,event_project:0
msgid "Helps you to manage and organize your events."
msgstr "Auttaa sinua hallitsemaan ja organisoimaan tapahtumia"
#. module: association
#: field:profile.association.config.install_modules_wizard,config_logo:0
msgid "Image"
msgstr "Kuva"
#. module: association
#: help:profile.association.config.install_modules_wizard,hr_expense:0
msgid ""
"Tracks and manages employee expenses, and can automatically re-invoice "
"clients if the expenses are project-related."
msgstr ""
"Seuraa ja hallitsee työntekijäkuluja ja voi automaattisesti laskuttaa "
"asiakasta, jos kulut liittyvät projektiin."
#. module: association
#: help:profile.association.config.install_modules_wizard,project_gtd:0
msgid ""
"GTD is a methodology to efficiently organise yourself and your tasks. This "
"module fully integrates GTD principle with OpenERP's project management."
msgstr ""
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Resources Management"
msgstr "Resurssienhallinta"
#. module: association
#: model:ir.module.module,shortdesc:association.module_meta_information
msgid "Association profile"
msgstr "Yhdistysprofiili"
#. module: association
#: field:profile.association.config.install_modules_wizard,hr_expense:0
msgid "Expenses Tracking"
msgstr "Kulujenseuranta"
#. module: association
#: model:ir.actions.act_window,name:association.action_config_install_module
#: view:profile.association.config.install_modules_wizard:0
msgid "Association Application Configuration"
msgstr "Jäsenhakemuksen konfiguraatio"
#. module: association
#: help:profile.association.config.install_modules_wizard,wiki:0
msgid ""
"Lets you create wiki pages and page groups in order to keep track of "
"business knowledge and share it with and between your employees."
msgstr ""
#. module: association
#: help:profile.association.config.install_modules_wizard,project:0
msgid ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
msgstr ""
"Auttaa sinua hallitsemaan projektejasi ja tehtäviäsi seuraamalla niitä, "
"luomalla suunnitelmia yms."
#. module: association
#: model:ir.model,name:association.model_profile_association_config_install_modules_wizard
msgid "profile.association.config.install_modules_wizard"
msgstr ""
#. module: association
#: field:profile.association.config.install_modules_wizard,event_project:0
msgid "Events"
msgstr "Tapahtumat"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
#: field:profile.association.config.install_modules_wizard,project:0
msgid "Project Management"
msgstr "Projektinhallinta"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Configure"
msgstr "Konfiguroi"

View File

@ -95,12 +95,12 @@ class auction_dates(osv.osv):
'seller_costs': fields.many2many('account.tax', 'auction_seller_taxes_rel', 'auction_id', 'tax_id', 'Seller Costs', help="Account tax for seller"),
'acc_income': fields.many2one('account.account', 'Income Account', required=True),
'acc_expense': fields.many2one('account.account', 'Expense Account', required=True),
'adj_total': fields.function(_adjudication_get, method=True, string='Total Adjudication', store=True),
'adj_total': fields.function(_adjudication_get, string='Total Adjudication', store=True),
'state': fields.selection((('draft', 'Draft'), ('closed', 'Closed')), 'State', select=1, readonly=True,
help='When auction starts the state is \'Draft\'.\n At the end of auction, the state becomes \'Closed\'.'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=False),
'buyer_invoice_history': fields.function(_get_invoice, relation='account.invoice', method=True, string="Buyer Invoice", type='many2many', multi=True),
'seller_invoice_history': fields.function(_get_invoice, relation='account.invoice', method=True, string="Seller Invoice", type='many2many', multi=True),
'buyer_invoice_history': fields.function(_get_invoice, relation='account.invoice', string="Buyer Invoice", type='many2many', multi=True),
'seller_invoice_history': fields.function(_get_invoice, relation='account.invoice', string="Seller Invoice", type='many2many', multi=True),
}
_defaults = {
@ -382,8 +382,8 @@ class auction_lots(osv.osv):
'vnd_lim': fields.float('Seller limit'),
'vnd_lim_net': fields.boolean('Net limit ?', readonly=True),
'image': fields.binary('Image', help="Object Image"),
'paid_vnd':fields.function(_getprice, string='Seller Paid', method=True, type='boolean', store=True, multi="paid_vnd", help="When state of Seller Invoice is 'Paid', this field is selected as True."),
'paid_ach':fields.function(_getprice, string='Buyer Invoice Reconciled', method=True, type='boolean', store=True, multi="paid_ach", help="When state of Buyer Invoice is 'Paid', this field is selected as True."),
'paid_vnd':fields.function(_getprice, string='Seller Paid', type='boolean', store=True, multi="paid_vnd", help="When state of Seller Invoice is 'Paid', this field is selected as True."),
'paid_ach':fields.function(_getprice, string='Buyer Invoice Reconciled', type='boolean', store=True, multi="paid_ach", help="When state of Buyer Invoice is 'Paid', this field is selected as True."),
'state': fields.selection((
('draft', 'Draft'),
('unsold', 'Unsold'),
@ -394,14 +394,14 @@ class auction_lots(osv.osv):
\n* The \'Unsold\' state is used when object does not sold for long time, user can also set it as draft state after unsold. \
\n* The \'Paid\' state is used when user pay for the object \
\n* The \'Sold\' state is used when user buy the object.'),
'buyer_price': fields.function(_getprice, method=True, string='Buyer price', store=True, multi="buyer_price", help="Buyer Price"),
'seller_price': fields.function(_getprice, method=True, string='Seller price', store=True, multi="seller_price", help="Seller Price"),
'gross_revenue':fields.function(_getprice, method=True, string='Gross revenue', store=True, multi="gross_revenue", help="Buyer Price - Seller Price"),
'gross_margin':fields.function(_getprice, method=True, string='Gross Margin (%)', store=True, multi="gross_margin", help="(Gross Revenue*100.0)/ Object Price"),
'costs':fields.function(_getprice, method=True, string='Indirect costs', store=True, multi="costs", help="Deposit cost"),
'buyer_price': fields.function(_getprice, string='Buyer price', store=True, multi="buyer_price", help="Buyer Price"),
'seller_price': fields.function(_getprice, string='Seller price', store=True, multi="seller_price", help="Seller Price"),
'gross_revenue':fields.function(_getprice, string='Gross revenue', store=True, multi="gross_revenue", help="Buyer Price - Seller Price"),
'gross_margin':fields.function(_getprice, string='Gross Margin (%)', store=True, multi="gross_margin", help="(Gross Revenue*100.0)/ Object Price"),
'costs':fields.function(_getprice, string='Indirect costs', store=True, multi="costs", help="Deposit cost"),
'statement_id': fields.many2many('account.bank.statement.line', 'auction_statement_line_rel', 'auction_id', 'statement', 'Payment', help="Bank statement line for given buyer"),
'net_revenue':fields.function(_getprice, method=True, string='Net revenue', store=True, multi="net_revenue", help="Buyer Price - Seller Price - Indirect Cost"),
'net_margin':fields.function(_getprice, method=True, string='Net Margin (%)', store=True, multi="net_margin", help="(Net Revenue * 100)/ Object Price"),
'net_revenue':fields.function(_getprice, string='Net revenue', store=True, multi="net_revenue", help="Buyer Price - Seller Price - Indirect Cost"),
'net_margin':fields.function(_getprice, string='Net Margin (%)', store=True, multi="net_margin", help="(Net Revenue * 100)/ Object Price"),
}
_defaults = {
'state':lambda *a: 'draft',

View File

@ -20,7 +20,7 @@
##############################################################################
from osv import fields, osv
from osv.osv import osv_pool, object_proxy
from osv.osv import object_proxy
from tools.translate import _
import pooler
import time

View File

@ -487,21 +487,24 @@ base_action_rule()
class ir_cron(osv.osv):
_inherit = 'ir.cron'
_inherit = 'ir.cron'
_init_done = False
def _poolJobs(self, db_name, check=False):
try:
db = pooler.get_db(db_name)
except:
return False
cr = db.cursor()
try:
next = datetime.now().strftime('%Y-%m-%d %H:00:00')
# Putting nextcall always less than current time in order to call it every time
cr.execute('UPDATE ir_cron set nextcall = \'%s\' where numbercall<>0 and active and model=\'base.action.rule\' ' % (next))
finally:
cr.commit()
cr.close()
if not self._init_done:
self._init_done = True
try:
db = pooler.get_db(db_name)
except:
return False
cr = db.cursor()
try:
next = datetime.now().strftime('%Y-%m-%d %H:00:00')
# Putting nextcall always less than current time in order to call it every time
cr.execute('UPDATE ir_cron set nextcall = \'%s\' where numbercall<>0 and active and model=\'base.action.rule\' ' % (next))
finally:
cr.commit()
cr.close()
super(ir_cron, self)._poolJobs(db_name, check=check)

View File

@ -1,11 +1,55 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name": "Base calendar",
"version": "2.0",
"depends": ['base'],
"js": [
'static/lib/dhtmlxScheduler/codebase/dhtmlxscheduler.js',
'static/src/js/calendar.js'
"name" : "Basic Calendar Functionality",
"version" : "1.0",
"depends" : ["base"],
'description': """
This is a full-featured calendar system.
========================================
It supports:
- Calendar of events
- Alerts (create requests)
- Recurring events
- Invitations to people""",
"author" : "OpenERP SA",
'category': 'Tools',
'website': 'http://www.openerp.com',
"init_xml" : [
'base_calendar_data.xml'
],
"css": ['static/lib/dhtmlxScheduler/codebase/dhtmlxscheduler.css'],
'active': True
"demo_xml" : [],
"update_xml" : [
'security/calendar_security.xml',
'security/ir.model.access.csv',
'wizard/base_calendar_invite_attendee_view.xml',
'base_calendar_view.xml'
],
"test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
"certificate" : "00694071962960352821",
'images': ['images/base_calendar1.jpeg','images/base_calendar2.jpeg','images/base_calendar3.jpeg','images/base_calendar4.jpeg',],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -22,6 +22,7 @@
from datetime import datetime, timedelta, date
from dateutil import parser
from dateutil import rrule
from dateutil.relativedelta import relativedelta
from osv import fields, osv
from service import web_services
from tools.translate import _
@ -47,20 +48,22 @@ def get_recurrent_dates(rrulestring, exdate, startdate=None, exrule=None):
def todate(date):
val = parser.parse(''.join((re.compile('\d')).findall(date)))
return val
if not startdate:
startdate = datetime.now()
if not exdate:
exdate = []
rset1 = rrule.rrulestr(str(rrulestring), dtstart=startdate, forceset=True)
for date in exdate:
datetime_obj = todate(date)
rset1._exdate.append(datetime_obj)
if exrule:
rset1.exrule(rrule.rrulestr(str(exrule), dtstart=startdate))
return list(rset1._iter())
return list(rset1)
def base_calendar_id2real_id(base_calendar_id=None, with_date=False):
"""
@ -338,26 +341,26 @@ class calendar_attendee(osv.osv):
help="Status of the attendee's participation"),
'rsvp': fields.boolean('Required Reply?',
help="Indicats whether the favor of a reply is requested"),
'delegated_to': fields.function(_compute_data, method=True, \
'delegated_to': fields.function(_compute_data, \
string='Delegated To', type="char", size=124, store=True, \
multi='delegated_to', help="The users that the original \
request was delegated to"),
'delegated_from': fields.function(_compute_data, method=True, string=\
'delegated_from': fields.function(_compute_data, string=\
'Delegated From', type="char", store=True, size=124, multi='delegated_from'),
'parent_ids': fields.many2many('calendar.attendee', 'calendar_attendee_parent_rel', \
'attendee_id', 'parent_id', 'Delegrated From'),
'child_ids': fields.many2many('calendar.attendee', 'calendar_attendee_child_rel', \
'attendee_id', 'child_id', 'Delegrated To'),
'sent_by': fields.function(_compute_data, method=True, string='Sent By', \
'sent_by': fields.function(_compute_data, string='Sent By', \
type="char", multi='sent_by', store=True, size=124, \
help="Specify the user that is acting on behalf of the calendar user"),
'sent_by_uid': fields.function(_compute_data, method=True, string='Sent By User', \
'sent_by_uid': fields.function(_compute_data, string='Sent By User', \
type="many2one", relation="res.users", multi='sent_by_uid'),
'cn': fields.function(_compute_data, method=True, string='Common name', \
'cn': fields.function(_compute_data, string='Common name', \
type="char", size=124, multi='cn', store=True),
'dir': fields.char('URI Reference', size=124, help="Reference to the URI\
that points to the directory information corresponding to the attendee."),
'language': fields.function(_compute_data, method=True, string='Language', \
'language': fields.function(_compute_data, string='Language', \
type="selection", selection=_lang_get, multi='language', \
store=True, help="To specify the language for text values in a\
property or property parameter."),
@ -366,14 +369,15 @@ property or property parameter."),
'partner_id': fields.related('partner_address_id', 'partner_id', type='many2one', \
relation='res.partner', string='Partner', help="Partner related to contact"),
'email': fields.char('Email', size=124, help="Email of Invited Person"),
'event_date': fields.function(_compute_data, method=True, string='Event Date', \
'event_date': fields.function(_compute_data, string='Event Date', \
type="datetime", multi='event_date'),
'event_end_date': fields.function(_compute_data, method=True, \
'event_end_date': fields.function(_compute_data, \
string='Event End Date', type="datetime", \
multi='event_end_date'),
'ref': fields.reference('Event Ref', selection=_links_get, size=128),
'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"),
}
}
_defaults = {
'state': 'needs-action',
'role': 'req-participant',
@ -411,7 +415,7 @@ property or property parameter."),
cal = vobject.iCalendar()
event = cal.add('vevent')
if not event_obj.date_deadline or not event_obj.date:
raise osv.except_osv(_('Warning !'),_("Couldn't Invite because date is not specified!"))
raise osv.except_osv(_('Warning !'),_("Couldn't Invite because date is not specified!"))
event.add('created').value = ics_datetime(time.strftime('%Y-%m-%d %H:%M:%S'))
event.add('dtstart').value = ics_datetime(event_obj.date)
event.add('dtend').value = ics_datetime(event_obj.date_deadline)
@ -456,7 +460,7 @@ property or property parameter."),
trigger.value = delta
# Compute other details
valarm.add('DESCRIPTION').value = alarm_data['name'] or 'OpenERP'
for attendee in event_obj.attendee_ids:
attendee_add = event.add('attendee')
attendee_add.params['CUTYPE'] = [str(attendee.cutype)]
@ -674,7 +678,7 @@ true, it will allow you to hide the event alarm information without removing it.
new_res_alarm = alarm_ids[0]
cr.execute('UPDATE %s ' % model_obj._table + \
' SET base_calendar_alarm_id=%s, alarm_id=%s ' \
' WHERE id=%s',
' WHERE id=%s',
(cal_alarm.id, new_res_alarm, data.id))
self.do_alarm_unlink(cr, uid, [data.id], model)
@ -806,7 +810,6 @@ class calendar_alarm(osv.osv):
@param use_new_cursor: False or the dbname
@param context: A standard dictionary for contextual values
"""
return True # XXX FIXME REMOVE THIS AFTER FIXING get_recurrent_dates!!
if context is None:
context = {}
current_datetime = datetime.now()
@ -914,22 +917,6 @@ class calendar_event(osv.osv):
def _tz_get(self, cr, uid, context=None):
return [(x.lower(), x) for x in pytz.all_timezones]
def onchange_allday(self, cr, uid, ids, allday, context=None):
"""Sets duration as 24 Hours if event is selected for all day
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of calendar events IDs.
@param allday: Value of allday boolean
@param context: A standard dictionary for contextual values
"""
if not allday or not ids:
return {}
value = {
'duration': 24
}
return {'value': value}
def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, allday=False, context=None):
"""Returns duration and/or end date based on values passed
@param self: The object pointer
@ -952,8 +939,13 @@ class calendar_event(osv.osv):
value['duration'] = duration
if allday: # For all day event
value = {'duration': 24}
value = {'duration': 24.0}
duration = 24.0
if start_date:
start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S")
start_date = datetime.strftime(datetime(start.year, start.month, start.day, 0,0,0), "%Y-%m-%d %H:%M:%S")
value['date'] = start_date
start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S")
if end_date and not duration:
@ -966,7 +958,7 @@ class calendar_event(osv.osv):
value['date_deadline'] = end.strftime("%Y-%m-%d %H:%M:%S")
elif end_date and duration and not allday:
# we have both, keep them synchronized:
# set duration based on end_date (arbitrary decision: this avoid
# set duration based on end_date (arbitrary decision: this avoid
# getting dates like 06:31:48 instead of 06:32:00)
end = datetime.strptime(end_date, "%Y-%m-%d %H:%M:%S")
diff = end - start
@ -982,88 +974,10 @@ class calendar_event(osv.osv):
"""
if context is None:
context = {}
cr.execute('select id from '+self._table+' where recurrent_uid in %s', (tuple(ids),))
r_ids = map(lambda x: x[0], cr.fetchall())
self.unlink(cr, uid, r_ids, context=context)
return True
def _set_rrulestring(self, cr, uid, id, name, value, arg, context=None):
"""
Sets values of fields that defines event recurrence from the value of rrule string
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param id: List of calendar event's ids.
@param context: A standard dictionary for contextual values
@return: dictionary of rrule value.
"""
if context is None:
context = {}
cr.execute("UPDATE %s set freq='None',interval=0,count=0,end_date=Null,\
mo=False,tu=False,we=False,th=False,fr=False,sa=False,su=False,\
day=0,select1='date',month_list=Null ,byday=Null where id=%%s" % (self._table), (id,))
if not value:
cr.execute("UPDATE %s set rrule_type='none' where id=%%s" % self._table,(id,))
return True
val = {}
for part in value.split(';'):
if part.lower().__contains__('freq') and len(value.split(';')) <=2:
rrule_type = part.lower()[5:]
break
else:
rrule_type = 'custom'
break
ans = value.split(';')
for i in ans:
val[i.split('=')[0].lower()] = i.split('=')[1].lower()
if not val.get('interval'):
rrule_type = 'custom'
elif int(val.get('interval')) > 1: #If interval is other than 1 rule is custom
rrule_type = 'custom'
qry = "UPDATE \"%s\" set rrule_type=%%s " % self._table
qry_args = [ rrule_type, ]
new_val = val.copy()
for k, v in val.items():
if val['freq'] == 'weekly' and val.get('byday'):
for day in val['byday'].split(','):
new_val[day] = True
val.pop('byday')
if val.get('until'):
until = parser.parse(''.join((re.compile('\d')).findall(val.get('until'))))
new_val['end_date'] = until.strftime('%Y-%m-%d')
val.pop('until')
new_val.pop('until')
if val.get('bymonthday'):
new_val['day'] = val.get('bymonthday')
val.pop('bymonthday')
new_val['select1'] = 'date'
new_val.pop('bymonthday')
if val.get('byday'):
d = val.get('byday')
if '-' in d:
new_val['byday'] = d[:2]
new_val['week_list'] = d[2:4].upper()
else:
new_val['byday'] = d[:1]
new_val['week_list'] = d[1:3].upper()
new_val['select1'] = 'day'
if val.get('bymonth'):
new_val['month_list'] = val.get('bymonth')
val.pop('bymonth')
new_val.pop('bymonth')
for k, v in new_val.items():
qry += ", %s=%%s" % k
qry_args.append(v)
qry = qry + " where id=%s"
qry_args.append(id)
cr.execute(qry, qry_args)
for event_id in ids:
cr.execute("select id from %s where recurrent_uid=%%s" % (self._table), (event_id,))
r_ids = map(lambda x: x[0], cr.fetchall())
self.unlink(cr, uid, r_ids, context=context)
return True
def _get_rulestring(self, cr, uid, ids, name, arg, context=None):
@ -1075,28 +989,15 @@ class calendar_event(osv.osv):
@param context: A standard dictionary for contextual values
@return: dictionary of rrule value.
"""
result = {}
for datas in self.read(cr, uid, ids, context=context):
for datas in self.read(cr, uid, ids, ['id','byday','recurrency', 'month_list','end_date', 'rrule_type', 'select1', 'interval', 'count', 'end_type', 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su', 'exrule', 'day', 'week_list' ], context=context):
event = datas['id']
if datas.get('rrule_type'):
if datas.get('rrule_type') == 'none':
result[event] = False
cr.execute("UPDATE %s set exrule=Null where id=%%s" % self._table,( event,))
if datas.get('rrule_type') :
if datas.get('interval', 0) < 0:
raise osv.except_osv(_('Warning!'), _('Interval can not be Negative'))
if datas.get('count', 0) < 0:
raise osv.except_osv(_('Warning!'), _('Count can not be Negative'))
rrule_custom = self.compute_rule_string(cr, uid, datas, \
context=context)
result[event] = rrule_custom
else:
result[event] = self.compute_rule_string(cr, uid, {'freq': datas.get('rrule_type').upper(), 'interval': 1}, context=context)
for id, myrule in result.items():
#Remove the events generated from recurrent event
if not myrule:
self.unlink_events(cr, uid, [id], context=context)
if datas.get('interval', 0) < 0:
raise osv.except_osv(_('Warning!'), _('Interval can not be Negative'))
if datas.get('count', 0) < 0:
raise osv.except_osv(_('Warning!'), _('Count can not be Negative'))
result[event] = self.compute_rule_string(datas)
return result
_columns = {
@ -1121,15 +1022,11 @@ class calendar_event(osv.osv):
defines the list of date/time exceptions for a recurring calendar component."),
'exrule': fields.char('Exception Rule', size=352, help="Defines a \
rule or repeating pattern of time to exclude from the recurring rule."),
'rrule': fields.function(_get_rulestring, type='char', size=124, method=True, \
string='Recurrent Rule', store=True, \
fnct_inv=_set_rrulestring, help='Defines a\
rule or repeating pattern for recurring events\n\
e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU'),
'rrule': fields.function(_get_rulestring, type='char', size=124, \
store=True, string='Recurrent Rule'),
'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
('weekly', 'Weekly'), ('monthly', 'Monthly'), \
('yearly', 'Yearly'),],
('yearly', 'Yearly'),],
'Recurrency', states={'done': [('readonly', True)]},
help="Let the event automatically repeat at that interval"),
'alarm_id': fields.many2one('res.alarm', 'Alarm', states={'done': [('readonly', True)]},
@ -1141,14 +1038,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
'organizer': fields.char("Organizer", size=256, states={'done': [('readonly', True)]}), # Map with Organizer Attribure of VEvent.
'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
'freq': fields.selection([('None', 'No Repeat'),
('hourly', 'Hours'),
('daily', 'Days'),
('weekly', 'Weeks'),
('monthly', 'Months'),
('yearly', 'Years'), ], 'Frequency'),
'end_type' : fields.selection([('forever', 'Forever'), ('count', 'Fix amout of times'), ('end_date','End date')], 'Way to end reccurency'),
'end_type' : fields.selection([('count', 'Fix amout of times'), ('end_date','End date')], 'Way to end reccurency'),
'interval': fields.integer('Repeat every', help="Repeat every (Days/Week/Month/Year)"),
'count': fields.integer('Repeat', help="Repeat x times"),
'mo': fields.boolean('Mon'),
@ -1158,7 +1048,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'fr': fields.boolean('Fri'),
'sa': fields.boolean('Sat'),
'su': fields.boolean('Sun'),
'select1': fields.selection([('date', 'Date of month'),
'select1': fields.selection([('date', 'Date of month'),
('day', 'Day of month')], 'Option'),
'day': fields.integer('Date of month'),
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
@ -1175,8 +1065,8 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'allday': fields.boolean('All Day', states={'done': [('readonly', True)]}),
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it."),
'recurrency': fields.boolean('Recurrent', help="Recurrent Meeting"),
'edit_all': fields.boolean('Edit All', help="Edit all Occurrences of recurrent Meeting."),
'recurrency': fields.boolean('Recurrent', help="Recurrent Meeting"),
'edit_all': fields.boolean('Edit All', help="Edit all Occurrences of recurrent Meeting."),
}
def default_organizer(self, cr, uid, context=None):
user_pool = self.pool.get('res.users')
@ -1187,11 +1077,12 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
return res
_defaults = {
'end_type' : 'forever',
'end_type' : 'count',
'count' : 1,
'rrule_type' : 'none',
'state': 'tentative',
'class': 'public',
'show_as': 'busy',
'freq': 'None',
'select1': 'date',
'interval': 1,
'active': 1,
@ -1200,43 +1091,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'edit_all' : False,
}
def onchange_edit_all(self, cr, uid, ids, rrule_type,edit_all, context=None):
if not context:
context = {}
value = {}
if edit_all and rrule_type:
for id in ids:
base_calendar_id2real_id(id)
return value
def modify_all(self, cr, uid, event_ids, defaults, context=None, *args):
"""
Modifies the recurring event
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param event_ids: List of crm meetings IDs.
@param context: A standard dictionary for contextual values
@return: True
"""
for event_id in event_ids:
event_id = base_calendar_id2real_id(event_id)
defaults.pop('id')
defaults.update({'table': self._table})
qry = "UPDATE %(table)s set name = '%(name)s', \
date = '%(date)s', date_deadline = '%(date_deadline)s'"
if defaults.get('alarm_id'):
qry += ", alarm_id = %(alarm_id)s"
if defaults.get('location'):
qry += ", location = '%(location)s'"
qry += "WHERE id = %s" % (event_id)
cr.execute(qry, defaults)
return True
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100):
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100, context=None):
"""Gives virtual event ids for recurring events based on value of Recurrence Rule
This method gives ids of dates that comes between start date and end date of calendar views
@param self: The object pointer
@ -1245,46 +1100,32 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
@param base_start_date: Get Start Date
@param base_until_date: Get End Date
@param limit: The Number of Results to Return """
if not context:
context = {}
virtual_id = context and context.get('virtual_id', False) or False
if not limit:
limit = 100
if isinstance(select, (str, int, long)):
ids = [select]
else:
ids = select
result = []
recur_dict = []
if ids and (base_start_date or base_until_date):
cr.execute("select m.id, m.rrule, m.date, m.date_deadline, m.duration, \
m.exdate, m.exrule, m.recurrent_id, m.recurrent_uid from " + self._table + \
" m where m.id = ANY(%s)", (ids,) )
count = 0
for data in cr.dictfetchall():
if ids and virtual_id:
for data in super(calendar_event, self).read(cr, uid, ids, context=context):
start_date = base_start_date and datetime.strptime(base_start_date[:10]+ ' 00:00:00' , "%Y-%m-%d %H:%M:%S") or False
until_date = base_until_date and datetime.strptime(base_until_date[:10]+ ' 23:59:59', "%Y-%m-%d %H:%M:%S") or False
if count > limit:
break
event_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S")
# To check: If the start date is replace by event date .. the event date will be changed by that of calendar code
start_date = event_date
if not data['rrule']:
if start_date and (event_date < start_date):
continue
if until_date and (event_date > until_date):
continue
idval = real_id2base_calendar_id(data['id'], data['date'])
if not data['recurrent_id']:
result.append(idval)
count += 1
else:
ex_id = real_id2base_calendar_id(data['recurrent_uid'], data['recurrent_id'])
ls = base_calendar_id2real_id(ex_id, with_date=data and data.get('duration', 0) or 0)
if not isinstance(ls, (str, int, long)) and len(ls) >= 2:
if ls[1] == data['recurrent_id']:
result.append(idval)
recur_dict.append(ex_id)
idval = data['id']
result.append(idval)
else:
start_date = event_date
exdate = data['exdate'] and data['exdate'].split(',') or []
rrule_str = data['rrule']
new_rrule_str = []
@ -1300,6 +1141,8 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
until_date = rrule_until_date
if until_date:
value = until_date.strftime("%Y%m%d%H%M%S")
else:
value = value.strftime("%Y%m%d%H%M%S")
new_rule = '%s=%s' % (name, value)
new_rrule_str.append(new_rule)
if not is_until and until_date:
@ -1309,6 +1152,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
new_rrule_str.append(new_rule)
new_rrule_str = ';'.join(new_rrule_str)
rdates = get_recurrent_dates(str(new_rrule_str), exdate, start_date, data['exrule'])
for r_date in rdates:
if start_date and r_date < start_date:
continue
@ -1316,77 +1160,75 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
continue
idval = real_id2base_calendar_id(data['id'], r_date.strftime("%Y-%m-%d %H:%M:%S"))
result.append(idval)
count += 1
if result:
ids = list(set(result)-set(recur_dict))
ids = list(set(result))
if isinstance(select, (str, int, long)):
return ids and ids[0] or False
return ids
def compute_rule_string(self, cr, uid, datas, context=None, *args):
def compute_rule_string(self, datas):
"""
Compute rule string according to value type RECUR of iCalendar from the values given.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param datas: dictionary of freq and interval value.
@param context: A standard dictionary for contextual values
@return: String value of the format RECUR of iCalendar
"""
weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
weekstring = ''
monthstring = ''
yearstring = ''
freq=datas.get('rrule_type')
if freq == 'none':
def get_week_string(freq, datas):
weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
if freq == 'weekly':
byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
if byday:
return ';BYDAY=' + ','.join(byday)
return ''
def get_month_string(freq, datas):
if freq == 'monthly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
if datas.get('select1')=='day':
return ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
return ';BYMONTHDAY=' + str(datas.get('day'))
return ''
def get_end_date(datas):
if datas.get('end_date'):
datas['end_date_new'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + 'T235959Z'
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
if freq == 'weekly':
byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
if byday:
weekstring = ';BYDAY=' + ','.join(byday)
elif freq == 'monthly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
if datas.get('select1')=='day':
monthstring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
monthstring = ';BYMONTHDAY=' + str(datas.get('day'))
return (datas.get('end_type') == 'count' and (';COUNT=' + str(datas.get('count'))) or '') +\
((datas.get('end_date_new') and datas.get('end_type') == 'end_date' and (';UNTIL=' + datas.get('end_date_new'))) or '')
if datas.get('end_date'):
datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + 'T235959Z'
enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\
((datas.get('end_date') and (';UNTIL=' + datas.get('end_date'))) or '')
freq=datas.get('rrule_type')
if freq == 'none':
return ''
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
return 'FREQ=' + freq.upper() + get_week_string(freq, datas) + interval_srting + get_end_date(datas) + get_month_string(freq, datas)
rrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \
+ enddate + monthstring + yearstring
return rrule_string
def search(self, cr, uid, args, offset=0, limit=100, order=None,
def remove_virtual_id(self, ids):
if isinstance(ids, (str, int)):
return base_calendar_id2real_id(ids)
if isinstance(ids, (list, tuple)):
res = []
for id in ids:
res.append(base_calendar_id2real_id(id))
return res
def search(self, cr, uid, args, offset=0, limit=0, order=None,
context=None, count=False):
"""
Overrides orm search method.
@param cr: the current row, from the database cursor,
@param user: the current users ID for security checks,
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param offset: The Number of Results to Pass
@param limit: The Number of Results to Return
@param context: A standard dictionary for contextual values
@param count: If its True the method returns number of records instead of ids
@return: List of id
"""
args_without_date = []
start_date = False
until_date = False
for arg in args:
if arg[0] not in ('date', unicode('date'), 'date_deadline', unicode('date_deadline')):
if arg[0] == "id":
new_id = self.remove_virtual_id(arg[2])
new_arg = (arg[0], arg[1], new_id)
args_without_date.append(new_arg)
elif arg[0] not in ('date', unicode('date'), 'date_deadline', unicode('date_deadline')):
args_without_date.append(arg)
else:
if arg[1] in ('>', '>='):
@ -1397,12 +1239,17 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
if until_date:
continue
until_date = arg[2]
res = super(calendar_event, self).search(cr, uid, args_without_date, \
offset, limit, order, context, count)
0, 0, order, context, count=False)
res = self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit, context=context)
if count:
return len(res)
elif limit:
return res[offset:offset+limit]
else:
return res
res = self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit)
return res
def get_edit_all(self, cr, uid, id, vals=None):
"""
@ -1413,22 +1260,25 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
if(vals and 'edit_all' in vals): #we jsut check edit_all
return vals['edit_all']
else: #it's a recurrent event and edit_all is already check
return meeting['recurrency'] and meeting['edit_all']
return meeting['recurrency'] and meeting['edit_all']
def _get_data(self, cr, uid, id, context=None):
res = self.read(cr, uid, [id],['date', 'date_deadline'])
return res[0]
def need_to_update(self, event_id, vals):
split_id = str(event_id).split("-")
if len(split_id) < 2:
return False
else:
date_start = vals.get('date', '')
try:
date_start = datetime.strptime(date_start, '%Y-%m-%d %H:%M:%S').strftime("%Y%m%d%H%M%S")
return date_start == split_id[1]
except Exception:
return True
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
"""
Overrides orm write method.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of crm meeting's ids
@param vals: Dictionary of field value.
@param context: A standard dictionary for contextual values
@return: True
"""
if context is None:
context = {}
if isinstance(ids, (str, int, long)):
@ -1440,12 +1290,15 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
for event_id in select:
real_event_id = base_calendar_id2real_id(event_id)
if(self.get_edit_all(cr, uid, event_id, vals=vals)):
edit_all = self.get_edit_all(cr, uid, event_id, vals=vals)
if edit_all:
if self.need_to_update(event_id, vals):
res = self._get_data(cr, uid, real_event_id, context=context)
vals.update(res)
event_id = real_event_id
if len(str(event_id).split('-')) > 1:
#if edit one instance of a reccurrent id
if len(str(event_id).split('-')) > 1 and not edit_all:
data = self.read(cr, uid, event_id, ['date', 'date_deadline', \
'rrule', 'duration', 'exdate'])
if data.get('rrule'):
@ -1458,15 +1311,15 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'edit_all': False,
'recurrency' : False,
})
new_id = self.copy(cr, uid, real_event_id, default=data, context=context)
date_new = event_id.split('-')[1]
date_new = time.strftime("%Y%m%dT%H%M%S", \
time.strptime(date_new, "%Y%m%d%H%M%S"))
exdate = (data['exdate'] and (data['exdate'] + ',') or '') + date_new
res = self.write(cr, uid, [real_event_id], {'exdate': exdate})
context.update({'active_id': new_id, 'active_ids': [new_id]})
continue
if not real_event_id in new_ids:
@ -1482,10 +1335,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
vals.get('allday', False),
context=context)
vals.update(updated_vals.get('value', {}))
if not 'edit_all' in vals:
vals['edit_all'] = False
if new_ids:
res = super(calendar_event, self).write(cr, uid, new_ids, vals, context=context)
@ -1494,18 +1343,9 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
# change alarm details
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, new_ids, self._name, 'date', context=context)
return res
return res or True and False
def browse(self, cr, uid, ids, context=None, list_class=None, fields_process=None):
"""
Overrides orm browse method.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of crm meeting's ids
@param context: A standard dictionary for contextual values
@return: the object list.
"""
if isinstance(ids, (str, int, long)):
select = [ids]
else:
@ -1518,19 +1358,29 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
return res
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
if not context:
context = {}
if 'date' in groupby:
raise osv.except_osv(_('Warning !'), _('Group by date not supported, use the calendar view instead'))
virtual_id = context.get('virtual_id', False)
context.update({'virtual_id': False})
res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
for re in res:
#remove the count, since the value is not consistent with the result of the search when expand the group
for groupname in groupby:
if re.get(groupname + "_count"):
del re[groupname + "_count"]
re.get('__context').update({'virtual_id' : virtual_id})
return res
def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
"""
Overrides orm Read method.Read List of fields for calendar event.
@param cr: the current row, from the database cursor,
@param user: the current users ID for security checks,
@param ids: List of calendar event's id.
@param fields: List of fields.
@param context: A standard dictionary for contextual values
@return: List of Dictionary of form [{name_of_the_field: value, ...}, ...]
"""
# FIXME This whole id mangling has to go!
if context is None:
context = {}
if isinstance(ids, (str, int, long)):
select = [ids]
@ -1544,9 +1394,10 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
fields.append('duration')
for base_calendar_id, real_id in select:
for base_calendar_id, real_id in select:
#REVET: Revision ID: olt@tinyerp.com-20100924131709-cqsd1ut234ni6txn
res = super(calendar_event, self).read(cr, uid, real_id, fields=fields, context=context, load=load)
if not res :
continue
ls = base_calendar_id2real_id(base_calendar_id, with_date=res and res.get('duration', 0) or 0)
@ -1558,41 +1409,34 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
result.append(res)
if isinstance(ids, (str, int, long)):
return result and result[0] or False
return result
def copy(self, cr, uid, id, default=None, context=None):
"""
Duplicate record on specified id.
@param self: the object pointer.
@param cr: the current row, from the database cursor,
@param id: id of record from which we duplicated.
@param context: A standard dictionary for contextual values
@return: Duplicate record id.
"""
if context is None:
context = {}
res = super(calendar_event, self).copy(cr, uid, base_calendar_id2real_id(id), default, context)
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
return res
def unlink(self, cr, uid, ids, context=None):
"""
Deletes records specified in ids.
@param self: the object pointer.
@param cr: the current row, from the database cursor,
@param id: List of calendar event's id.
@param context: A standard dictionary for contextual values
@return: True
"""
res = False
for event_datas in self.read(cr, uid, ids, ['date', 'rrule', 'exdate'], context=context):
event_id = event_datas['id']
if not isinstance(ids, list):
ids = [ids]
res = False
for id in ids:
data_list = self.read(cr, uid, [id], ['date', 'rrule', 'exdate'], context=context)
if len(data_list) < 1:
continue
event_data = data_list[0]
event_id = event_data['id']
if self.get_edit_all(cr, uid, event_id, vals=None):
event_id = base_calendar_id2real_id(event_id)
if isinstance(event_id, (int, long)):
res = super(calendar_event, self).unlink(cr, uid, event_id, context=context)
self.pool.get('res.alarm').do_alarm_unlink(cr, uid, [event_id], self._name)
@ -1600,11 +1444,11 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
else:
str_event, date_new = event_id.split('-')
event_id = int(str_event)
if event_datas['rrule']:
if event_data['rrule']:
# Remove one of the recurrent event
date_new = time.strftime("%Y%m%dT%H%M%S", \
time.strptime(date_new, "%Y%m%d%H%M%S"))
exdate = (event_datas['exdate'] and (event_datas['exdate'] + ',') or '') + date_new
exdate = (event_data['exdate'] and (event_data['exdate'] + ',') or '') + date_new
res = self.write(cr, uid, [event_id], {'exdate': exdate})
else:
res = super(calendar_event, self).unlink(cr, uid, [event_id], context=context)
@ -1613,15 +1457,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
return res
def create(self, cr, uid, vals, context=None):
"""
Create new record.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param vals: dictionary of every field value.
@param context: A standard dictionary for contextual values
@return: new created record id.
"""
if context is None:
context = {}
@ -1635,11 +1470,13 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
vals.get('allday', False),
context=context)
vals.update(updated_vals.get('value', {}))
res = super(calendar_event, self).create(cr, uid, vals, context)
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
return res
def do_tentative(self, cr, uid, ids, context=None, *args):
""" Makes event invitation as Tentative
@ -1710,12 +1547,12 @@ class calendar_todo(osv.osv):
@param args: list of tuples of form [(name_of_the_field, operator, value), ...].
@param context: A standard dictionary for contextual values
"""
assert name == 'date'
return self.write(cr, uid, id, { 'date_start': value }, context=context)
_columns = {
'date': fields.function(_get_date, method=True, fnct_inv=_set_date, \
'date': fields.function(_get_date, fnct_inv=_set_date, \
string='Duration', store=True, type='datetime'),
'duration': fields.integer('Duration'),
}
@ -1742,9 +1579,9 @@ class ir_attachment(osv.osv):
for arg in args:
args1.append(map(lambda x:str(x).split('-')[0], arg))
return super(ir_attachment, self).search_count(cr, user, args1, context)
def create(self, cr, uid, vals, context=None):
if context:
id = context.get('default_res_id', False)
@ -1913,7 +1750,7 @@ class res_users(osv.osv):
_columns = {
'availability': fields.function(_get_user_avail_fun, type='selection', \
selection=[('free', 'Free'), ('busy', 'Busy')], \
string='Free/Busy', method=True),
string='Free/Busy'),
}
res_users()

View File

@ -242,8 +242,7 @@
widget="selection" />
<group colspan="2" col="4" attrs="{'readonly': [('state','=','done')]}">
<field name="recurrency"/>
<field name="edit_all" attrs="{'invisible':[('recurrency','=', False)]}"
on_change="onchange_edit_all(rrule_type,edit_all)"/>
<field name="edit_all" attrs="{'invisible':[('recurrency','=', False)]}" />
</group>
</group>
<notebook colspan="4">

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,8 @@
Now I will set recurrence for this event to occur monday and friday of week
-
!python {model: calendar.event}: |
self.write(cr, uid, [ref("calendar_event_technicalpresentation0")], {'fr': 1, 'mo': 1, 'interval': 1, 'rrule_type': 'weekly'})
data = {'fr': 1, 'mo': 1, 'interval': 1, 'rrule_type': 'weekly', 'end_type': 'end_date', 'end_date': '2011-05-31 00:00:00'}
self.write(cr, uid, [ref("calendar_event_technicalpresentation0")], data)
- |
In order to check that recurrent events are views successfully in calendar view,
I will open calendar view of events
@ -27,7 +28,7 @@
I will search for one of the recurrent event and count the number of events
-
!python {model: calendar.event}: |
ids = self.search(cr, uid, [('date', '>=', '2011-04-30 16:00:00'), ('date', '<=', '2011-05-31 00:00:00')] )
ids = self.search(cr, uid, [('date', '>=', '2011-04-30 16:00:00'), ('date', '<=', '2011-05-31 00:00:00')], context={'virtual_id': True} )
assert len(ids) == 9
- |
Now I will make All day event and test it

View File

@ -19,9 +19,7 @@
#
##############################################################################
import calendar_event_edit_all
import base_calendar_invite_attendee
import base_calendar_set_exrule
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,163 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from base_calendar import base_calendar
from osv import fields, osv
from tools.translate import _
import tools
import re
months = {
1: "January", 2: "February", 3: "March", 4: "April", \
5: "May", 6: "June", 7: "July", 8: "August", 9: "September", \
10: "October", 11: "November", 12: "December"
}
class base_calendar_set_exrule(osv.osv_memory):
"""
Set Exrule.
"""
_name = "base.calendar.set.exrule"
_description = "Set Exrule"
_columns = {
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
('hourly', 'Hourly'), \
('daily', 'Daily'), \
('weekly', 'Weekly'), \
('monthly', 'Monthly'), \
('yearly', 'Yearly')], 'Frequency',required=True),
'interval': fields.integer('Interval'),
'count': fields.integer('Count'),
'mo': fields.boolean('Mon'),
'tu': fields.boolean('Tue'),
'we': fields.boolean('Wed'),
'th': fields.boolean('Thu'),
'fr': fields.boolean('Fri'),
'sa': fields.boolean('Sat'),
'su': fields.boolean('Sun'),
'select1': fields.selection([('date', 'Date of month'), \
('day', 'Day of month')], 'Option'),
'day': fields.integer('Date of month'),
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
('WE', 'Wednesday'), ('TH', 'Thursday'), \
('FR', 'Friday'), ('SA', 'Saturday'), \
('SU', 'Sunday')], 'Weekday'),
'byday': fields.selection([('1', 'First'), ('2', 'Second'), \
('3', 'Third'), ('4', 'Fourth'), \
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
'month_list': fields.selection(months.items(),'Month'),
'end_date': fields.date('Repeat Until'),
}
def view_init(self, cr, uid, fields, context=None):
"""
This function checks for precondition before wizard executes
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param fields: List of fields for default value
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
event_obj = self.pool.get(context.get('active_model'))
for event in event_obj.browse(cr, uid, context.get('active_ids', []), context=context):
if not event.rrule:
raise osv.except_osv(_("Warning !"), _("Please Apply Recurrency before applying Exception Rule."))
return False
def compute_exrule_string(self, cr, uid, ids, context=None):
"""
Compute rule string.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param datas: dictionary of freq and interval value.
@return: string value which compute FREQILY;INTERVAL
"""
weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
weekstring = ''
monthstring = ''
yearstring = ''
if context is None:
context = {}
ex_id = base_calendar.base_calendar_id2real_id(context.get('active_id', False))
model = context.get('model', False)
model_obj = self.pool.get(model)
for datas in self.read(cr, uid, ids, context=context):
freq = datas.get('freq')
if freq == 'None':
model_obj.write(cr, uid, ex_id,{'exrule': ''})
return{}
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
if freq == 'weekly':
byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
if byday:
weekstring = ';BYDAY=' + ','.join(byday)
elif freq == 'monthly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
if datas.get('select1')=='day':
monthstring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
monthstring = ';BYMONTHDAY=' + str(datas.get('day'))
elif freq == 'yearly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
bymonth = ';BYMONTH=' + str(datas.get('month_list'))
if datas.get('select1')=='day':
bystring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
bystring = ';BYMONTHDAY=' + str(datas.get('day'))
yearstring = bymonth + bystring
if datas.get('end_date'):
datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + '235959Z'
enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\
((datas.get('end_date') and (';UNTIL=' + datas.get('end_date'))) or '')
exrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \
+ enddate + monthstring + yearstring
model_obj.write(cr, uid, ex_id,{'exrule': exrule_string})
return {'type': 'ir.actions.act_window_close'}
_defaults = {
'freq': lambda *x: 'None',
'select1': lambda *x: 'date',
'interval': lambda *x: 1,
}
base_calendar_set_exrule()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_base_calendar_set_exrule" model="ir.ui.view">
<field name="name">base.calendar.set.exrule.form</field>
<field name="model">base.calendar.set.exrule</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Set Exrule">
<separator string="Select range to Exclude" colspan="8"/>
<group col="8" colspan="6">
<field name="interval" />
<field name="freq" />
<field name="count" />
<field name="end_date" />
</group>
<group col="8" colspan="8" name="Select weekdays"
attrs="{'invisible' : [('freq','!=','weekly')]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="8" colspan="6"
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date')]}"/>
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day')]}"/>
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day')]}"/>
</group>
<group col="1" colspan="1"
attrs="{'invisible' : [('freq','!=','yearly')]}">
<field name="month_list" string="of"
colspan="1"
attrs="{'required' : [('freq','=','yearly')]}"/>
</group>
</group>
<group colspan="4" col="6">
<separator string="" colspan="8"/>
<label string="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
<button icon="gtk-ok" string="_Ok" name="compute_exrule_string" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_base_calendar_set_exrule" model="ir.actions.act_window">
<field name="name">Set Exclude range</field>
<field name="res_model">base.calendar.set.exrule</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -1,98 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv
from osv import fields
class calendar_event_edit_all(osv.osv_memory):
def _default_values(self, cr, uid, context=None):
""" Get Default value for Start Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
@Return: Get Default value for Start Date
"""
context_id = context and context.get('active_id', False) or False
if context_id:
if context.get('date'):
return context.get('date')
else:
model = context.get('model', False)
model_obj = self.pool.get(model)
event = model_obj.read(cr, uid, context_id, ['name', 'location', 'alarm_id'])
return event['date']
def _default_deadline(self, cr, uid, context=None):
""" Get Default value for End Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
@return: Get Default value for End Date
"""
context_id = context and context.get('active_id', False) or False
if context_id:
if context.get('date_deadline'):
return context.get('date_deadline')
else:
model = context.get('model', False)
model_obj = self.pool.get(model)
event = model_obj.read(cr, uid, context_id, ['name', 'location', 'alarm_id'])
return event['date_deadline']
def modify_this(self, cr, uid, ids, context=None):
"""
Modify All event for Crm Meeting.
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of calendar event edit alls IDs
@return: dictionary {}
"""
if context is None:
context = {}
context_id = context and context.get('active_id', False) or False
if context_id:
for datas in self.read(cr, uid, ids):
model = context.get('model', False)
model_obj = self.pool.get(model)
model_obj.modify_all(cr, uid, [context_id], datas, context=context)
return {'type': 'ir.actions.act_window_close'}
_name = "calendar.event.edit.all"
_description = "Calendar Edit all event"
_columns = {
'name': fields.char('Title', size=64, required=True),
'date': fields.datetime('Start Date', required=True),
'date_deadline': fields.datetime('End Date', required=True),
'location': fields.char('Location', size=124),
'alarm_id': fields.many2one('res.alarm', 'Reminder'),
}
_defaults = {
'date': _default_values,
'date_deadline': _default_deadline
}
calendar_event_edit_all()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_calendar_event_edit_all" model="ir.ui.view">
<field name="name">calendar.event.edit.all.form</field>
<field name="model">calendar.event.edit.all</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Edit all Occurrences">
<group colspan="4" >
<separator string="" colspan="4" />
<newline/>
<field name='name' colspan="4" />
<newline />
<field name='location' colspan="4" />
<newline />
<field name='date' />
<field name='date_deadline' />
<newline />
<field name='alarm_id'/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-save" string="_Save" name="modify_this" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_calendar_event_edit_all" model="ir.actions.act_window">
<field name="name">Edit all events</field>
<field name="res_model">calendar.event.edit.all</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_calendar_event_edit_all"/>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -64,7 +64,7 @@ class res_partner_contact(osv.osv):
relation='res.partner', string='Main Employer'),
'function': fields.related('job_ids', 'function', type='char', \
string='Main Function'),
'job_id': fields.function(_main_job, method=True, type='many2one',\
'job_id': fields.function(_main_job, type='many2one',\
relation='res.partner.job', string='Main Job'),
'email': fields.char('E-Mail', size=240),
'comment': fields.text('Notes', translate=True),

View File

@ -26,18 +26,35 @@
"website" : "http://www.openerp.com",
"category" : "Tools",
"description": """
This module replaces the cleartext password in the database with a password hash.
=================================================================================
Replaces cleartext passwords in the database with a secure hash
===============================================================
For your existing user base, the removal of the cleartext
passwords occurs the first time a user logs into the database,
after installing base_crypt.
It prevents anyone from reading the original password.
For your existing user base, the removal of the cleartext passwords occurs the first time
a user logs into the database, after installing base_crypt.
After installing this module it won't be possible to recover a forgotten password for your
users, the only solution is for an admin to set a new password.
All passwords will be replaced by a secure, salted, cryptographic
hash, preventing anyone from reading the original password in
the database.
After installing this module it won't be possible to recover a
forgotten password for your users, the only solution is for an
admin to set a new password.
Security Warning
++++++++++++++++
Installing this module does not mean you can ignore other security measures,
as the password is still transmitted unencrypted on the network, unless you
are using a secure protocol such as XML-RPCS.
It also does not protect the rest of the content of the database, which may
contain critical data. Appropriate security measures need to be implemented
by the system administrator in all areas, such as: protection of database
backups, system files, remote shell access, physical server access, etc.
Interation with LDAP authentication
+++++++++++++++++++++++++++++++++++
This module is currently not compatible with the ``user_ldap`` module and
will disable LDAP authentication completely if installed at the same time.
Note: installing this module does not mean you can ignore basic security measures,
as the password is still transmitted unencrypted on the network (by the client),
unless you are using a secure protocol such as XML-RPCS.
""",
"depends" : ["base"],
"data" : [],

View File

@ -0,0 +1,72 @@
# Spanish (Chile) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-06 18:09+0000\n"
"Last-Translator: doingit.cl <Unknown>\n"
"Language-Team: Spanish (Chile) <es_CL@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: 2011-06-07 04:35+0000\n"
"X-Generator: Launchpad (build 12959)\n"
#. module: base_crypt
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr ""
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "res.users"
msgstr "res.users"
#. module: base_crypt
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
"La compañía seleccionada no está autorizada como compañía para este usuario"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Please specify the password !"
msgstr ""
#. module: base_crypt
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
msgid "Base - Password Encryption"
msgstr ""
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Error"
msgstr "Error!"
#. module: base_crypt
#: model:ir.module.module,description:base_crypt.module_meta_information
msgid ""
"This module replaces the cleartext password in the database with a password "
"hash,\n"
"preventing anyone from reading the original password.\n"
"For your existing user base, the removal of the cleartext passwords occurs "
"the first time\n"
"a user logs into the database, after installing base_crypt.\n"
"After installing this module it won't be possible to recover a forgotten "
"password for your\n"
"users, the only solution is for an admin to set a new password.\n"
"\n"
"Note: installing this module does not mean you can ignore basic security "
"measures,\n"
"as the password is still transmitted unencrypted on the network (by the "
"client),\n"
"unless you are using a secure protocol such as XML-RPCS.\n"
" "
msgstr ""

View File

@ -0,0 +1,71 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-08 10:57+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-09 04:35+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: base_crypt
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr "Kahdella eri käyttäjällä ei voi olla samaa käyttäjätunnusta!"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "res.users"
msgstr ""
#. module: base_crypt
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr "Valittu yritys ei ole sallittu tälle käyttäjälle"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Please specify the password !"
msgstr "Määrittele salasana !"
#. module: base_crypt
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
msgid "Base - Password Encryption"
msgstr "Base - Salasanan kryptaus"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Error"
msgstr "Virhe"
#. module: base_crypt
#: model:ir.module.module,description:base_crypt.module_meta_information
msgid ""
"This module replaces the cleartext password in the database with a password "
"hash,\n"
"preventing anyone from reading the original password.\n"
"For your existing user base, the removal of the cleartext passwords occurs "
"the first time\n"
"a user logs into the database, after installing base_crypt.\n"
"After installing this module it won't be possible to recover a forgotten "
"password for your\n"
"users, the only solution is for an admin to set a new password.\n"
"\n"
"Note: installing this module does not mean you can ignore basic security "
"measures,\n"
"as the password is still transmitted unencrypted on the network (by the "
"client),\n"
"unless you are using a secure protocol such as XML-RPCS.\n"
" "
msgstr ""

View File

@ -0,0 +1,72 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-09 11:12+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@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: 2011-06-10 04:37+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: base_crypt
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr "Du kan ikke ha to brukere med samme login !"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "res.users"
msgstr "res.users"
#. module: base_crypt
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
"Det valgte firmaet er ikke i listen over tillatte firmaer for denne brukeren"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Please specify the password !"
msgstr "Vennligst angi passordet !"
#. module: base_crypt
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
msgid "Base - Password Encryption"
msgstr "Basis - Passord kryptering"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Error"
msgstr "Feil"
#. module: base_crypt
#: model:ir.module.module,description:base_crypt.module_meta_information
msgid ""
"This module replaces the cleartext password in the database with a password "
"hash,\n"
"preventing anyone from reading the original password.\n"
"For your existing user base, the removal of the cleartext passwords occurs "
"the first time\n"
"a user logs into the database, after installing base_crypt.\n"
"After installing this module it won't be possible to recover a forgotten "
"password for your\n"
"users, the only solution is for an admin to set a new password.\n"
"\n"
"Note: installing this module does not mean you can ignore basic security "
"measures,\n"
"as the password is still transmitted unencrypted on the network (by the "
"client),\n"
"unless you are using a secure protocol such as XML-RPCS.\n"
" "
msgstr ""

View File

@ -0,0 +1,71 @@
# Portuguese translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-06 22:16+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Portuguese <pt@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: 2011-06-07 04:35+0000\n"
"X-Generator: Launchpad (build 12959)\n"
#. module: base_crypt
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr "Não pode ter dois utilizadores com o mesmo nome de utilizador!"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "res.users"
msgstr "res.users"
#. module: base_crypt
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr "A companhia escolhida não está entre permitidas para este utilizador"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Please specify the password !"
msgstr "Por favor escolha uma password!"
#. module: base_crypt
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
msgid "Base - Password Encryption"
msgstr ""
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Error"
msgstr "Erro"
#. module: base_crypt
#: model:ir.module.module,description:base_crypt.module_meta_information
msgid ""
"This module replaces the cleartext password in the database with a password "
"hash,\n"
"preventing anyone from reading the original password.\n"
"For your existing user base, the removal of the cleartext passwords occurs "
"the first time\n"
"a user logs into the database, after installing base_crypt.\n"
"After installing this module it won't be possible to recover a forgotten "
"password for your\n"
"users, the only solution is for an admin to set a new password.\n"
"\n"
"Note: installing this module does not mean you can ignore basic security "
"measures,\n"
"as the password is still transmitted unencrypted on the network (by the "
"client),\n"
"unless you are using a secure protocol such as XML-RPCS.\n"
" "
msgstr ""

View File

@ -0,0 +1,77 @@
# Chinese (Simplified) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-22 08:19+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2011-06-23 04:56+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: base_crypt
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr "你不能同时登录两个用户!"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "res.users"
msgstr "res.users"
#. module: base_crypt
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr "用户无权操作所选择公司数据"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Please specify the password !"
msgstr "请指定密码!"
#. module: base_crypt
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
msgid "Base - Password Encryption"
msgstr "Base - Password Encryption"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Error"
msgstr "错误"
#. module: base_crypt
#: model:ir.module.module,description:base_crypt.module_meta_information
msgid ""
"This module replaces the cleartext password in the database with a password "
"hash,\n"
"preventing anyone from reading the original password.\n"
"For your existing user base, the removal of the cleartext passwords occurs "
"the first time\n"
"a user logs into the database, after installing base_crypt.\n"
"After installing this module it won't be possible to recover a forgotten "
"password for your\n"
"users, the only solution is for an admin to set a new password.\n"
"\n"
"Note: installing this module does not mean you can ignore basic security "
"measures,\n"
"as the password is still transmitted unencrypted on the network (by the "
"client),\n"
"unless you are using a secure protocol such as XML-RPCS.\n"
" "
msgstr ""
"这个模块在数据库里用密码散列代替原来的明文密码,防止任何人读取到原密码。\n"
"对于已存在在数据当安装了base_crypt后明文密码会在用户第一次登陆数据库的时候清除。\n"
"在安装了这个模块后将不能恢复已遗忘的用户密码,唯一的解决办法是通过管理员输入一个新密码。\n"
"注意:安装这个模块并不意味着你可以忽略基本安全措施,\n"
"除非你用了一个安全协议例如XML-RPCS否则密码在网络仍然以非加密的形式传输通过客户端\n"
" "

View File

@ -20,53 +20,11 @@
##############################################################################
from xml.dom import minidom
from osv.osv import osv_pool
from osv import fields,osv
import pooler
import string
import tools
class recording_objects_proxy(osv_pool):
def execute(self, *args, **argv):
if args[3] == 'create':
_old_args = args[4].copy()
elif args[3] == 'write':
_old_args = args[5].copy()
elif len(args) >= 5 and isinstance(args[4], dict):
_old_args = args[4].copy()
elif len(args) > 5 and args[3] != 'write' and isinstance(args[5], dict):
_old_args = args[5].copy()
else:
_old_args = None
res = super(recording_objects_proxy, self).execute(*args, **argv)
pool = pooler.get_pool(args[0])
mod = pool.get('ir.module.record')
if mod and mod.recording:
if args[3] not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink'):
if _old_args is not None:
if args[3] != 'write' and args[3] != 'create' and len(args) > 5 and isinstance(args[5], dict):
args=list(args)
args[5]=_old_args
args=tuple(args)
mod.recording_data.append(('osv_memory_action', args, argv ,None))
else:
if args[3] == 'create':
args[4].update(_old_args)
elif args[3] == 'write':
args[5].update(_old_args)
mod.recording_data.append(('query', args, argv,res))
return res
def exec_workflow(self, *args, **argv):
res = super(recording_objects_proxy, self).exec_workflow(*args, **argv)
pool = pooler.get_pool(args[0])
mod = pool.get('ir.module.record')
if mod and mod.recording:
mod.recording_data.append(('workflow', args, argv))
return res
recording_objects_proxy()
class xElement(minidom.Element):
"""dom.Element with compact print

View File

@ -415,7 +415,7 @@ class report_creator(osv.osv):
'model_ids': fields.many2many('ir.model', 'base_report_creator_report_model_rel', 'report_id', 'model_id', 'Reported Objects'),
'field_ids': fields.one2many('base_report_creator.report.fields', 'report_id', 'Fields to Display'),
'filter_ids': fields.one2many('base_report_creator.report.filter', 'report_id', 'Filters'),
'sql_query': fields.function(_sql_query_get, method=True, type="text", string='SQL Query', store=True),
'sql_query': fields.function(_sql_query_get, type="text", string='SQL Query', store=True),
'group_ids': fields.many2many('res.groups', 'base_report_creator_group_rel', 'report_id', 'group_id', 'Authorized Groups'),
'menu_id': fields.many2one('ir.ui.menu', "Menu", readonly=True),
}

View File

@ -19,7 +19,7 @@
<node oor:name="Submenu">
<node oor:name="m11" oor:op="replace">
<prop oor:name="URL" oor:type="xs:string">
<value>service:org.openoffice.openerp.report.serverparam?execute</value>
<value>service:org.openoffice.openerp.report.change?execute</value>
</prop>
<prop oor:name="Title" oor:type="xs:string">
<value/>
@ -283,7 +283,7 @@
<node oor:name="org.openoffice.openerp.report" oor:op="replace">
<node oor:name="m11" oor:op="replace">
<prop oor:name="URL" oor:type="xs:string">
<value>service:org.openoffice.openerp.report.serverparam?execute</value>
<value>service:org.openoffice.openerp.report.change?execute</value>
</prop>
<prop oor:name="ImageIdentifier" oor:type="xs:string">
<value/>
@ -593,7 +593,7 @@
</node>
<node oor:name="org.openoffice.openerp.report.image8" oor:op="replace">
<prop oor:name="URL">
<value>service:org.openoffice.openerp.report.serverparam?execute</value>
<value>service:org.openoffice.openerp.report.change?execute</value>
</prop>
<node oor:name="UserDefinedImages">
<prop oor:name="ImageSmallURL" oor:type="xs:string">

View File

@ -44,68 +44,96 @@
#
#
##############################################################################
import uno
import string
import unohelper
import xmlrpclib
from com.sun.star.task import XJobExecutor
if __name__<>"package":
from lib.gui import *
from lib.error import ErrorDialog
from lib.functions import *
from lib.logreport import *
from lib.rpc import *
from ServerParameter import *
database="test"
class Change:
def __init__(self, aVal= None, sURL=""):
class Change( unohelper.Base, XJobExecutor ):
def __init__(self,ctx):
self.ctx = ctx
self.module = "openerp_report"
self.version = "0.1"
desktop=getDesktop()
log_detail(self)
self.logobj=Logger()
doc = desktop.getCurrentComponent()
docinfo=doc.getDocumentInfo()
self.protocol = {
'XML-RPC': 'http://',
'XML-RPC secure': 'https://',
'NET-RPC': 'socket://',
}
host=port=protocol=''
if docinfo.getUserFieldValue(0):
m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', docinfo.getUserFieldValue(0) or '')
host = m.group(2)
port = m.group(3)
protocol = m.group(1)
if protocol:
for (key, value) in self.protocol.iteritems():
if value==protocol:
protocol=key
break
else:
protocol='XML-RPC'
self.win=DBModalDialog(60, 50, 120, 90, "Connect to Open ERP Server")
self.win.addFixedText("lblVariable", 38, 12, 25, 15, "Server ")
self.win.addEdit("txtHost",-2,9,60,15,sURL[sURL.find("/")+2:sURL.rfind(":")])
self.win.addEdit("txtHost",-2,9,60,15, host or 'localhost')
self.win.addFixedText("lblReportName",45 , 31, 15, 15, "Port ")
self.win.addEdit("txtPort",-2,28,60,15,sURL[sURL.rfind(":")+1:])
self.win.addEdit("txtPort",-2,28,60,15, port or "8069")
self.win.addFixedText("lblLoginName", 2, 51, 60, 15, "Protocol Connection")
self.win.addComboListBox("lstProtocol", -2, 48, 60, 15, True)
self.lstProtocol = self.win.getControl( "lstProtocol" )
# self.lstProtocol.addItem( "XML-RPC", 0)
#self.lstProtocol.addItem( "XML-RPC secure", 1)
#self.lstProtocol.addItem( "NET-RPC (faster)", 2)
self.win.addButton( 'btnOK', -2, -5, 30, 15, 'Ok', actionListenerProc = self.btnOk_clicked )
self.win.addButton( 'btnNext', -2, -5, 30, 15, 'Next', actionListenerProc = self.btnNext_clicked )
self.win.addButton( 'btnCancel', -2 - 30 - 5 ,-5, 30, 15, 'Cancel', actionListenerProc = self.btnCancel_clicked )
self.aVal=aVal
self.protocol = {
'XML-RPC': 'http://',
'XML-RPC secure': 'https://',
'NET-RPC': 'socket://',
}
for i in self.protocol.keys():
self.lstProtocol.addItem(i,self.lstProtocol.getItemCount() )
self.win.doModalDialog( "lstProtocol", protocol)
sValue=self.protocol.keys()[0]
if sURL<>"":
sValue=self.protocol.keys()[self.protocol.values().index(sURL[:sURL.find("/")+2])]
self.win.doModalDialog( "lstProtocol", sValue)
def btnOk_clicked(self,oActionEvent):
def btnNext_clicked(self,oActionEvent):
global url
url = self.protocol[self.win.getListBoxSelectedItem("lstProtocol")]+self.win.getEditText("txtHost")+":"+self.win.getEditText("txtPort")
self.sock=RPCSession(url)
desktop=getDesktop()
doc = desktop.getCurrentComponent()
docinfo=doc.getDocumentInfo()
docinfo.setUserFieldValue(0,url)
res=self.sock.listdb()
if res == -1:
self.aVal.append(url)
elif res == 0:
self.aVal.append("No Database found !!!")
else:
self.aVal.append(url)
self.aVal.append(res)
aVal=''
#aVal= Fetature used
try:
url = self.protocol[self.win.getListBoxSelectedItem("lstProtocol")]+self.win.getEditText("txtHost")+":"+self.win.getEditText("txtPort")
self.sock=RPCSession(url)
desktop=getDesktop()
doc = desktop.getCurrentComponent()
docinfo=doc.getDocumentInfo()
docinfo.setUserFieldValue(0,url)
res=self.sock.listdb()
self.win.endExecute()
ServerParameter(aVal,url)
except :
import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
self.logobj.log_write('ServerParameter', LOG_ERROR, info)
ErrorDialog("Connection to server fail. please check your Server Parameter", "", "Error")
self.win.endExecute()
def btnCancel_clicked(self,oActionEvent):
self.win.endExecute()
def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute()
if __name__<>"package" and __name__=="__main__":
Change(None)
elif __name__=="package":
g_ImplementationHelper.addImplementation( Change, "org.openoffice.openerp.report.change", ("com.sun.star.task.Job",),)

View File

@ -51,5 +51,5 @@ if __name__<>"package":
class LoginTest:
def __init__(self):
if not loginstatus:
ServerParameter(None)
Change(None)

View File

@ -59,8 +59,7 @@ if __name__<>"package":
database="test"
class ServerParameter( unohelper.Base, XJobExecutor ):
def __init__(self,ctx):
self.ctx = ctx
def __init__(self, aVal= None, sURL=""):
self.module = "openerp_report"
self.version = "0.1"
desktop=getDesktop()
@ -69,19 +68,12 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
doc = desktop.getCurrentComponent()
docinfo=doc.getDocumentInfo()
self.win=DBModalDialog(60, 50, 160, 108, "Server Connection Parameter")
self.win.addFixedText("lblVariable", 2, 12, 35, 15, "Server URL")
if docinfo.getUserFieldValue(0)=="":
docinfo.setUserFieldValue(0,"http://localhost:8069")
self.win.addEdit("txtHost",-34,9,91,15,docinfo.getUserFieldValue(0))
self.win.addButton('btnChange',-2 ,9,30,15,'Change', actionListenerProc = self.btnChange_clicked )
docinfo.setUserFieldValue(0,"http://localhost:8069")
self.win.addFixedText("txtHost",-20,12,105,15,sURL)
self.win.addFixedText("lblDatabaseName", 6, 31, 31, 15, "Database")
#self.win.addFixedText("lblMsg", -2,28,123,15)
# self.win.addComboListBox("lstDatabase", -2,28,123,15, True)
# self.lstDatabase = self.win.getControl( "lstDatabase" )
#self.win.selectListBoxItem( "lstDatabase", docinfo.getUserFieldValue(2), True )
#self.win.setEnabled("lblMsg",False)
self.win.addFixedText("lblLoginName", 17, 51, 20, 15, "Login")
self.win.addEdit("txtLoginName",-2,48,123,15,docinfo.getUserFieldValue(1))
@ -92,8 +84,9 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
self.win.addButton('btnOK',-2 ,-5, 60,15,'Connect' ,actionListenerProc = self.btnOk_clicked )
self.win.addButton('btnCancel',-2 - 60 - 5 ,-5, 35,15,'Cancel' ,actionListenerProc = self.btnCancel_clicked )
self.win.addButton('btnPrevious',15 -80 ,-5,50,15,'Previous',actionListenerProc = self.btnPrevious_clicked)
self.win.addButton('btnCancel',-2 - 110 - 5 ,-5, 35,15,'Cancel' ,actionListenerProc = self.btnCancel_clicked )
sValue=""
if docinfo.getUserFieldValue(0)<>"":
global url
@ -125,7 +118,6 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
def btnOk_clicked(self,oActionEvent):
sLogin=self.win.getEditText("txtLoginName")
sPassword=self.win.getEditText("txtPassword")
global url
@ -136,20 +128,14 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
sDatabase=self.win.getListBoxSelectedItem("lstDatabase")
self.sock=RPCSession(url)
UID = self.sock.login(sDatabase,sLogin,sPassword)
if not UID :
if not UID or UID==-1 :
ErrorDialog("Connection Refuse...","Please enter valid Login/Password")
self.win.endExecute()
try:
ids_module =self.sock.execute(sDatabase, UID, sPassword, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
except :
import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
self.logobj.log_write('ServerParameter', LOG_ERROR, info)
# self.win.endExecute()
ids_module =self.sock.execute(sDatabase, UID, sPassword, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
if not len(ids_module):
ErrorDialog("Please Install base_report_designer module", "", "Module Uninstalled Error")
self.logobj.log_write('Module Not Found',LOG_WARNING, ':base_report_designer not install in database %s' % (sDatabase))
self.win.endExecute()
#self.win.endExecute()
else:
desktop=getDesktop()
doc = desktop.getCurrentComponent()
@ -171,27 +157,15 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
self.logobj.log_write('successful login',LOG_INFO, ':successful login from %s using database %s' % (sLogin, sDatabase))
self.win.endExecute()
def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute()
def btnChange_clicked(self,oActionEvent):
aVal=[]
url= self.win.getEditText("txtHost")
Change(aVal,url)
if aVal[1]== -1:
self.win.getEditText("lstDatabase")
self.win.removeListBoxItems("lstDatabase", 0, self.win.getListBoxItemCount("lstDatabase"))
self.win.setEditText("txtHost",aVal[0])
for i in range(len(aVal[1])):
self.lstDatabase.addItem(aVal[1][i],i)
elif aVal[1]==0:
ErrorDialog(aVal[0],"")
else:
self.win.setEditText("txtHost",aVal[0])
self.win.removeListBoxItems("lstDatabase", 0, self.win.getListBoxItemCount("lstDatabase"))
for i in range(len(aVal[1])):
self.lstDatabase.addItem(aVal[1][i],i)
def btnPrevious_clicked(self,oActionEvent):
self.win.endExecute()
Change(None)
self.win.endExecute()
if __name__<>"package" and __name__=="__main__":
ServerParameter(None)

View File

@ -0,0 +1,289 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-09 10:01+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-10 04:37+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: base_synchro
#: model:ir.actions.act_window,name:base_synchro.action_view_base_synchro
msgid "Base Synchronization"
msgstr "Pohjatietojen synkronointi"
#. module: base_synchro
#: field:base.synchro.server,server_db:0
msgid "Server Database"
msgstr "Palvelintietokanta"
#. module: base_synchro
#: view:base.synchro.server:0
#: model:ir.model,name:base_synchro.model_base_synchro_server
msgid "Synchronized server"
msgstr "Synkronoitu palvelin"
#. module: base_synchro
#: field:base.synchro.obj.avoid,name:0
msgid "Field Name"
msgstr "Kentän nimi"
#. module: base_synchro
#: field:base.synchro.obj,synchronize_date:0
msgid "Latest Synchronization"
msgstr "Viimeisin synkronointi"
#. module: base_synchro
#: field:base.synchro,user_id:0
msgid "Send Result To"
msgstr "Lähetä tulos"
#. module: base_synchro
#: model:ir.model,name:base_synchro.model_base_synchro_obj_avoid
msgid "Fields to not synchronize"
msgstr "Kentät, joita ei synkronoida"
#. module: base_synchro
#: view:base.synchro:0
msgid "_Close"
msgstr ""
#. module: base_synchro
#: view:base.synchro:0
msgid "Transfer Data To Server"
msgstr "Siirrä tiedot palvelimelle"
#. module: base_synchro
#: model:ir.model,name:base_synchro.model_base_synchro_obj
msgid "Register Class"
msgstr "Rekisteröi luokka"
#. module: base_synchro
#: view:base.synchro.obj:0
#: model:ir.actions.act_window,name:base_synchro.action_transfer_tree
#: model:ir.ui.menu,name:base_synchro.transfer_menu_id
msgid "Synchronized objects"
msgstr "Synkronoidut objektit"
#. module: base_synchro
#: field:base.synchro.server,obj_ids:0
msgid "Models"
msgstr "Mallit"
#. module: base_synchro
#: field:base.synchro.obj.avoid,obj_id:0
#: view:base.synchro.obj.line:0
#: field:base.synchro.obj.line,obj_id:0
msgid "Object"
msgstr "Objekti"
#. module: base_synchro
#: field:base.synchro.server,login:0
msgid "User Name"
msgstr "Käyttäjänimi"
#. module: base_synchro
#: view:base.synchro.obj:0
#: view:base.synchro.obj.line:0
msgid "Group By"
msgstr "Ryhmittelyn peruste"
#. module: base_synchro
#: selection:base.synchro.obj,action:0
msgid "Upload"
msgstr "Lähetä palvelimelle"
#. module: base_synchro
#: view:base.synchro.obj:0
msgid "Latest synchronization"
msgstr "Viimeisin synkronointi"
#. module: base_synchro
#: model:ir.module.module,description:base_synchro.module_meta_information
msgid "Synchronization with all objects."
msgstr "Synkronoi kaikki objektit"
#. module: base_synchro
#: view:base.synchro.obj.line:0
#: field:base.synchro.obj.line,name:0
msgid "Date"
msgstr "Päivämäärä"
#. module: base_synchro
#: field:base.synchro.server,password:0
msgid "Password"
msgstr "Salasana"
#. module: base_synchro
#: field:base.synchro.obj,avoid_ids:0
msgid "Fields Not Sync."
msgstr "Ei synkronoidut kentät"
#. module: base_synchro
#: selection:base.synchro.obj,action:0
msgid "Both"
msgstr "Molemmat"
#. module: base_synchro
#: field:base.synchro.obj,name:0
msgid "Name"
msgstr "Nimi"
#. module: base_synchro
#: view:base.synchro.obj:0
msgid "Fields"
msgstr "Kentät"
#. module: base_synchro
#: view:base.synchro.obj.line:0
msgid "Transfered Ids Details"
msgstr "Siirrettyjen tunnusten yksityiskohdat"
#. module: base_synchro
#: field:base.synchro.obj,action:0
msgid "Synchronisation direction"
msgstr "Synkronoinnin suunta"
#. module: base_synchro
#: field:base.synchro.obj,server_id:0
msgid "Server"
msgstr "Palvelin"
#. module: base_synchro
#: model:ir.actions.act_window,name:base_synchro.action_base_synchro_obj_line_tree
#: model:ir.model,name:base_synchro.model_base_synchro_obj_line
#: model:ir.ui.menu,name:base_synchro.menu_action_base_synchro_obj_line_tree
msgid "Synchronized instances"
msgstr "Synkronoidut instanssit"
#. module: base_synchro
#: field:base.synchro.obj,active:0
msgid "Active"
msgstr "Aktiivinen"
#. module: base_synchro
#: view:base.synchro.obj:0
#: field:base.synchro.obj,model_id:0
msgid "Object to synchronize"
msgstr "Synkronoitava objekti"
#. module: base_synchro
#: model:ir.module.module,shortdesc:base_synchro.module_meta_information
msgid "Base Synchro"
msgstr "Perustietojen synkronointi"
#. module: base_synchro
#: model:ir.actions.act_window,name:base_synchro.action_base_synchro_server_tree
#: model:ir.ui.menu,name:base_synchro.synchro_server_tree_menu_id
msgid "Servers to be synchronized"
msgstr "Synkronoitavat palvelimet"
#. module: base_synchro
#: view:base.synchro.obj:0
msgid "Transfer Details"
msgstr "Siirron tiedot"
#. module: base_synchro
#: field:base.synchro.obj.line,remote_id:0
msgid "Remote Id"
msgstr "Etätunniste"
#. module: base_synchro
#: field:base.synchro.obj,line_id:0
msgid "Ids Affected"
msgstr "kohde id:t"
#. module: base_synchro
#: model:ir.ui.menu,name:base_synchro.next_id_63
msgid "History"
msgstr "Historia"
#. module: base_synchro
#: model:ir.ui.menu,name:base_synchro.next_id_62
#: model:ir.ui.menu,name:base_synchro.synch_config
msgid "Synchronization"
msgstr "Synkronointi"
#. module: base_synchro
#: field:base.synchro.obj,domain:0
msgid "Domain"
msgstr "Toimialue"
#. module: base_synchro
#: view:base.synchro:0
msgid "_Synchronize"
msgstr ""
#. module: base_synchro
#: view:base.synchro:0
msgid "OK"
msgstr ""
#. module: base_synchro
#: field:base.synchro.server,name:0
msgid "Server name"
msgstr "Palvelimen nimi"
#. module: base_synchro
#: field:base.synchro.obj,sequence:0
msgid "Sequence"
msgstr "Sekvenssi"
#. module: base_synchro
#: view:base.synchro:0
msgid ""
"The synchronisation has been started.You will receive a request when it's "
"done."
msgstr "Synkronointi on aloitettu. Saat pyynnön kun se on valmis."
#. module: base_synchro
#: field:base.synchro.server,server_port:0
msgid "Server Port"
msgstr "Palvelimen portti"
#. module: base_synchro
#: model:ir.ui.menu,name:base_synchro.menu_action_view_base_synchro
msgid "Synchronize objects"
msgstr "Synkronoi objektit"
#. module: base_synchro
#: view:base.synchro:0
msgid "Synchronization Complited!"
msgstr "Synkronointi valmis!"
#. module: base_synchro
#: model:ir.model,name:base_synchro.model_base_synchro
msgid "base.synchro"
msgstr ""
#. module: base_synchro
#: field:base.synchro.obj.line,local_id:0
msgid "Local Id"
msgstr "Paikallinen id"
#. module: base_synchro
#: model:ir.actions.act_window,name:base_synchro.actions_regclass_tree
#: model:ir.actions.act_window,name:base_synchro.actions_transfer_line_form
msgid "Filters"
msgstr "Suotimet"
#. module: base_synchro
#: selection:base.synchro.obj,action:0
msgid "Download"
msgstr "Lataa"
#. module: base_synchro
#: field:base.synchro,server_url:0
#: field:base.synchro.server,server_url:0
msgid "Server URL"
msgstr "Palvelimen URL"

View File

@ -0,0 +1,32 @@
# Chinese (Simplified) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-29 01:21+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2011-06-30 04:34+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: base_tools
#: model:ir.module.module,shortdesc:base_tools.module_meta_information
msgid "Common base for tools modules"
msgstr "base_tools"
#. module: base_tools
#: model:ir.module.module,description:base_tools.module_meta_information
msgid ""
"\n"
" "
msgstr ""
"\n"
" "

818
addons/caldav/i18n/fi.po Normal file
View File

@ -0,0 +1,818 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-28 09:32+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-29 04:43+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: caldav
#: view:basic.calendar:0
msgid "Value Mapping"
msgstr ""
#. module: caldav
#: help:caldav.browse,url:0
msgid "Url of the caldav server, use for synchronization"
msgstr ""
#. module: caldav
#: field:basic.calendar.alias,name:0
msgid "Filename"
msgstr "Tiedostonnimi"
#. module: caldav
#: model:ir.model,name:caldav.model_calendar_event_export
msgid "Event Export"
msgstr ""
#. module: caldav
#: view:calendar.event.subscribe:0
msgid "Provide path for Remote Calendar"
msgstr ""
#. module: caldav
#: model:ir.actions.act_window,name:caldav.action_calendar_event_import_values
msgid "Import .ics File"
msgstr ""
#. module: caldav
#: view:calendar.event.export:0
msgid "_Close"
msgstr ""
#. module: caldav
#: selection:basic.calendar.attributes,type:0
#: selection:basic.calendar.lines,name:0
msgid "Attendee"
msgstr "Osallistuja"
#. module: caldav
#: sql_constraint:basic.calendar.fields:0
msgid "Can not map a field more than once"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:787
#: code:addons/caldav/calendar.py:877
#: code:addons/caldav/wizard/calendar_event_import.py:63
#, python-format
msgid "Warning !"
msgstr "Varoitus !"
#. module: caldav
#: field:basic.calendar.lines,object_id:0
msgid "Object"
msgstr "Objekti"
#. module: caldav
#: view:basic.calendar:0
msgid "Todo"
msgstr "Tehtävät"
#. module: caldav
#: model:ir.model,name:caldav.model_user_preference
msgid "User preference Form"
msgstr ""
#. module: caldav
#: field:user.preference,service:0
msgid "Services"
msgstr "Palvelut"
#. module: caldav
#: selection:basic.calendar.fields,fn:0
msgid "Expression as constant"
msgstr ""
#. module: caldav
#: selection:user.preference,device:0
msgid "Evolution"
msgstr "Evoluutio"
#. module: caldav
#: view:calendar.event.import:0
#: view:calendar.event.subscribe:0
msgid "Ok"
msgstr "OK"
#. module: caldav
#: code:addons/caldav/calendar.py:877
#, python-format
msgid "Please provide proper configuration of \"%s\" in Calendar Lines"
msgstr ""
#. module: caldav
#: field:calendar.event.export,name:0
msgid "File name"
msgstr "Tiedostonimi"
#. module: caldav
#: field:caldav.browse,url:0
msgid "Caldav Server"
msgstr "Caldav palvelin"
#. module: caldav
#: code:addons/caldav/wizard/calendar_event_subscribe.py:59
#, python-format
msgid "Error!"
msgstr "Virhe!"
#. module: caldav
#: help:caldav.browse,caldav_doc_file:0
msgid "download full caldav Documentation."
msgstr ""
#. module: caldav
#: selection:user.preference,device:0
msgid "iPhone"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:32
#, python-format
msgid ""
"\n"
" * Webdav server that provides remote access to calendar\n"
" * Synchronisation of calendar using WebDAV\n"
" * Customize calendar event and todo attribute with any of OpenERP model\n"
" * Provides iCal Import/Export functionality\n"
"\n"
" To access Calendars using CalDAV clients, point them to:\n"
" "
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/calendars/users/USERNAME/c\n"
"\n"
" To access OpenERP Calendar using WebCal to remote site use the URL "
"like:\n"
" "
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/Calendars/CALENDAR_NAME.ics\n"
"\n"
" Where,\n"
" HOSTNAME: Host on which OpenERP server(With webdav) is running\n"
" PORT : Port on which OpenERP server is running (By Default : 8069)\n"
" DATABASE_NAME: Name of database on which OpenERP Calendar is "
"created\n"
" CALENDAR_NAME: Name of calendar to access\n"
" "
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:147
#, python-format
msgid ""
"\n"
"Prerequire\n"
"----------\n"
"If you are using thunderbird, first you need to install the lightning "
"module\n"
"http://www.mozilla.org/projects/calendar/lightning/\n"
"\n"
"configuration\n"
"-------------\n"
"\n"
"1. Go to Calendar View\n"
"\n"
"2. File -> New Calendar\n"
"\n"
"3. Chosse \"On the Network\"\n"
"\n"
"4. for format choose CalDav\n"
" and as location the url given above (ie : "
"http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)\n"
" \n"
"5. Choose a name and a color for the Calendar, and we advice you to uncheck "
"\"alarm\"\n"
"\n"
"6. Then put your openerp login and password (to give the password only check "
"the box \"Use password Manager to remember this password\"\n"
"\n"
"7. Then Finish, your meetings should appear now in your calendar view\n"
msgstr ""
#. module: caldav
#: selection:basic.calendar,type:0
#: selection:basic.calendar.attributes,type:0
#: selection:basic.calendar.lines,name:0
msgid "TODO"
msgstr "Tehtävät"
#. module: caldav
#: view:calendar.event.export:0
msgid "Export ICS"
msgstr ""
#. module: caldav
#: selection:basic.calendar.fields,fn:0
msgid "Use the field"
msgstr "Käytä kenttää"
#. module: caldav
#: code:addons/caldav/calendar.py:787
#, python-format
msgid "Can not create line \"%s\" more than once"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
#: field:basic.calendar,line_ids:0
#: model:ir.model,name:caldav.model_basic_calendar_lines
msgid "Calendar Lines"
msgstr "Kalenteririvit"
#. module: caldav
#: model:ir.model,name:caldav.model_calendar_event_subscribe
msgid "Event subscribe"
msgstr ""
#. module: caldav
#: view:calendar.event.import:0
msgid "Import ICS"
msgstr ""
#. module: caldav
#: view:calendar.event.import:0
#: view:calendar.event.subscribe:0
#: view:user.preference:0
msgid "_Cancel"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_event
msgid "basic.calendar.event"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
#: selection:basic.calendar,type:0
#: selection:basic.calendar.attributes,type:0
#: selection:basic.calendar.lines,name:0
msgid "Event"
msgstr ""
#. module: caldav
#: field:document.directory,calendar_collection:0
#: field:user.preference,collection:0
msgid "Calendar Collection"
msgstr ""
#. module: caldav
#: constraint:document.directory:0
msgid "Error! You can not create recursive Directories."
msgstr "Virhe! Et voi luoda rekursiivisia kansioita."
#. module: caldav
#: view:user.preference:0
msgid "_Open"
msgstr ""
#. module: caldav
#: field:basic.calendar,type:0
#: field:basic.calendar.attributes,type:0
#: field:basic.calendar.fields,type_id:0
#: field:basic.calendar.lines,name:0
msgid "Type"
msgstr "Tyyppi"
#. module: caldav
#: help:calendar.event.export,name:0
msgid "Save in .ics format"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:1291
#, python-format
msgid "Error !"
msgstr "Virhe !"
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:128
#, python-format
msgid ""
"\n"
" 1. Go to Calendar View\n"
"\n"
" 2. File -> New -> Calendar\n"
"\n"
" 3. Fill the form \n"
" - type : CalDav\n"
" - name : Whaterver you want (ie : Meeting)\n"
" - url : "
"http://HOST:PORT/webdav/DB_NAME/calendars/users/USER/c/Meetings (ie : "
"http://localhost:8069/webdav/db_1/calendars/users/demo/c/Meetings) the one "
"given on the top of this window\n"
" - uncheck \"User SSL\"\n"
" - Username : Your username (ie : Demo)\n"
" - Refresh : everytime you want that evolution synchronize the data "
"with the server\n"
"\n"
" 4. Click ok and give your openerp password\n"
"\n"
" 5. A new calendar named with the name you gave should appear on the left "
"side. \n"
" "
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_attributes
msgid "Calendar attributes"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_caldav_browse
msgid "Caldav Browse"
msgstr ""
#. module: caldav
#: model:ir.module.module,description:caldav.module_meta_information
msgid ""
"\n"
" This module Contains basic functionality for caldav system like: \n"
" - Webdav server that provides remote access to calendar\n"
" - Synchronisation of calendar using WebDAV\n"
" - Customize calendar event and todo attribute with any of OpenERP model\n"
" - Provides iCal Import/Export functionality\n"
"\n"
" To access Calendars using CalDAV clients, point them to:\n"
" "
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/calendars/users/USERNAME/c\n"
"\n"
" To access OpenERP Calendar using WebCal to remote site use the URL "
"like:\n"
" "
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/Calendars/CALENDAR_NAME.ics\n"
"\n"
" Where,\n"
" HOSTNAME: Host on which OpenERP server(With webdav) is running\n"
" PORT : Port on which OpenERP server is running (By Default : 8069)\n"
" DATABASE_NAME: Name of database on which OpenERP Calendar is "
"created\n"
" CALENDAR_NAME: Name of calendar to access\n"
msgstr ""
#. module: caldav
#: selection:user.preference,device:0
msgid "Android based device"
msgstr ""
#. module: caldav
#: field:basic.calendar,create_date:0
msgid "Created Date"
msgstr "Luontipäivä"
#. module: caldav
#: view:basic.calendar:0
msgid "Attributes Mapping"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_document_directory
msgid "Directory"
msgstr "Hakemisto"
#. module: caldav
#: field:calendar.event.subscribe,url_path:0
msgid "Provide path for remote calendar"
msgstr ""
#. module: caldav
#: view:caldav.browse:0
msgid "_Ok"
msgstr ""
#. module: caldav
#: field:basic.calendar.lines,domain:0
msgid "Domain"
msgstr "Toimialue"
#. module: caldav
#: view:calendar.event.subscribe:0
msgid "_Subscribe"
msgstr ""
#. module: caldav
#: field:basic.calendar,user_id:0
msgid "Owner"
msgstr "Omistaja"
#. module: caldav
#: view:basic.calendar:0
#: field:basic.calendar.alias,cal_line_id:0
#: field:basic.calendar.lines,calendar_id:0
#: model:ir.ui.menu,name:caldav.menu_calendar
#: field:user.preference,calendar:0
msgid "Calendar"
msgstr "kalenteri"
#. module: caldav
#: code:addons/caldav/calendar.py:41
#, python-format
msgid ""
"Please install python-vobject from http://vobject.skyhouseconsulting.com/"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/calendar_event_import.py:63
#, python-format
msgid "Invalid format of the ics, file can not be imported"
msgstr "Virheellinen ics formaatti, tiedostoa ei voi tuoda"
#. module: caldav
#: selection:user.preference,service:0
msgid "CalDAV"
msgstr ""
#. module: caldav
#: field:basic.calendar.fields,field_id:0
msgid "OpenObject Field"
msgstr ""
#. module: caldav
#: field:basic.calendar.alias,res_id:0
msgid "Res. ID"
msgstr ""
#. module: caldav
#: view:calendar.event.subscribe:0
msgid "Message..."
msgstr "Viesti..."
#. module: caldav
#: selection:user.preference,device:0
msgid "Other"
msgstr "Muu"
#. module: caldav
#: view:basic.calendar:0
#: field:basic.calendar,has_webcal:0
msgid "WebCal"
msgstr ""
#. module: caldav
#: view:document.directory:0
#: model:ir.actions.act_window,name:caldav.action_calendar_collection_form
#: model:ir.ui.menu,name:caldav.menu_calendar_collection
msgid "Calendar Collections"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:813
#: sql_constraint:basic.calendar.alias:0
#, python-format
msgid "The same filename cannot apply to two records!"
msgstr ""
#. module: caldav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
#: field:document.directory,calendar_ids:0
#: model:ir.actions.act_window,name:caldav.action_caldav_form
#: model:ir.ui.menu,name:caldav.menu_caldav_directories
msgid "Calendars"
msgstr "Kalenterit"
#. module: caldav
#: field:basic.calendar,collection_id:0
msgid "Collection"
msgstr "Kokoelma"
#. module: caldav
#: field:basic.calendar,write_date:0
msgid "Write Date"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:104
#, python-format
msgid ""
"\n"
"Prerequire\n"
"----------\n"
"There is no buit-in way to synchronize calendar with caldav.\n"
"So you need to install a third part software : Calendar (CalDav) \n"
"for now it's the only one\n"
"\n"
"configuration\n"
"-------------\n"
"\n"
"1. Open Calendar Sync\n"
" I'll get an interface with 2 tabs\n"
" Stay on the first one\n"
" \n"
"2. CaDAV Calendar URL : put the URL given above (ie : "
"http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)\n"
"\n"
"3. Put your openerp username and password\n"
"\n"
"4. If your server don't use SSL, you'll get a warnign, say \"Yes\"\n"
"\n"
"5. Then you can synchronize manually or custom the settings to synchronize "
"every x minutes.\n"
" \n"
" "
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:53
#, python-format
msgid ""
"\n"
" For SSL specific configuration see the documentation below\n"
"\n"
"Now, to setup the calendars, you need to:\n"
"\n"
"1. Click on the \"Settings\" and go to the \"Mail, Contacts, Calendars\" "
"page.\n"
"2. Go to \"Add account...\"\n"
"3. Click on \"Other\"\n"
"4. From the \"Calendars\" group, select \"Add CalDAV Account\"\n"
"\n"
"5. Enter the host's name \n"
" (ie : if the url is http://openerp.com:8069/webdav/db_1/calendars/ , "
"openerp.com is the host)\n"
"\n"
"6. Fill Username and password with your openerp login and password\n"
"\n"
"7. As a description, you can either leave the server's name or\n"
" something like \"OpenERP calendars\".\n"
"\n"
"9. If you are not using a SSL server, you'll get an error, do not worry and "
"push \"Continue\"\n"
"\n"
"10. Then click to \"Advanced Settings\" to specify the right\n"
" ports and paths. \n"
" \n"
"11. Specify the port for the OpenERP server: 8071 for SSL, 8069 without.\n"
"\n"
"12. Set the \"Account URL\" to the right path of the OpenERP webdav:\n"
" the url given by the wizard (ie : "
"http://my.server.ip:8069/webdav/dbname/calendars/ )\n"
"\n"
"11. Click on Done. The phone will hopefully connect to the OpenERP server\n"
" and verify it can use the account.\n"
"\n"
"12. Go to the main menu of the iPhone and enter the Calendar application.\n"
" Your OpenERP calendars will be visible inside the selection of the\n"
" \"Calendars\" button.\n"
" Note that when creating a new calendar entry, you will have to specify\n"
" which calendar it should be saved at.\n"
"\n"
"\n"
"\n"
"IF you need SSL (and your certificate is not a verified one, as usual),\n"
"then you first will need to let the iPhone trust that. Follow these\n"
"steps:\n"
"\n"
" s1. Open Safari and enter the https location of the OpenERP server:\n"
" https://my.server.ip:8071/\n"
" (assuming you have the server at \"my.server.ip\" and the HTTPS port\n"
" is the default 8071)\n"
" s2. Safari will try to connect and issue a warning about the "
"certificate\n"
" used. Inspect the certificate and click \"Accept\" so that iPhone\n"
" now trusts it. \n"
" "
msgstr ""
#. module: caldav
#: sql_constraint:document.directory:0
msgid "The directory name must be unique !"
msgstr "Hakemiston nimen tulee olla uniikki !"
#. module: caldav
#: view:user.preference:0
msgid "User Preference"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/calendar_event_subscribe.py:59
#, python-format
msgid "Please provide Proper URL !"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_timezone
msgid "basic.calendar.timezone"
msgstr ""
#. module: caldav
#: field:basic.calendar.fields,expr:0
msgid "Expression"
msgstr "Lauseke"
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_attendee
msgid "basic.calendar.attendee"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_alias
msgid "basic.calendar.alias"
msgstr ""
#. module: caldav
#: view:calendar.event.import:0
#: field:calendar.event.import,file_path:0
msgid "Select ICS file"
msgstr ""
#. module: caldav
#: field:caldav.browse,caldav_doc_file:0
msgid "Caldav Document"
msgstr ""
#. module: caldav
#: field:basic.calendar.lines,mapping_ids:0
msgid "Fields Mapping"
msgstr "Kenttien kartoitukset"
#. module: caldav
#: view:caldav.browse:0
msgid "Browse caldav"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar
msgid "basic.calendar"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
msgid "Other Info"
msgstr "Muu tieto"
#. module: caldav
#: field:user.preference,device:0
msgid "Software/Devices"
msgstr "Ohjelmisto/Laitteet"
#. module: caldav
#: help:basic.calendar,has_webcal:0
msgid ""
"Also export a <name>.ics entry next to the calendar folder, with WebCal "
"content."
msgstr ""
#. module: caldav
#: field:basic.calendar.fields,fn:0
msgid "Function"
msgstr "Toiminto"
#. module: caldav
#: view:basic.calendar:0
#: field:basic.calendar,description:0
#: view:caldav.browse:0
#: field:caldav.browse,description:0
msgid "Description"
msgstr "Kuvaus"
#. module: caldav
#: help:basic.calendar.alias,cal_line_id:0
msgid "The calendar/line this mapping applies to"
msgstr ""
#. module: caldav
#: field:basic.calendar.fields,mapping:0
msgid "Mapping"
msgstr "Mäppäys"
#. module: caldav
#: code:addons/caldav/wizard/calendar_event_import.py:86
#, python-format
msgid "Import Sucessful"
msgstr "Tuonti onnistui"
#. module: caldav
#: view:calendar.event.import:0
msgid "_Import"
msgstr "_Tuo"
#. module: caldav
#: model:ir.model,name:caldav.model_calendar_event_import
msgid "Event Import"
msgstr ""
#. module: caldav
#: selection:basic.calendar.fields,fn:0
msgid "Interval in hours"
msgstr "Väli tuntia"
#. module: caldav
#: view:calendar.event.subscribe:0
msgid "Subscribe to Remote Calendar"
msgstr ""
#. module: caldav
#: help:basic.calendar,calendar_color:0
msgid "For supporting clients, the color of the calendar entries"
msgstr ""
#. module: caldav
#: field:basic.calendar,name:0
#: field:basic.calendar.attributes,name:0
#: field:basic.calendar.fields,name:0
msgid "Name"
msgstr "Nimi"
#. module: caldav
#: selection:basic.calendar.attributes,type:0
#: selection:basic.calendar.lines,name:0
msgid "Alarm"
msgstr "Hälytys"
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_alarm
msgid "basic.calendar.alarm"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:1291
#, python-format
msgid "Attendee must have an Email Id"
msgstr ""
#. module: caldav
#: model:ir.actions.act_window,name:caldav.action_calendar_event_export_values
msgid "Export .ics File"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:41
#, python-format
msgid "vobject Import Error!"
msgstr ""
#. module: caldav
#: field:calendar.event.export,file_path:0
msgid "Save ICS file"
msgstr ""
#. module: caldav
#: selection:user.preference,device:0
msgid "Sunbird/Thunderbird"
msgstr ""
#. module: caldav
#: field:basic.calendar,calendar_order:0
msgid "Order"
msgstr "Järjestys"
#. module: caldav
#: model:ir.module.module,shortdesc:caldav.module_meta_information
msgid "Share Calendar using CalDAV"
msgstr "Jaa kalenteri käyttäen CalDAV:ia"
#. module: caldav
#: field:basic.calendar,calendar_color:0
msgid "Color"
msgstr "Väri"
#. module: caldav
#: view:basic.calendar:0
msgid "MY"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_fields
msgid "Calendar fields"
msgstr "Kalenterikentät"
#. module: caldav
#: view:calendar.event.import:0
msgid "Import Message"
msgstr ""
#. module: caldav
#: model:ir.actions.act_window,name:caldav.action_calendar_event_subscribe
#: model:ir.actions.act_window,name:caldav.action_calendar_event_subscribe_values
msgid "Subscribe"
msgstr "Tilaa"
#. module: caldav
#: sql_constraint:document.directory:0
msgid "Directory must have a parent or a storage"
msgstr "Hakemistolla täytyy olla ylätason hakemisto tai tietovarasto"
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_todo
msgid "basic.calendar.todo"
msgstr ""
#. module: caldav
#: help:basic.calendar,calendar_order:0
msgid "For supporting clients, the order of this folder among the calendars"
msgstr ""

View File

@ -8,24 +8,24 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-05-29 10:44+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2011-06-20 20:57+0000\n"
"Last-Translator: Ayhan KIZILTAN <Unknown>\n"
"Language-Team: Turkish <tr@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: 2011-05-30 04:59+0000\n"
"X-Generator: Launchpad (build 12959)\n"
"X-Launchpad-Export-Date: 2011-06-21 04:37+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: caldav
#: view:basic.calendar:0
msgid "Value Mapping"
msgstr ""
msgstr "Değer Eşleme"
#. module: caldav
#: help:caldav.browse,url:0
msgid "Url of the caldav server, use for synchronization"
msgstr ""
msgstr "Caldav sunucusu url si, senkronize etmek için kullanın"
#. module: caldav
#: field:basic.calendar.alias,name:0
@ -35,17 +35,17 @@ msgstr "Dosya ismi"
#. module: caldav
#: model:ir.model,name:caldav.model_calendar_event_export
msgid "Event Export"
msgstr ""
msgstr "Olay Dışaaktarımı"
#. module: caldav
#: view:calendar.event.subscribe:0
msgid "Provide path for Remote Calendar"
msgstr ""
msgstr "Uzaktan Takvim yolunu belirt"
#. module: caldav
#: model:ir.actions.act_window,name:caldav.action_calendar_event_import_values
msgid "Import .ics File"
msgstr ""
msgstr ".ics Dosyası İçe aktar"
#. module: caldav
#: view:calendar.event.export:0
@ -61,7 +61,7 @@ msgstr "Katılımcı"
#. module: caldav
#: sql_constraint:basic.calendar.fields:0
msgid "Can not map a field more than once"
msgstr ""
msgstr "Birden çok alan eşleştirilemiyor"
#. module: caldav
#: code:addons/caldav/calendar.py:787
@ -94,12 +94,12 @@ msgstr "Hizmetler"
#. module: caldav
#: selection:basic.calendar.fields,fn:0
msgid "Expression as constant"
msgstr ""
msgstr "Sabit İfade"
#. module: caldav
#: selection:user.preference,device:0
msgid "Evolution"
msgstr ""
msgstr "Evrim"
#. module: caldav
#: view:calendar.event.import:0
@ -127,12 +127,12 @@ msgstr "Caldav Sunucusu"
#: code:addons/caldav/wizard/calendar_event_subscribe.py:59
#, python-format
msgid "Error!"
msgstr ""
msgstr "Hata!"
#. module: caldav
#: help:caldav.browse,caldav_doc_file:0
msgid "download full caldav Documentation."
msgstr ""
msgstr "Tam calsav Belgesi indir"
#. module: caldav
#: selection:user.preference,device:0
@ -210,7 +210,7 @@ msgstr "YAPILACAK"
#. module: caldav
#: view:calendar.event.export:0
msgid "Export ICS"
msgstr ""
msgstr "ICS Dışaaktar"
#. module: caldav
#: selection:basic.calendar.fields,fn:0
@ -221,7 +221,7 @@ msgstr "Alanı Kullan"
#: code:addons/caldav/calendar.py:787
#, python-format
msgid "Can not create line \"%s\" more than once"
msgstr ""
msgstr "\"%s\" Satırı birden çok oluşturulamıyor"
#. module: caldav
#: view:basic.calendar:0
@ -233,24 +233,24 @@ msgstr "Takvim Satırları"
#. module: caldav
#: model:ir.model,name:caldav.model_calendar_event_subscribe
msgid "Event subscribe"
msgstr ""
msgstr "Olay aboneliği"
#. module: caldav
#: view:calendar.event.import:0
msgid "Import ICS"
msgstr ""
msgstr "ICS içeaktar"
#. module: caldav
#: view:calendar.event.import:0
#: view:calendar.event.subscribe:0
#: view:user.preference:0
msgid "_Cancel"
msgstr ""
msgstr "_Vazgeç"
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_event
msgid "basic.calendar.event"
msgstr ""
msgstr "temel.Etkinlik.olay"
#. module: caldav
#: view:basic.calendar:0
@ -258,7 +258,7 @@ msgstr ""
#: selection:basic.calendar.attributes,type:0
#: selection:basic.calendar.lines,name:0
msgid "Event"
msgstr ""
msgstr "Etkinlik"
#. module: caldav
#: field:document.directory,calendar_collection:0

818
addons/caldav/i18n/zh_CN.po Normal file
View File

@ -0,0 +1,818 @@
# Chinese (Simplified) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-07-04 10:45+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2011-07-05 04:33+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: caldav
#: view:basic.calendar:0
msgid "Value Mapping"
msgstr "值列表"
#. module: caldav
#: help:caldav.browse,url:0
msgid "Url of the caldav server, use for synchronization"
msgstr "caldav服务器网址用于同步"
#. module: caldav
#: field:basic.calendar.alias,name:0
msgid "Filename"
msgstr "文件名"
#. module: caldav
#: model:ir.model,name:caldav.model_calendar_event_export
msgid "Event Export"
msgstr "事件导出"
#. module: caldav
#: view:calendar.event.subscribe:0
msgid "Provide path for Remote Calendar"
msgstr "提供远程日历路径"
#. module: caldav
#: model:ir.actions.act_window,name:caldav.action_calendar_event_import_values
msgid "Import .ics File"
msgstr "导入 .ics 文件"
#. module: caldav
#: view:calendar.event.export:0
msgid "_Close"
msgstr "关闭(_C)"
#. module: caldav
#: selection:basic.calendar.attributes,type:0
#: selection:basic.calendar.lines,name:0
msgid "Attendee"
msgstr "参与者"
#. module: caldav
#: sql_constraint:basic.calendar.fields:0
msgid "Can not map a field more than once"
msgstr "不能映射,相关字段多于一个"
#. module: caldav
#: code:addons/caldav/calendar.py:787
#: code:addons/caldav/calendar.py:877
#: code:addons/caldav/wizard/calendar_event_import.py:63
#, python-format
msgid "Warning !"
msgstr "警告!"
#. module: caldav
#: field:basic.calendar.lines,object_id:0
msgid "Object"
msgstr "对象"
#. module: caldav
#: view:basic.calendar:0
msgid "Todo"
msgstr "待办事项"
#. module: caldav
#: model:ir.model,name:caldav.model_user_preference
msgid "User preference Form"
msgstr "用户编好"
#. module: caldav
#: field:user.preference,service:0
msgid "Services"
msgstr "服务"
#. module: caldav
#: selection:basic.calendar.fields,fn:0
msgid "Expression as constant"
msgstr "表现像常量"
#. module: caldav
#: selection:user.preference,device:0
msgid "Evolution"
msgstr "演变"
#. module: caldav
#: view:calendar.event.import:0
#: view:calendar.event.subscribe:0
msgid "Ok"
msgstr "确定"
#. module: caldav
#: code:addons/caldav/calendar.py:877
#, python-format
msgid "Please provide proper configuration of \"%s\" in Calendar Lines"
msgstr "在日程表明细中请为 \"%s\" 进行合适的设置"
#. module: caldav
#: field:calendar.event.export,name:0
msgid "File name"
msgstr "文件名"
#. module: caldav
#: field:caldav.browse,url:0
msgid "Caldav Server"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/calendar_event_subscribe.py:59
#, python-format
msgid "Error!"
msgstr ""
#. module: caldav
#: help:caldav.browse,caldav_doc_file:0
msgid "download full caldav Documentation."
msgstr ""
#. module: caldav
#: selection:user.preference,device:0
msgid "iPhone"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:32
#, python-format
msgid ""
"\n"
" * Webdav server that provides remote access to calendar\n"
" * Synchronisation of calendar using WebDAV\n"
" * Customize calendar event and todo attribute with any of OpenERP model\n"
" * Provides iCal Import/Export functionality\n"
"\n"
" To access Calendars using CalDAV clients, point them to:\n"
" "
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/calendars/users/USERNAME/c\n"
"\n"
" To access OpenERP Calendar using WebCal to remote site use the URL "
"like:\n"
" "
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/Calendars/CALENDAR_NAME.ics\n"
"\n"
" Where,\n"
" HOSTNAME: Host on which OpenERP server(With webdav) is running\n"
" PORT : Port on which OpenERP server is running (By Default : 8069)\n"
" DATABASE_NAME: Name of database on which OpenERP Calendar is "
"created\n"
" CALENDAR_NAME: Name of calendar to access\n"
" "
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:147
#, python-format
msgid ""
"\n"
"Prerequire\n"
"----------\n"
"If you are using thunderbird, first you need to install the lightning "
"module\n"
"http://www.mozilla.org/projects/calendar/lightning/\n"
"\n"
"configuration\n"
"-------------\n"
"\n"
"1. Go to Calendar View\n"
"\n"
"2. File -> New Calendar\n"
"\n"
"3. Chosse \"On the Network\"\n"
"\n"
"4. for format choose CalDav\n"
" and as location the url given above (ie : "
"http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)\n"
" \n"
"5. Choose a name and a color for the Calendar, and we advice you to uncheck "
"\"alarm\"\n"
"\n"
"6. Then put your openerp login and password (to give the password only check "
"the box \"Use password Manager to remember this password\"\n"
"\n"
"7. Then Finish, your meetings should appear now in your calendar view\n"
msgstr ""
#. module: caldav
#: selection:basic.calendar,type:0
#: selection:basic.calendar.attributes,type:0
#: selection:basic.calendar.lines,name:0
msgid "TODO"
msgstr ""
#. module: caldav
#: view:calendar.event.export:0
msgid "Export ICS"
msgstr ""
#. module: caldav
#: selection:basic.calendar.fields,fn:0
msgid "Use the field"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:787
#, python-format
msgid "Can not create line \"%s\" more than once"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
#: field:basic.calendar,line_ids:0
#: model:ir.model,name:caldav.model_basic_calendar_lines
msgid "Calendar Lines"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_calendar_event_subscribe
msgid "Event subscribe"
msgstr ""
#. module: caldav
#: view:calendar.event.import:0
msgid "Import ICS"
msgstr ""
#. module: caldav
#: view:calendar.event.import:0
#: view:calendar.event.subscribe:0
#: view:user.preference:0
msgid "_Cancel"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_event
msgid "basic.calendar.event"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
#: selection:basic.calendar,type:0
#: selection:basic.calendar.attributes,type:0
#: selection:basic.calendar.lines,name:0
msgid "Event"
msgstr ""
#. module: caldav
#: field:document.directory,calendar_collection:0
#: field:user.preference,collection:0
msgid "Calendar Collection"
msgstr ""
#. module: caldav
#: constraint:document.directory:0
msgid "Error! You can not create recursive Directories."
msgstr ""
#. module: caldav
#: view:user.preference:0
msgid "_Open"
msgstr ""
#. module: caldav
#: field:basic.calendar,type:0
#: field:basic.calendar.attributes,type:0
#: field:basic.calendar.fields,type_id:0
#: field:basic.calendar.lines,name:0
msgid "Type"
msgstr ""
#. module: caldav
#: help:calendar.event.export,name:0
msgid "Save in .ics format"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:1291
#, python-format
msgid "Error !"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:128
#, python-format
msgid ""
"\n"
" 1. Go to Calendar View\n"
"\n"
" 2. File -> New -> Calendar\n"
"\n"
" 3. Fill the form \n"
" - type : CalDav\n"
" - name : Whaterver you want (ie : Meeting)\n"
" - url : "
"http://HOST:PORT/webdav/DB_NAME/calendars/users/USER/c/Meetings (ie : "
"http://localhost:8069/webdav/db_1/calendars/users/demo/c/Meetings) the one "
"given on the top of this window\n"
" - uncheck \"User SSL\"\n"
" - Username : Your username (ie : Demo)\n"
" - Refresh : everytime you want that evolution synchronize the data "
"with the server\n"
"\n"
" 4. Click ok and give your openerp password\n"
"\n"
" 5. A new calendar named with the name you gave should appear on the left "
"side. \n"
" "
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_attributes
msgid "Calendar attributes"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_caldav_browse
msgid "Caldav Browse"
msgstr ""
#. module: caldav
#: model:ir.module.module,description:caldav.module_meta_information
msgid ""
"\n"
" This module Contains basic functionality for caldav system like: \n"
" - Webdav server that provides remote access to calendar\n"
" - Synchronisation of calendar using WebDAV\n"
" - Customize calendar event and todo attribute with any of OpenERP model\n"
" - Provides iCal Import/Export functionality\n"
"\n"
" To access Calendars using CalDAV clients, point them to:\n"
" "
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/calendars/users/USERNAME/c\n"
"\n"
" To access OpenERP Calendar using WebCal to remote site use the URL "
"like:\n"
" "
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/Calendars/CALENDAR_NAME.ics\n"
"\n"
" Where,\n"
" HOSTNAME: Host on which OpenERP server(With webdav) is running\n"
" PORT : Port on which OpenERP server is running (By Default : 8069)\n"
" DATABASE_NAME: Name of database on which OpenERP Calendar is "
"created\n"
" CALENDAR_NAME: Name of calendar to access\n"
msgstr ""
#. module: caldav
#: selection:user.preference,device:0
msgid "Android based device"
msgstr ""
#. module: caldav
#: field:basic.calendar,create_date:0
msgid "Created Date"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
msgid "Attributes Mapping"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_document_directory
msgid "Directory"
msgstr ""
#. module: caldav
#: field:calendar.event.subscribe,url_path:0
msgid "Provide path for remote calendar"
msgstr ""
#. module: caldav
#: view:caldav.browse:0
msgid "_Ok"
msgstr ""
#. module: caldav
#: field:basic.calendar.lines,domain:0
msgid "Domain"
msgstr ""
#. module: caldav
#: view:calendar.event.subscribe:0
msgid "_Subscribe"
msgstr ""
#. module: caldav
#: field:basic.calendar,user_id:0
msgid "Owner"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
#: field:basic.calendar.alias,cal_line_id:0
#: field:basic.calendar.lines,calendar_id:0
#: model:ir.ui.menu,name:caldav.menu_calendar
#: field:user.preference,calendar:0
msgid "Calendar"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:41
#, python-format
msgid ""
"Please install python-vobject from http://vobject.skyhouseconsulting.com/"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/calendar_event_import.py:63
#, python-format
msgid "Invalid format of the ics, file can not be imported"
msgstr ""
#. module: caldav
#: selection:user.preference,service:0
msgid "CalDAV"
msgstr ""
#. module: caldav
#: field:basic.calendar.fields,field_id:0
msgid "OpenObject Field"
msgstr ""
#. module: caldav
#: field:basic.calendar.alias,res_id:0
msgid "Res. ID"
msgstr ""
#. module: caldav
#: view:calendar.event.subscribe:0
msgid "Message..."
msgstr ""
#. module: caldav
#: selection:user.preference,device:0
msgid "Other"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
#: field:basic.calendar,has_webcal:0
msgid "WebCal"
msgstr ""
#. module: caldav
#: view:document.directory:0
#: model:ir.actions.act_window,name:caldav.action_calendar_collection_form
#: model:ir.ui.menu,name:caldav.menu_calendar_collection
msgid "Calendar Collections"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:813
#: sql_constraint:basic.calendar.alias:0
#, python-format
msgid "The same filename cannot apply to two records!"
msgstr ""
#. module: caldav
#: sql_constraint:document.directory:0
msgid "Directory cannot be parent of itself!"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
#: field:document.directory,calendar_ids:0
#: model:ir.actions.act_window,name:caldav.action_caldav_form
#: model:ir.ui.menu,name:caldav.menu_caldav_directories
msgid "Calendars"
msgstr ""
#. module: caldav
#: field:basic.calendar,collection_id:0
msgid "Collection"
msgstr ""
#. module: caldav
#: field:basic.calendar,write_date:0
msgid "Write Date"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:104
#, python-format
msgid ""
"\n"
"Prerequire\n"
"----------\n"
"There is no buit-in way to synchronize calendar with caldav.\n"
"So you need to install a third part software : Calendar (CalDav) \n"
"for now it's the only one\n"
"\n"
"configuration\n"
"-------------\n"
"\n"
"1. Open Calendar Sync\n"
" I'll get an interface with 2 tabs\n"
" Stay on the first one\n"
" \n"
"2. CaDAV Calendar URL : put the URL given above (ie : "
"http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)\n"
"\n"
"3. Put your openerp username and password\n"
"\n"
"4. If your server don't use SSL, you'll get a warnign, say \"Yes\"\n"
"\n"
"5. Then you can synchronize manually or custom the settings to synchronize "
"every x minutes.\n"
" \n"
" "
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/caldav_browse.py:53
#, python-format
msgid ""
"\n"
" For SSL specific configuration see the documentation below\n"
"\n"
"Now, to setup the calendars, you need to:\n"
"\n"
"1. Click on the \"Settings\" and go to the \"Mail, Contacts, Calendars\" "
"page.\n"
"2. Go to \"Add account...\"\n"
"3. Click on \"Other\"\n"
"4. From the \"Calendars\" group, select \"Add CalDAV Account\"\n"
"\n"
"5. Enter the host's name \n"
" (ie : if the url is http://openerp.com:8069/webdav/db_1/calendars/ , "
"openerp.com is the host)\n"
"\n"
"6. Fill Username and password with your openerp login and password\n"
"\n"
"7. As a description, you can either leave the server's name or\n"
" something like \"OpenERP calendars\".\n"
"\n"
"9. If you are not using a SSL server, you'll get an error, do not worry and "
"push \"Continue\"\n"
"\n"
"10. Then click to \"Advanced Settings\" to specify the right\n"
" ports and paths. \n"
" \n"
"11. Specify the port for the OpenERP server: 8071 for SSL, 8069 without.\n"
"\n"
"12. Set the \"Account URL\" to the right path of the OpenERP webdav:\n"
" the url given by the wizard (ie : "
"http://my.server.ip:8069/webdav/dbname/calendars/ )\n"
"\n"
"11. Click on Done. The phone will hopefully connect to the OpenERP server\n"
" and verify it can use the account.\n"
"\n"
"12. Go to the main menu of the iPhone and enter the Calendar application.\n"
" Your OpenERP calendars will be visible inside the selection of the\n"
" \"Calendars\" button.\n"
" Note that when creating a new calendar entry, you will have to specify\n"
" which calendar it should be saved at.\n"
"\n"
"\n"
"\n"
"IF you need SSL (and your certificate is not a verified one, as usual),\n"
"then you first will need to let the iPhone trust that. Follow these\n"
"steps:\n"
"\n"
" s1. Open Safari and enter the https location of the OpenERP server:\n"
" https://my.server.ip:8071/\n"
" (assuming you have the server at \"my.server.ip\" and the HTTPS port\n"
" is the default 8071)\n"
" s2. Safari will try to connect and issue a warning about the "
"certificate\n"
" used. Inspect the certificate and click \"Accept\" so that iPhone\n"
" now trusts it. \n"
" "
msgstr ""
#. module: caldav
#: sql_constraint:document.directory:0
msgid "The directory name must be unique !"
msgstr ""
#. module: caldav
#: view:user.preference:0
msgid "User Preference"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/calendar_event_subscribe.py:59
#, python-format
msgid "Please provide Proper URL !"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_timezone
msgid "basic.calendar.timezone"
msgstr ""
#. module: caldav
#: field:basic.calendar.fields,expr:0
msgid "Expression"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_attendee
msgid "basic.calendar.attendee"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_alias
msgid "basic.calendar.alias"
msgstr ""
#. module: caldav
#: view:calendar.event.import:0
#: field:calendar.event.import,file_path:0
msgid "Select ICS file"
msgstr ""
#. module: caldav
#: field:caldav.browse,caldav_doc_file:0
msgid "Caldav Document"
msgstr ""
#. module: caldav
#: field:basic.calendar.lines,mapping_ids:0
msgid "Fields Mapping"
msgstr ""
#. module: caldav
#: view:caldav.browse:0
msgid "Browse caldav"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar
msgid "basic.calendar"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
msgid "Other Info"
msgstr ""
#. module: caldav
#: field:user.preference,device:0
msgid "Software/Devices"
msgstr ""
#. module: caldav
#: help:basic.calendar,has_webcal:0
msgid ""
"Also export a <name>.ics entry next to the calendar folder, with WebCal "
"content."
msgstr ""
#. module: caldav
#: field:basic.calendar.fields,fn:0
msgid "Function"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
#: field:basic.calendar,description:0
#: view:caldav.browse:0
#: field:caldav.browse,description:0
msgid "Description"
msgstr ""
#. module: caldav
#: help:basic.calendar.alias,cal_line_id:0
msgid "The calendar/line this mapping applies to"
msgstr ""
#. module: caldav
#: field:basic.calendar.fields,mapping:0
msgid "Mapping"
msgstr ""
#. module: caldav
#: code:addons/caldav/wizard/calendar_event_import.py:86
#, python-format
msgid "Import Sucessful"
msgstr ""
#. module: caldav
#: view:calendar.event.import:0
msgid "_Import"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_calendar_event_import
msgid "Event Import"
msgstr ""
#. module: caldav
#: selection:basic.calendar.fields,fn:0
msgid "Interval in hours"
msgstr ""
#. module: caldav
#: view:calendar.event.subscribe:0
msgid "Subscribe to Remote Calendar"
msgstr ""
#. module: caldav
#: help:basic.calendar,calendar_color:0
msgid "For supporting clients, the color of the calendar entries"
msgstr ""
#. module: caldav
#: field:basic.calendar,name:0
#: field:basic.calendar.attributes,name:0
#: field:basic.calendar.fields,name:0
msgid "Name"
msgstr ""
#. module: caldav
#: selection:basic.calendar.attributes,type:0
#: selection:basic.calendar.lines,name:0
msgid "Alarm"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_alarm
msgid "basic.calendar.alarm"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:1291
#, python-format
msgid "Attendee must have an Email Id"
msgstr ""
#. module: caldav
#: model:ir.actions.act_window,name:caldav.action_calendar_event_export_values
msgid "Export .ics File"
msgstr ""
#. module: caldav
#: code:addons/caldav/calendar.py:41
#, python-format
msgid "vobject Import Error!"
msgstr ""
#. module: caldav
#: field:calendar.event.export,file_path:0
msgid "Save ICS file"
msgstr ""
#. module: caldav
#: selection:user.preference,device:0
msgid "Sunbird/Thunderbird"
msgstr ""
#. module: caldav
#: field:basic.calendar,calendar_order:0
msgid "Order"
msgstr ""
#. module: caldav
#: model:ir.module.module,shortdesc:caldav.module_meta_information
msgid "Share Calendar using CalDAV"
msgstr ""
#. module: caldav
#: field:basic.calendar,calendar_color:0
msgid "Color"
msgstr ""
#. module: caldav
#: view:basic.calendar:0
msgid "MY"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_fields
msgid "Calendar fields"
msgstr ""
#. module: caldav
#: view:calendar.event.import:0
msgid "Import Message"
msgstr ""
#. module: caldav
#: model:ir.actions.act_window,name:caldav.action_calendar_event_subscribe
#: model:ir.actions.act_window,name:caldav.action_calendar_event_subscribe_values
msgid "Subscribe"
msgstr ""
#. module: caldav
#: sql_constraint:document.directory:0
msgid "Directory must have a parent or a storage"
msgstr ""
#. module: caldav
#: model:ir.model,name:caldav.model_basic_calendar_todo
msgid "basic.calendar.todo"
msgstr ""
#. module: caldav
#: help:basic.calendar,calendar_order:0
msgid "For supporting clients, the order of this folder among the calendars"
msgstr ""

View File

@ -26,9 +26,8 @@ import addons
from tools.translate import _
class caldav_browse(osv.osv_memory):
__doc = {
'other' : _("""
* Webdav server that provides remote access to calendar
* Synchronisation of calendar using WebDAV
@ -45,11 +44,8 @@ class caldav_browse(osv.osv_memory):
HOSTNAME: Host on which OpenERP server(With webdav) is running
PORT : Port on which OpenERP server is running (By Default : 8069)
DATABASE_NAME: Name of database on which OpenERP Calendar is created
CALENDAR_NAME: Name of calendar to access
"""),
'iphone' : _("""
For SSL specific configuration see the documentation below
@ -60,7 +56,7 @@ Now, to setup the calendars, you need to:
3. Click on "Other"
4. From the "Calendars" group, select "Add CalDAV Account"
5. Enter the host's name
5. Enter the host's name
(ie : if the url is http://openerp.com:8069/webdav/db_1/calendars/ , openerp.com is the host)
6. Fill Username and password with your openerp login and password
@ -71,8 +67,8 @@ Now, to setup the calendars, you need to:
9. If you are not using a SSL server, you'll get an error, do not worry and push "Continue"
10. Then click to "Advanced Settings" to specify the right
ports and paths.
ports and paths.
11. Specify the port for the OpenERP server: 8071 for SSL, 8069 without.
12. Set the "Account URL" to the right path of the OpenERP webdav:
@ -87,8 +83,6 @@ Now, to setup the calendars, you need to:
Note that when creating a new calendar entry, you will have to specify
which calendar it should be saved at.
IF you need SSL (and your certificate is not a verified one, as usual),
then you first will need to let the iPhone trust that. Follow these
steps:
@ -99,13 +93,13 @@ steps:
is the default 8071)
s2. Safari will try to connect and issue a warning about the certificate
used. Inspect the certificate and click "Accept" so that iPhone
now trusts it.
now trusts it.
"""),
'android' : _("""
Prerequire
----------
There is no buit-in way to synchronize calendar with caldav.
So you need to install a third part software : Calendar (CalDav)
So you need to install a third part software : Calendar (CalDav)
for now it's the only one
configuration
@ -114,7 +108,7 @@ configuration
1. Open Calendar Sync
I'll get an interface with 2 tabs
Stay on the first one
2. CaDAV Calendar URL : put the URL given above (ie : http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)
3. Put your openerp username and password
@ -122,7 +116,7 @@ configuration
4. If your server don't use SSL, you'll get a warnign, say "Yes"
5. Then you can synchronize manually or custom the settings to synchronize every x minutes.
"""),
'evolution' : _("""
@ -130,7 +124,7 @@ configuration
2. File -> New -> Calendar
3. Fill the form
3. Fill the form
- type : CalDav
- name : Whaterver you want (ie : Meeting)
- url : http://HOST:PORT/webdav/DB_NAME/calendars/users/USER/c/Meetings (ie : http://localhost:8069/webdav/db_1/calendars/users/demo/c/Meetings) the one given on the top of this window
@ -140,10 +134,9 @@ configuration
4. Click ok and give your openerp password
5. A new calendar named with the name you gave should appear on the left side.
5. A new calendar named with the name you gave should appear on the left side.
"""),
'thunderbird' : _("""
Prerequire
----------
@ -161,7 +154,7 @@ configuration
4. for format choose CalDav
and as location the url given above (ie : http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)
5. Choose a name and a color for the Calendar, and we advice you to uncheck "alarm"
6. Then put your openerp login and password (to give the password only check the box "Use password Manager to remember this password"
@ -169,8 +162,6 @@ configuration
7. Then Finish, your meetings should appear now in your calendar view
"""),
}
_name = 'caldav.browse'
_description = 'Caldav Browse'
@ -181,55 +172,48 @@ configuration
}
def default_get(self, cr, uid, fields, context=None):
pref_obj = self.pool.get('user.preference')
pref_ids = pref_obj.browse(cr, uid ,context.get('rec_id',False), context=context)
res = {}
host = ''
host = context.get('host')
port = ''
prefix = 'http://'
prefix = 'http://'
if not config.get('xmlrpc'):
if not config.get('netrpc'):
prefix = 'https://'
host = config.get('xmlrpcs_interface', None)
prefix = 'https://'
port = config.get('xmlrpcs_port', 8071)
else:
host = config.get('netrpc_interface', None)
port = config.get('netrpc_port',8070)
else:
host = config.get('xmlrpc_interface', None)
port = config.get('netrpc_port',8070)
else:
port = config.get('xmlrpc_port',8069)
if host == '' or None:
host = 'localhost'
port = 8069
if not config.get_misc('webdav','enable',True):
raise Exception("WebDAV is disabled, cannot continue")
user_pool = self.pool.get('res.users')
current_user = user_pool.browse(cr, uid, uid, context=context)
pref_obj = self.pool.get('user.preference')
pref_ids = pref_obj.browse(cr, uid ,context.get('rec_id',False), context=context)
#TODO write documentation
res['description'] = self.__doc['other']
if pref_ids:
pref_ids = pref_ids[0]
pref_ids = pref_ids[0]
if pref_ids.device == 'iphone':
url = host + ':' + str(port) + '/'+ pref_ids.service + '/' + cr.dbname + '/'+'calendars/'
else :
url = host + ':' + str(port) + '/'+ pref_ids.service + '/' + cr.dbname + '/'+'calendars/'+ 'users/'+ current_user.login + '/'+ pref_ids.collection.name+ '/'+ pref_ids.calendar.name
res['description'] = self.__doc.get(pref_ids.device , self.__doc['other'])
file = open(addons.get_module_resource('caldav','doc', 'caldav_doc.pdf'),'rb')
res['caldav_doc_file'] = base64.encodestring(file.read())
#res['doc_link'] = 'http://doc.openerp.com/'
res['url'] = prefix+url
return res
def browse_caldav(self, cr, uid, ids, context):
return {}
caldav_browse()
class user_preference(osv.osv_memory):
_name = 'user.preference'
_description = 'User preference Form'
@ -238,32 +222,39 @@ class user_preference(osv.osv_memory):
'calendar' :fields.many2one('basic.calendar', 'Calendar', required=True),
'service': fields.selection([('webdav','CalDAV')], "Services"),
'device' : fields.selection([('other', 'Other'), ('iphone', 'iPhone'), ('android', 'Android based device'),('thunderbird', 'Sunbird/Thunderbird'), ('evolution','Evolution')], "Software/Devices"),
'host_name': fields.char('Host Name', size=64, required=True),
}
def _get_default_calendar(self, cr, uid, context):
if context == None:
context = {}
name = context.get('cal_name')
collection_obj = self.pool.get('basic.calendar')
ids = collection_obj.search(cr, uid, [('name', '=', name)])
return ids[0]
def _get_default_collection(self, cr, uid, context):
collection_obj = self.pool.get('document.directory')
ids = collection_obj.search(cr, uid, [('name', '=', 'c')])
return ids[0]
def _get_default_host(self, cr, uid, context):
ids=self.search(cr,uid,[])
host_name = ''
if ids:
ids = len(ids)> 1 and len(ids)-1 or ids[0] # Use len(ids)-1 for taking the value of last id
host_name = self.browse(cr, uid,[ids],context=context)[0].host_name
return host_name
_defaults={
'service': 'webdav',
'collection' : _get_default_collection,
'calendar' : _get_default_calendar,
'device' : 'other',
}
'host_name':_get_default_host
}
def open_window(self, cr, uid, ids, context=None):
obj_model = self.pool.get('ir.model.data')
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','caldav_Browse')])
@ -278,6 +269,22 @@ class user_preference(osv.osv_memory):
'target': 'new',
'context': context,
}
def next_window(self, cr, uid, ids, context=None):
obj_model = self.pool.get('ir.model.data')
host_name = self.browse (cr,uid,ids)[0].host_name
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','user_prefernce_form')])
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'])
context.update({'res_id': ids,'host':host_name})
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'user.preference',
'views': [(resource_id,'form')],
'type': 'ir.actions.act_window',
'target': 'new',
'context': context,
}
user_preference()

View File

@ -11,19 +11,39 @@
<group colspan="4" width="700" height="500">
<separator string="Browse caldav" colspan="4"/>
<field name="url" colspan="4" />
<separator string="Description" colspan="4"/>
<field name="description" colspan="4" nolabel="1"/>
<separator colspan="4"/>
<group col="4" colspan="4">
<label string="" colspan="2"/>
<button special="cancel" string="_Close" icon="gtk-close"/>
</group>
<group col="4" colspan="4">
<label string="" colspan="2"/>
<button special="cancel" string="_Close" icon="gtk-close"/>
</group>
</group>
</form>
</field>
</record>
<record id="host_prefernce_form" model="ir.ui.view">
<field name="name">host_preference</field>
<field name="model">user.preference</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Caldav's host name configuration">
<label string="Configure your openerp hostname. For example : " colspan="4"></label>
<newline/>
<label string="database.my.openerp.com or companyserver.com" colspan="4"/>
<newline/>
<separator colspan="4"/>
<field name="host_name" colspan="4" width="250" />
<separator colspan="4"/>
<group col="4" colspan="4">
<button special="cancel" string="_Cancel" icon="gtk-cancel"/>
<button name="next_window" string="Next" type="object" icon="gtk-go-forward"/>
</group>
</form>
</field>
</record>
<record id="user_prefernce_form" model="ir.ui.view">
<field name="name">user_preference</field>
<field name="model">user.preference</field>

View File

@ -0,0 +1,33 @@
# Finnish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-06-20 10:45+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Finnish <fi@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: 2011-06-21 04:36+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: claim_from_delivery
#: model:ir.actions.act_window,name:claim_from_delivery.action_claim_from_delivery
msgid "Claim"
msgstr "Reklamaatio"
#. module: claim_from_delivery
#: model:ir.module.module,description:claim_from_delivery.module_meta_information
msgid "Create Claim from delivery order:\n"
msgstr "Luo reklamaatio toimitustilaukselta:\n"
#. module: claim_from_delivery
#: model:ir.module.module,shortdesc:claim_from_delivery.module_meta_information
msgid "Claim from delivery"
msgstr "Reklamaatio toimitukselta"

View File

@ -0,0 +1,33 @@
# Chinese (Simplified) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-07-04 05:17+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2011-07-05 04:33+0000\n"
"X-Generator: Launchpad (build 13168)\n"
#. module: claim_from_delivery
#: model:ir.actions.act_window,name:claim_from_delivery.action_claim_from_delivery
msgid "Claim"
msgstr "索赔"
#. module: claim_from_delivery
#: model:ir.module.module,description:claim_from_delivery.module_meta_information
msgid "Create Claim from delivery order:\n"
msgstr "创建送货单索赔:\n"
#. module: claim_from_delivery
#: model:ir.module.module,shortdesc:claim_from_delivery.module_meta_information
msgid "Claim from delivery"
msgstr "送货单索赔"

View File

@ -129,6 +129,7 @@ Creates a dashboard for CRM that includes:
'test/test_crm_phonecall.yml',
'test/test_crm_recurrent_meeting.yml',
'test/test_crm_stage_changes.yml',
'test/test_crm_recurrent_meeting_case2.yml',
],
'installable': True,
'active': False,

View File

@ -44,8 +44,177 @@ AVAILABLE_PRIORITIES = [
('5', 'Lowest'),
]
class crm_case(object):
"""A simple python class to be used for common functions """
class crm_base(object):
"""
Base classe for crm object,
Object that inherit from this class should have
date_open
date_closed
user_id
partner_id
partner_address_id
as field to be compatible with this class
"""
def _get_default_partner_address(self, cr, uid, context=None):
"""Gives id of default address for current user
:param context: if portal in context is false return false anyway
"""
if context is None:
context = {}
if not context.get('portal'):
return False
return self.pool.get('res.users').browse(cr, uid, uid, context).address_id.id
def _get_default_partner(self, cr, uid, context=None):
"""Gives id of partner for current user
:param context: if portal in context is false return false anyway
"""
if context is None:
context = {}
if not context.get('portal', False):
return False
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if not user.address_id:
return False
return user.address_id.partner_id.id
def _get_default_email(self, cr, uid, context=None):
"""Gives default email address for current user
:param context: if portal in context is false return false anyway
"""
if not context.get('portal', False):
return False
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if not user.address_id:
return False
return user.address_id.email
def _get_default_user(self, cr, uid, context=None):
"""Gives current user id
:param context: if portal in context is false return false anyway
"""
if context and context.get('portal', False):
return False
return uid
def _get_section(self, cr, uid, context=None):
"""Gives section id for current User
"""
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.context_section_id.id or False
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
"""This function returns value of partner email based on Partner Address
@param ids: List of case IDs
@param add: Id of Partner's address
@email: Partner's email ID
"""
if not add:
return {'value': {'email_from': False}}
address = self.pool.get('res.partner.address').browse(cr, uid, add)
if address.email:
return {'value': {'email_from': address.email, 'phone': address.phone}}
else:
return {'value': {'phone': address.phone}}
def onchange_partner_id(self, cr, uid, ids, part, email=False):
"""This function returns value of partner address based on partner
@param ids: List of case IDs
@param part: Partner's id
@email: Partner's email ID
"""
data={}
if part:
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
data = {'partner_address_id': addr['contact']}
data.update(self.onchange_partner_address_id(cr, uid, ids, addr['contact'])['value'])
return {'value': data}
def case_open(self, cr, uid, ids, *args):
"""Opens Case
@param ids: List of case Ids
"""
cases = self.browse(cr, uid, ids)
for case in cases:
data = {'state': 'open', 'active': True}
if not case.user_id:
data['user_id'] = uid
self.write(cr, uid, case.id, data)
self._action(cr, uid, cases, 'open')
return True
def case_close(self, cr, uid, ids, *args):
"""Closes Case
@param ids: List of case Ids
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.write(cr, uid, ids, {'state': 'done',
'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'),
})
#
# We use the cache of cases to keep the old case state
#
self._action(cr, uid, cases, 'done')
return True
def case_cancel(self, cr, uid, ids, *args):
"""Cancels Case
@param ids: List of case Ids
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.write(cr, uid, ids, {'state': 'cancel',
'active': True})
self._action(cr, uid, cases, 'cancel')
for case in cases:
message = _("The case '%s' has been cancelled.") % (case.name,)
self.log(cr, uid, case.id, message)
return True
def case_pending(self, cr, uid, ids, *args):
"""Marks case as pending
@param ids: List of case Ids
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.write(cr, uid, ids, {'state': 'pending', 'active': True})
self._action(cr, uid, cases, 'pending')
return True
def case_reset(self, cr, uid, ids, *args):
"""Resets case as draft
@param ids: List of case Ids
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.write(cr, uid, ids, {'state': 'draft', 'active': True})
self._action(cr, uid, cases, 'draft')
return True
def _action(self, cr, uid, cases, state_to, scrit=None, context=None):
if context is None:
context = {}
context['state_to'] = state_to
rule_obj = self.pool.get('base.action.rule')
model_obj = self.pool.get('ir.model')
model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
rule_ids = rule_obj.search(cr, uid, [('model_id','=',model_ids[0])])
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
class crm_case(crm_base):
"""
A simple python class to be used for common functions
Object that inherit from this class should inherit from mailgate.thread
And need a stage_id field
And object that inherit (orm inheritance) from a class the overwrite copy
"""
def _find_lost_stage(self, cr, uid, type, section_id):
return self._find_percent_stage(cr, uid, 0.0, type, section_id)
@ -105,35 +274,7 @@ class crm_case(object):
return {'value':{}}
return {'value':{'probability': stage.probability}}
def _get_default_partner_address(self, cr, uid, context=None):
"""Gives id of default address for current user
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
if not context.get('portal', False):
return False
return self.pool.get('res.users').browse(cr, uid, uid, context).address_id.id
def _get_default_partner(self, cr, uid, context=None):
"""Gives id of partner for current user
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
if not context.get('portal', False):
return False
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if not user.address_id:
return False
return user.address_id.partner_id.id
def copy(self, cr, uid, id, default=None, context=None):
"""
@ -145,6 +286,7 @@ class crm_case(object):
@param default: Dictionary of default values for copy.
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
if default is None:
@ -164,40 +306,9 @@ class crm_case(object):
})
return super(osv.osv, self).copy(cr, uid, id, default, context=context)
def _get_default_email(self, cr, uid, context=None):
"""Gives default email address for current user
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
if not context.get('portal', False):
return False
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if not user.address_id:
return False
return user.address_id.email
def _get_default_user(self, cr, uid, context=None):
"""Gives current user id
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
if context and context.get('portal', False):
return False
return uid
def _get_section(self, cr, uid, context=None):
"""Gives section id for current User
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.context_section_id.id or False
def _find_next_stage(self, cr, uid, stage_list, index, current_seq, stage_pool, context=None):
if index + 1 == len(stage_list):
@ -274,38 +385,9 @@ class crm_case(object):
@param context: A standard dictionary for contextual values"""
return self.stage_change(cr, uid, ids, context=context, order='sequence desc')
def onchange_partner_id(self, cr, uid, ids, part, email=False):
"""This function returns value of partner address based on partner
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case IDs
@param part: Partner's id
@email: Partner's email ID
"""
data={}
if part:
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
data = {'partner_address_id': addr['contact']}
data.update(self.onchange_partner_address_id(cr, uid, ids, addr['contact'])['value'])
return {'value': data}
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
"""This function returns value of partner email based on Partner Address
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case IDs
@param add: Id of Partner's address
@email: Partner's email ID
"""
if not add:
return {'value': {'email_from': False}}
address = self.pool.get('res.partner.address').browse(cr, uid, add)
if address.email:
return {'value': {'email_from': address.email, 'phone': address.phone}}
else:
return {'value': {'phone': address.phone}}
def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context=None):
mailgate_pool = self.pool.get('mailgate.thread')
@ -331,8 +413,6 @@ class crm_case(object):
if not case.user_id:
data['user_id'] = uid
self.write(cr, uid, case.id, data)
self._action(cr, uid, cases, 'open')
return True
@ -423,11 +503,14 @@ class crm_case(object):
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
state = 'draft'
if 'crm.phonecall' in args:
state = 'open'
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self._history(cr, uid, cases, _('Draft'))
self.write(cr, uid, ids, {'state': 'draft', 'active': True})
self._action(cr, uid, cases, 'draft')
self.write(cr, uid, ids, {'state': state, 'active': True})
self._action(cr, uid, cases, state)
return True
def remind_partner(self, cr, uid, ids, context=None, attach=False):
@ -454,9 +537,9 @@ class crm_case(object):
"""
for case in self.browse(cr, uid, ids, context=context):
if not destination and not case.email_from:
raise osv.except_osv(_('Error!'), ("Partner Email is not specified in Case"))
return False
if not case.user_id.user_email:
raise osv.except_osv(_('Error!'), ("User Email is not specified in Case"))
return False
if destination and case.section_id.user_id:
case_email = case.section_id.user_id.user_email
@ -521,15 +604,7 @@ class crm_case(object):
cases = self.browse(cr, uid, ids2, context=context)
return self._action(cr, uid, cases, False, context=context)
def _action(self, cr, uid, cases, state_to, scrit=None, context=None):
if context is None:
context = {}
context['state_to'] = state_to
rule_obj = self.pool.get('base.action.rule')
model_obj = self.pool.get('ir.model')
model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
rule_ids = rule_obj.search(cr, uid, [('model_id','=',model_ids[0])])
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
def format_body(self, body):
return self.pool.get('base.action.rule').format_body(body)
@ -607,7 +682,7 @@ class crm_case_section(osv.osv):
_columns = {
'name': fields.char('Sales Team', size=64, required=True, translate=True),
'complete_name': fields.function(get_full_name, method=True, type='char', size=256, readonly=True, store=True),
'complete_name': fields.function(get_full_name, type='char', size=256, readonly=True, store=True),
'code': fields.char('Code', size=8),
'active': fields.boolean('Active', help="If the active field is set to "\
"true, it will allow you to hide the sales team without removing it."),

View File

@ -37,6 +37,7 @@ class crm_installer(osv.osv_memory):
'thunderbird': fields.boolean('Thunderbird', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
'outlook': fields.boolean('MS-Outlook', help="Allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one."),
'wiki_sale_faq': fields.boolean('Sale FAQ', help="Helps you manage wiki pages for Frequently Asked Questions on Sales Application."),
'import_google': fields.boolean('Google Import', help="Imports contacts and events from your google account."),
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):

View File

@ -19,7 +19,7 @@
<attribute name="string">Enhance your core CRM Application with additional functionalities.</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>13</attribute>
<attribute name='rowspan'>8</attribute>
<attribute name='string'></attribute>
</xpath>
<xpath expr="//button[@string='Install Modules']" position="attributes">
@ -37,6 +37,7 @@
<separator string="Synchronization" colspan="4" />
<field name="crm_caldav" />
<field name="fetchmail" />
<field name="import_google"/>
</group>
<group colspan="2" col="2">
<separator string="Plug-In" colspan="4" />

View File

@ -143,7 +143,7 @@ class crm_lead(crm_case, osv.osv):
domain="['|',('section_id','=',section_id),('section_id','=',False), ('object_id.model', '=', 'crm.lead')]"),
'type_id': fields.many2one('crm.case.resource.type', 'Campaign', \
domain="['|',('section_id','=',section_id),('section_id','=',False)]"),
'channel_id': fields.many2one('res.partner.canal', 'Channel'),
'channel_id': fields.many2one('res.partner.canal', 'Lead Source'),
'contact_name': fields.char('Contact Name', size=64),
'partner_name': fields.char("Customer Name", size=64,help='The name of the future partner that will be created while converting the into opportunity'),
@ -170,7 +170,7 @@ class crm_lead(crm_case, osv.osv):
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
'subjects': fields.function(_get_email_subject, fnct_search=_history_search, string='Subject of Email', method=True, type='char', size=64),
'subjects': fields.function(_get_email_subject, fnct_search=_history_search, string='Subject of Email', type='char', size=64),
}
@ -270,7 +270,6 @@ class crm_lead(crm_case, osv.osv):
data_obj = self.pool.get('ir.model.data')
value = {}
view_id = False
for case in self.browse(cr, uid, ids, context=context):
context.update({'active_id': case.id})

View File

@ -334,7 +334,7 @@
domain="[('user_id','=', False)]"
help="Unassigned Leads" />
</field>
<field name="subjects"/>
<field name="subjects" groups="base.group_extended"/>
<field name="section_id" widget="selection"
context="{'invisible_section': False}">
<filter icon="terp-personal+" groups="base.group_extended"

View File

@ -20,7 +20,7 @@
##############################################################################
from base_calendar import base_calendar
from crm import crm_case
from crm import crm_base, crm_case
from osv import fields, osv
from tools.translate import _
import logging
@ -36,13 +36,13 @@ class crm_phonecall(crm_case, osv.osv):
crm_phonecall()
class crm_meeting(crm_case, osv.osv):
class crm_meeting(crm_base, osv.osv):
""" CRM Meeting Cases """
_name = 'crm.meeting'
_description = "Meeting"
_order = "id desc"
_inherit = ['mailgate.thread',"calendar.event"]
_inherit = "calendar.event"
_columns = {
# From crm.case
'name': fields.char('Summary', size=124, required=True, states={'done': [('readonly', True)]}),
@ -125,7 +125,7 @@ class calendar_attendee(osv.osv):
return result
_columns = {
'categ_id': fields.function(_compute_data, method=True, \
'categ_id': fields.function(_compute_data, \
string='Event Type', type="many2one", \
relation="crm.case.categ", multi='categ_id'),
}

View File

@ -51,7 +51,7 @@
<field name="res_model">crm.meeting</field>
<field name="view_mode">calendar,tree,form,gantt</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id}</field>
<field name="context">{"search_default_user_id":uid, 'search_default_section_id': section_id, 'virtual_id' : True}</field>
<field name="search_view_id" ref="view_crm_case_meetings_filter"/>
<field name="help">The meeting calendar is shared between the sales teams and fully integrated with other applications such as the employee holidays or the business opportunities. You can also synchronize meetings with your mobile phone using the caldav interface.
</field>

View File

@ -45,8 +45,7 @@
widget="selection" />
<group colspan="2" col="4" attrs="{'readonly': ['|', ('recurrent_uid','!=',False), ('state','=','done')]}">
<field name="recurrency"/>
<field name="edit_all" attrs="{'invisible':[('recurrency','=', False)]}"
on_change="onchange_edit_all(rrule_type,edit_all)"/>
<field name="edit_all" attrs="{'invisible':[('recurrency','=', False)]}" />
</group>
</group>
<notebook colspan="4">

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