[MERGE] merged with main addons trunk

bzr revid: qdp-launchpad@openerp.com-20110706145644-merwy0setzzb8c9w
This commit is contained in:
Quentin (OpenERP) 2011-07-06 16:56:44 +02:00
commit 9c9516d21c
134 changed files with 6933 additions and 1718 deletions

View File

@ -368,16 +368,16 @@ class account_account(osv.osv):
'parent_id': fields.many2one('account.account', 'Parent', ondelete='cascade', domain=[('type','=','view')]), 'parent_id': fields.many2one('account.account', 'Parent', ondelete='cascade', domain=[('type','=','view')]),
'child_parent_ids': fields.one2many('account.account','parent_id','Children'), '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_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"), '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'), method=True, string='Balance', multi='balance'), 'balance': fields.function(__compute, digits_compute=dp.get_precision('Account'), string='Balance', multi='balance'),
'credit': fields.function(__compute, digits_compute=dp.get_precision('Account'), method=True, string='Credit', 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'), method=True, string='Debit', 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."), 'reconcile': fields.boolean('Reconcile', help="Check this if the user is allowed to reconcile entries in this account."),
'shortcut': fields.char('Shortcut', size=12), 'shortcut': fields.char('Shortcut', size=12),
'tax_ids': fields.many2many('account.tax', 'account_account_tax_default_rel', 'tax_ids': fields.many2many('account.tax', 'account_account_tax_default_rel',
'account_id', 'tax_id', 'Default Taxes'), 'account_id', 'tax_id', 'Default Taxes'),
'note': fields.text('Note'), '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), '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."), '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. ' \ '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.', \ 'Incoming transactions always use the rate at date.', \
required=True), 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 = { _defaults = {
@ -587,7 +587,7 @@ class account_journal_column(osv.osv):
_description = "Journal Column" _description = "Journal Column"
_columns = { _columns = {
'name': fields.char('Column Name', size=64, required=True), '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), '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), 'sequence': fields.integer('Sequence', help="Gives the sequence order to journal column.", readonly=True),
'required': fields.boolean('Required'), 'required': fields.boolean('Required'),
@ -985,7 +985,7 @@ class account_journal_period(osv.osv):
'name': fields.char('Journal-Period Name', size=64, required=True), 'name': fields.char('Journal-Period Name', size=64, required=True),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, ondelete="cascade"), 'journal_id': fields.many2one('account.journal', 'Journal', required=True, ondelete="cascade"),
'period_id': fields.many2one('account.period', 'Period', 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."), '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, '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.'), 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)]}), '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.'), '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), '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), 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True),
'narration':fields.text('Narration'), 'narration':fields.text('Narration'),
'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True), 'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
@ -1646,8 +1646,8 @@ class account_tax_code(osv.osv):
'name': fields.char('Tax Case Name', size=64, required=True, translate=True), 'name': fields.char('Tax Case Name', size=64, required=True, translate=True),
'code': fields.char('Case Code', size=64), 'code': fields.char('Case Code', size=64),
'info': fields.text('Description'), 'info': fields.text('Description'),
'sum': fields.function(_sum_year, method=True, string="Year Sum"), 'sum': fields.function(_sum_year, string="Year Sum"),
'sum_period': fields.function(_sum_period, method=True, string="Period Sum"), 'sum_period': fields.function(_sum_period, string="Period Sum"),
'parent_id': fields.many2one('account.tax.code', 'Parent Code', select=True), 'parent_id': fields.many2one('account.tax.code', 'Parent Code', select=True),
'child_ids': fields.one2many('account.tax.code', 'parent_id', 'Child Codes'), 'child_ids': fields.one2many('account.tax.code', 'parent_id', 'Child Codes'),
'line_ids': fields.one2many('account.move.line', 'tax_code_id', 'Lines'), 'line_ids': fields.one2many('account.move.line', 'tax_code_id', 'Lines'),
@ -2502,7 +2502,7 @@ class account_tax_template(osv.osv):
'name': fields.char('Tax Name', size=64, required=True), '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."), '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."), '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."), '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."), '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'), '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)]}), states={'confirm':[('readonly',True)]}),
'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'), 'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'),
states={'confirm':[('readonly', True)]}), 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), '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', 'line_ids': fields.one2many('account.bank.statement.line',
'statement_id', 'Statement lines', 'statement_id', 'Statement lines',
@ -149,7 +149,7 @@ class account_bank_statement(osv.osv):
states={'confirm': [('readonly', True)]}, readonly="1", states={'confirm': [('readonly', True)]}, readonly="1",
help='When new statement is created the state will be \'Draft\'. \ 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.'), \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'), 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.'), '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 = { _columns = {
'pieces': fields.float('Values', digits_compute=dp.get_precision('Account')), 'pieces': fields.float('Values', digits_compute=dp.get_precision('Account')),
'number': fields.integer('Number'), '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'), 'starting_id': fields.many2one('account.bank.statement', ondelete='cascade'),
'ending_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'), [('draft', 'Draft'),
('confirm', 'Closed'), ('confirm', 'Closed'),
('open','Open')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"), ('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"), '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': 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, method=True, store=True, string='Balance', help="Closing balance based on cashBox"), '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'), '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'), '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'), '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_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), '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_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_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, 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': 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."), '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), 'period_id': fields.many2one('account.period', 'Period', required=True, select=2),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1), 'journal_id': fields.many2one('account.journal', 'Journal', required=True, select=1),
@ -504,13 +504,13 @@ class account_move_line(osv.osv):
'date_created': fields.date('Creation date', select=True), 'date_created': fields.date('Creation date', select=True),
'analytic_lines': fields.one2many('account.analytic.line', 'move_id', 'Analytic lines'), 'analytic_lines': fields.one2many('account.analytic.line', 'move_id', 'Analytic lines'),
'centralisation': fields.selection([('normal','Normal'),('credit','Credit Centralisation'),('debit','Debit Centralisation'),('currency','Currency Adjustment')], 'Centralisation', size=8), '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, method=True, string='Balance'), 'balance': fields.function(_balance, fnct_search=_balance_search, string='Balance'),
'state': fields.selection([('draft','Unbalanced'), ('valid','Valid')], 'State', readonly=True, '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.'), 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_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, "\ '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)."), "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), type='many2one', relation='account.invoice', fnct_search=_invoice_search),
'account_tax_id':fields.many2one('account.tax', 'Tax'), 'account_tax_id':fields.many2one('account.tax', 'Tax'),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'), 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),

View File

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

View File

@ -30,7 +30,6 @@ class res_company(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Reserve and Profit/Loss Account", string="Reserve and Profit/Loss Account",
method=True,
view_load=True, view_load=True,
domain="[('type', '=', 'other')]", domain="[('type', '=', 'other')]",
help="This Account is used for transferring Profit/Loss(If It is Profit: Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profit & Loss Report"), help="This Account is used for transferring Profit/Loss(If It is Profit: Amount will be added, Loss : Amount will be deducted.), Which is calculated from Profit & Loss Report"),

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)]}), '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."), '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={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20), 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
'account.invoice.tax': (_get_invoice_tax, None, 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), 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
}, },
multi='all'), 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={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20), 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
'account.invoice.tax': (_get_invoice_tax, None, 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), 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20),
}, },
multi='all'), 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={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20), 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 20),
'account.invoice.tax': (_get_invoice_tax, None, 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)]}), '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)]}), '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)]}), '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={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, None, 50), # Check if we can remove ? '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), 'account.move.line': (_get_invoice_from_line, None, 50),
@ -260,8 +260,8 @@ class account_invoice(osv.osv):
}, help="The Journal Entry of the invoice have been totally reconciled with one or several Journal Entries of payment."), }, 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', '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)]}), 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'), 'move_lines':fields.function(_get_lines, type='many2many', relation='account.move.line', string='Entry Lines'),
'residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual', 'residual': fields.function(_amount_residual, digits_compute=dp.get_precision('Account'), string='Residual',
store={ store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line','move_id'], 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.tax': (_get_invoice_tax, None, 50),
@ -270,7 +270,7 @@ class account_invoice(osv.osv):
'account.move.reconcile': (_get_invoice_from_reconcile, None, 50), 'account.move.reconcile': (_get_invoice_from_reconcile, None, 50),
}, },
help="Remaining amount due."), 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)]}), '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)]}), '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)]}) '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'), '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."), '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_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), digits_compute= dp.get_precision('Account'), store=True),
'quantity': fields.float('Quantity', required=True), 'quantity': fields.float('Quantity', required=True),
'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Account')), '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_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')), '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), '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_base': fields.function(_count_factor, 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_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): def base_change(self, cr, uid, ids, base, currency_id=False, company_id=False, date_invoice=False):

View File

@ -142,15 +142,14 @@ class res_partner(osv.osv):
_columns = { _columns = {
'credit': fields.function(_credit_debit_get, 'credit': fields.function(_credit_debit_get,
fnct_search=_credit_search, method=True, string='Total Receivable', multi='dc', help="Total amount this customer owes you."), 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, method=True, string='Total Payable', multi='dc', help="Total amount you have to pay to this supplier."), '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'), 'debit_limit': fields.float('Payable Limit'),
'property_account_payable': fields.property( 'property_account_payable': fields.property(
'account.account', 'account.account',
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Account Payable", string="Account Payable",
method=True,
view_load=True, view_load=True,
domain="[('type', '=', 'payable')]", domain="[('type', '=', 'payable')]",
help="This account will be used instead of the default one as the payable account for the current partner", help="This account will be used instead of the default one as the payable account for the current partner",
@ -160,7 +159,6 @@ class res_partner(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Account Receivable", string="Account Receivable",
method=True,
view_load=True, view_load=True,
domain="[('type', '=', 'receivable')]", domain="[('type', '=', 'receivable')]",
help="This account will be used instead of the default one as the receivable account for the current partner", help="This account will be used instead of the default one as the receivable account for the current partner",
@ -170,7 +168,6 @@ class res_partner(osv.osv):
type='many2one', type='many2one',
relation='account.fiscal.position', relation='account.fiscal.position',
string="Fiscal Position", string="Fiscal Position",
method=True,
view_load=True, view_load=True,
help="The fiscal position will determine taxes and the accounts used for the partner.", help="The fiscal position will determine taxes and the accounts used for the partner.",
), ),
@ -179,7 +176,6 @@ class res_partner(osv.osv):
type='many2one', type='many2one',
relation='account.payment.term', relation='account.payment.term',
string ='Payment Term', string ='Payment Term',
method=True,
view_load=True, view_load=True,
help="This payment term will be used instead of the default one for the current partner"), help="This payment term will be used instead of the default one for the current partner"),
'ref_companies': fields.one2many('res.company', 'partner_id', 'ref_companies': fields.one2many('res.company', 'partner_id',

View File

@ -29,7 +29,6 @@ class product_category(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Income Account", string="Income Account",
method=True,
view_load=True, view_load=True,
help="This account will be used for invoices to value sales for the current product category"), help="This account will be used for invoices to value sales for the current product category"),
'property_account_expense_categ': fields.property( 'property_account_expense_categ': fields.property(
@ -37,7 +36,6 @@ class product_category(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Expense Account", string="Expense Account",
method=True,
view_load=True, view_load=True,
help="This account will be used for invoices to value expenses for the current product category"), help="This account will be used for invoices to value expenses for the current product category"),
} }
@ -61,7 +59,6 @@ class product_template(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Income Account", string="Income Account",
method=True,
view_load=True, view_load=True,
help="This account will be used for invoices instead of the default one to value sales for the current product"), help="This account will be used for invoices instead of the default one to value sales for the current product"),
'property_account_expense': fields.property( 'property_account_expense': fields.property(
@ -69,7 +66,6 @@ class product_template(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Expense Account", string="Expense Account",
method=True,
view_load=True, view_load=True,
help="This account will be used for invoices instead of the default one to value expenses for the current product"), help="This account will be used for invoices instead of the default one to value expenses for the current product"),
} }

View File

@ -114,7 +114,7 @@ class report_aged_receivable(osv.osv):
_columns = { _columns = {
'name': fields.char('Month Range', size=7, readonly=True), '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): def init(self, cr, uid=1):

View File

@ -47,8 +47,8 @@ class account_treasury_report(osv.osv):
'credit': fields.float('Credit', readonly=True), 'credit': fields.float('Credit', readonly=True),
'balance': fields.float('Balance', readonly=True), 'balance': fields.float('Balance', readonly=True),
'date': fields.date('Beginning of Period Date', 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'), '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'), method=True, string='Ending 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), '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> <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record> </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"> <record id="account_fiscal_position_comp_rule" model="ir.rule">
<field name="name">Account fiscal Mapping company rule</field> <field name="name">Account fiscal Mapping company rule</field>
<field model="ir.model" name="model_id" ref="model_account_fiscal_position"/> <field model="ir.model" name="model_id" ref="model_account_fiscal_position"/>

View File

@ -375,49 +375,49 @@ class account_analytic_account(osv.osv):
return res return res
_columns ={ _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.", help="Total customer invoiced amount for this account.",
digits_compute=dp.get_precision('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.", 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')), 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.", 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')), 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.", 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')), 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'."), 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."), 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."), 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."), 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."), 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."), 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."), 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.", help="Computed using the formula: Max Invoice Price - Invoiced Amount.",
digits_compute=dp.get_precision('Account')), 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.", help="Computed using the formula: Invoiced Amount / Hours Tot.",
digits_compute=dp.get_precision('Account')), 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.", help="Computed using the formula: Invoiced Amount - Total Costs.",
digits_compute=dp.get_precision('Account')), 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", help="Computed using the formula: Theorial Revenue - Total Costs",
digits_compute=dp.get_precision('Account')), 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.", help="Computes using the formula: (Real Margin / Total Costs) * 100.",
digits_compute=dp.get_precision('Account')), 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'), '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, method=True, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'), 'user_ids': fields.function(_analysis_all, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'),
} }
account_analytic_account() account_analytic_account()
@ -456,7 +456,7 @@ class account_analytic_account_summary_user(osv.osv):
_columns = { _columns = {
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True), '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'), string='Total Time'),
'user': fields.many2one('res.users', 'User'), 'user': fields.many2one('res.users', 'User'),
} }
@ -620,7 +620,7 @@ class account_analytic_account_summary_month(osv.osv):
_columns = { _columns = {
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True), '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), 'month': fields.char('Month', size=32, readonly=True),
} }

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-09-29 09:13+0000\n" "PO-Revision-Date: 2011-07-01 10:20+0000\n"
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n" "Last-Translator: digitalsatori <digisatori@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:25+0000\n" "X-Launchpad-Export-Date: 2011-07-02 05:06+0000\n"
"X-Generator: Launchpad (build 12758)\n" "X-Generator: Launchpad (build 13168)\n"
#. module: account_analytic_default #. module: account_analytic_default
#: model:ir.module.module,shortdesc:account_analytic_default.module_meta_information #: model:ir.module.module,shortdesc:account_analytic_default.module_meta_information
@ -49,7 +49,7 @@ msgstr ""
#. module: account_analytic_default #. module: account_analytic_default
#: view:account.analytic.default:0 #: view:account.analytic.default:0
msgid "Group By..." msgid "Group By..."
msgstr "" msgstr "分组..."
#. module: account_analytic_default #. module: account_analytic_default
#: help:account.analytic.default,date_stop:0 #: help:account.analytic.default,date_stop:0
@ -59,7 +59,7 @@ msgstr ""
#. module: account_analytic_default #. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_stock_picking #: model:ir.model,name:account_analytic_default.model_stock_picking
msgid "Picking List" msgid "Picking List"
msgstr "" msgstr "领料/提货单"
#. module: account_analytic_default #. module: account_analytic_default
#: view:account.analytic.default:0 #: view:account.analytic.default:0

View File

@ -61,7 +61,7 @@ class account_analytic_line(osv.osv):
return res return res
_columns = { _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') 'percentage': fields.float('Percentage')
} }

View File

@ -28,7 +28,6 @@ class product_category(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Price Difference Account", string="Price Difference Account",
method=True,
view_load=True, view_load=True,
help="This account will be used to value price difference between purchase price and cost price."), help="This account will be used to value price difference between purchase price and cost price."),
@ -38,7 +37,6 @@ class product_category(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Income Account", string="Income Account",
method=True,
view_load=True, view_load=True,
help="This account will be used to value outgoing stock for the current product category using sale price"), help="This account will be used to value outgoing stock for the current product category using sale price"),
'property_account_expense_categ': fields.property( 'property_account_expense_categ': fields.property(
@ -46,7 +44,6 @@ class product_category(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Expense Account", string="Expense Account",
method=True,
view_load=True, view_load=True,
help="This account will be used to value outgoing stock for the current product category using cost price"), help="This account will be used to value outgoing stock for the current product category using cost price"),
@ -61,7 +58,6 @@ class product_template(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Price Difference Account", string="Price Difference Account",
method=True,
view_load=True, view_load=True,
help="This account will be used to value price difference between purchase price and cost price."), help="This account will be used to value price difference between purchase price and cost price."),
@ -71,7 +67,6 @@ class product_template(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Income Account", string="Income Account",
method=True,
view_load=True, view_load=True,
help="This account will be used to value outgoing stock for the current product category using sale price"), help="This account will be used to value outgoing stock for the current product category using sale price"),
'property_account_expense': fields.property( 'property_account_expense': fields.property(
@ -79,7 +74,6 @@ class product_template(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Expense Account", string="Expense Account",
method=True,
view_load=True, view_load=True,
help="This account will be used to value outgoing stock for the current product category using cost price"), help="This account will be used to value outgoing stock for the current product category using cost price"),

View File

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

View File

@ -161,7 +161,7 @@ class account_invoice_line(osv.osv):
('break','Page Break'),] ('break','Page Break'),]
,'Type', select=True, required=True), ,'Type', select=True, required=True),
'sequence': fields.integer('Sequence Number', help="Gives the sequence order when displaying a list of invoice lines."), '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): def _default_account(self, cr, uid, context=None):

View File

@ -42,7 +42,7 @@ class Invoice(osv.osv):
return res return res
_columns = { _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', type='float', string='Amount to be paid',
help='The amount which should be paid at the current date\n' \ help='The amount which should be paid at the current date\n' \
'minus the amount which is already in payment order'), 'minus the amount which is already in payment order'),

View File

@ -111,7 +111,7 @@ class account_move_line(osv.osv):
return line2bank return line2bank
_columns = { _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), 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, ('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\'.'), 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)]}), '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)]}), 'user_id': fields.many2one('res.users', 'User', required=True, states={'done': [('readonly', True)]}),
'date_prefered': fields.selection([ 'date_prefered': fields.selection([
('now', 'Directly'), ('now', 'Directly'),
@ -344,14 +344,14 @@ class payment_line(osv.osv):
ondelete='cascade', select=True), ondelete='cascade', select=True),
'partner_id': fields.many2one('res.partner', string="Partner", required=True, help='The Ordering Customer'), 'partner_id': fields.many2one('res.partner', string="Partner", required=True, help='The Ordering Customer'),
'amount': fields.function(_amount, string='Amount in Company Currency', 'amount': fields.function(_amount, string='Amount in Company Currency',
method=True, type='float', type='float',
help='Payment amount in the company currency'), help='Payment amount in the company currency'),
'ml_date_created': fields.function(_get_ml_created_date, string="Effective Date", 'ml_date_created': fields.function(_get_ml_created_date, string="Effective Date",
method=True, type='date', help="Invoice Effective Date"), type='date', help="Invoice Effective Date"),
'ml_maturity_date': fields.function(_get_ml_maturity_date, method=True, type='date', string='Due Date'), 'ml_maturity_date': fields.function(_get_ml_maturity_date, type='date', string='Due Date'),
'ml_inv_ref': fields.function(_get_ml_inv_ref, method=True, type='many2one', relation='account.invoice', string='Invoice Ref.'), '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", method=True, type="text", help='Address of the Main Partner'), '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", method=True, type="text", help='Address of the Ordering Customer.'), '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"), '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), 'create_date': fields.datetime('Created', readonly=True),
'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True), 'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True),

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)]}), '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)]}), '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)]}), '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 = { _defaults = {
'period_id': _get_period, 'period_id': _get_period,
@ -845,8 +845,8 @@ class account_voucher_line(osv.osv):
'move_line_id': fields.many2one('account.move.line', 'Journal Item'), '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_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), '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_original': fields.function(_compute_balance, 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_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), 'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),
} }
_defaults = { _defaults = {
@ -991,7 +991,7 @@ class account_bank_statement_line(osv.osv):
_columns = { _columns = {
'amount_reconciled': fields.function(_amount_reconciled, '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'), 'voucher_id': fields.many2one('account.voucher', 'Payment'),
} }

View File

@ -149,18 +149,18 @@ class account_analytic_account(osv.osv):
_columns = { _columns = {
'name': fields.char('Account Name', size=128, required=True), '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), '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.'), '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'), 'description': fields.text('Description'),
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2), 'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'), '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'), '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')), '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, method=True, type='float', string='Debit', 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, method=True, type='float', string='Credit', 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, method=True, type='float', string='Quantity', multi='debit_credit_bal_qtty'), '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.'), 'quantity_max': fields.float('Maximum Quantity', help='Sets the higher limit of quantity of hours.'),
'partner_id': fields.many2one('res.partner', 'Partner'), 'partner_id': fields.many2one('res.partner', 'Partner'),
'contact_id': fields.many2one('res.partner.address', 'Contact'), '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* 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* 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\'.'), \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 = { store = {
'res.company': (_get_analytic_account, ['currency_id'], 10), 'res.company': (_get_analytic_account, ['currency_id'], 10),
}, string='Currency', type='many2one', relation='res.currency'), }, string='Currency', type='many2one', relation='res.currency'),

View File

@ -240,10 +240,10 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
_columns = { _columns = {
'name': fields.char(size='64', string='File Name'), '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_export': fields.binary(string='Export'),
'file_import': fields.binary(string='Import'), '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'), '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" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\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" "Last-Translator: Gustavo T <Unknown>\n"
"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n" "Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-05-21 05:02+0000\n" "X-Launchpad-Export-Date: 2011-07-03 04:47+0000\n"
"X-Generator: Launchpad (build 12959)\n" "X-Generator: Launchpad (build 13168)\n"
#. module: anonymization #. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard #: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard
@ -25,7 +25,7 @@ msgstr "ir.model.fields.anonymize.wizard"
#. module: anonymization #. module: anonymization
#: field:ir.model.fields.anonymization,field_name:0 #: field:ir.model.fields.anonymization,field_name:0
msgid "Field Name" msgid "Field Name"
msgstr "Nome do Campo" msgstr "Nome do campo"
#. module: anonymization #. module: anonymization
#: field:ir.model.fields.anonymization,field_id:0 #: field:ir.model.fields.anonymization,field_id:0
@ -138,7 +138,7 @@ msgstr "Limpar"
#. module: anonymization #. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0 #: selection:ir.model.fields.anonymization.history,direction:0
msgid "clear -> anonymized" msgid "clear -> anonymized"
msgstr "" msgstr "em branco -> anonimizado"
#. module: anonymization #. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0 #: view:ir.model.fields.anonymize.wizard:0
@ -149,7 +149,7 @@ msgstr "Resumo"
#. module: anonymization #. module: anonymization
#: view:ir.model.fields.anonymization:0 #: view:ir.model.fields.anonymization:0
msgid "Anonymized Field" msgid "Anonymized Field"
msgstr "" msgstr "Campo Anonimizado"
#. module: anonymization #. module: anonymization
#: model:ir.module.module,description:anonymization.module_meta_information #: model:ir.module.module,description:anonymization.module_meta_information
@ -158,6 +158,9 @@ msgid ""
"This module allows you to anonymize a database.\n" "This module allows you to anonymize a database.\n"
" " " "
msgstr "" msgstr ""
"\n"
"Este módulo permite que você anonimize um banco de dados\n"
" "
#. module: anonymization #. module: anonymization
#: selection:ir.model.fields.anonymize.wizard,state:0 #: 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 #: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymize_wizard
#: view:ir.model.fields.anonymize.wizard:0 #: view:ir.model.fields.anonymize.wizard:0
msgid "Anonymize Database" msgid "Anonymize Database"
msgstr "" msgstr "Anonimizar Banco de Dados"
#. module: anonymization #. module: anonymization
#: field:ir.model.fields.anonymize.wizard,name:0 #: field:ir.model.fields.anonymize.wizard,name:0
@ -206,21 +209,21 @@ msgstr "Nome do Arquivo"
#. module: anonymization #. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0 #: selection:ir.model.fields.anonymization.history,direction:0
msgid "anonymized -> clear" msgid "anonymized -> clear"
msgstr "" msgstr "anonimizado -> em branco"
#. module: anonymization #. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0 #: selection:ir.model.fields.anonymization.history,state:0
msgid "Started" msgid "Started"
msgstr "" msgstr "Iniciada"
#. module: anonymization #. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0 #: selection:ir.model.fields.anonymization.history,state:0
msgid "Done" msgid "Done"
msgstr "" msgstr "Concluído"
#. module: anonymization #. module: anonymization
#: view:ir.model.fields.anonymization.history:0 #: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,msg:0 #: field:ir.model.fields.anonymization.history,msg:0
#: field:ir.model.fields.anonymize.wizard,msg:0 #: field:ir.model.fields.anonymize.wizard,msg:0
msgid "Message" msgid "Message"
msgstr "" msgstr "Mensagem"

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"), '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_income': fields.many2one('account.account', 'Income Account', required=True),
'acc_expense': fields.many2one('account.account', 'Expense 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, '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\'.'), 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), '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), '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', method=True, string="Seller Invoice", type='many2many', multi=True), 'seller_invoice_history': fields.function(_get_invoice, relation='account.invoice', string="Seller Invoice", type='many2many', multi=True),
} }
_defaults = { _defaults = {
@ -382,8 +382,8 @@ class auction_lots(osv.osv):
'vnd_lim': fields.float('Seller limit'), 'vnd_lim': fields.float('Seller limit'),
'vnd_lim_net': fields.boolean('Net limit ?', readonly=True), 'vnd_lim_net': fields.boolean('Net limit ?', readonly=True),
'image': fields.binary('Image', help="Object Image"), '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_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', method=True, type='boolean', store=True, multi="paid_ach", help="When state of Buyer 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(( 'state': fields.selection((
('draft', 'Draft'), ('draft', 'Draft'),
('unsold', 'Unsold'), ('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 \'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 \'Paid\' state is used when user pay for the object \
\n* The \'Sold\' state is used when user buy 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"), 'buyer_price': fields.function(_getprice, 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"), 'seller_price': fields.function(_getprice, 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_revenue':fields.function(_getprice, 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"), 'gross_margin':fields.function(_getprice, 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"), '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"), '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_revenue':fields.function(_getprice, 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_margin':fields.function(_getprice, string='Net Margin (%)', store=True, multi="net_margin", help="(Net Revenue * 100)/ Object Price"),
} }
_defaults = { _defaults = {
'state':lambda *a: 'draft', 'state':lambda *a: 'draft',

View File

@ -341,26 +341,26 @@ class calendar_attendee(osv.osv):
help="Status of the attendee's participation"), help="Status of the attendee's participation"),
'rsvp': fields.boolean('Required Reply?', 'rsvp': fields.boolean('Required Reply?',
help="Indicats whether the favor of a reply is requested"), 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, \ string='Delegated To', type="char", size=124, store=True, \
multi='delegated_to', help="The users that the original \ multi='delegated_to', help="The users that the original \
request was delegated to"), 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'), 'Delegated From', type="char", store=True, size=124, multi='delegated_from'),
'parent_ids': fields.many2many('calendar.attendee', 'calendar_attendee_parent_rel', \ 'parent_ids': fields.many2many('calendar.attendee', 'calendar_attendee_parent_rel', \
'attendee_id', 'parent_id', 'Delegrated From'), 'attendee_id', 'parent_id', 'Delegrated From'),
'child_ids': fields.many2many('calendar.attendee', 'calendar_attendee_child_rel', \ 'child_ids': fields.many2many('calendar.attendee', 'calendar_attendee_child_rel', \
'attendee_id', 'child_id', 'Delegrated To'), '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, \ type="char", multi='sent_by', store=True, size=124, \
help="Specify the user that is acting on behalf of the calendar user"), 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'), 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), type="char", size=124, multi='cn', store=True),
'dir': fields.char('URI Reference', size=124, help="Reference to the URI\ 'dir': fields.char('URI Reference', size=124, help="Reference to the URI\
that points to the directory information corresponding to the attendee."), 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', \ type="selection", selection=_lang_get, multi='language', \
store=True, help="To specify the language for text values in a\ store=True, help="To specify the language for text values in a\
property or property parameter."), property or property parameter."),
@ -369,9 +369,9 @@ property or property parameter."),
'partner_id': fields.related('partner_address_id', 'partner_id', type='many2one', \ 'partner_id': fields.related('partner_address_id', 'partner_id', type='many2one', \
relation='res.partner', string='Partner', help="Partner related to contact"), relation='res.partner', string='Partner', help="Partner related to contact"),
'email': fields.char('Email', size=124, help="Email of Invited Person"), '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'), 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", \ string='Event End Date', type="datetime", \
multi='event_end_date'), multi='event_end_date'),
'ref': fields.reference('Event Ref', selection=_links_get, size=128), 'ref': fields.reference('Event Ref', selection=_links_get, size=128),
@ -1022,7 +1022,7 @@ class calendar_event(osv.osv):
defines the list of date/time exceptions for a recurring calendar component."), defines the list of date/time exceptions for a recurring calendar component."),
'exrule': fields.char('Exception Rule', size=352, help="Defines a \ 'exrule': fields.char('Exception Rule', size=352, help="Defines a \
rule or repeating pattern of time to exclude from the recurring rule."), rule or repeating pattern of time to exclude from the recurring rule."),
'rrule': fields.function(_get_rulestring, type='char', size=124, method=True, \ 'rrule': fields.function(_get_rulestring, type='char', size=124, \
store=True, string='Recurrent Rule'), store=True, string='Recurrent Rule'),
'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \ 'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
('weekly', 'Weekly'), ('monthly', 'Monthly'), \ ('weekly', 'Weekly'), ('monthly', 'Monthly'), \
@ -1552,7 +1552,7 @@ class calendar_todo(osv.osv):
return self.write(cr, uid, id, { 'date_start': value }, context=context) return self.write(cr, uid, id, { 'date_start': value }, context=context)
_columns = { _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'), string='Duration', store=True, type='datetime'),
'duration': fields.integer('Duration'), 'duration': fields.integer('Duration'),
} }
@ -1750,7 +1750,7 @@ class res_users(osv.osv):
_columns = { _columns = {
'availability': fields.function(_get_user_avail_fun, type='selection', \ 'availability': fields.function(_get_user_avail_fun, type='selection', \
selection=[('free', 'Free'), ('busy', 'Busy')], \ selection=[('free', 'Free'), ('busy', 'Busy')], \
string='Free/Busy', method=True), string='Free/Busy'),
} }
res_users() res_users()

View File

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

View File

@ -163,7 +163,7 @@ class users(osv.osv):
# an existing column cannot be downsized; thus we use the original # an existing column cannot be downsized; thus we use the original
# column size. # column size.
'password': fields.function(get_pw, fnct_inv=set_pw, type='char', 'password': fields.function(get_pw, fnct_inv=set_pw, type='char',
method=True, size=64, string='Password', invisible=True, size=64, string='Password', invisible=True,
store=True), store=True),
} }

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'), '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'), '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'), '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'), '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), 'menu_id': fields.many2one('ir.ui.menu', "Menu", readonly=True),
} }

View File

@ -0,0 +1,289 @@
# Vietnamese 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-06 04:09+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Vietnamese <vi@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-06 04:34+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 ""
#. module: base_synchro
#: field:base.synchro.server,server_db:0
msgid "Server Database"
msgstr ""
#. module: base_synchro
#: view:base.synchro.server:0
#: model:ir.model,name:base_synchro.model_base_synchro_server
msgid "Synchronized server"
msgstr ""
#. module: base_synchro
#: field:base.synchro.obj.avoid,name:0
msgid "Field Name"
msgstr ""
#. module: base_synchro
#: field:base.synchro.obj,synchronize_date:0
msgid "Latest Synchronization"
msgstr ""
#. module: base_synchro
#: field:base.synchro,user_id:0
msgid "Send Result To"
msgstr ""
#. module: base_synchro
#: model:ir.model,name:base_synchro.model_base_synchro_obj_avoid
msgid "Fields to not synchronize"
msgstr ""
#. module: base_synchro
#: view:base.synchro:0
msgid "_Close"
msgstr ""
#. module: base_synchro
#: view:base.synchro:0
msgid "Transfer Data To Server"
msgstr ""
#. module: base_synchro
#: model:ir.model,name:base_synchro.model_base_synchro_obj
msgid "Register Class"
msgstr ""
#. 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 ""
#. module: base_synchro
#: field:base.synchro.server,obj_ids:0
msgid "Models"
msgstr ""
#. 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 ""
#. module: base_synchro
#: field:base.synchro.server,login:0
msgid "User Name"
msgstr ""
#. module: base_synchro
#: view:base.synchro.obj:0
#: view:base.synchro.obj.line:0
msgid "Group By"
msgstr ""
#. module: base_synchro
#: selection:base.synchro.obj,action:0
msgid "Upload"
msgstr ""
#. module: base_synchro
#: view:base.synchro.obj:0
msgid "Latest synchronization"
msgstr ""
#. module: base_synchro
#: model:ir.module.module,description:base_synchro.module_meta_information
msgid "Synchronization with all objects."
msgstr ""
#. module: base_synchro
#: view:base.synchro.obj.line:0
#: field:base.synchro.obj.line,name:0
msgid "Date"
msgstr ""
#. module: base_synchro
#: field:base.synchro.server,password:0
msgid "Password"
msgstr ""
#. module: base_synchro
#: field:base.synchro.obj,avoid_ids:0
msgid "Fields Not Sync."
msgstr ""
#. module: base_synchro
#: selection:base.synchro.obj,action:0
msgid "Both"
msgstr ""
#. module: base_synchro
#: field:base.synchro.obj,name:0
msgid "Name"
msgstr ""
#. module: base_synchro
#: view:base.synchro.obj:0
msgid "Fields"
msgstr ""
#. module: base_synchro
#: view:base.synchro.obj.line:0
msgid "Transfered Ids Details"
msgstr ""
#. module: base_synchro
#: field:base.synchro.obj,action:0
msgid "Synchronisation direction"
msgstr ""
#. module: base_synchro
#: field:base.synchro.obj,server_id:0
msgid "Server"
msgstr ""
#. 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 ""
#. module: base_synchro
#: field:base.synchro.obj,active:0
msgid "Active"
msgstr ""
#. module: base_synchro
#: view:base.synchro.obj:0
#: field:base.synchro.obj,model_id:0
msgid "Object to synchronize"
msgstr ""
#. module: base_synchro
#: model:ir.module.module,shortdesc:base_synchro.module_meta_information
msgid "Base Synchro"
msgstr ""
#. 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 ""
#. module: base_synchro
#: view:base.synchro.obj:0
msgid "Transfer Details"
msgstr ""
#. module: base_synchro
#: field:base.synchro.obj.line,remote_id:0
msgid "Remote Id"
msgstr ""
#. module: base_synchro
#: field:base.synchro.obj,line_id:0
msgid "Ids Affected"
msgstr ""
#. module: base_synchro
#: model:ir.ui.menu,name:base_synchro.next_id_63
msgid "History"
msgstr ""
#. 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 ""
#. module: base_synchro
#: field:base.synchro.obj,domain:0
msgid "Domain"
msgstr ""
#. 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 ""
#. module: base_synchro
#: field:base.synchro.obj,sequence:0
msgid "Sequence"
msgstr ""
#. module: base_synchro
#: view:base.synchro:0
msgid ""
"The synchronisation has been started.You will receive a request when it's "
"done."
msgstr ""
#. module: base_synchro
#: field:base.synchro.server,server_port:0
msgid "Server Port"
msgstr ""
#. module: base_synchro
#: model:ir.ui.menu,name:base_synchro.menu_action_view_base_synchro
msgid "Synchronize objects"
msgstr ""
#. module: base_synchro
#: view:base.synchro:0
msgid "Synchronization Complited!"
msgstr ""
#. 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 ""
#. 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 ""
#. module: base_synchro
#: selection:base.synchro.obj,action:0
msgid "Download"
msgstr ""
#. module: base_synchro
#: field:base.synchro,server_url:0
#: field:base.synchro.server,server_url:0
msgid "Server URL"
msgstr ""

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 _ from tools.translate import _
class caldav_browse(osv.osv_memory): class caldav_browse(osv.osv_memory):
__doc = { __doc = {
'other' : _(""" 'other' : _("""
* Webdav server that provides remote access to calendar * Webdav server that provides remote access to calendar
* Synchronisation of calendar using WebDAV * 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 HOSTNAME: Host on which OpenERP server(With webdav) is running
PORT : Port on which OpenERP server is running (By Default : 8069) PORT : Port on which OpenERP server is running (By Default : 8069)
DATABASE_NAME: Name of database on which OpenERP Calendar is created DATABASE_NAME: Name of database on which OpenERP Calendar is created
CALENDAR_NAME: Name of calendar to access
"""), """),
'iphone' : _(""" 'iphone' : _("""
For SSL specific configuration see the documentation below For SSL specific configuration see the documentation below
@ -60,7 +56,7 @@ Now, to setup the calendars, you need to:
3. Click on "Other" 3. Click on "Other"
4. From the "Calendars" group, select "Add CalDAV Account" 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) (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 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" 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 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. 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: 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 Note that when creating a new calendar entry, you will have to specify
which calendar it should be saved at. which calendar it should be saved at.
IF you need SSL (and your certificate is not a verified one, as usual), 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 then you first will need to let the iPhone trust that. Follow these
steps: steps:
@ -99,13 +93,13 @@ steps:
is the default 8071) is the default 8071)
s2. Safari will try to connect and issue a warning about the certificate s2. Safari will try to connect and issue a warning about the certificate
used. Inspect the certificate and click "Accept" so that iPhone used. Inspect the certificate and click "Accept" so that iPhone
now trusts it. now trusts it.
"""), """),
'android' : _(""" 'android' : _("""
Prerequire Prerequire
---------- ----------
There is no buit-in way to synchronize calendar with caldav. 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 for now it's the only one
configuration configuration
@ -114,7 +108,7 @@ configuration
1. Open Calendar Sync 1. Open Calendar Sync
I'll get an interface with 2 tabs I'll get an interface with 2 tabs
Stay on the first one 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) 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 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" 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. 5. Then you can synchronize manually or custom the settings to synchronize every x minutes.
"""), """),
'evolution' : _(""" 'evolution' : _("""
@ -130,7 +124,7 @@ configuration
2. File -> New -> Calendar 2. File -> New -> Calendar
3. Fill the form 3. Fill the form
- type : CalDav - type : CalDav
- name : Whaterver you want (ie : Meeting) - 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 - 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 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' : _(""" 'thunderbird' : _("""
Prerequire Prerequire
---------- ----------
@ -161,7 +154,7 @@ configuration
4. for format choose CalDav 4. for format choose CalDav
and as location the url given above (ie : http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings) 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" 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" 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 7. Then Finish, your meetings should appear now in your calendar view
"""), """),
} }
_name = 'caldav.browse' _name = 'caldav.browse'
_description = 'Caldav Browse' _description = 'Caldav Browse'
@ -181,55 +172,48 @@ configuration
} }
def default_get(self, cr, uid, fields, context=None): 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 = {} res = {}
host = '' host = context.get('host')
port = '' port = ''
prefix = 'http://' prefix = 'http://'
if not config.get('xmlrpc'): if not config.get('xmlrpc'):
if not config.get('netrpc'): if not config.get('netrpc'):
prefix = 'https://' prefix = 'https://'
host = config.get('xmlrpcs_interface', None)
port = config.get('xmlrpcs_port', 8071) port = config.get('xmlrpcs_port', 8071)
else: else:
host = config.get('netrpc_interface', None) port = config.get('netrpc_port',8070)
port = config.get('netrpc_port',8070) else:
else:
host = config.get('xmlrpc_interface', None)
port = config.get('xmlrpc_port',8069) port = config.get('xmlrpc_port',8069)
if host == '' or None:
host = 'localhost'
port = 8069
if not config.get_misc('webdav','enable',True): if not config.get_misc('webdav','enable',True):
raise Exception("WebDAV is disabled, cannot continue") raise Exception("WebDAV is disabled, cannot continue")
user_pool = self.pool.get('res.users') user_pool = self.pool.get('res.users')
current_user = user_pool.browse(cr, uid, uid, context=context) 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 #TODO write documentation
res['description'] = self.__doc['other'] res['description'] = self.__doc['other']
if pref_ids: if pref_ids:
pref_ids = pref_ids[0] pref_ids = pref_ids[0]
if pref_ids.device == 'iphone': if pref_ids.device == 'iphone':
url = host + ':' + str(port) + '/'+ pref_ids.service + '/' + cr.dbname + '/'+'calendars/' url = host + ':' + str(port) + '/'+ pref_ids.service + '/' + cr.dbname + '/'+'calendars/'
else : else :
url = host + ':' + str(port) + '/'+ pref_ids.service + '/' + cr.dbname + '/'+'calendars/'+ 'users/'+ current_user.login + '/'+ pref_ids.collection.name+ '/'+ pref_ids.calendar.name 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']) res['description'] = self.__doc.get(pref_ids.device , self.__doc['other'])
file = open(addons.get_module_resource('caldav','doc', 'caldav_doc.pdf'),'rb') file = open(addons.get_module_resource('caldav','doc', 'caldav_doc.pdf'),'rb')
res['caldav_doc_file'] = base64.encodestring(file.read()) res['caldav_doc_file'] = base64.encodestring(file.read())
#res['doc_link'] = 'http://doc.openerp.com/' #res['doc_link'] = 'http://doc.openerp.com/'
res['url'] = prefix+url res['url'] = prefix+url
return res return res
def browse_caldav(self, cr, uid, ids, context): def browse_caldav(self, cr, uid, ids, context):
return {} return {}
caldav_browse() caldav_browse()
class user_preference(osv.osv_memory): class user_preference(osv.osv_memory):
_name = 'user.preference' _name = 'user.preference'
_description = 'User preference Form' _description = 'User preference Form'
@ -238,32 +222,39 @@ class user_preference(osv.osv_memory):
'calendar' :fields.many2one('basic.calendar', 'Calendar', required=True), 'calendar' :fields.many2one('basic.calendar', 'Calendar', required=True),
'service': fields.selection([('webdav','CalDAV')], "Services"), 'service': fields.selection([('webdav','CalDAV')], "Services"),
'device' : fields.selection([('other', 'Other'), ('iphone', 'iPhone'), ('android', 'Android based device'),('thunderbird', 'Sunbird/Thunderbird'), ('evolution','Evolution')], "Software/Devices"), '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): def _get_default_calendar(self, cr, uid, context):
if context == None: if context == None:
context = {} context = {}
name = context.get('cal_name') name = context.get('cal_name')
collection_obj = self.pool.get('basic.calendar') collection_obj = self.pool.get('basic.calendar')
ids = collection_obj.search(cr, uid, [('name', '=', name)]) ids = collection_obj.search(cr, uid, [('name', '=', name)])
return ids[0] return ids[0]
def _get_default_collection(self, cr, uid, context): def _get_default_collection(self, cr, uid, context):
collection_obj = self.pool.get('document.directory') collection_obj = self.pool.get('document.directory')
ids = collection_obj.search(cr, uid, [('name', '=', 'c')]) ids = collection_obj.search(cr, uid, [('name', '=', 'c')])
return ids[0] 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={ _defaults={
'service': 'webdav', 'service': 'webdav',
'collection' : _get_default_collection, 'collection' : _get_default_collection,
'calendar' : _get_default_calendar, 'calendar' : _get_default_calendar,
'device' : 'other', 'device' : 'other',
'host_name':_get_default_host
}
}
def open_window(self, cr, uid, ids, context=None): def open_window(self, cr, uid, ids, context=None):
obj_model = self.pool.get('ir.model.data') obj_model = self.pool.get('ir.model.data')
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','caldav_Browse')]) 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', 'target': 'new',
'context': context, '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() user_preference()

View File

@ -11,19 +11,39 @@
<group colspan="4" width="700" height="500"> <group colspan="4" width="700" height="500">
<separator string="Browse caldav" colspan="4"/> <separator string="Browse caldav" colspan="4"/>
<field name="url" colspan="4" /> <field name="url" colspan="4" />
<separator string="Description" colspan="4"/> <separator string="Description" colspan="4"/>
<field name="description" colspan="4" nolabel="1"/> <field name="description" colspan="4" nolabel="1"/>
<separator colspan="4"/> <separator colspan="4"/>
<group col="4" colspan="4"> <group col="4" colspan="4">
<label string="" colspan="2"/> <label string="" colspan="2"/>
<button special="cancel" string="_Close" icon="gtk-close"/> <button special="cancel" string="_Close" icon="gtk-close"/>
</group> </group>
</group> </group>
</form> </form>
</field> </field>
</record> </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"> <record id="user_prefernce_form" model="ir.ui.view">
<field name="name">user_preference</field> <field name="name">user_preference</field>
<field name="model">user.preference</field> <field name="model">user.preference</field>

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

@ -682,7 +682,7 @@ class crm_case_section(osv.osv):
_columns = { _columns = {
'name': fields.char('Sales Team', size=64, required=True, translate=True), '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), 'code': fields.char('Code', size=8),
'active': fields.boolean('Active', help="If the active field is set to "\ '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."), "true, it will allow you to hide the sales team without removing it."),

View File

@ -161,16 +161,16 @@ class crm_lead(crm_case, osv.osv):
'referred': fields.char('Referred By', size=64), 'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True), 'date_open': fields.datetime('Opened', readonly=True),
'day_open': fields.function(_compute_day, string='Days to Open', \ 'day_open': fields.function(_compute_day, string='Days to Open', \
method=True, multi='day_open', type="float", store=True), multi='day_open', type="float", store=True),
'day_close': fields.function(_compute_day, string='Days to Close', \ 'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="float", store=True), multi='day_close', type="float", store=True),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True, 'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\ help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\ \nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\ \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\'.'), \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)]), '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),
} }
@ -345,7 +345,7 @@ class crm_lead(crm_case, osv.osv):
""" """
mailgate_pool = self.pool.get('email.server.tools') mailgate_pool = self.pool.get('email.server.tools')
subject = msg.get('subject') subject = msg.get('subject') or _("No Subject")
body = msg.get('body') body = msg.get('body')
msg_from = msg.get('from') msg_from = msg.get('from')
priority = msg.get('priority') priority = msg.get('priority')

View File

@ -105,7 +105,7 @@
</group> </group>
<group colspan="2" col="3"> <group colspan="2" col="3">
<separator string="Communication" colspan="4" col="3"/> <separator string="Communication" colspan="4" col="3"/>
<field name="email_from" widget="email"/><button string="Send Email" <field name="email_from" widget="email"/><button string="Mail"
name="%(crm.action_crm_send_mail)d" name="%(crm.action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.lead'}" context="{'mail':'new', 'model': 'crm.lead'}"
icon="terp-mail-message-new" type="action" colspan="1"/> icon="terp-mail-message-new" type="action" colspan="1"/>

View File

@ -125,7 +125,7 @@ class calendar_attendee(osv.osv):
return result return result
_columns = { _columns = {
'categ_id': fields.function(_compute_data, method=True, \ 'categ_id': fields.function(_compute_data, \
string='Event Type', type="many2one", \ string='Event Type', type="many2one", \
relation="crm.case.categ", multi='categ_id'), relation="crm.case.categ", multi='categ_id'),
} }
@ -138,16 +138,19 @@ class res_users(osv.osv):
def create(self, cr, uid, data, context=None): def create(self, cr, uid, data, context=None):
user_id = super(res_users, self).create(cr, uid, data, context=context) user_id = super(res_users, self).create(cr, uid, data, context=context)
data_obj = self.pool.get('ir.model.data')
try: # add shortcut unless 'noshortcut' is True in context
data_id = data_obj._get_id(cr, uid, 'crm', 'ir_ui_view_sc_calendar0') if not(context and context.get('noshortcut', False)):
view_id = data_obj.browse(cr, uid, data_id, context=context).res_id data_obj = self.pool.get('ir.model.data')
self.pool.get('ir.ui.view_sc').copy(cr, uid, view_id, default = { try:
'user_id': user_id}, context=context) data_id = data_obj._get_id(cr, uid, 'crm', 'ir_ui_view_sc_calendar0')
except: view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
# Tolerate a missing shortcut. See product/product.py for similar code. self.pool.get('ir.ui.view_sc').copy(cr, uid, view_id, default = {
logging.getLogger('orm').debug('Skipped meetings shortcut for user "%s"', data.get('name','<new')) 'user_id': user_id}, context=context)
except:
# Tolerate a missing shortcut. See product/product.py for similar code.
logging.getLogger('orm').debug('Skipped meetings shortcut for user "%s"', data.get('name','<new'))
return user_id return user_id
res_users() res_users()

View File

@ -59,7 +59,7 @@
colspan="1" /> colspan="1" />
<group col="3" colspan="2"> <group col="3" colspan="2">
<field name="email_from" string="Email" /> <field name="email_from" string="Email" />
<button string="Send Email" <button string="Mail"
name="%(crm.action_crm_send_mail)d" name="%(crm.action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.lead'}" context="{'mail':'new', 'model': 'crm.lead'}"
icon="terp-mail-message-new" type="action" /> icon="terp-mail-message-new" type="action" />

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2011-04-11 11:33+0000\n" "PO-Revision-Date: 2011-07-01 15:43+0000\n"
"Last-Translator: lky <Unknown>\n" "Last-Translator: hifly <Unknown>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:00+0000\n" "X-Launchpad-Export-Date: 2011-07-02 05:06+0000\n"
"X-Generator: Launchpad (build 12758)\n" "X-Generator: Launchpad (build 13168)\n"
#. module: crm #. module: crm
#: view:crm.lead.report:0 #: view:crm.lead.report:0
@ -36,12 +36,12 @@ msgstr "需要服务"
#. module: crm #. module: crm
#: selection:crm.meeting,rrule_type:0 #: selection:crm.meeting,rrule_type:0
msgid "Monthly" msgid "Monthly"
msgstr "月" msgstr "月"
#. module: crm #. module: crm
#: view:crm.opportunity2phonecall:0 #: view:crm.opportunity2phonecall:0
msgid "Schedule a PhoneCall" msgid "Schedule a PhoneCall"
msgstr "安排一电话访问" msgstr "安排一电话访问"
#. module: crm #. module: crm
#: model:ir.model,name:crm.model_crm_case_stage #: model:ir.model,name:crm.model_crm_case_stage
@ -67,7 +67,7 @@ msgstr "显示为"
#: field:crm.meeting,day:0 #: field:crm.meeting,day:0
#: selection:crm.meeting,select1:0 #: selection:crm.meeting,select1:0
msgid "Date of month" msgid "Date of month"
msgstr "月的天数" msgstr "每月的指定日期"
#. module: crm #. module: crm
#: view:crm.lead:0 #: view:crm.lead:0
@ -124,10 +124,10 @@ msgid "The code of the sales team must be unique !"
msgstr "销售团队编码必须唯一!" msgstr "销售团队编码必须唯一!"
#. module: crm #. module: crm
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:93 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:95
#, python-format #, python-format
msgid "Lead '%s' has been converted to an opportunity." msgid "Lead '%s' has been converted to an opportunity."
msgstr "线索'%s'已转化商机" msgstr "线索'%s'已转化商机"
#. module: crm #. module: crm
#: code:addons/crm/crm_lead.py:228 #: code:addons/crm/crm_lead.py:228
@ -141,8 +141,8 @@ msgid "No Repeat"
msgstr "不重复" msgstr "不重复"
#. module: crm #. module: crm
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:133 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:135
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:258 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:260
#: code:addons/crm/wizard/crm_lead_to_partner.py:55 #: code:addons/crm/wizard/crm_lead_to_partner.py:55
#: code:addons/crm/wizard/crm_phonecall_to_partner.py:52 #: code:addons/crm/wizard/crm_phonecall_to_partner.py:52
#, python-format #, python-format
@ -152,7 +152,7 @@ msgstr "警告!"
#. module: crm #. module: crm
#: selection:crm.meeting,rrule_type:0 #: selection:crm.meeting,rrule_type:0
msgid "Yearly" msgid "Yearly"
msgstr "年" msgstr "年"
#. module: crm #. module: crm
#: field:crm.segmentation.line,name:0 #: field:crm.segmentation.line,name:0
@ -172,7 +172,7 @@ msgstr "营销活动"
#. module: crm #. module: crm
#: selection:crm.lead2opportunity.partner,action:0 #: selection:crm.lead2opportunity.partner,action:0
msgid "Do not create a partner" msgid "Do not create a partner"
msgstr "不能创建业务伙伴" msgstr "不能创建业务伙伴"
#. module: crm #. module: crm
#: view:crm.lead:0 #: view:crm.lead:0
@ -184,7 +184,7 @@ msgstr "搜索商机"
#, python-format #, python-format
msgid "" msgid ""
"Opportunity must have Partner assigned before merging with other Opportunity." "Opportunity must have Partner assigned before merging with other Opportunity."
msgstr "必须要为商机选择一个业务伙伴才能进行商机合并." msgstr "必须为商机选择业务伙伴才能和其它商机合并."
#. module: crm #. module: crm
#: code:addons/crm/wizard/crm_merge_opportunities.py:46 #: code:addons/crm/wizard/crm_merge_opportunities.py:46
@ -536,9 +536,9 @@ msgstr "第一次与新的潜在客户接触"
#. module: crm #. module: crm
#: code:addons/crm/crm_lead.py:278 #: code:addons/crm/crm_lead.py:278
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:195 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:197
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:229 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:231
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:297 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:299
#: view:crm.lead2opportunity:0 #: view:crm.lead2opportunity:0
#: view:crm.partner2opportunity:0 #: view:crm.partner2opportunity:0
#: model:ir.actions.act_window,name:crm.action_crm_lead2opportunity #: model:ir.actions.act_window,name:crm.action_crm_lead2opportunity
@ -597,7 +597,7 @@ msgstr "销售FAQ"
#. module: crm #. module: crm
#: model:ir.model,name:crm.model_crm_send_mail_attachment #: model:ir.model,name:crm.model_crm_send_mail_attachment
msgid "crm.send.mail.attachment" msgid "crm.send.mail.attachment"
msgstr "" msgstr "crm.send.mail.attachment"
#. module: crm #. module: crm
#: selection:crm.lead.report,month:0 #: selection:crm.lead.report,month:0
@ -805,8 +805,8 @@ msgid "Statistics Dashboard"
msgstr "统计控制台" msgstr "统计控制台"
#. module: crm #. module: crm
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:86 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:88
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:96 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:98
#: code:addons/crm/wizard/crm_partner_to_opportunity.py:101 #: code:addons/crm/wizard/crm_partner_to_opportunity.py:101
#: code:addons/crm/wizard/crm_phonecall_to_opportunity.py:117 #: code:addons/crm/wizard/crm_phonecall_to_opportunity.py:117
#: view:crm.lead:0 #: view:crm.lead:0
@ -870,7 +870,7 @@ msgstr "事件类型"
#. module: crm #. module: crm
#: model:ir.model,name:crm.model_crm_installer #: model:ir.model,name:crm.model_crm_installer
msgid "crm.installer" msgid "crm.installer"
msgstr "" msgstr "crm.installer"
#. module: crm #. module: crm
#: field:crm.segmentation,exclusif:0 #: field:crm.segmentation,exclusif:0
@ -1099,7 +1099,7 @@ msgstr "订阅"
#. module: crm #. module: crm
#: code:addons/crm/crm_opportunity.py:208 #: code:addons/crm/crm_opportunity.py:208
#: code:addons/crm/crm_phonecall.py:184 #: code:addons/crm/crm_phonecall.py:185
#: code:addons/crm/wizard/crm_phonecall_to_meeting.py:55 #: code:addons/crm/wizard/crm_phonecall_to_meeting.py:55
#: code:addons/crm/wizard/crm_phonecall_to_meeting.py:137 #: code:addons/crm/wizard/crm_phonecall_to_meeting.py:137
#: view:crm.meeting:0 #: view:crm.meeting:0
@ -2610,7 +2610,7 @@ msgid "Meeting Type"
msgstr "会议类型" msgstr "会议类型"
#. module: crm #. module: crm
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:312 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:314
#, python-format #, python-format
msgid "Merge with Existing Opportunity" msgid "Merge with Existing Opportunity"
msgstr "合并现有的商机" msgstr "合并现有的商机"
@ -3128,8 +3128,8 @@ msgid "Schedule Call"
msgstr "计划的电话访问" msgstr "计划的电话访问"
#. module: crm #. module: crm
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:133 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:135
#: code:addons/crm/wizard/crm_lead_to_opportunity.py:258 #: code:addons/crm/wizard/crm_lead_to_opportunity.py:260
#, python-format #, python-format
msgid "Closed/Cancelled Leads Could not convert into Opportunity" msgid "Closed/Cancelled Leads Could not convert into Opportunity"
msgstr "已结束/已取消的线索不能转换为商机" msgstr "已结束/已取消的线索不能转换为商机"

View File

@ -5,7 +5,7 @@
<field name="name">Caldav Browse</field> <field name="name">Caldav Browse</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">user.preference</field> <field name="res_model">user.preference</field>
<field name="view_id" ref="caldav.user_prefernce_form"/> <field name="view_id" ref="caldav.host_prefernce_form"/>
<field name="context">{'cal_name' : 'Meetings'}</field> <field name="context">{'cal_name' : 'Meetings'}</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">form</field> <field name="view_mode">form</field>

View File

@ -181,7 +181,7 @@ class crm_claim(crm.crm_case, osv.osv):
""" """
mailgate_pool = self.pool.get('email.server.tools') mailgate_pool = self.pool.get('email.server.tools')
subject = msg.get('subject') subject = msg.get('subject') or _("No Subject")
body = msg.get('body') body = msg.get('body')
msg_from = msg.get('from') msg_from = msg.get('from')
priority = msg.get('priority') priority = msg.get('priority')

View File

@ -24,6 +24,7 @@ from osv import fields, osv
import time import time
import binascii import binascii
import tools import tools
from tools.translate import _
CRM_HELPDESK_STATES = ( CRM_HELPDESK_STATES = (
crm.AVAILABLE_STATES[2][0], # Cancelled crm.AVAILABLE_STATES[2][0], # Cancelled
@ -104,7 +105,7 @@ class crm_helpdesk(crm.crm_case, osv.osv):
""" """
mailgate_pool = self.pool.get('email.server.tools') mailgate_pool = self.pool.get('email.server.tools')
subject = msg.get('subject') subject = msg.get('subject') or _("No Subject")
body = msg.get('body') body = msg.get('body')
msg_from = msg.get('from') msg_from = msg.get('from')
priority = msg.get('priority') priority = msg.get('priority')

View File

@ -65,14 +65,13 @@ class delivery_carrier(osv.osv):
'partner_id': fields.many2one('res.partner', 'Carrier Partner', required=True), 'partner_id': fields.many2one('res.partner', 'Carrier Partner', required=True),
'product_id': fields.many2one('product.product', 'Delivery Product', required=True), 'product_id': fields.many2one('product.product', 'Delivery Product', required=True),
'grids_id': fields.one2many('delivery.grid', 'carrier_id', 'Delivery Grids'), 'grids_id': fields.one2many('delivery.grid', 'carrier_id', 'Delivery Grids'),
'price' : fields.function(get_price, method=True,string='Price'), 'price' : fields.function(get_price, string='Price'),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the delivery carrier without removing it."), 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the delivery carrier without removing it."),
'normal_price': fields.float('Normal Price'), 'normal_price': fields.float('Normal Price'),
'free_if_more_than': fields.boolean('Free If More Than'), 'free_if_more_than': fields.boolean('Free If More Than'),
'amount': fields.float('Amount'), 'amount': fields.float('Amount'),
'use_detailed_pricelist': fields.boolean('Use Detailed Pricelist'), 'use_detailed_pricelist': fields.boolean('Use Detailed Pricelist'),
'pricelist_ids': fields.one2many('delivery.grid', 'carrier_id', 'Price List'), 'pricelist_ids': fields.one2many('delivery.grid', 'carrier_id', 'Price List'),
} }
_defaults = { _defaults = {

View File

@ -29,7 +29,6 @@ class res_partner(osv.osv):
type='many2one', type='many2one',
relation='delivery.carrier', relation='delivery.carrier',
string="Delivery Method", string="Delivery Method",
method=True,
view_load=True, view_load=True,
help="This delivery method will be used when invoicing from picking."), help="This delivery method will be used when invoicing from picking."),
} }

View File

@ -54,12 +54,12 @@ class stock_picking(osv.osv):
_columns = { _columns = {
'carrier_id':fields.many2one("delivery.carrier","Carrier"), 'carrier_id':fields.many2one("delivery.carrier","Carrier"),
'volume': fields.float('Volume'), 'volume': fields.float('Volume'),
'weight': fields.function(_cal_weight, method=True, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight', 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
store={ store={
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20), 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20), 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
}), }),
'weight_net': fields.function(_cal_weight, method=True, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight', 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight',
store={ store={
'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20), 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20),
'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20), 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20),
@ -158,11 +158,11 @@ class stock_move(osv.osv):
return res return res
_columns = { _columns = {
'weight': fields.function(_cal_move_weight, method=True, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight', 'weight': fields.function(_cal_move_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',
store={ store={
'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20), 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),
}), }),
'weight_net': fields.function(_cal_move_weight, method=True, type='float', string='Net weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight', 'weight_net': fields.function(_cal_move_weight, type='float', string='Net weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_move_weight',
store={ store={
'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20), 'stock.move': (lambda self, cr, uid, ids, c=None: ids, ['product_id', 'product_qty', 'product_uom'], 20),
}), }),

View File

@ -56,7 +56,7 @@ class ir_action_report_xml(osv.osv):
return [('id','in',report_id)] return [('id','in',report_id)]
_columns={ _columns={
'model_id' : fields.function(_model_get, fnct_search=_model_search, method=True, string='Model Id'), 'model_id' : fields.function(_model_get, fnct_search=_model_search, string='Model Id'),
} }
ir_action_report_xml() ir_action_report_xml()

View File

@ -117,7 +117,7 @@ class document_file(osv.osv):
# If ir.attachment contained any data before document is installed, preserve # If ir.attachment contained any data before document is installed, preserve
# the data, don't drop the column! # the data, don't drop the column!
'db_datas': fields.binary('Data', oldname='datas'), 'db_datas': fields.binary('Data', oldname='datas'),
'datas': fields.function(_data_get, method=True, fnct_inv=_data_set, string='File Content', type="binary", nodrop=True), 'datas': fields.function(_data_get, fnct_inv=_data_set, string='File Content', type="binary", nodrop=True),
# Fields of document: # Fields of document:
'user_id': fields.many2one('res.users', 'Owner', select=1), 'user_id': fields.many2one('res.users', 'Owner', select=1),

View File

@ -207,9 +207,9 @@ class event_event(osv.osv):
'type': fields.many2one('event.type', 'Type', help="Type of Event like Seminar, Exhibition, Conference, Training.", readonly=False, states={'done': [('readonly', True)]}), 'type': fields.many2one('event.type', 'Type', help="Type of Event like Seminar, Exhibition, Conference, Training.", readonly=False, states={'done': [('readonly', True)]}),
'register_max': fields.integer('Maximum Registrations', help="Provide Maximum Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}), 'register_max': fields.integer('Maximum Registrations', help="Provide Maximum Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}),
'register_min': fields.integer('Minimum Registrations', help="Provide Minimum Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}), 'register_min': fields.integer('Minimum Registrations', help="Provide Minimum Number of Registrations", readonly=True, states={'draft': [('readonly', False)]}),
'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations', multi='register_current', 'register_current': fields.function(_get_register, string='Confirmed Registrations', multi='register_current',
help="Total of Open and Done Registrations"), help="Total of Open and Done Registrations"),
'register_prospect': fields.function(_get_register, method=True, string='Unconfirmed Registrations', multi='register_prospect', 'register_prospect': fields.function(_get_register, string='Unconfirmed Registrations', multi='register_prospect',
help="Total of Prospect Registrations"), help="Total of Prospect Registrations"),
'registration_ids': fields.one2many('event.registration', 'event_id', 'Registrations', readonly=False, states={'done': [('readonly', True)]}), 'registration_ids': fields.one2many('event.registration', 'event_id', 'Registrations', readonly=False, states={'done': [('readonly', True)]}),
'date_begin': fields.datetime('Beginning date', required=True, help="Beginning Date of Event", readonly=True, states={'draft': [('readonly', False)]}), 'date_begin': fields.datetime('Beginning date', required=True, help="Beginning Date of Event", readonly=True, states={'draft': [('readonly', False)]}),
@ -301,7 +301,7 @@ class event_registration(osv.osv):
"partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced', readonly=True, states={'draft': [('readonly', False)]}), "partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced', readonly=True, states={'draft': [('readonly', False)]}),
"contact_id": fields.many2one('res.partner.contact', 'Partner Contact', readonly=False, states={'done': [('readonly', True)]}), #TODO: filter only the contacts that have a function into the selected partner_id "contact_id": fields.many2one('res.partner.contact', 'Partner Contact', readonly=False, states={'done': [('readonly', True)]}), #TODO: filter only the contacts that have a function into the selected partner_id
"unit_price": fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}), "unit_price": fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}),
'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', digits_compute=dp.get_precision('Sale Price'), store=True), 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute=dp.get_precision('Sale Price'), store=True),
"badge_ids": fields.one2many('event.registration.badge', 'registration_id', 'Badges', readonly=False, states={'done': [('readonly', True)]}), "badge_ids": fields.one2many('event.registration.badge', 'registration_id', 'Badges', readonly=False, states={'done': [('readonly', True)]}),
"event_product": fields.char("Invoice Name", size=128, readonly=True, states={'draft': [('readonly', False)]}), "event_product": fields.char("Invoice Name", size=128, readonly=True, states={'draft': [('readonly', False)]}),
"tobe_invoiced": fields.boolean("To be Invoiced", readonly=True, states={'draft': [('readonly', False)]}), "tobe_invoiced": fields.boolean("To be Invoiced", readonly=True, states={'draft': [('readonly', False)]}),

View File

@ -116,7 +116,7 @@ class email_server(osv.osv):
if context is None: if context is None:
context = {} context = {}
for server in self.browse(cr, uid, ids, context=context): for server in self.browse(cr, uid, ids, context=context):
logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name)) logger.notifyChannel(server.type, netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name))
context.update({'server_id': server.id, 'server_type': server.type}) context.update({'server_id': server.id, 'server_type': server.type})
try: try:
if server.type == 'imap': if server.type == 'imap':
@ -199,7 +199,7 @@ class email_server(osv.osv):
pop_server.quit() pop_server.quit()
logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail fetch %s email(s) from %s' % (numMsgs, server.name)) logger.notifyChannel(server.type, netsvc.LOG_INFO, 'fetchmail fetch %s email(s) from %s' % (numMsgs, server.name))
except Exception, e: except Exception, e:
logger.notifyChannel(server.type, netsvc.LOG_WARNING, '%s' % (tools.ustr(e))) logger.notifyChannel(server.type, netsvc.LOG_WARNING, '%s' % (tools.ustr(e)))

View File

@ -45,7 +45,7 @@ class hr_employee_category(osv.osv):
_description = "Employee Category" _description = "Employee Category"
_columns = { _columns = {
'name': fields.char("Category", size=64, required=True), 'name': fields.char("Category", size=64, required=True),
'complete_name': fields.function(_name_get_fnc, method=True, type="char", string='Name'), 'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
'parent_id': fields.many2one('hr.employee.category', 'Parent Category', select=True), 'parent_id': fields.many2one('hr.employee.category', 'Parent Category', select=True),
'child_ids': fields.one2many('hr.employee.category', 'parent_id', 'Child Categories') 'child_ids': fields.one2many('hr.employee.category', 'parent_id', 'Child Categories')
} }
@ -92,8 +92,8 @@ class hr_job(osv.osv):
_description = "Job Description" _description = "Job Description"
_columns = { _columns = {
'name': fields.char('Job Name', size=128, required=True, select=True), 'name': fields.char('Job Name', size=128, required=True, select=True),
'expected_employees': fields.function(_no_of_employee, method=True, string='Expected Employees', help='Required number of Employees in total for that job.', multi="no_of_employee", store=True), 'expected_employees': fields.function(_no_of_employee, string='Expected Employees', help='Required number of Employees in total for that job.', multi="no_of_employee", store=True),
'no_of_employee': fields.function(_no_of_employee, method=True, string="No of Employee", help='Number of employee with that job.', multi="no_of_employee", store=True), 'no_of_employee': fields.function(_no_of_employee, string="No of Employee", help='Number of employee with that job.', multi="no_of_employee", store=True),
'no_of_recruitment': fields.float('Expected in Recruitment'), 'no_of_recruitment': fields.float('Expected in Recruitment'),
'employee_ids': fields.one2many('hr.employee', 'job_id', 'Employees'), 'employee_ids': fields.one2many('hr.employee', 'job_id', 'Employees'),
'description': fields.text('Job Description'), 'description': fields.text('Job Description'),
@ -241,16 +241,19 @@ class res_users(osv.osv):
def create(self, cr, uid, data, context=None): def create(self, cr, uid, data, context=None):
user_id = super(res_users, self).create(cr, uid, data, context=context) user_id = super(res_users, self).create(cr, uid, data, context=context)
data_obj = self.pool.get('ir.model.data')
try: # add shortcut unless 'noshortcut' is True in context
data_id = data_obj._get_id(cr, uid, 'hr', 'ir_ui_view_sc_employee') if not(context and context.get('noshortcut', False)):
view_id = data_obj.browse(cr, uid, data_id, context=context).res_id data_obj = self.pool.get('ir.model.data')
self.pool.get('ir.ui.view_sc').copy(cr, uid, view_id, default = { try:
'user_id': user_id}, context=context) data_id = data_obj._get_id(cr, uid, 'hr', 'ir_ui_view_sc_employee')
except: view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
# Tolerate a missing shortcut. See product/product.py for similar code. self.pool.get('ir.ui.view_sc').copy(cr, uid, view_id, default = {
logging.getLogger('orm').debug('Skipped meetings shortcut for user "%s"', data.get('name','<new')) 'user_id': user_id}, context=context)
except:
# Tolerate a missing shortcut. See product/product.py for similar code.
logging.getLogger('orm').debug('Skipped meetings shortcut for user "%s"', data.get('name','<new'))
return user_id return user_id
res_users() res_users()

View File

@ -44,7 +44,7 @@ class hr_department(osv.osv):
_name = "hr.department" _name = "hr.department"
_columns = { _columns = {
'name': fields.char('Department Name', size=64, required=True), 'name': fields.char('Department Name', size=64, required=True),
'complete_name': fields.function(_dept_name_get_fnc, method=True, type="char", string='Name'), 'complete_name': fields.function(_dept_name_get_fnc, type="char", string='Name'),
'company_id': fields.many2one('res.company', 'Company', select=True, required=False), 'company_id': fields.many2one('res.company', 'Company', select=True, required=False),
'parent_id': fields.many2one('hr.department', 'Parent Department', select=True), 'parent_id': fields.many2one('hr.department', 'Parent Department', select=True),
'child_ids': fields.one2many('hr.department', 'parent_id', 'Child Departments'), 'child_ids': fields.one2many('hr.department', 'parent_id', 'Child Departments'),

View File

@ -56,7 +56,7 @@ class hr_attendance(osv.osv):
'action': fields.selection([('sign_in', 'Sign In'), ('sign_out', 'Sign Out'), ('action','Action')], 'Action', required=True), 'action': fields.selection([('sign_in', 'Sign In'), ('sign_out', 'Sign Out'), ('action','Action')], 'Action', required=True),
'action_desc': fields.many2one("hr.action.reason", "Action Reason", domain="[('action_type', '=', action)]", help='Specifies the reason for Signing In/Signing Out in case of extra hours.'), 'action_desc': fields.many2one("hr.action.reason", "Action Reason", domain="[('action_type', '=', action)]", help='Specifies the reason for Signing In/Signing Out in case of extra hours.'),
'employee_id': fields.many2one('hr.employee', "Employee's Name", required=True, select=True), 'employee_id': fields.many2one('hr.employee', "Employee's Name", required=True, select=True),
'day': fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32), 'day': fields.function(_day_compute, type='char', string='Day', store=True, select=1, size=32),
} }
_defaults = { _defaults = {
'name': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), #please don't remove the lambda, if you remove it then the current time will not change 'name': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), #please don't remove the lambda, if you remove it then the current time will not change
@ -110,7 +110,7 @@ class hr_employee(osv.osv):
return result return result
_columns = { _columns = {
'state': fields.function(_state, method=True, type='selection', selection=[('absent', 'Absent'), ('present', 'Present')], string='Attendance'), 'state': fields.function(_state, type='selection', selection=[('absent', 'Absent'), ('present', 'Present')], string='Attendance'),
} }
def _action_check(self, cr, uid, emp_id, dt=False, context=None): def _action_check(self, cr, uid, emp_id, dt=False, context=None):

View File

@ -46,7 +46,7 @@ class hr_employee(osv.osv):
'vehicle': fields.char('Company Vehicle', size=64), 'vehicle': fields.char('Company Vehicle', size=64),
'vehicle_distance': fields.integer('Home-Work Distance', help="In kilometers"), 'vehicle_distance': fields.integer('Home-Work Distance', help="In kilometers"),
'contract_ids': fields.one2many('hr.contract', 'employee_id', 'Contracts'), 'contract_ids': fields.one2many('hr.contract', 'employee_id', 'Contracts'),
'contract_id':fields.function(_get_latest_contract, method=True, string='Contract', type='many2one', relation="hr.contract", help='Latest contract of the employee'), 'contract_id':fields.function(_get_latest_contract, string='Contract', type='many2one', relation="hr.contract", help='Latest contract of the employee'),
} }
hr_employee() hr_employee()

View File

@ -70,7 +70,7 @@ class hr_expense_expense(osv.osv):
'account_move_id': fields.many2one('account.move', 'Ledger Posting'), 'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ), 'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
'note': fields.text('Note'), 'note': fields.text('Note'),
'amount': fields.function(_amount, method=True, string='Total Amount'), 'amount': fields.function(_amount, string='Total Amount'),
'invoice_id': fields.many2one('account.invoice', "Employee's Invoice"), 'invoice_id': fields.many2one('account.invoice', "Employee's Invoice"),
'currency_id': fields.many2one('res.currency', 'Currency', required=True), 'currency_id': fields.many2one('res.currency', 'Currency', required=True),
'department_id':fields.many2one('hr.department','Department'), 'department_id':fields.many2one('hr.department','Department'),
@ -254,7 +254,7 @@ class hr_expense_line(osv.osv):
'name': fields.char('Expense Note', size=128, required=True), 'name': fields.char('Expense Note', size=128, required=True),
'date_value': fields.date('Date', required=True), 'date_value': fields.date('Date', required=True),
'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True), 'expense_id': fields.many2one('hr.expense.expense', 'Expense', ondelete='cascade', select=True),
'total_amount': fields.function(_amount, method=True, string='Total', digits_compute=dp.get_precision('Account')), 'total_amount': fields.function(_amount, string='Total', digits_compute=dp.get_precision('Account')),
'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Account')), 'unit_amount': fields.float('Unit Price', digits_compute=dp.get_precision('Account')),
'unit_quantity': fields.float('Quantities' ), 'unit_quantity': fields.float('Quantities' ),
'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]), 'product_id': fields.many2one('product.product', 'Product', domain=[('hr_expense_ok','=',True)]),

View File

@ -78,9 +78,9 @@ class hr_holidays_status(osv.osv):
'color_name': fields.selection([('red', 'Red'),('blue','Blue'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Departement'), 'color_name': fields.selection([('red', 'Red'),('blue','Blue'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Departement'),
'limit': fields.boolean('Allow to Override Limit', help='If you tick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'), 'limit': fields.boolean('Allow to Override Limit', help='If you tick this checkbox, the system will allow, for this section, the employees to take more leaves than the available ones.'),
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."), 'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."),
'max_leaves': fields.function(_user_left_days, method=True, string='Maximum Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'), 'max_leaves': fields.function(_user_left_days, string='Maximum Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'),
'leaves_taken': fields.function(_user_left_days, method=True, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'), 'leaves_taken': fields.function(_user_left_days, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'),
'remaining_leaves': fields.function(_user_left_days, method=True, string='Remaining Legal Leaves', help='Maximum Leaves Allowed - Leaves Already Taken', multi='user_left_days'), 'remaining_leaves': fields.function(_user_left_days, string='Remaining Leaves', help='Maximum Leaves Allowed - Leaves Already Taken', multi='user_left_days'),
'double_validation': fields.boolean('Apply Double Validation', help="If its True then its Allocation/Request have to be validated by second validator") 'double_validation': fields.boolean('Apply Double Validation', help="If its True then its Allocation/Request have to be validated by second validator")
} }
_defaults = { _defaults = {
@ -127,7 +127,7 @@ class hr_holidays(osv.osv):
'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'), 'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'),
'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)]}), 'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)]}),
'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}), 'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}),
'number_of_days': fields.function(_compute_number_of_days, method=True, string='Number of Days', store=True), 'number_of_days': fields.function(_compute_number_of_days, string='Number of Days', store=True),
'case_id': fields.many2one('crm.meeting', 'Meeting'), 'case_id': fields.many2one('crm.meeting', 'Meeting'),
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone"), 'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone"),
'parent_id': fields.many2one('hr.holidays', 'Parent'), 'parent_id': fields.many2one('hr.holidays', 'Parent'),
@ -361,7 +361,7 @@ class hr_employee(osv.osv):
_columns = { _columns = {
'remaining_leaves': fields.function(_get_remaining_days, method=True, string='Remaining Leaves', fnct_inv=_set_remaining_days, type="float", help='Total number of legal leaves allocated to this employee, change this value to create allocation/leave requests.', store=True), 'remaining_leaves': fields.function(_get_remaining_days, method=True, string='Remaining Legal Leaves', fnct_inv=_set_remaining_days, type="float", help='Total number of legal leaves allocated to this employee, change this value to create allocation/leave requests.', store=True),
} }
hr_employee() hr_employee()

View File

@ -318,11 +318,11 @@ class hr_contract(osv.osv):
'visa_expire': fields.date('Visa Expire Date'), 'visa_expire': fields.date('Visa Expire Date'),
'struct_id': fields.many2one('hr.payroll.structure', 'Salary Structure'), 'struct_id': fields.many2one('hr.payroll.structure', 'Salary Structure'),
'working_days_per_week': fields.integer('Working Days', help="No of Working days / week for an employee"), 'working_days_per_week': fields.integer('Working Days', help="No of Working days / week for an employee"),
'basic': fields.function(_calculate_salary, method=True, store=True, multi='dc', type='float', string='Basic Salary', digits=(14,2)), 'basic': fields.function(_calculate_salary, store=True, multi='dc', type='float', string='Basic Salary', digits=(14,2)),
'gross': fields.function(_calculate_salary, method=True, store=True, multi='dc', type='float', string='Gross Salary', digits=(14,2)), 'gross': fields.function(_calculate_salary, store=True, multi='dc', type='float', string='Gross Salary', digits=(14,2)),
'net': fields.function(_calculate_salary, method=True, store=True, multi='dc', type='float', string='Net Salary', digits=(14,2)), 'net': fields.function(_calculate_salary, store=True, multi='dc', type='float', string='Net Salary', digits=(14,2)),
'advantages_net': fields.function(_calculate_salary, method=True, store=True, multi='dc', type='float', string='Deductions', digits=(14,2)), 'advantages_net': fields.function(_calculate_salary, store=True, multi='dc', type='float', string='Deductions', digits=(14,2)),
'advantages_gross': fields.function(_calculate_salary, method=True, store=True, multi='dc', type='float', string='Allowances', digits=(14,2)), 'advantages_gross': fields.function(_calculate_salary, store=True, multi='dc', type='float', string='Allowances', digits=(14,2)),
} }
_defaults = { _defaults = {
'working_days_per_week': lambda *a: 5, 'working_days_per_week': lambda *a: 5,
@ -374,10 +374,10 @@ class payroll_register(osv.osv):
],'State', select=True, readonly=True), ],'State', select=True, readonly=True),
'active':fields.boolean('Active', required=False), 'active':fields.boolean('Active', required=False),
'company_id':fields.many2one('res.company', 'Company', required=False), 'company_id':fields.many2one('res.company', 'Company', required=False),
'grows': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', type='float', digits=(16, 4)), 'grows': fields.function(_calculate, store=True, multi='dc', string='Gross Salary', type='float', digits=(16, 4)),
'net': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits=(16, 4)), 'net': fields.function(_calculate, store=True, multi='dc', string='Net Salary', digits=(16, 4)),
'allounce': fields.function(_calculate, method=True, store=True, multi='dc', string='Allowance', digits=(16, 4)), 'allounce': fields.function(_calculate, store=True, multi='dc', string='Allowance', digits=(16, 4)),
'deduction': fields.function(_calculate, method=True, store=True, multi='dc', string='Deduction', digits=(16, 4)), 'deduction': fields.function(_calculate, store=True, multi='dc', string='Deduction', digits=(16, 4)),
'note': fields.text('Description'), 'note': fields.text('Description'),
'bank_id':fields.many2one('res.bank', 'Bank', required=False, help="Select the Bank Address from whcih the salary is going to be paid"), 'bank_id':fields.many2one('res.bank', 'Bank', required=False, help="Select the Bank Address from whcih the salary is going to be paid"),
} }
@ -611,8 +611,8 @@ class contrib_register(osv.osv):
'company_id':fields.many2one('res.company', 'Company', required=False), 'company_id':fields.many2one('res.company', 'Company', required=False),
'name':fields.char('Name', size=256, required=True, readonly=False), 'name':fields.char('Name', size=256, required=True, readonly=False),
'register_line_ids':fields.one2many('hr.contibution.register.line', 'register_id', 'Register Line', readonly=True), 'register_line_ids':fields.one2many('hr.contibution.register.line', 'register_id', 'Register Line', readonly=True),
'monthly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', string='Total By Employee', digits=(16, 4)), 'monthly_total_by_emp': fields.function(_total_contrib, multi='dc', string='Total By Employee', digits=(16, 4)),
'monthly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', string='Total By Company', digits=(16, 4)), 'monthly_total_by_comp': fields.function(_total_contrib, multi='dc', string='Total By Company', digits=(16, 4)),
'note': fields.text('Description'), 'note': fields.text('Description'),
} }
_defaults = { _defaults = {
@ -644,7 +644,7 @@ class contrib_register_line(osv.osv):
'date': fields.date('Date'), 'date': fields.date('Date'),
'emp_deduction': fields.float('Employee Deduction', digits=(16, 4)), 'emp_deduction': fields.float('Employee Deduction', digits=(16, 4)),
'comp_deduction': fields.float('Company Deduction', digits=(16, 4)), 'comp_deduction': fields.float('Company Deduction', digits=(16, 4)),
'total': fields.function(_total, method=True, store=True, string='Total', digits=(16, 4)), 'total': fields.function(_total, store=True, string='Total', digits=(16, 4)),
} }
_defaults = { _defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'), 'date': lambda *a: time.strftime('%Y-%m-%d'),
@ -711,7 +711,6 @@ class company_contribution(osv.osv):
type='many2one', type='many2one',
relation='hr.contibution.register', relation='hr.contibution.register',
string="Contribution Register", string="Contribution Register",
method=True,
view_load=True, view_load=True,
help="Contribution register based on company", help="Contribution register based on company",
required=False required=False
@ -884,12 +883,12 @@ class hr_payslip(osv.osv):
'basic_before_leaves': fields.float('Basic Salary', readonly=True, digits_compute=dp.get_precision('Account')), 'basic_before_leaves': fields.float('Basic Salary', readonly=True, digits_compute=dp.get_precision('Account')),
'leaves': fields.float('Leave Deductions', readonly=True, digits_compute=dp.get_precision('Account')), 'leaves': fields.float('Leave Deductions', readonly=True, digits_compute=dp.get_precision('Account')),
'basic': fields.float('Net Basic', readonly=True, digits_compute=dp.get_precision('Account')), 'basic': fields.float('Net Basic', readonly=True, digits_compute=dp.get_precision('Account')),
'grows': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', digits_compute=dp.get_precision('Account')), 'grows': fields.function(_calculate, store=True, multi='dc', string='Gross Salary', digits_compute=dp.get_precision('Account')),
'net': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits_compute=dp.get_precision('Account')), 'net': fields.function(_calculate, store=True, multi='dc', string='Net Salary', digits_compute=dp.get_precision('Account')),
'allounce': fields.function(_calculate, method=True, store=True, multi='dc', string='Allowance', digits_compute=dp.get_precision('Account')), 'allounce': fields.function(_calculate, store=True, multi='dc', string='Allowance', digits_compute=dp.get_precision('Account')),
'deduction': fields.function(_calculate, method=True, store=True, multi='dc', string='Deduction', digits_compute=dp.get_precision('Account')), 'deduction': fields.function(_calculate, store=True, multi='dc', string='Deduction', digits_compute=dp.get_precision('Account')),
'other_pay': fields.function(_calculate, method=True, store=True, multi='dc', string='Others', digits_compute=dp.get_precision('Account')), 'other_pay': fields.function(_calculate, store=True, multi='dc', string='Others', digits_compute=dp.get_precision('Account')),
'total_pay': fields.function(_calculate, method=True, store=True, multi='dc', string='Total Payment', digits_compute=dp.get_precision('Account')), 'total_pay': fields.function(_calculate, store=True, multi='dc', string='Total Payment', digits_compute=dp.get_precision('Account')),
'line_ids':fields.one2many('hr.payslip.line', 'slip_id', 'Payslip Line', required=False, readonly=True, states={'draft': [('readonly', False)]}), 'line_ids':fields.one2many('hr.payslip.line', 'slip_id', 'Payslip Line', required=False, readonly=True, states={'draft': [('readonly', False)]}),
'company_id':fields.many2one('res.company', 'Company', required=False, readonly=True, states={'draft': [('readonly', False)]}), 'company_id':fields.many2one('res.company', 'Company', required=False, readonly=True, states={'draft': [('readonly', False)]}),
'holiday_days': fields.float('No of Leaves', readonly=True), 'holiday_days': fields.float('No of Leaves', readonly=True),
@ -1436,11 +1435,11 @@ class hr_employee(osv.osv):
'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True), 'slip_ids':fields.one2many('hr.payslip', 'employee_id', 'Payslips', required=False, readonly=True),
'otherid': fields.char('Other Id', size=64), 'otherid': fields.char('Other Id', size=64),
'basic': fields.function(_calculate_salary, method=True, multi='dc', type='float', string='Basic Salary', digits=(14,2)), 'basic': fields.function(_calculate_salary, multi='dc', type='float', string='Basic Salary', digits=(14,2)),
'gross': fields.function(_calculate_salary, method=True, multi='dc', type='float', string='Gross Salary', digits=(14,2)), 'gross': fields.function(_calculate_salary, multi='dc', type='float', string='Gross Salary', digits=(14,2)),
'net': fields.function(_calculate_salary, method=True, multi='dc', type='float', string='Net Salary', digits=(14,2)), 'net': fields.function(_calculate_salary, multi='dc', type='float', string='Net Salary', digits=(14,2)),
'advantages_net': fields.function(_calculate_salary, method=True, multi='dc', type='float', string='Deductions', digits=(14,2)), 'advantages_net': fields.function(_calculate_salary, multi='dc', type='float', string='Deductions', digits=(14,2)),
'advantages_gross': fields.function(_calculate_salary, method=True, multi='dc', type='float', string='Allowances', digits=(14,2)), 'advantages_gross': fields.function(_calculate_salary, multi='dc', type='float', string='Allowances', digits=(14,2)),
} }
hr_employee() hr_employee()

View File

@ -167,9 +167,9 @@
</group> </group>
<group col="2" colspan="2"> <group col="2" colspan="2">
<separator colspan="2" string="Valid for"/> <separator colspan="2" string="Valid for"/>
<field name="visa_no" attrs="{'required': [('passport_id','!=',False), ]}"/> <field name="visa_no" attrs="{'required': [('passport_id','!=',False) ]}"/>
<field name="permit_no" attrs="{'required': [('passport_id','!=',False), ]}"/> <field name="permit_no" attrs="{'required': [('passport_id','!=',False) ]}"/>
<field name="visa_expire" attrs="{'required': [('passport_id','!=',False), ]}"/> <field name="visa_expire" attrs="{'required': [('passport_id','!=',False) ]}"/>
</group> </group>
</page> </page>
</notebook> </notebook>

View File

@ -60,7 +60,6 @@ class hr_employee(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Bank Account", string="Bank Account",
method=True,
domain="[('type', '=', 'liquidity')]", domain="[('type', '=', 'liquidity')]",
view_load=True, view_load=True,
help="Select Bank Account from where Salary Expense will be Paid, to be used for payslip verification."), help="Select Bank Account from where Salary Expense will be Paid, to be used for payslip verification."),
@ -69,7 +68,6 @@ class hr_employee(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Salary Account", string="Salary Account",
method=True,
domain="[('type', '=', 'other')]", domain="[('type', '=', 'other')]",
view_load=True, view_load=True,
help="Expense account when Salary Expense will be recorded"), help="Expense account when Salary Expense will be recorded"),
@ -78,7 +76,6 @@ class hr_employee(osv.osv):
type='many2one', type='many2one',
relation='account.account', relation='account.account',
string="Employee Account", string="Employee Account",
method=True,
domain="[('type', '=', 'other')]", domain="[('type', '=', 'other')]",
view_load=True, view_load=True,
help="Employee Payable Account"), help="Employee Payable Account"),
@ -87,7 +84,6 @@ class hr_employee(osv.osv):
type='many2one', type='many2one',
relation='account.analytic.account', relation='account.analytic.account',
string="Analytic Account", string="Analytic Account",
method=True,
view_load=True, view_load=True,
help="Analytic Account for Salary Analysis"), help="Analytic Account for Salary Analysis"),
} }
@ -180,8 +176,8 @@ class contrib_register(osv.osv):
_columns = { _columns = {
'account_id': fields.many2one('account.account', 'Account'), 'account_id': fields.many2one('account.account', 'Account'),
'analytic_account_id':fields.many2one('account.analytic.account', 'Analytic Account'), 'analytic_account_id':fields.many2one('account.analytic.account', 'Analytic Account'),
'yearly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, 4)), 'yearly_total_by_emp': fields.function(_total_contrib, multi='dc', store=True, string='Total By Employee', digits=(16, 4)),
'yearly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, 4)), 'yearly_total_by_comp': fields.function(_total_contrib, multi='dc', store=True, string='Total By Company', digits=(16, 4)),
} }
contrib_register() contrib_register()

View File

@ -157,9 +157,9 @@ class hr_applicant(crm.crm_case, osv.osv):
'response': fields.integer("Response"), 'response': fields.integer("Response"),
'reference': fields.char('Reference', size=128), 'reference': fields.char('Reference', size=128),
'day_open': fields.function(_compute_day, string='Days to Open', \ 'day_open': fields.function(_compute_day, string='Days to Open', \
method=True, multi='day_open', type="float", store=True), multi='day_open', type="float", store=True),
'day_close': fields.function(_compute_day, string='Days to Close', \ 'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="float", store=True), multi='day_close', type="float", store=True),
} }
def _get_stage(self, cr, uid, context=None): def _get_stage(self, cr, uid, context=None):
@ -308,7 +308,7 @@ class hr_applicant(crm.crm_case, osv.osv):
mailgate_pool = self.pool.get('email.server.tools') mailgate_pool = self.pool.get('email.server.tools')
attach_obj = self.pool.get('ir.attachment') attach_obj = self.pool.get('ir.attachment')
subject = msg.get('subject') subject = msg.get('subject') or _("No Subject")
body = msg.get('body') body = msg.get('body')
msg_from = msg.get('from') msg_from = msg.get('from')
priority = msg.get('priority') priority = msg.get('priority')

View File

@ -66,7 +66,7 @@ class account_analytic_account(osv.osv):
'pricelist_id': fields.many2one('product.pricelist', 'Sale Pricelist', 'pricelist_id': fields.many2one('product.pricelist', 'Sale Pricelist',
help="The product to invoice is defined on the employee form, the price will be deduced by this pricelist on the product."), help="The product to invoice is defined on the employee form, the price will be deduced by this pricelist on the product."),
'amount_max': fields.float('Max. Invoice Price'), 'amount_max': fields.float('Max. Invoice Price'),
'amount_invoiced': fields.function(_invoiced_calc, method=True, string='Invoiced Amount', 'amount_invoiced': fields.function(_invoiced_calc, string='Invoiced Amount',
help="Total invoiced"), help="Total invoiced"),
'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Reinvoice Costs', 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Reinvoice Costs',
help="Fill this field if you plan to automatically generate invoices based " \ help="Fill this field if you plan to automatically generate invoices based " \

View File

@ -286,13 +286,13 @@ class hr_timesheet_sheet(osv.osv):
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed timesheet. \ help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed timesheet. \
\n* The \'Confirmed\' state is used for to confirm the timesheet by user. \ \n* The \'Confirmed\' state is used for to confirm the timesheet by user. \
\n* The \'Done\' state is used when users timesheet is accepted by his/her senior.'), \n* The \'Done\' state is used when users timesheet is accepted by his/her senior.'),
'state_attendance' : fields.function(_state_attendance, method=True, type='selection', selection=[('absent', 'Absent'), ('present', 'Present'),('none','No employee defined')], string='Current Status'), 'state_attendance' : fields.function(_state_attendance, type='selection', selection=[('absent', 'Absent'), ('present', 'Present'),('none','No employee defined')], string='Current Status'),
'total_attendance_day': fields.function(_total_day, method=True, string='Total Attendance', multi="_total_day"), 'total_attendance_day': fields.function(_total_day, string='Total Attendance', multi="_total_day"),
'total_timesheet_day': fields.function(_total_day, method=True, string='Total Timesheet', multi="_total_day"), 'total_timesheet_day': fields.function(_total_day, string='Total Timesheet', multi="_total_day"),
'total_difference_day': fields.function(_total_day, method=True, string='Difference', multi="_total_day"), 'total_difference_day': fields.function(_total_day, string='Difference', multi="_total_day"),
'total_attendance': fields.function(_total, method=True, string='Total Attendance', multi="_total_sheet"), 'total_attendance': fields.function(_total, string='Total Attendance', multi="_total_sheet"),
'total_timesheet': fields.function(_total, method=True, string='Total Timesheet', multi="_total_sheet"), 'total_timesheet': fields.function(_total, string='Total Timesheet', multi="_total_sheet"),
'total_difference': fields.function(_total, method=True, string='Difference', multi="_total_sheet"), 'total_difference': fields.function(_total, string='Difference', multi="_total_sheet"),
'period_ids': fields.one2many('hr_timesheet_sheet.sheet.day', 'sheet_id', 'Period', readonly=True), 'period_ids': fields.one2many('hr_timesheet_sheet.sheet.day', 'sheet_id', 'Period', readonly=True),
'account_ids': fields.one2many('hr_timesheet_sheet.sheet.account', 'sheet_id', 'Analytic accounts', readonly=True), 'account_ids': fields.one2many('hr_timesheet_sheet.sheet.account', 'sheet_id', 'Analytic accounts', readonly=True),
'company_id': fields.many2one('res.company', 'Company'), 'company_id': fields.many2one('res.company', 'Company'),
@ -473,7 +473,7 @@ class hr_timesheet_line(osv.osv):
return [('id', 'in', [x[0] for x in res])] return [('id', 'in', [x[0] for x in res])]
_columns = { _columns = {
'sheet_id': fields.function(_sheet, method=True, string='Sheet', 'sheet_id': fields.function(_sheet, string='Sheet',
type='many2one', relation='hr_timesheet_sheet.sheet', type='many2one', relation='hr_timesheet_sheet.sheet',
fnct_search=_sheet_search), fnct_search=_sheet_search),
} }
@ -494,6 +494,8 @@ class hr_timesheet_line(osv.osv):
] ]
def unlink(self, cr, uid, ids, *args, **kwargs): def unlink(self, cr, uid, ids, *args, **kwargs):
if isinstance(ids, (int, long)):
ids = [ids]
self._check(cr, uid, ids) self._check(cr, uid, ids)
return super(hr_timesheet_line,self).unlink(cr, uid, ids,*args, **kwargs) return super(hr_timesheet_line,self).unlink(cr, uid, ids,*args, **kwargs)
@ -596,7 +598,7 @@ class hr_attendance(osv.osv):
return [('id', 'in', [x[0] for x in res])] return [('id', 'in', [x[0] for x in res])]
_columns = { _columns = {
'sheet_id': fields.function(_sheet, method=True, string='Sheet', 'sheet_id': fields.function(_sheet, string='Sheet',
type='many2one', relation='hr_timesheet_sheet.sheet', type='many2one', relation='hr_timesheet_sheet.sheet',
fnct_search=_sheet_search), fnct_search=_sheet_search),
} }
@ -619,12 +621,16 @@ class hr_attendance(osv.osv):
return res return res
def unlink(self, cr, uid, ids, *args, **kwargs): def unlink(self, cr, uid, ids, *args, **kwargs):
if isinstance(ids, (int, long)):
ids = [ids]
self._check(cr, uid, ids) self._check(cr, uid, ids)
return super(hr_attendance,self).unlink(cr, uid, ids,*args, **kwargs) return super(hr_attendance,self).unlink(cr, uid, ids,*args, **kwargs)
def write(self, cr, uid, ids, vals, context=None): def write(self, cr, uid, ids, vals, context=None):
if context is None: if context is None:
context = {} context = {}
if isinstance(ids, (int, long)):
ids = [ids]
self._check(cr, uid, ids) self._check(cr, uid, ids)
res = super(hr_attendance,self).write(cr, uid, ids, vals, context=context) res = super(hr_attendance,self).write(cr, uid, ids, vals, context=context)
if 'sheet_id' in context: if 'sheet_id' in context:

View File

@ -52,7 +52,7 @@ class idea_category(osv.osv):
_columns = { _columns = {
'name': fields.char('Category', size=64, required=True), 'name': fields.char('Category', size=64, required=True),
'complete_name': fields.function(_categ_name_get_fnc, method=True, type="char", string='Name'), 'complete_name': fields.function(_categ_name_get_fnc, type="char", string='Name'),
'summary': fields.text('Summary'), 'summary': fields.text('Summary'),
'parent_id': fields.many2one('idea.category', 'Parent Categories', ondelete='set null'), 'parent_id': fields.many2one('idea.category', 'Parent Categories', ondelete='set null'),
'child_ids': fields.one2many('idea.category', 'parent_id', 'Child Categories'), 'child_ids': fields.one2many('idea.category', 'parent_id', 'Child Categories'),
@ -180,10 +180,10 @@ class idea_idea(osv.osv):
'created_date': fields.datetime('Creation date', readonly=True), 'created_date': fields.datetime('Creation date', readonly=True),
'open_date': fields.datetime('Open date', readonly=True, help="Date when an idea opened"), 'open_date': fields.datetime('Open date', readonly=True, help="Date when an idea opened"),
'vote_ids': fields.one2many('idea.vote', 'idea_id', 'Vote'), 'vote_ids': fields.one2many('idea.vote', 'idea_id', 'Vote'),
'my_vote': fields.function(_vote_read, fnct_inv = _vote_save, string="My Vote", method=True, type="selection", selection=VoteValues), 'my_vote': fields.function(_vote_read, fnct_inv = _vote_save, string="My Vote", type="selection", selection=VoteValues),
'vote_avg': fields.function(_vote_avg_compute, method=True, string="Average Score", type="float"), 'vote_avg': fields.function(_vote_avg_compute, string="Average Score", type="float"),
'count_votes': fields.function(_vote_count, method=True, string="Count of votes", type="integer"), 'count_votes': fields.function(_vote_count, string="Count of votes", type="integer"),
'count_comments': fields.function(_comment_count, method=True, string="Count of comments", type="integer"), 'count_comments': fields.function(_comment_count, string="Count of comments", type="integer"),
'category_id': fields.many2one('idea.category', 'Category', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'category_id': fields.many2one('idea.category', 'Category', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft', 'Draft'), 'state': fields.selection([('draft', 'Draft'),
('open', 'Opened'), ('open', 'Opened'),

View File

@ -71,7 +71,7 @@ class synchronize_google(osv.osv_memory):
raise osv.except_osv(_('Warning !'), _("No Google Username or password Defined for user.\nPlease define in user view")) raise osv.except_osv(_('Warning !'), _("No Google Username or password Defined for user.\nPlease define in user view"))
gd_client = google.google_login(user_obj.gmail_user,user_obj.gmail_password,type='group') gd_client = google.google_login(user_obj.gmail_user,user_obj.gmail_password,type='group')
if not gd_client: if not gd_client:
raise osv.except_osv(_('Error'), _("Authentication fail check the user and password !")) return [('failed', 'Connection to google fail')]
res = [] res = []
query = gdata.contacts.service.GroupsQuery(feed='/m8/feeds/groups/default/full') query = gdata.contacts.service.GroupsQuery(feed='/m8/feeds/groups/default/full')
@ -92,7 +92,7 @@ class synchronize_google(osv.osv_memory):
for cal in calendars.entry: for cal in calendars.entry:
res.append((cal.id.text, cal.title.text)) res.append((cal.id.text, cal.title.text))
except Exception, e: except Exception, e:
raise osv.except_osv('Error !', e.args[0].get('body')) return [('failed', 'Connection to google fail')]
res.append(('all', 'All Calendars')) res.append(('all', 'All Calendars'))
return res return res

View File

@ -73,7 +73,7 @@ class account_invoice(osv.osv):
help='The partner bank account to pay\nKeep empty to use the default' help='The partner bank account to pay\nKeep empty to use the default'
), ),
### Amount to pay ### Amount to pay
'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', type='float', string='Amount to be paid',
help='The amount which should be paid at the current date\n' \ help='The amount which should be paid at the current date\n' \
'minus the amount which is already in payment order'), 'minus the amount which is already in payment order'),

View File

@ -81,7 +81,7 @@ class lunch_cashbox(osv.osv):
_columns = { _columns = {
'manager': fields.many2one('res.users', 'Manager'), 'manager': fields.many2one('res.users', 'Manager'),
'name': fields.char('Name', size=30, required=True, unique = True), 'name': fields.char('Name', size=30, required=True, unique = True),
'sum_remain': fields.function(amount_available, method=True, string='Total Remaining'), 'sum_remain': fields.function(amount_available, string='Total Remaining'),
} }
lunch_cashbox() lunch_cashbox()
@ -140,7 +140,7 @@ class lunch_order(osv.osv):
states = {'draft':[('readonly', False)]}), states = {'draft':[('readonly', False)]}),
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ], \ 'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ], \
'State', readonly=True, select=True), 'State', readonly=True, select=True),
'price': fields.function(_price_get, method=True, string="Price"), 'price': fields.function(_price_get, string="Price"),
'category': fields.many2one('lunch.category','Category'), 'category': fields.many2one('lunch.category','Category'),
} }

View File

@ -281,7 +281,7 @@ class mailgate_message(osv.osv):
'description': fields.text('Description', readonly=True), 'description': fields.text('Description', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', required=False), 'partner_id': fields.many2one('res.partner', 'Partner', required=False),
'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments', readonly=True), 'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments', readonly=True),
'display_text': fields.function(_get_display_text, method=True, type='text', size="512", string='Display Text'), 'display_text': fields.function(_get_display_text, type='text', size="512", string='Display Text'),
} }
def init(self, cr): def init(self, cr):
@ -519,7 +519,7 @@ class mailgate_tool(osv.osv_memory):
body = content body = content
has_plain_text = True has_plain_text = True
elif part.get_content_maintype() in ('application', 'image'): elif part.get_content_maintype() in ('application', 'image'):
if filename : if filename and attach:
attachments[filename] = part.get_payload(decode=True) attachments[filename] = part.get_payload(decode=True)
else: else:
res = part.get_payload(decode=True) res = part.get_payload(decode=True)

File diff suppressed because it is too large Load Diff

View File

@ -281,7 +281,7 @@ class marketing_campaign_segment(osv.osv):
'State',), 'State',),
'date_run': fields.datetime('Launch Date', help="Initial start date of this segment."), 'date_run': fields.datetime('Launch Date', help="Initial start date of this segment."),
'date_done': fields.datetime('End Date', help="Date this segment was last closed or cancelled."), 'date_done': fields.datetime('End Date', help="Date this segment was last closed or cancelled."),
'date_next_sync': fields.function(_get_next_sync, method=True, string='Next Synchronization', type='datetime', help="Next time the synchronization job is scheduled to run automatically"), 'date_next_sync': fields.function(_get_next_sync, string='Next Synchronization', type='datetime', help="Next time the synchronization job is scheduled to run automatically"),
} }
_defaults = { _defaults = {
@ -548,7 +548,7 @@ class marketing_campaign_transition(osv.osv):
_columns = { _columns = {
'name': fields.function(_get_name, method=True, string='Name', 'name': fields.function(_get_name, string='Name',
type='char', size=128), type='char', size=128),
'activity_from_id': fields.many2one('marketing.campaign.activity', 'activity_from_id': fields.many2one('marketing.campaign.activity',
'Previous Activity', select=1, 'Previous Activity', select=1,
@ -649,7 +649,7 @@ class marketing_campaign_workitem(osv.osv):
'object_id': fields.related('activity_id', 'campaign_id', 'object_id', 'object_id': fields.related('activity_id', 'campaign_id', 'object_id',
type='many2one', relation='ir.model', string='Resource', select=1, readonly=True, store=True), type='many2one', relation='ir.model', string='Resource', select=1, readonly=True, store=True),
'res_id': fields.integer('Resource ID', select=1, readonly=True), 'res_id': fields.integer('Resource ID', select=1, readonly=True),
'res_name': fields.function(_res_name_get, method=True, string='Resource Name', fnct_search=_resource_search, type="char", size=64), 'res_name': fields.function(_res_name_get, string='Resource Name', fnct_search=_resource_search, type="char", size=64),
'date': fields.datetime('Execution Date', help='If date is not set, this workitem has to be run manually', readonly=True), 'date': fields.datetime('Execution Date', help='If date is not set, this workitem has to be run manually', readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', select=1, readonly=True), 'partner_id': fields.many2one('res.partner', 'Partner', select=1, readonly=True),
'state': fields.selection([('todo', 'To Do'), 'state': fields.selection([('todo', 'To Do'),

View File

@ -62,7 +62,7 @@ class campaign_analysis(osv.osv):
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True), 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
'country_id': fields.related('partner_id','address', 'country_id', 'country_id': fields.related('partner_id','address', 'country_id',
type='many2one', relation='res.country',string='Country'), type='many2one', relation='res.country',string='Country'),
'total_cost' : fields.function(_total_cost, string='Cost', method=True, 'total_cost' : fields.function(_total_cost, string='Cost',
type="float", digits_compute=dp.get_precision('Purchase Price')), type="float", digits_compute=dp.get_precision('Purchase Price')),
'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Sale Price')), 'revenue': fields.float('Revenue', readonly=True, digits_compute=dp.get_precision('Sale Price')),
'count' : fields.integer('# of Actions', readonly=True), 'count' : fields.integer('# of Actions', readonly=True),

View File

@ -149,7 +149,7 @@ class membership_line(osv.osv):
'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Sale Price'), required=True, help='Amount for the membership'), 'member_price': fields.float('Member Price', digits_compute= dp.get_precision('Sale Price'), required=True, help='Amount for the membership'),
'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True), 'account_invoice_line': fields.many2one('account.invoice.line', 'Account Invoice line', readonly=True),
'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True), 'account_invoice_id': fields.related('account_invoice_line', 'invoice_id', type='many2one', relation='account.invoice', string='Invoice', readonly=True),
'state': fields.function(_state, method=True, 'state': fields.function(_state,
string='Membership State', type='selection', string='Membership State', type='selection',
selection=STATE, store = { selection=STATE, store = {
'account.invoice': (_get_membership_lines, ['state'], 10), 'account.invoice': (_get_membership_lines, ['state'], 10),
@ -322,7 +322,7 @@ class Partner(osv.osv):
'Membership amount', digits=(16, 2), 'Membership amount', digits=(16, 2),
help = 'The price negotiated by the partner'), help = 'The price negotiated by the partner'),
'membership_state': fields.function( 'membership_state': fields.function(
__get_membership_state, method=True, __get_membership_state,
string = 'Current Membership State', type = 'selection', string = 'Current Membership State', type = 'selection',
selection = STATE, selection = STATE,
store = { store = {
@ -337,7 +337,7 @@ class Partner(osv.osv):
-Invoiced Member: A member whose invoice has been created. -Invoiced Member: A member whose invoice has been created.
-Paid Member: A member who has paid the membership amount."""), -Paid Member: A member who has paid the membership amount."""),
'membership_start': fields.function( 'membership_start': fields.function(
_membership_date, method=True, multi = 'membeship_start', _membership_date, multi = 'membeship_start',
string = 'Start membership date', type = 'date', string = 'Start membership date', type = 'date',
store = { store = {
'account.invoice': (_get_invoice_partner, ['state'], 10), 'account.invoice': (_get_invoice_partner, ['state'], 10),
@ -345,7 +345,7 @@ class Partner(osv.osv):
'res.partner': (lambda self, cr, uid, ids, c={}: ids, ['free_member'], 10) 'res.partner': (lambda self, cr, uid, ids, c={}: ids, ['free_member'], 10)
}, help="Date from which membership becomes active."), }, help="Date from which membership becomes active."),
'membership_stop': fields.function( 'membership_stop': fields.function(
_membership_date, method=True, _membership_date,
string = 'Stop membership date', type='date', multi='membership_stop', string = 'Stop membership date', type='date', multi='membership_stop',
store = { store = {
'account.invoice': (_get_invoice_partner, ['state'], 10), 'account.invoice': (_get_invoice_partner, ['state'], 10),
@ -353,7 +353,7 @@ class Partner(osv.osv):
'res.partner': (lambda self, cr, uid, ids, c={}: ids, ['free_member'], 10) 'res.partner': (lambda self, cr, uid, ids, c={}: ids, ['free_member'], 10)
}, help="Date until which membership remains active."), }, help="Date until which membership remains active."),
'membership_cancel': fields.function( 'membership_cancel': fields.function(
_membership_date, method=True, _membership_date,
string = 'Cancel membership date', type='date', multi='membership_cancel', string = 'Cancel membership date', type='date', multi='membership_cancel',
store = { store = {
'account.invoice': (_get_invoice_partner, ['state'], 11), 'account.invoice': (_get_invoice_partner, ['state'], 11),

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:15+0000\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n"
"PO-Revision-Date: 2011-01-28 05:53+0000\n" "PO-Revision-Date: 2011-07-02 15:27+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n" "Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 04:51+0000\n" "X-Launchpad-Export-Date: 2011-07-03 04:45+0000\n"
"X-Generator: Launchpad (build 12758)\n" "X-Generator: Launchpad (build 13168)\n"
#. module: mrp #. module: mrp
#: field:mrp.production,move_created_ids:0 #: field:mrp.production,move_created_ids:0
@ -35,7 +35,7 @@ msgstr ""
#. module: mrp #. module: mrp
#: help:mrp.production,location_src_id:0 #: help:mrp.production,location_src_id:0
msgid "Location where the system will look for components." msgid "Location where the system will look for components."
msgstr "" msgstr "系统用于查找部件的位置。"
#. module: mrp #. module: mrp
#: field:mrp.production,workcenter_lines:0 #: field:mrp.production,workcenter_lines:0
@ -107,7 +107,7 @@ msgstr "工艺路线"
#. module: mrp #. module: mrp
#: field:mrp.workcenter,product_id:0 #: field:mrp.workcenter,product_id:0
msgid "Work Center Product" msgid "Work Center Product"
msgstr "" msgstr "工作中心产品"
#. module: mrp #. module: mrp
#: view:mrp.bom:0 #: view:mrp.bom:0
@ -165,7 +165,7 @@ msgstr ""
#. module: mrp #. module: mrp
#: model:process.transition,note:mrp.process_transition_purchaseprocure0 #: model:process.transition,note:mrp.process_transition_purchaseprocure0
msgid "The system launches automatically a RFQ to the preferred supplier." msgid "The system launches automatically a RFQ to the preferred supplier."
msgstr "" msgstr "系统将自动向首选供应商发起询价单。"
#. module: mrp #. module: mrp
#: view:mrp.production:0 #: view:mrp.production:0
@ -227,7 +227,7 @@ msgstr ""
#. module: mrp #. module: mrp
#: model:process.node,note:mrp.process_node_purchaseprocure0 #: model:process.node,note:mrp.process_node_purchaseprocure0
msgid "For purchased material" msgid "For purchased material"
msgstr "" msgstr "用于采购原料"
#. module: mrp #. module: mrp
#: field:mrp.bom.revision,indice:0 #: field:mrp.bom.revision,indice:0
@ -273,7 +273,7 @@ msgstr "目标库位"
#. module: mrp #. module: mrp
#: view:mrp.installer:0 #: view:mrp.installer:0
msgid "title" msgid "title"
msgstr "" msgstr "标题"
#. module: mrp #. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_bom #: model:ir.ui.menu,name:mrp.menu_mrp_bom
@ -320,7 +320,7 @@ msgstr "八月"
#. module: mrp #. module: mrp
#: constraint:stock.move:0 #: constraint:stock.move:0
msgid "You try to assign a lot which is not from the same product" msgid "You try to assign a lot which is not from the same product"
msgstr "" msgstr "您尝试为另外的产品赋予批次"
#. module: mrp #. module: mrp
#: model:ir.model,name:mrp.model_mrp_production_order #: model:ir.model,name:mrp.model_mrp_production_order
@ -335,7 +335,7 @@ msgstr "六月"
#. module: mrp #. module: mrp
#: model:ir.model,name:mrp.model_mrp_product_produce #: model:ir.model,name:mrp.model_mrp_product_produce
msgid "Product Produce" msgid "Product Produce"
msgstr "" msgstr "产品生产"
#. module: mrp #. module: mrp
#: selection:mrp.production.order,month:0 #: selection:mrp.production.order,month:0
@ -370,7 +370,7 @@ msgstr "数量"
#. module: mrp #. module: mrp
#: field:mrp.production.workcenter.line,hour:0 #: field:mrp.production.workcenter.line,hour:0
msgid "Nbr of hours" msgid "Nbr of hours"
msgstr "" msgstr "小时数"
#. module: mrp #. module: mrp
#: view:mrp.production:0 #: view:mrp.production:0
@ -399,7 +399,7 @@ msgstr "维修"
#. module: mrp #. module: mrp
#: field:mrp.installer,stock_location:0 #: field:mrp.installer,stock_location:0
msgid "Advanced Routes" msgid "Advanced Routes"
msgstr "" msgstr "高级路线"
#. module: mrp #. module: mrp
#: model:ir.ui.menu,name:mrp.menu_view_resource_calendar_search_mrp #: model:ir.ui.menu,name:mrp.menu_view_resource_calendar_search_mrp
@ -468,7 +468,7 @@ msgstr ""
#. module: mrp #. module: mrp
#: model:process.node,note:mrp.process_node_serviceproduct1 #: model:process.node,note:mrp.process_node_serviceproduct1
msgid "For Services." msgid "For Services."
msgstr "" msgstr "用于服务。"
#. module: mrp #. module: mrp
#: field:mrp.bom.revision,date:0 #: field:mrp.bom.revision,date:0
@ -486,13 +486,13 @@ msgstr "如果你需要生产单的自动辅助核算项目凭证只有完成这
#. module: mrp #. module: mrp
#: field:mrp.production.workcenter.line,cycle:0 #: field:mrp.production.workcenter.line,cycle:0
msgid "Nbr of cycles" msgid "Nbr of cycles"
msgstr "" msgstr "周期数"
#. module: mrp #. module: mrp
#: model:process.node,note:mrp.process_node_orderrfq0 #: model:process.node,note:mrp.process_node_orderrfq0
#: model:process.node,note:mrp.process_node_rfq0 #: model:process.node,note:mrp.process_node_rfq0
msgid "Request for Quotation." msgid "Request for Quotation."
msgstr "" msgstr "询价单"
#. module: mrp #. module: mrp
#: model:process.transition,note:mrp.process_transition_billofmaterialrouting0 #: model:process.transition,note:mrp.process_transition_billofmaterialrouting0
@ -540,7 +540,7 @@ msgstr "物料清单结构"
#. module: mrp #. module: mrp
#: view:mrp.production:0 #: view:mrp.production:0
msgid "Search Production" msgid "Search Production"
msgstr "" msgstr "搜索产品"
#. module: mrp #. module: mrp
#: code:addons/mrp/report/price.py:130 #: code:addons/mrp/report/price.py:130
@ -575,7 +575,7 @@ msgstr ""
#: view:mrp.production.order:0 #: view:mrp.production.order:0
#: selection:mrp.production.order,state:0 #: selection:mrp.production.order,state:0
msgid "Picking Exception" msgid "Picking Exception"
msgstr "" msgstr "领料异常"
#. module: mrp #. module: mrp
#: field:mrp.bom,bom_lines:0 #: field:mrp.bom,bom_lines:0
@ -617,7 +617,7 @@ msgstr "错误!你不能创建递归的物料清单"
#: model:ir.model,name:mrp.model_mrp_workcenter_load #: model:ir.model,name:mrp.model_mrp_workcenter_load
#: model:ir.model,name:mrp.model_report_workcenter_load #: model:ir.model,name:mrp.model_report_workcenter_load
msgid "Work Center Load" msgid "Work Center Load"
msgstr "" msgstr "工作中心负载"
#. module: mrp #. module: mrp
#: code:addons/mrp/procurement.py:45 #: code:addons/mrp/procurement.py:45
@ -663,7 +663,7 @@ msgstr "一个周期的工作小时数"
#. module: mrp #. module: mrp
#: report:bom.structure:0 #: report:bom.structure:0
msgid "BOM Ref" msgid "BOM Ref"
msgstr "" msgstr "物料表编号"
#. module: mrp #. module: mrp
#: view:mrp.production:0 #: view:mrp.production:0
@ -676,7 +676,7 @@ msgstr "生产中"
#. module: mrp #. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_property #: model:ir.ui.menu,name:mrp.menu_mrp_property
msgid "Master Bill of Materials" msgid "Master Bill of Materials"
msgstr "" msgstr "主物料表"
#. module: mrp #. module: mrp
#: help:mrp.bom,product_uos:0 #: help:mrp.bom,product_uos:0
@ -702,12 +702,12 @@ msgstr "类型"
#: code:addons/mrp/report/price.py:201 #: code:addons/mrp/report/price.py:201
#, python-format #, python-format
msgid "Total Cost of " msgid "Total Cost of "
msgstr "" msgstr "总成本 "
#. module: mrp #. module: mrp
#: model:process.node,note:mrp.process_node_minimumstockrule0 #: model:process.node,note:mrp.process_node_minimumstockrule0
msgid "Linked to the 'Minimum stock rule' supplying method." msgid "Linked to the 'Minimum stock rule' supplying method."
msgstr "" msgstr "链接到“最小库存规则”供货方式"
#. module: mrp #. module: mrp
#: selection:mrp.workcenter.load,time_unit:0 #: selection:mrp.workcenter.load,time_unit:0
@ -715,7 +715,7 @@ msgid "Per month"
msgstr "每月" msgstr "每月"
#. module: mrp #. module: mrp
#: code:addons/mrp/mrp.py:591 #: code:addons/mrp/mrp.py:595
#: code:addons/mrp/wizard/change_production_qty.py:77 #: code:addons/mrp/wizard/change_production_qty.py:77
#: code:addons/mrp/wizard/change_production_qty.py:82 #: code:addons/mrp/wizard/change_production_qty.py:82
#, python-format #, python-format
@ -728,7 +728,7 @@ msgid "Product Name"
msgstr "产品名称" msgstr "产品名称"
#. module: mrp #. module: mrp
#: code:addons/mrp/mrp.py:491 #: code:addons/mrp/mrp.py:495
#, python-format #, python-format
msgid "Invalid action !" msgid "Invalid action !"
msgstr "无效动作" msgstr "无效动作"
@ -798,7 +798,7 @@ msgstr "紧急"
#. module: mrp #. module: mrp
#: model:ir.model,name:mrp.model_mrp_routing_workcenter #: model:ir.model,name:mrp.model_mrp_routing_workcenter
msgid "Work Center Usage" msgid "Work Center Usage"
msgstr "" msgstr "工作中心使用情况"
#. module: mrp #. module: mrp
#: model:ir.model,name:mrp.model_mrp_production #: model:ir.model,name:mrp.model_mrp_production
@ -879,7 +879,7 @@ msgstr "公司"
#: model:process.node,name:mrp.process_node_minimumstockrule0 #: model:process.node,name:mrp.process_node_minimumstockrule0
#: model:process.node,name:mrp.process_node_productminimumstockrule0 #: model:process.node,name:mrp.process_node_productminimumstockrule0
msgid "Minimum Stock" msgid "Minimum Stock"
msgstr "" msgstr "最小库存"
#. module: mrp #. module: mrp
#: model:ir.ui.menu,name:mrp.menus_dash_mrp #: model:ir.ui.menu,name:mrp.menus_dash_mrp
@ -889,7 +889,7 @@ msgstr "仪表盘"
#. module: mrp #. module: mrp
#: view:board.board:0 #: view:board.board:0
msgid "Work Center Future Load" msgid "Work Center Future Load"
msgstr "" msgstr "工作中心未来负载"
#. module: mrp #. module: mrp
#: model:process.node,name:mrp.process_node_stockproduct0 #: model:process.node,name:mrp.process_node_stockproduct0
@ -902,7 +902,7 @@ msgstr "可库存产品"
#: code:addons/mrp/report/price.py:121 #: code:addons/mrp/report/price.py:121
#, python-format #, python-format
msgid "Work Center name" msgid "Work Center name"
msgstr "" msgstr "工作中心名称"
#. module: mrp #. module: mrp
#: field:mrp.routing,code:0 #: field:mrp.routing,code:0
@ -917,7 +917,7 @@ msgstr "小时编号"
#. module: mrp #. module: mrp
#: field:mrp.installer,mrp_jit:0 #: field:mrp.installer,mrp_jit:0
msgid "Just In Time Scheduling" msgid "Just In Time Scheduling"
msgstr "" msgstr "及时生产计划"
#. module: mrp #. module: mrp
#: view:mrp.property:0 #: view:mrp.property:0
@ -1000,7 +1000,7 @@ msgstr ""
#. module: mrp #. module: mrp
#: report:bom.structure:0 #: report:bom.structure:0
msgid "BOM Name" msgid "BOM Name"
msgstr "" msgstr "物料表名称"
#. module: mrp #. module: mrp
#: view:mrp.production:0 #: view:mrp.production:0
@ -1011,17 +1011,17 @@ msgstr "启动生产"
#: model:ir.actions.act_window,name:mrp.open_board_manufacturing #: model:ir.actions.act_window,name:mrp.open_board_manufacturing
#: model:ir.ui.menu,name:mrp.menu_board_manufacturing #: model:ir.ui.menu,name:mrp.menu_board_manufacturing
msgid "Production Dashboard" msgid "Production Dashboard"
msgstr "" msgstr "生产仪表盘"
#. module: mrp #. module: mrp
#: view:mrp.production:0 #: view:mrp.production:0
msgid "Source Loc." msgid "Source Loc."
msgstr "" msgstr "来源位置"
#. module: mrp #. module: mrp
#: field:mrp.bom,position:0 #: field:mrp.bom,position:0
msgid "Internal Reference" msgid "Internal Reference"
msgstr "" msgstr "内部单号"
#. module: mrp #. module: mrp
#: help:mrp.installer,stock_location:0 #: help:mrp.installer,stock_location:0
@ -1033,7 +1033,7 @@ msgstr ""
#. module: mrp #. module: mrp
#: model:process.node,note:mrp.process_node_billofmaterial0 #: model:process.node,note:mrp.process_node_billofmaterial0
msgid "Product's structure" msgid "Product's structure"
msgstr "" msgstr "产品结构"
#. module: mrp #. module: mrp
#: field:mrp.bom,name:0 #: field:mrp.bom,name:0
@ -1294,7 +1294,7 @@ msgid "Month -1"
msgstr "" msgstr ""
#. module: mrp #. module: mrp
#: code:addons/mrp/mrp.py:914 #: code:addons/mrp/mrp.py:924
#, python-format #, python-format
msgid "Manufacturing order '%s' is scheduled for the %s." msgid "Manufacturing order '%s' is scheduled for the %s."
msgstr "" msgstr ""
@ -1305,7 +1305,7 @@ msgid "Production Order N° :"
msgstr "生产单号:" msgstr "生产单号:"
#. module: mrp #. module: mrp
#: code:addons/mrp/mrp.py:630 #: code:addons/mrp/mrp.py:640
#, python-format #, python-format
msgid "Manufacturing order '%s' is ready to produce." msgid "Manufacturing order '%s' is ready to produce."
msgstr "" msgstr ""
@ -1534,7 +1534,7 @@ msgid "Manufacturing Orders To Start"
msgstr "" msgstr ""
#. module: mrp #. module: mrp
#: code:addons/mrp/mrp.py:491 #: code:addons/mrp/mrp.py:495
#, python-format #, python-format
msgid "Cannot delete Production Order(s) which are in %s State!" msgid "Cannot delete Production Order(s) which are in %s State!"
msgstr "" msgstr ""
@ -1624,7 +1624,7 @@ msgid "Production Analysis"
msgstr "" msgstr ""
#. module: mrp #. module: mrp
#: code:addons/mrp/mrp.py:345 #: code:addons/mrp/mrp.py:349
#, python-format #, python-format
msgid "Copy" msgid "Copy"
msgstr "" msgstr ""
@ -2113,7 +2113,7 @@ msgid "Product type is Stockable or Consumable."
msgstr "" msgstr ""
#. module: mrp #. module: mrp
#: code:addons/mrp/mrp.py:591 #: code:addons/mrp/mrp.py:595
#: code:addons/mrp/wizard/change_production_qty.py:77 #: code:addons/mrp/wizard/change_production_qty.py:77
#: code:addons/mrp/wizard/change_production_qty.py:82 #: code:addons/mrp/wizard/change_production_qty.py:82
#, python-format #, python-format

View File

@ -197,7 +197,7 @@ class mrp_bom(osv.osv):
help= "If a sub-product is used in several products, it can be useful to create its own BoM. "\ help= "If a sub-product is used in several products, it can be useful to create its own BoM. "\
"Though if you don't want separated production orders for this sub-product, select Set/Phantom as BoM type. "\ "Though if you don't want separated production orders for this sub-product, select Set/Phantom as BoM type. "\
"If a Phantom BoM is used for a root product, it will be sold and shipped as a set of components, instead of being produced."), "If a Phantom BoM is used for a root product, it will be sold and shipped as a set of components, instead of being produced."),
'method': fields.function(_compute_type, string='Method', method=True, type='selection', selection=[('',''),('stock','On Stock'),('order','On Order'),('set','Set / Pack')]), 'method': fields.function(_compute_type, string='Method', type='selection', selection=[('',''),('stock','On Stock'),('order','On Order'),('set','Set / Pack')]),
'date_start': fields.date('Valid From', help="Validity of this BoM or component. Keep empty if it's always valid."), 'date_start': fields.date('Valid From', help="Validity of this BoM or component. Keep empty if it's always valid."),
'date_stop': fields.date('Valid Until', help="Validity of this BoM or component. Keep empty if it's always valid."), 'date_stop': fields.date('Valid Until', help="Validity of this BoM or component. Keep empty if it's always valid."),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."), 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of bills of material."),
@ -214,7 +214,7 @@ class mrp_bom(osv.osv):
'routing_id': fields.many2one('mrp.routing', 'Routing', help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production planning."), 'routing_id': fields.many2one('mrp.routing', 'Routing', help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production planning."),
'property_ids': fields.many2many('mrp.property', 'mrp_bom_property_rel', 'bom_id','property_id', 'Properties'), 'property_ids': fields.many2many('mrp.property', 'mrp_bom_property_rel', 'bom_id','property_id', 'Properties'),
'revision_ids': fields.one2many('mrp.bom.revision', 'bom_id', 'BoM Revisions'), 'revision_ids': fields.one2many('mrp.bom.revision', 'bom_id', 'BoM Revisions'),
'child_complete_ids': fields.function(_child_compute, relation='mrp.bom', method=True, string="BoM Hierarchy", type='many2many'), 'child_complete_ids': fields.function(_child_compute, relation='mrp.bom', string="BoM Hierarchy", type='many2many'),
'company_id': fields.many2one('res.company','Company',required=True), 'company_id': fields.many2one('res.company','Company',required=True),
} }
_defaults = { _defaults = {
@ -457,8 +457,8 @@ class mrp_production(osv.osv):
'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True, 'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True,
readonly=True, states={'draft':[('readonly',False)]}, help="Location where the system will stock the finished products."), readonly=True, states={'draft':[('readonly',False)]}, help="Location where the system will stock the finished products."),
'date_planned_end': fields.function(_production_date_end, method=True, type='date', string='Scheduled End Date'), 'date_planned_end': fields.function(_production_date_end, type='date', string='Scheduled End Date'),
'date_planned_date': fields.function(_production_date, method=True, type='date', string='Scheduled Date'), 'date_planned_date': fields.function(_production_date, type='date', string='Scheduled Date'),
'date_planned': fields.datetime('Scheduled date', required=True, select=1), 'date_planned': fields.datetime('Scheduled date', required=True, select=1),
'date_start': fields.datetime('Start Date', select=True), 'date_start': fields.datetime('Start Date', select=True),
'date_finished': fields.datetime('End Date', select=True), 'date_finished': fields.datetime('End Date', select=True),
@ -478,8 +478,8 @@ class mrp_production(osv.osv):
'state': fields.selection([('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'State', readonly=True, 'state': fields.selection([('draft','Draft'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','In Production'),('cancel','Cancelled'),('done','Done')],'State', readonly=True,
help='When the production order is created the state is set to \'Draft\'.\n If the order is confirmed the state is set to \'Waiting Goods\'.\n If any exceptions are there, the state is set to \'Picking Exception\'.\ help='When the production order is created the state is set to \'Draft\'.\n If the order is confirmed the state is set to \'Waiting Goods\'.\n If any exceptions are there, the state is set to \'Picking Exception\'.\
\nIf the stock is available then the state is set to \'Ready to Produce\'.\n When the production gets started then the state is set to \'In Production\'.\n When the production is over, the state is set to \'Done\'.'), \nIf the stock is available then the state is set to \'Ready to Produce\'.\n When the production gets started then the state is set to \'In Production\'.\n When the production is over, the state is set to \'Done\'.'),
'hour_total': fields.function(_production_calc, method=True, type='float', string='Total Hours', multi='workorder', store=True), 'hour_total': fields.function(_production_calc, type='float', string='Total Hours', multi='workorder', store=True),
'cycle_total': fields.function(_production_calc, method=True, type='float', string='Total Cycles', multi='workorder', store=True), 'cycle_total': fields.function(_production_calc, type='float', string='Total Cycles', multi='workorder', store=True),
'company_id': fields.many2one('res.company','Company',required=True), 'company_id': fields.many2one('res.company','Company',required=True),
} }
_defaults = { _defaults = {

View File

@ -92,9 +92,9 @@ class mrp_production_workcenter_line(osv.osv):
"* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pause' state.\n" \ "* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pause' state.\n" \
"* When the user cancels the work order it will be set in 'Canceled' state.\n" \ "* When the user cancels the work order it will be set in 'Canceled' state.\n" \
"* When order is completely processed that time it is set in 'Finished' state."), "* When order is completely processed that time it is set in 'Finished' state."),
'date_start_date': fields.function(_get_date_date, method=True, string='Start Date', type='date'), 'date_start_date': fields.function(_get_date_date, string='Start Date', type='date'),
'date_planned': fields.datetime('Scheduled Date'), 'date_planned': fields.datetime('Scheduled Date'),
'date_planned_end': fields.function(_get_date_end, method=True, string='End Date', type='datetime'), 'date_planned_end': fields.function(_get_date_end, string='End Date', type='datetime'),
'date_start': fields.datetime('Start Date'), 'date_start': fields.datetime('Start Date'),
'date_finished': fields.datetime('End Date'), 'date_finished': fields.datetime('End Date'),
'delay': fields.float('Working Hours',help="This is lead time between operation start and stop in this Work Center",readonly=True), 'delay': fields.float('Working Hours',help="This is lead time between operation start and stop in this Work Center",readonly=True),
@ -554,7 +554,7 @@ class mrp_operations_operation(osv.osv):
'code_id':fields.many2one('mrp_operations.operation.code','Code',required=True), 'code_id':fields.many2one('mrp_operations.operation.code','Code',required=True),
'date_start': fields.datetime('Start Date'), 'date_start': fields.datetime('Start Date'),
'date_finished': fields.datetime('End Date'), 'date_finished': fields.datetime('End Date'),
'order_date': fields.function(_get_order_date,method=True,string='Order Date',type='date',store={'mrp.production':(_order_date_search_production,['date_planned'], 10)}), 'order_date': fields.function(_get_order_date,string='Order Date',type='date',store={'mrp.production':(_order_date_search_production,['date_planned'], 10)}),
} }
_defaults={ _defaults={
'date_start': lambda *a:datetime.now().strftime('%Y-%m-%d %H:%M:%S') 'date_start': lambda *a:datetime.now().strftime('%Y-%m-%d %H:%M:%S')

View File

@ -117,7 +117,7 @@ class mrp_repair(osv.osv):
'product_id': fields.many2one('product.product', string='Product to Repair', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'product_id': fields.many2one('product.product', string='Product to Repair', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'partner_id' : fields.many2one('res.partner', 'Partner', select=True, help='This field allow you to choose the parner that will be invoiced and delivered'), 'partner_id' : fields.many2one('res.partner', 'Partner', select=True, help='This field allow you to choose the parner that will be invoiced and delivered'),
'address_id': fields.many2one('res.partner.address', 'Delivery Address', domain="[('partner_id','=',partner_id)]"), 'address_id': fields.many2one('res.partner.address', 'Delivery Address', domain="[('partner_id','=',partner_id)]"),
'default_address_id': fields.function(_get_default_address, method=True, type="many2one", relation="res.partner.address"), 'default_address_id': fields.function(_get_default_address, type="many2one", relation="res.partner.address"),
'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number', select=True, domain="[('product_id','=',product_id)]"), 'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number', select=True, domain="[('product_id','=',product_id)]"),
'state': fields.selection([ 'state': fields.selection([
('draft','Quotation'), ('draft','Quotation'),
@ -156,17 +156,17 @@ class mrp_repair(osv.osv):
'deliver_bool': fields.boolean('Deliver', help="Check this box if you want to manage the delivery once the product is repaired. If cheked, it will create a picking with selected product. Note that you can select the locations in the Info tab, if you have the extended view."), 'deliver_bool': fields.boolean('Deliver', help="Check this box if you want to manage the delivery once the product is repaired. If cheked, it will create a picking with selected product. Note that you can select the locations in the Info tab, if you have the extended view."),
'invoiced': fields.boolean('Invoiced', readonly=True), 'invoiced': fields.boolean('Invoiced', readonly=True),
'repaired': fields.boolean('Repaired', readonly=True), 'repaired': fields.boolean('Repaired', readonly=True),
'amount_untaxed': fields.function(_amount_untaxed, method=True, string='Untaxed Amount', 'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount',
store={ store={
'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10), 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10), 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
}), }),
'amount_tax': fields.function(_amount_tax, method=True, string='Taxes', 'amount_tax': fields.function(_amount_tax, string='Taxes',
store={ store={
'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10), 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10), 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
}), }),
'amount_total': fields.function(_amount_total, method=True, string='Total', 'amount_total': fields.function(_amount_total, string='Total',
store={ store={
'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10), 'mrp.repair': (lambda self, cr, uid, ids, c={}: ids, ['operations'], 10),
'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10), 'mrp.repair.line': (_get_lines, ['price_unit', 'price_subtotal', 'product_id', 'tax_id', 'product_uom_qty', 'product_uom'], 10),
@ -661,7 +661,7 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok','=',True)], required=True), 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok','=',True)], required=True),
'invoiced': fields.boolean('Invoiced',readonly=True), 'invoiced': fields.boolean('Invoiced',readonly=True),
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price')), 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price')),
'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal',digits_compute= dp.get_precision('Sale Price')), 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Sale Price')),
'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'), 'tax_id': fields.many2many('account.tax', 'repair_operation_line_tax', 'repair_operation_line_id', 'tax_id', 'Taxes'),
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2), required=True), 'product_uom_qty': fields.float('Quantity (UoM)', digits=(16,2), required=True),
'product_uom': fields.many2one('product.uom', 'Product UoM', required=True), 'product_uom': fields.many2one('product.uom', 'Product UoM', required=True),
@ -750,7 +750,7 @@ class mrp_repair_fee(osv.osv, ProductChangeMixin):
'product_uom_qty': fields.float('Quantity', digits=(16,2), required=True), 'product_uom_qty': fields.float('Quantity', digits=(16,2), required=True),
'price_unit': fields.float('Unit Price', required=True), 'price_unit': fields.float('Unit Price', required=True),
'product_uom': fields.many2one('product.uom', 'Product UoM', required=True), 'product_uom': fields.many2one('product.uom', 'Product UoM', required=True),
'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal',digits_compute= dp.get_precision('Sale Price')), 'price_subtotal': fields.function(_amount_line, string='Subtotal',digits_compute= dp.get_precision('Sale Price')),
'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'), 'tax_id': fields.many2many('account.tax', 'repair_fee_line_tax', 'repair_fee_line_id', 'tax_id', 'Taxes'),
'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True), 'invoice_line_id': fields.many2one('account.invoice.line', 'Invoice Line', readonly=True),
'to_invoice': fields.boolean('To Invoice'), 'to_invoice': fields.boolean('To Invoice'),

View File

@ -250,20 +250,19 @@ class pos_order(osv.osv):
states={'draft': [('readonly', False)]}, readonly=True), states={'draft': [('readonly', False)]}, readonly=True),
'date_order': fields.datetime('Date Ordered', readonly=True, select=True), 'date_order': fields.datetime('Date Ordered', readonly=True, select=True),
'date_validation': fields.function(_get_date_payment, 'date_validation': fields.function(_get_date_payment,
method=True,
string='Validation Date', string='Validation Date',
type='date', select=True, store=True), type='date', select=True, store=True),
'date_payment': fields.function(_get_date_payment2, method=True, 'date_payment': fields.function(_get_date_payment2,
string='Payment Date', string='Payment Date',
type='date', select=True, store=True), type='date', select=True, store=True),
'date_validity': fields.date('Validity Date', required=True), 'date_validity': fields.date('Validity Date', required=True),
'user_id': fields.many2one('res.users', 'Connected Salesman', help="Person who uses the the cash register. It could be a reliever, a student or an interim employee."), 'user_id': fields.many2one('res.users', 'Connected Salesman', help="Person who uses the the cash register. It could be a reliever, a student or an interim employee."),
'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True, help="User who is logged into the system."), 'user_salesman_id': fields.many2one('res.users', 'Cashier', required=True, help="User who is logged into the system."),
'sale_manager': fields.many2one('res.users', 'Salesman Manager'), 'sale_manager': fields.many2one('res.users', 'Salesman Manager'),
'amount_tax': fields.function(_amount_all, method=True, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'), 'amount_tax': fields.function(_amount_all, string='Taxes', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'amount_total': fields.function(_amount_all, method=True, string='Total', multi='all'), 'amount_total': fields.function(_amount_all, string='Total', multi='all'),
'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, method=True, digits_compute=dp.get_precision('Point Of Sale'), multi='all'), 'amount_paid': fields.function(_amount_all, string='Paid', states={'draft': [('readonly', False)]}, readonly=True, digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'amount_return': fields.function(_amount_all, 'Returned', method=True, digits_compute=dp.get_precision('Point Of Sale'), multi='all'), 'amount_return': fields.function(_amount_all, 'Returned', digits_compute=dp.get_precision('Point Of Sale'), multi='all'),
'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True), 'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True),
'price_type': fields.selection([ 'price_type': fields.selection([
('tax_excluded','Tax excluded')], ('tax_excluded','Tax excluded')],
@ -955,7 +954,7 @@ class account_bank_statement_line(osv.osv):
res[line.id] = line.statement_id and line.statement_id.journal_id and line.statement_id.journal_id.name or None res[line.id] = line.statement_id and line.statement_id.journal_id and line.statement_id.journal_id.name or None
return res return res
_columns= { _columns= {
'journal_id': fields.function(_get_statement_journal, method=True,store=True, string='Journal', type='char', size=64), 'journal_id': fields.function(_get_statement_journal,store=True, string='Journal', type='char', size=64),
'am_out': fields.boolean("To count"), 'am_out': fields.boolean("To count"),
'is_acc': fields.boolean("Is accompte"), 'is_acc': fields.boolean("Is accompte"),
'pos_statement_id': fields.many2one('pos.order', ondelete='cascade'), 'pos_statement_id': fields.many2one('pos.order', ondelete='cascade'),
@ -1141,12 +1140,12 @@ class pos_order_line(osv.osv):
'notice': fields.char('Discount Notice', size=128, required=True), 'notice': fields.char('Discount Notice', size=128, required=True),
'serial_number': fields.char('Serial Number', size=128), 'serial_number': fields.char('Serial Number', size=128),
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True), 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], required=True, change_default=True),
'price_unit': fields.function(_get_amount, method=True, string='Unit Price', store=True), 'price_unit': fields.function(_get_amount, string='Unit Price', store=True),
'price_ded': fields.float('Discount(Amount)', digits_compute=dp.get_precision('Point Of Sale')), 'price_ded': fields.float('Discount(Amount)', digits_compute=dp.get_precision('Point Of Sale')),
'qty': fields.float('Quantity'), 'qty': fields.float('Quantity'),
'qty_rfd': fields.float('Refunded Quantity'), 'qty_rfd': fields.float('Refunded Quantity'),
'price_subtotal': fields.function(_amount_line_all, method=True, multi='pos_order_line_amount', string='Subtotal w/o Tax'), 'price_subtotal': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal w/o Tax'),
'price_subtotal_incl': fields.function(_amount_line_all, method=True, multi='pos_order_line_amount', string='Subtotal'), 'price_subtotal_incl': fields.function(_amount_line_all, multi='pos_order_line_amount', string='Subtotal'),
'discount': fields.float('Discount (%)', digits=(16, 2)), 'discount': fields.float('Discount (%)', digits=(16, 2)),
'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'), 'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),
'create_date': fields.datetime('Creation Date', readonly=True), 'create_date': fields.datetime('Creation Date', readonly=True),

View File

@ -21,4 +21,6 @@
import portal import portal
import wizard import wizard
import ir_ui_menu import res_user
import ir_ui_menu

View File

@ -19,14 +19,13 @@
# #
############################################################################## ##############################################################################
{ {
"name" : "Portal", 'name' : "Portal",
"version" : "0.3", 'version' : "1.0",
"depends" : ["base", "share"], 'depends' : ["base", "share"],
"author" : "OpenERP SA", 'author' : "OpenERP SA",
"category": 'Tools', 'category': 'Tools',
"description": """ 'description': """
This module defines 'portals' to customize the access to your OpenERP database This module defines 'portals' to customize the access to your OpenERP database
for external users. for external users.
@ -37,12 +36,14 @@ users, etc). That feature is very handy when used in combination with the
module 'share'. module 'share'.
""", """,
'website': 'http://www.openerp.com', 'website': 'http://www.openerp.com',
'data': ['security/portal_security.xml', 'data': [
'security/ir.model.access.csv', 'security/portal_security.xml',
'portal_view.xml', 'security/ir.model.access.csv',
'wizard_view.xml', 'portal_view.xml',
'wizard/share_wizard_view.xml', 'res_user_view.xml',
], 'wizard/portal_wizard_view.xml',
'wizard/share_wizard_view.xml',
],
'installable': True, 'installable': True,
'certificate' : '', 'certificate' : '',
} }

393
addons/portal/i18n/en_US.po Normal file
View File

@ -0,0 +1,393 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * portal
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1-dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-07-04 14:16+0000\n"
"PO-Revision-Date: 2011-07-04 14:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: portal
#: code:addons/portal/wizard/share_wizard.py:55
#, python-format
msgid "Please select at least one user to share with"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/share_wizard.py:59
#, python-format
msgid "Please select at least one group to share with"
msgstr ""
#. module: portal
#: field:res.portal,group_id:0
msgid "Group"
msgstr ""
#. module: portal
#: help:res.portal,other_group_ids:0
msgid "Those groups are assigned to the portal's users"
msgstr ""
#. module: portal
#: view:share.wizard:0
#: field:share.wizard,group_ids:0
msgid "Existing groups"
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_portal_wizard_user
msgid "Portal User Config"
msgstr ""
#. module: portal
#: view:res.portal.wizard.user:0
msgid "Portal User"
msgstr ""
#. module: portal
#: help:res.portal,override_menu:0
msgid "Enable this option to override the Menu Action of portal users"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,user_email:0
msgid "E-mail"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Other Groups assigned to Users"
msgstr ""
#. module: portal
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
#. module: portal
#: view:res.portal:0
#: field:res.portal,widget_ids:0
msgid "Widgets"
msgstr ""
#. module: portal
#: model:ir.module.module,description:portal.module_meta_information
msgid "\n"
"This module defines 'portals' to customize the access to your OpenERP database\n"
"for external users.\n"
"\n"
"A portal defines customized user menu and access rights for a group of users\n"
"(the ones associated to that portal). It also associates user groups to the\n"
"portal users (adding a group in the portal automatically adds it to the portal\n"
"users, etc). That feature is very handy when used in combination with the\n"
"module 'share'.\n"
" "
msgstr ""
#. module: portal
#: view:share.wizard:0
msgid "Who do you want to share with?"
msgstr ""
#. module: portal
#: view:res.portal.wizard:0
msgid "Send Invitations"
msgstr ""
#. module: portal
#: help:res.portal,url:0
msgid "The url where portal users can connect to the server"
msgstr ""
#. module: portal
#: field:res.portal.widget,widget_id:0
msgid "Widget"
msgstr ""
#. module: portal
#: help:res.portal.wizard,message:0
msgid "This text is included in the welcome email sent to the users"
msgstr ""
#. module: portal
#: help:res.portal,menu_action_id:0
msgid "If set, replaces the standard menu for the portal's users"
msgstr ""
#. module: portal
#: field:res.portal,parent_menu_id:0
msgid "Parent Menu"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Portal Name"
msgstr ""
#. module: portal
#: view:res.portal.wizard.user:0
msgid "Portal Users"
msgstr ""
#. module: portal
#: field:res.portal,override_menu:0
msgid "Override Menu Action of Users"
msgstr ""
#. module: portal
#: field:res.portal,menu_action_id:0
msgid "Menu Action"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,name:0
msgid "User Name"
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_portal_widget
msgid "Portal Widgets"
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_portal
#: model:ir.module.module,shortdesc:portal.module_meta_information
#: view:res.portal:0
#: field:res.portal.widget,portal_id:0
#: field:res.portal.wizard,portal_id:0
msgid "Portal"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:35
#, python-format
msgid "Your OpenERP account at %(company)s"
msgstr ""
#. module: portal
#: code:addons/portal/portal.py:110
#: code:addons/portal/portal.py:184
#, python-format
msgid "%s Menu"
msgstr ""
#. module: portal
#: help:res.portal.wizard,portal_id:0
msgid "The portal in which new users must be added"
msgstr ""
#. module: portal
#: help:res.portal,widget_ids:0
msgid "Widgets assigned to portal users"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:163
#, python-format
msgid "(missing url)"
msgstr ""
#. module: portal
#: view:share.wizard:0
#: field:share.wizard,user_ids:0
msgid "Existing users"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,wizard_id:0
msgid "Wizard"
msgstr ""
#. module: portal
#: help:res.portal.wizard.user,user_email:0
msgid "Will be used as user login. Also necessary to send the account information to new users"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,lang:0
msgid "Language"
msgstr ""
#. module: portal
#: field:res.portal,url:0
msgid "URL"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Widgets assigned to Users"
msgstr ""
#. module: portal
#: help:res.portal.wizard.user,lang:0
msgid "The language for the user's user interface"
msgstr ""
#. module: portal
#: view:res.portal.wizard:0
msgid "Cancel"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Website"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Create Parent Menu"
msgstr ""
#. module: portal
#: view:res.portal.wizard:0
msgid "The following text will be included in the welcome email sent to users."
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:135
#, python-format
msgid "Email required"
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_users
msgid "res.users"
msgstr ""
#. module: portal
#: constraint:res.portal.wizard.user:0
msgid "Invalid email address"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:136
#, python-format
msgid "You must have an email address in your User Preferences to send emails."
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_ir_ui_menu
msgid "ir.ui.menu"
msgstr ""
#. module: portal
#: help:res.portal,group_id:0
msgid "The group extended by this portal"
msgstr ""
#. module: portal
#: view:res.portal:0
#: view:res.portal.wizard:0
#: field:res.portal.wizard,user_ids:0
msgid "Users"
msgstr ""
#. module: portal
#: field:res.portal,other_group_ids:0
msgid "Other User Groups"
msgstr ""
#. module: portal
#: model:ir.actions.act_window,name:portal.portal_list_action
#: model:ir.ui.menu,name:portal.portal_list_menu
#: model:ir.ui.menu,name:portal.portal_menu
#: view:res.portal:0
msgid "Portals"
msgstr ""
#. module: portal
#: help:res.portal,parent_menu_id:0
msgid "The menu action opens the submenus of this menu item"
msgstr ""
#. module: portal
#: field:res.portal.widget,sequence:0
msgid "Sequence"
msgstr ""
#. module: portal
#: field:res.users,partner_id:0
msgid "Related Partner"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Portal Menu"
msgstr ""
#. module: portal
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr ""
#. module: portal
#: view:res.portal.wizard:0
#: field:res.portal.wizard,message:0
msgid "Invitation message"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:36
#, python-format
msgid "Dear %(name)s,\n"
"\n"
"You have been created an OpenERP account at %(url)s.\n"
"\n"
"Your login account data is:\n"
"Database: %(db)s\n"
"User: %(login)s\n"
"Password: %(password)s\n"
"\n"
"%(message)s\n"
"\n"
"--\n"
"OpenERP - Open Source Business Applications\n"
"http://www.openerp.com\n"
""
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_portal_wizard
msgid "Portal Wizard"
msgstr ""
#. module: portal
#: help:res.portal.wizard.user,name:0
msgid "The user's real name"
msgstr ""
#. module: portal
#: model:ir.actions.act_window,name:portal.address_wizard_action
#: model:ir.actions.act_window,name:portal.partner_wizard_action
#: view:res.portal.wizard:0
msgid "Add Portal Access"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,partner_id:0
msgid "Partner"
msgstr ""
#. module: portal
#: model:ir.actions.act_window,help:portal.portal_list_action
msgid "\n"
"A portal helps defining specific views and rules for a group of users (the\n"
"portal group). A portal menu, widgets and specific groups may be assigned to\n"
"the portal's users.\n"
" "
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_share_wizard
msgid "Share Wizard"
msgstr ""

View File

@ -0,0 +1,393 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * portal
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1-dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-07-04 14:16+0000\n"
"PO-Revision-Date: 2011-07-04 14:16+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: portal
#: code:addons/portal/wizard/share_wizard.py:55
#, python-format
msgid "Please select at least one user to share with"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/share_wizard.py:59
#, python-format
msgid "Please select at least one group to share with"
msgstr ""
#. module: portal
#: field:res.portal,group_id:0
msgid "Group"
msgstr ""
#. module: portal
#: help:res.portal,other_group_ids:0
msgid "Those groups are assigned to the portal's users"
msgstr ""
#. module: portal
#: view:share.wizard:0
#: field:share.wizard,group_ids:0
msgid "Existing groups"
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_portal_wizard_user
msgid "Portal User Config"
msgstr ""
#. module: portal
#: view:res.portal.wizard.user:0
msgid "Portal User"
msgstr ""
#. module: portal
#: help:res.portal,override_menu:0
msgid "Enable this option to override the Menu Action of portal users"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,user_email:0
msgid "E-mail"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Other Groups assigned to Users"
msgstr ""
#. module: portal
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
#. module: portal
#: view:res.portal:0
#: field:res.portal,widget_ids:0
msgid "Widgets"
msgstr ""
#. module: portal
#: model:ir.module.module,description:portal.module_meta_information
msgid "\n"
"This module defines 'portals' to customize the access to your OpenERP database\n"
"for external users.\n"
"\n"
"A portal defines customized user menu and access rights for a group of users\n"
"(the ones associated to that portal). It also associates user groups to the\n"
"portal users (adding a group in the portal automatically adds it to the portal\n"
"users, etc). That feature is very handy when used in combination with the\n"
"module 'share'.\n"
" "
msgstr ""
#. module: portal
#: view:share.wizard:0
msgid "Who do you want to share with?"
msgstr ""
#. module: portal
#: view:res.portal.wizard:0
msgid "Send Invitations"
msgstr ""
#. module: portal
#: help:res.portal,url:0
msgid "The url where portal users can connect to the server"
msgstr ""
#. module: portal
#: field:res.portal.widget,widget_id:0
msgid "Widget"
msgstr ""
#. module: portal
#: help:res.portal.wizard,message:0
msgid "This text is included in the welcome email sent to the users"
msgstr ""
#. module: portal
#: help:res.portal,menu_action_id:0
msgid "If set, replaces the standard menu for the portal's users"
msgstr ""
#. module: portal
#: field:res.portal,parent_menu_id:0
msgid "Parent Menu"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Portal Name"
msgstr ""
#. module: portal
#: view:res.portal.wizard.user:0
msgid "Portal Users"
msgstr ""
#. module: portal
#: field:res.portal,override_menu:0
msgid "Override Menu Action of Users"
msgstr ""
#. module: portal
#: field:res.portal,menu_action_id:0
msgid "Menu Action"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,name:0
msgid "User Name"
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_portal_widget
msgid "Portal Widgets"
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_portal
#: model:ir.module.module,shortdesc:portal.module_meta_information
#: view:res.portal:0
#: field:res.portal.widget,portal_id:0
#: field:res.portal.wizard,portal_id:0
msgid "Portal"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:35
#, python-format
msgid "Your OpenERP account at %(company)s"
msgstr ""
#. module: portal
#: code:addons/portal/portal.py:110
#: code:addons/portal/portal.py:184
#, python-format
msgid "%s Menu"
msgstr ""
#. module: portal
#: help:res.portal.wizard,portal_id:0
msgid "The portal in which new users must be added"
msgstr ""
#. module: portal
#: help:res.portal,widget_ids:0
msgid "Widgets assigned to portal users"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:163
#, python-format
msgid "(missing url)"
msgstr ""
#. module: portal
#: view:share.wizard:0
#: field:share.wizard,user_ids:0
msgid "Existing users"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,wizard_id:0
msgid "Wizard"
msgstr ""
#. module: portal
#: help:res.portal.wizard.user,user_email:0
msgid "Will be used as user login. Also necessary to send the account information to new users"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,lang:0
msgid "Language"
msgstr ""
#. module: portal
#: field:res.portal,url:0
msgid "URL"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Widgets assigned to Users"
msgstr ""
#. module: portal
#: help:res.portal.wizard.user,lang:0
msgid "The language for the user's user interface"
msgstr ""
#. module: portal
#: view:res.portal.wizard:0
msgid "Cancel"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Website"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Create Parent Menu"
msgstr ""
#. module: portal
#: view:res.portal.wizard:0
msgid "The following text will be included in the welcome email sent to users."
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:135
#, python-format
msgid "Email required"
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_users
msgid "res.users"
msgstr ""
#. module: portal
#: constraint:res.portal.wizard.user:0
msgid "Invalid email address"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:136
#, python-format
msgid "You must have an email address in your User Preferences to send emails."
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_ir_ui_menu
msgid "ir.ui.menu"
msgstr ""
#. module: portal
#: help:res.portal,group_id:0
msgid "The group extended by this portal"
msgstr ""
#. module: portal
#: view:res.portal:0
#: view:res.portal.wizard:0
#: field:res.portal.wizard,user_ids:0
msgid "Users"
msgstr ""
#. module: portal
#: field:res.portal,other_group_ids:0
msgid "Other User Groups"
msgstr ""
#. module: portal
#: model:ir.actions.act_window,name:portal.portal_list_action
#: model:ir.ui.menu,name:portal.portal_list_menu
#: model:ir.ui.menu,name:portal.portal_menu
#: view:res.portal:0
msgid "Portals"
msgstr ""
#. module: portal
#: help:res.portal,parent_menu_id:0
msgid "The menu action opens the submenus of this menu item"
msgstr ""
#. module: portal
#: field:res.portal.widget,sequence:0
msgid "Sequence"
msgstr ""
#. module: portal
#: field:res.users,partner_id:0
msgid "Related Partner"
msgstr ""
#. module: portal
#: view:res.portal:0
msgid "Portal Menu"
msgstr ""
#. module: portal
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr ""
#. module: portal
#: view:res.portal.wizard:0
#: field:res.portal.wizard,message:0
msgid "Invitation message"
msgstr ""
#. module: portal
#: code:addons/portal/wizard/portal_wizard.py:36
#, python-format
msgid "Dear %(name)s,\n"
"\n"
"You have been created an OpenERP account at %(url)s.\n"
"\n"
"Your login account data is:\n"
"Database: %(db)s\n"
"User: %(login)s\n"
"Password: %(password)s\n"
"\n"
"%(message)s\n"
"\n"
"--\n"
"OpenERP - Open Source Business Applications\n"
"http://www.openerp.com\n"
""
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_res_portal_wizard
msgid "Portal Wizard"
msgstr ""
#. module: portal
#: help:res.portal.wizard.user,name:0
msgid "The user's real name"
msgstr ""
#. module: portal
#: model:ir.actions.act_window,name:portal.address_wizard_action
#: model:ir.actions.act_window,name:portal.partner_wizard_action
#: view:res.portal.wizard:0
msgid "Add Portal Access"
msgstr ""
#. module: portal
#: field:res.portal.wizard.user,partner_id:0
msgid "Partner"
msgstr ""
#. module: portal
#: model:ir.actions.act_window,help:portal.portal_list_action
msgid "\n"
"A portal helps defining specific views and rules for a group of users (the\n"
"portal group). A portal menu, widgets and specific groups may be assigned to\n"
"the portal's users.\n"
" "
msgstr ""
#. module: portal
#: model:ir.model,name:portal.model_share_wizard
msgid "Share Wizard"
msgstr ""

View File

@ -19,35 +19,40 @@
# #
############################################################################## ##############################################################################
import logging
from osv import osv, fields from osv import osv, fields
from tools.safe_eval import safe_eval
class portal_menu(osv.osv): class portal_menu(osv.osv):
"""Inherited menu class to customized the login search for menus, """
as web client 6.0 does not support the menu action properly yet""" Fix menu class to customize the login search for menus,
as web client 6.0 does not support the menu action properly yet
"""
_name = 'ir.ui.menu'
_inherit = 'ir.ui.menu' _inherit = 'ir.ui.menu'
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
if context is None: if context is None:
context = {} context = {}
# if the current user belongs to a portal, we have to
# rewrite any search on the top menus to be under the # if the user belongs to a portal, we have to rewrite any search on the
# portal's root menu: # top menus to be under the portal's parent menu
if not context.get('ir.ui.menu.full_list') and uid != 1 and \ if not context.get('ir.ui.menu.full_list') and uid != 1 and \
args and len(args) == 1 and \ args == [('parent_id', '=', False)]:
len(args[0]) == 3 and \ portal_obj = self.pool.get('res.portal')
(args[0][0] == 'parent_id' \ portal_ids = portal_obj.search(cr, uid, [('users', 'in', uid)])
and args[0][1] == '=' \ if portal_ids:
and args[0][2] == False): if len(portal_ids) > 1:
Portals = self.pool.get('res.portal') log = logging.getLogger('ir.ui.menu')
portal_id = Portals.search(cr, uid, [('group_id.users', 'in', uid)]) log.warning('User %s belongs to several portals', str(uid))
if portal_id: p = portal_obj.browse(cr, uid, portal_ids[0])
assert len(portal_id) == 1, "Users may only belong to one portal at a time!" # if the portal overrides the menu, use its domain
portal_data = Portals.read(cr, uid, portal_id[0], ['parent_menu_id']) if p.menu_action_id:
menu_id_pair = portal_data.get('parent_menu_id') # (ID, Name) args = safe_eval(p.menu_action_id.domain)
if menu_id_pair:
args = [('parent_id', '=', menu_id_pair[0])] return super(portal_menu, self).search(cr, uid, args, offset=offset,
ids = super(portal_menu, self).search(cr, uid, args, offset=0, limit=limit, order=order, context=context, count=count)
limit=None, order=order, context=context, count=False)
return len(ids) if count else ids portal_menu()
portal_menu()

View File

@ -22,116 +22,83 @@
from osv import osv, fields from osv import osv, fields
from tools.translate import _ from tools.translate import _
class portal(osv.osv): class portal(osv.osv):
"""
A portal is a group of users with specific menu, widgets, and typically
restricted access rights.
"""
_name = 'res.portal' _name = 'res.portal'
_description = 'Portal' _description = 'Portal'
_rec_name = 'group_id' _inherits = {'res.groups': 'group_id'}
_columns = { _columns = {
'group_id': fields.many2one('res.groups', required=True, 'group_id': fields.many2one('res.groups', required=True, ondelete='cascade',
string='Portal Group', string='Group',
help=_('This group defines the users associated to this portal')), help='The group extended by this portal'),
'user_ids': fields.related('group_id', 'users', 'other_group_ids': fields.many2many('res.groups',
type='many2many', relation='res.users', store=False, 'portal_group_rel', 'portal_id', 'group_id',
string='Portal Users'), string='Other User Groups',
'menu_action_id': fields.many2one('ir.actions.actions', readonly=True, help="Those groups are assigned to the portal's users"),
'url': fields.char('URL', size=64,
help="The url where portal users can connect to the server"),
'menu_action_id': fields.many2one('ir.actions.act_window', readonly=True,
# ISSUE: 'ondelete' constraints do not seem effective on this field...
string='Menu Action', string='Menu Action',
help=_("What replaces the standard menu for the portal's users")), help="If set, replaces the standard menu for the portal's users"),
'parent_menu_id': fields.many2one('ir.ui.menu', 'parent_menu_id': fields.many2one('ir.ui.menu', ondelete='restrict',
string='Parent Menu', string='Parent Menu',
help=_('The menu action opens the submenus of this menu item')), help='The menu action opens the submenus of this menu item'),
'widget_ids': fields.one2many('res.portal.widget', 'portal_id', 'widget_ids': fields.one2many('res.portal.widget', 'portal_id',
string='Widgets', string='Widgets',
help=_('Widgets assigned to portal users')), help='Widgets assigned to portal users'),
} }
_sql_constraints = [
('unique_group', 'UNIQUE(group_id)', _('Portals must have distinct groups.'))
]
def copy(self, cr, uid, id, default={}, context=None): def copy(self, cr, uid, id, values, context=None):
""" override copy(): group_id and menu_action_id must be different """ """ override copy(): menu_action_id must be different """
# copy the former group_id values['menu_action_id'] = None
groups_obj = self.pool.get('res.groups') return super(portal, self).copy(cr, uid, id, values, context)
group_id = self.browse(cr, uid, id, context).group_id.id
default['group_id'] = groups_obj.copy(cr, uid, group_id, {}, context)
default['menu_action_id'] = None
return super(portal, self).copy(cr, uid, id, default, context)
def create(self, cr, uid, values, context=None): def create(self, cr, uid, values, context=None):
""" extend create() to assign the portal group and menu to users """ """ extend create() to assign the portal menu to users """
# first create the 'menu_action_id' if context is None:
assert not values.get('menu_action_id') context = {}
values['menu_action_id'] = self._create_menu_action(cr, uid, values, context)
if 'user_ids' in values: # create portal (admin should not be included)
# set menu action of users context['noadmin'] = True
user_values = {'menu_id': values['menu_action_id']}
# values['user_ids'] should match [(6, 0, IDs)]
for id in get_many2many(values['user_ids']):
values['user_ids'].append((1, id, user_values))
# create portal
portal_id = super(portal, self).create(cr, uid, values, context) portal_id = super(portal, self).create(cr, uid, values, context)
# assign widgets to users # assign menu action and widgets to users
if 'user_ids' in values: if values.get('users') or values.get('other_group_ids') or values.get('menu_action_id'):
self._assign_widgets_to_users(cr, uid, [portal_id], context) self._assign_menu_and_groups(cr, uid, [portal_id], context)
if values.get('users') or values.get('widget_ids'):
self._assign_widgets(cr, uid, [portal_id], context)
return portal_id return portal_id
def name_get(self, cr, uid, ids, context=None):
portals = self.browse(cr, uid, ids, context)
return [(p.id, p.group_id.name) for p in portals]
def name_search(self, cr, uid, name='', args=None, operator='ilike', context=None, limit=100):
# first search for group names that match
groups_obj = self.pool.get('res.groups')
group_names = groups_obj.name_search(cr, uid, name, args, operator, context, limit)
# then search for portals that match the groups found so far
domain = [('group_id', 'in', [gn[0] for gn in group_names])]
ids = self.search(cr, uid, domain, context=context)
return self.name_get(cr, uid, ids, context)
def write(self, cr, uid, ids, values, context=None): def write(self, cr, uid, ids, values, context=None):
""" extend write() to reflect menu and groups changes on users """ """ extend write() to reflect changes on users """
# first apply portal changes # first apply portal changes
super(portal, self).write(cr, uid, ids, values, context) super(portal, self).write(cr, uid, ids, values, context)
portals = self.browse(cr, uid, ids, context)
# if 'menu_action_id' has changed, set menu_id on users # assign menu action and widgets to users
if 'menu_action_id' in values: if values.get('users') or values.get('other_group_ids') or values.get('menu_action_id'):
user_values = {'menu_id': values['menu_action_id']} self._assign_menu_and_groups(cr, uid, ids, context)
user_ids = [u.id for p in portals for u in p.user_ids if u.id != 1] if values.get('users') or values.get('widget_ids'):
self.pool.get('res.users').write(cr, uid, user_ids, user_values, context) self._assign_widgets(cr, uid, ids, context)
# if parent_menu_id has changed, apply the change on menu_action_id # if parent_menu_id has changed, apply the change on menu_action_id
if 'parent_menu_id' in values: if 'parent_menu_id' in values:
act_window_obj = self.pool.get('ir.actions.act_window') act_window_obj = self.pool.get('ir.actions.act_window')
action_ids = [p.menu_action_id.id for p in portals] portals = self.browse(cr, uid, ids, context)
action_values = {'domain': [('parent_id', '=', values['parent_menu_id'])]} action_ids = [p.menu_action_id.id for p in portals if p.menu_action_id]
act_window_obj.write(cr, uid, action_ids, action_values, context) if action_ids:
action_values = {'domain': [('parent_id', '=', values['parent_menu_id'])]}
# assign portal widgets to users, if widgets or users changed act_window_obj.write(cr, uid, action_ids, action_values, context)
if ('user_ids' in values) or ('widget_ids' in values):
self._assign_widgets_to_users(cr, uid, ids, context)
return True return True
def _create_menu_action(self, cr, uid, values, context=None):
# create a menu action that opens the menu items below parent_menu_id
groups_obj = self.pool.get('res.groups')
group_name = groups_obj.browse(cr, uid, values['group_id'], context).name
actions_obj = self.pool.get('ir.actions.act_window')
action_values = {
'name': group_name + ' Menu',
'type': 'ir.actions.act_window',
'usage': 'menu',
'res_model': 'ir.ui.menu',
'view_type': 'tree',
'view_id': self._res_xml_id(cr, uid, 'base', 'view_menu'),
'domain': [('parent_id', '=', values.get('parent_menu_id', False))],
}
return actions_obj.create(cr, uid, action_values, context)
def do_create_menu(self, cr, uid, ids, context=None): def do_create_menu(self, cr, uid, ids, context=None):
""" create a parent menu for the given portals """ """ create a parent menu for the given portals """
menu_obj = self.pool.get('ir.ui.menu') menu_obj = self.pool.get('ir.ui.menu')
@ -140,7 +107,7 @@ class portal(osv.osv):
for p in self.browse(cr, uid, ids, context): for p in self.browse(cr, uid, ids, context):
# create a menuitem under 'portal.portal_menu' # create a menuitem under 'portal.portal_menu'
menu_values = { menu_values = {
'name': p.group_id.name + ' Menu', 'name': _('%s Menu') % p.name,
'parent_id': menu_root, 'parent_id': menu_root,
'groups_id': [(6, 0, [p.group_id.id])], 'groups_id': [(6, 0, [p.group_id.id])],
} }
@ -150,28 +117,30 @@ class portal(osv.osv):
return True return True
def _assign_widgets_to_users(self, cr, uid, ids, context=None): def _assign_menu_and_groups(self, cr, uid, ids, context=None):
""" assign portal widgets to users for the given portal ids """ """ assign portal menu and other groups to users of portals (ids) """
user_obj = self.pool.get('res.users')
for p in self.browse(cr, uid, ids, context):
# user groups = portal group + other groups
group_ids = [p.group_id.id] + [g.id for g in p.other_group_ids]
user_values = {'groups_id': [(6, 0, group_ids)]}
# user menu action = portal menu action if set in portal
if p.menu_action_id:
user_values['menu_id'] = p.menu_action_id.id
user_ids = [u.id for u in p.users if u.id != 1]
user_obj.write(cr, uid, user_ids, user_values, context)
def _assign_widgets(self, cr, uid, ids, context=None):
""" assign portal widgets to users of portals (ids) """
widget_user_obj = self.pool.get('res.widget.user') widget_user_obj = self.pool.get('res.widget.user')
portals = self.browse(cr, uid, ids, context) for p in self.browse(cr, uid, ids, context):
for p in portals:
for w in p.widget_ids: for w in p.widget_ids:
values = {'sequence': w.sequence, 'widget_id': w.widget_id.id} values = {'sequence': w.sequence, 'widget_id': w.widget_id.id}
for u in p.user_ids: for u in p.users:
if u.id == 1: continue if u.id == 1: continue
values['user_id'] = u.id values['user_id'] = u.id
widget_user_obj.create(cr, uid, values, context) widget_user_obj.create(cr, uid, values, context)
def onchange_group(self, cr, uid, ids, group_id, context=None):
""" update the users list when the group changes """
user_ids = False
if group_id:
group = self.pool.get('res.groups').browse(cr, uid, group_id, context)
user_ids = [u.id for u in group.users]
return {
'value': {'user_ids': user_ids}
}
def _res_xml_id(self, cr, uid, module, xml_id): def _res_xml_id(self, cr, uid, module, xml_id):
""" return the resource id associated to the given xml_id """ """ return the resource id associated to the given xml_id """
data_obj = self.pool.get('ir.model.data') data_obj = self.pool.get('ir.model.data')
@ -182,21 +151,55 @@ portal()
class users(osv.osv): class portal_override_menu(osv.osv):
_name = 'res.users' """
_inherit = 'res.users' extend res.portal with a boolean field 'Override Users Menu', that
triggers the creation or removal of menu_action_id
"""
_name = 'res.portal'
_inherit = 'res.portal'
def default_get(self, cr, uid, fields, context=None): def _get_override_menu(self, cr, uid, ids, field_name, arg, context=None):
""" override default value of menu_id for portal users """ assert field_name == 'override_menu'
defs = super(users, self).default_get(cr, uid, fields, context) result = {}
for p in self.browse(cr, uid, ids, context):
# the value of 'menu_id' is passed in context by the portal form view result[p.id] = bool(p.menu_action_id)
if ('menu_id' in context) and ('menu_id' in fields): return result
defs['menu_id'] = context['menu_id']
def _set_override_menu(self, cr, uid, id, field_name, field_value, arg, context=None):
return defs assert field_name == 'override_menu'
if field_value:
self.create_menu_action(cr, uid, id, context)
else:
self.write(cr, uid, [id], {'menu_action_id': False}, context)
def create_menu_action(self, cr, uid, id, context=None):
""" create, if necessary, a menu action that opens the menu items below
parent_menu_id """
p = self.browse(cr, uid, id, context)
if not p.menu_action_id:
actions_obj = self.pool.get('ir.actions.act_window')
parent_id = p.parent_menu_id.id if p.parent_menu_id else False
action_values = {
'name': _('%s Menu') % p.name,
'type': 'ir.actions.act_window',
'usage': 'menu',
'res_model': 'ir.ui.menu',
'view_type': 'tree',
'view_id': self._res_xml_id(cr, uid, 'base', 'view_menu'),
'domain': [('parent_id', '=', parent_id)],
}
action_id = actions_obj.create(cr, uid, action_values, context)
self.write(cr, uid, [id], {'menu_action_id': action_id}, context)
_columns = {
'override_menu': fields.function(
_get_override_menu, fnct_inv=_set_override_menu,
type='boolean', string='Override Menu Action of Users',
help='Enable this option to override the Menu Action of portal users'),
}
users() portal_override_menu()
@ -210,7 +213,7 @@ class portal_widget(osv.osv):
_order = 'sequence' _order = 'sequence'
_columns = { _columns = {
'sequence': fields.integer('Sequence'), 'sequence': fields.integer('Sequence'),
'portal_id': fields.many2one('res.portal', select=1, 'portal_id': fields.many2one('res.portal', select=1, ondelete='cascade',
string='Portal'), string='Portal'),
'widget_id': fields.many2one('res.widget', required=True, ondelete='cascade', 'widget_id': fields.many2one('res.widget', required=True, ondelete='cascade',
string='Widget'), string='Widget'),
@ -230,17 +233,3 @@ portal_widget()
# utils
def get_browse_id(obj):
""" return the id of a browse() object, or None """
return (obj and obj.id or None)
def get_browse_ids(objs):
""" return the ids of a list of browse() objects """
return map(get_browse_id, objs)
def get_many2many(arg):
""" get the list of ids from a many2many 'values' field """
assert len(arg) == 1 and arg[0][0] == 6 # arg = [(6, _, IDs)]
return arg[0][2]

View File

@ -2,7 +2,8 @@
<openerp> <openerp>
<data> <data>
<!-- menu Administration/Portals --> <!-- menu Administration/Portals -->
<menuitem name="Portals" id="portal_menu" parent="base.menu_administration" groups="group_portal_manager"/> <menuitem name="Portals" id="portal_menu" parent="base.menu_administration"
groups="group_portal_manager"/>
<!-- menu Administration/Portals/Portals --> <!-- menu Administration/Portals/Portals -->
<record id="portal_list_action" model="ir.actions.act_window"> <record id="portal_list_action" model="ir.actions.act_window">
@ -10,83 +11,65 @@
<field name="res_model">res.portal</field> <field name="res_model">res.portal</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<!-- a context is necessary to get the right portal form view -->
<field name="context">{'form_view_ref': 'portal.portal_form_view'}</field>
<field name="help"> <field name="help">
A portal helps defining specific views and rules for a group of users (the A portal helps defining specific views and rules for a group of users (the
portal group). A portal is associated with a menu; when changed, the portal menu portal group). A portal menu, widgets and specific groups may be assigned to
is assigned to the portal's users. Groups can be added to or removed from the the portal's users.
portal's users.
</field> </field>
</record> </record>
<menuitem name="Portals" id="portal_list_menu" <menuitem name="Portals" id="portal_list_menu"
parent="portal_menu" sequence="1" action="portal_list_action"/> parent="portal_menu" sequence="1" action="portal_list_action"/>
<!-- portal tree view -->
<!-- portal list view --> <record id="portal_list_view" model="ir.ui.view">
<record id="portal_list" model="ir.ui.view">
<field name="name">Portal List</field> <field name="name">Portal List</field>
<field name="model">res.portal</field> <field name="model">res.portal</field>
<field name="type">tree</field> <field name="type">tree</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Portal List"> <tree string="Portals">
<field name="group_id"/> <field name="name" string="Portal Name"/>
<field name="user_ids"/>
</tree> </tree>
</field> </field>
</record> </record>
<!-- portal search view -->
<record id="portal_search" model="ir.ui.view">
<field name="name">Portal Search</field>
<field name="model">res.portal</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Portal Search">
<field name="group_id"/>
<field name="user_ids"/>
<field name="menu_action_id"/>
<field name="parent_menu_id"/>
</search>
</field>
</record>
<!-- portal form view --> <!-- portal form view -->
<record id="portal_form" model="ir.ui.view"> <record id="portal_form_view" model="ir.ui.view">
<field name="name">Portal Form</field> <field name="name">Portal Form</field>
<field name="model">res.portal</field> <field name="model">res.portal</field>
<field name="type">form</field> <field name="type">form</field>
<field name="inherit_id" ref="base.view_groups_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Portal Form"> <page string="Users" position="before">
<field name="group_id" on_change="onchange_group(group_id)"/> <page string="Portal">
<notebook> <group colspan="2" col="2">
<page string="Users"> <separator string="Website" colspan="2"/>
<field name="user_ids" nolabel="1" colspan="3" <field name="url" widget="url"/>
context="{'menu_id': menu_action_id}"/> </group>
<group name="user_panel" colspan="1"/> <group colspan="2" col="2">
<!-- wizards insert buttons inside the group 'user_panel' --> <separator string="Portal Menu" colspan="2"/>
</page> <field name="override_menu"/>
<page string="Menu &amp; Widgets"> <field name="parent_menu_id"
<group colspan="2" col="2"> context="{'ir.ui.menu.full_list': True}"/>
<separator string="Portal Menu" colspan="2"/> <label colspan="1"/>
<group colspan="2" col="2"> <button name="do_create_menu" type="object"
<field name="menu_action_id"/> string="Create Parent Menu"/>
<field name="parent_menu_id" </group>
context="{'ir.ui.menu.full_list': True}"/> <separator string="Other Groups assigned to Users" colspan="2"/>
</group> <separator string="Widgets assigned to Users" colspan="2"/>
<button name="do_create_menu" type="object" <!-- load group_id in order to exclude it from other_group_ids -->
string="Create Parent Menu"/> <field name="group_id" invisible="1"/>
</group> <field name="other_group_ids" nolabel="1" colspan="2"
<group colspan="2" col="2"> domain="[('id', '!=', group_id)]"/>
<separator string="Portal Widgets" colspan="2"/> <field name="widget_ids" nolabel="1" colspan="2">
<field name="widget_ids" nolabel="1" rowspan="7"> <tree string="Widgets" editable="bottom">
<tree string="Widgets" editable="bottom"> <field name="sequence"/>
<field name="sequence"/> <field name="widget_id"/>
<field name="widget_id"/> </tree>
</tree> </field>
</field> </page>
</group> </page>
</page>
</notebook>
</form>
</field> </field>
</record> </record>
</data> </data>

34
addons/portal/res_user.py Normal file
View File

@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# 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, fields
class res_users(osv.osv):
_inherit = 'res.users'
_columns = {
'partner_id': fields.many2one('res.partner',
string='Related Partner'),
}
res_users()

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- add partner field in user form -->
<record id="view_users_form" model="ir.ui.view">
<field name="name">res.portal.users.form</field>
<field name="model">res.users</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<field name="address_id" position="before">
<field name="partner_id"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@ -1,5 +1,5 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
"access_portal_manager","access.portal.manager","model_res_portal","group_portal_manager",1,1,1,1 access_all,access.portal.all,model_res_portal,,1,0,0,0
"access_portal_all","access.portal.all","model_res_portal",,1,0,0,0 access_widget_all,access.portal.widget.all,model_res_portal_widget,,1,0,0,0
"access_portal_widget_all","access.portal.widget.all","model_res_portal_widget",,1,0,0,0 access_manager,access.portal.manager,model_res_portal,group_portal_manager,1,1,1,1
"access_portal_widget_manager","access.portal.widget.manager","model_res_portal_widget",group_portal_manager,1,1,1,1 access_widget_manager,access.portal.widget.manager,model_res_portal_widget,group_portal_manager,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_portal_manager access_all access.portal.manager access.portal.all model_res_portal group_portal_manager 1 1 0 1 0 1 0
3 access_portal_all access_widget_all access.portal.all access.portal.widget.all model_res_portal model_res_portal_widget 1 0 0 0
4 access_portal_widget_all access_manager access.portal.widget.all access.portal.manager model_res_portal_widget model_res_portal group_portal_manager 1 0 1 0 1 0 1
5 access_portal_widget_manager access_widget_manager access.portal.widget.manager model_res_portal_widget group_portal_manager 1 1 1 1

View File

@ -3,14 +3,11 @@
<data noupdate="1"> <data noupdate="1">
<record id="group_portal_manager" model="res.groups"> <record id="group_portal_manager" model="res.groups">
<field name="name">Portal / Manager</field> <field name="name">Portal / Manager</field>
<field name="comment"> <field name="comment">Portal managers have access to the portal definitions, and can easily configure the users, access rights and menus of portal users.</field>
Members of this groups have access to the portal definitions, and can easily manage the users, access right and menus of portal users. </record>
Members of this group who are also members of the Sharing/User group get additional options in the sharing wizard: <record id="group_portal_officer" model="res.groups">
- they may select a list of existing users to share with, without having to give a list of emails <field name="name">Portal / Officer</field>
- they may choose to share with a Portal group instead of sharing with users, effectively extending the Portal content <field name="comment">Portal officers can create new portal users with the portal wizard.</field>
These features are useful for setting up Portals, but this could result in an alteration of the system's security policy.
Therefore this should be granted only to trustworthy users who know the security policy very well.
This group must not be deleted.</field>
</record> </record>
</data> </data>
</openerp> </openerp>

View File

@ -19,5 +19,6 @@
# #
############################################################################## ##############################################################################
import portal_wizard
import share_wizard import share_wizard
import groups_wizard

View File

@ -1,59 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# 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, fields
from tools.translate import _
class groups_wizard(osv.osv_memory):
_name = 'res.portal.groups'
_description = 'Portal Groups Wizard'
_columns = {
'portal_id': fields.many2one('res.portal', required=True, readonly=True,
string='Portal'),
'add_group_ids': fields.many2many('res.groups',
'portal_groups_add', 'portal_groups_id', 'group_ids',
string='Add Groups'),
'remove_group_ids': fields.many2many('res.groups',
'portal_groups_remove', 'portal_groups_id', 'group_ids',
string='Remove Groups'),
}
_defaults = {
'portal_id': (lambda self,cr,uid,context: context and context.get('active_id'))
}
def do_apply(self, cr, uid, ids, context=None, *args):
assert len(ids) == 1
wizard = self.browse(cr, uid, ids[0], context)
# select all portal users except admin
user_ids = [u.id for u in wizard.portal_id.user_ids if u.id != 1]
# apply group adds and removals to portal users
add_gids = [(4, g.id) for g in wizard.add_group_ids]
rem_gids = [(3, g.id) for g in wizard.remove_group_ids]
user_values = {'groups_id': add_gids + rem_gids}
self.pool.get('res.users').write(cr, uid, user_ids, user_values, context)
# return an empty dictionary to close the wizard window
return {}
groups_wizard()

View File

@ -0,0 +1,226 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# 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/>.
#
##############################################################################
import logging
import random
from osv import osv, fields
from tools.misc import email_re, email_send
from tools.translate import _
from base.res.res_user import _lang_get
# welcome email sent to new portal users (note that calling tools.translate._
# has no effect except exporting those strings for translation)
WELCOME_EMAIL_SUBJECT = _("Your OpenERP account at %(company)s")
WELCOME_EMAIL_BODY = _("""Dear %(name)s,
You have been created an OpenERP account at %(url)s.
Your login account data is:
Database: %(db)s
User: %(login)s
Password: %(password)s
%(message)s
--
OpenERP - Open Source Business Applications
http://www.openerp.com
""")
ROOT_UID = 1
# character sets for passwords, excluding 0, O, o, 1, I, l
_PASSU = 'ABCDEFGHIJKLMNPQRSTUVWXYZ'
_PASSL = 'abcdefghijkmnpqrstuvwxyz'
_PASSD = '23456789'
def random_password():
# get 3 uppercase letters, 3 lowercase letters, 2 digits, and shuffle them
chars = map(random.choice, [_PASSU] * 3 + [_PASSL] * 3 + [_PASSD] * 2)
random.shuffle(chars)
return ''.join(chars)
def extract_email(user_email):
""" extract the email address from a user-friendly email address """
m = email_re.search(user_email or "")
return m and m.group(0) or ""
class wizard(osv.osv_memory):
"""
A wizard to create portal users from instances of either 'res.partner'
or 'res.partner.address'. The purpose is to provide an OpenERP database
access to customers or suppliers.
"""
_name = 'res.portal.wizard'
_description = 'Portal Wizard'
_columns = {
'portal_id': fields.many2one('res.portal', required=True,
string='Portal',
help="The portal in which new users must be added"),
'user_ids': fields.one2many('res.portal.wizard.user', 'wizard_id',
string='Users'),
'message': fields.text(string='Invitation message',
help="This text is included in the welcome email sent to the users"),
}
def _default_user_ids(self, cr, uid, context):
""" determine default user_ids from the active records """
def create_user_from_address(address):
return { # a user config based on a contact (address)
'name': address.name,
'user_email': extract_email(address.email),
'lang': address.partner_id and address.partner_id.lang or 'en_US',
'partner_id': address.partner_id and address.partner_id.id,
}
user_ids = []
if context.get('active_model') == 'res.partner.address':
address_obj = self.pool.get('res.partner.address')
address_ids = context.get('active_ids', [])
addresses = address_obj.browse(cr, uid, address_ids, context)
user_ids = map(create_user_from_address, addresses)
elif context.get('active_model') == 'res.partner':
partner_obj = self.pool.get('res.partner')
partner_ids = context.get('active_ids', [])
partners = partner_obj.browse(cr, uid, partner_ids, context)
for p in partners:
# add one user per contact, or one user if no contact
if p.address:
user_ids.extend(map(create_user_from_address, p.address))
else:
user_ids.append({'lang': p.lang or 'en_US', 'partner_id': p.id})
return user_ids
_defaults = {
'user_ids': _default_user_ids
}
def action_create(self, cr, uid, ids, context=None):
""" create new users in portal(s), and notify them by email """
# we copy the context to change the language for translating emails
context0 = context or {}
context0['noshortcut'] = True # prevent shortcut creation
context = context0.copy()
user_obj = self.pool.get('res.users')
user = user_obj.browse(cr, ROOT_UID, uid, context0)
if not user.user_email:
raise osv.except_osv(_('Email required'),
_('You must have an email address in your User Preferences'
' to send emails.'))
portal_obj = self.pool.get('res.portal')
for wiz in self.browse(cr, uid, ids, context):
# determine existing users
login_cond = [('login', 'in', [u.user_email for u in wiz.user_ids])]
user_ids = user_obj.search(cr, ROOT_UID, login_cond)
users = user_obj.browse(cr, ROOT_UID, user_ids)
logins = [u.login for u in users]
# create new users in portal (skip existing logins)
new_users_data = [ {
'name': u.name,
'login': u.user_email,
'password': random_password(),
'user_email': u.user_email,
'context_lang': u.lang,
'partner_id': u.partner_id and u.partner_id.id,
} for u in wiz.user_ids if u.user_email not in logins ]
portal_obj.write(cr, ROOT_UID, [wiz.portal_id.id],
{'users': [(0, 0, data) for data in new_users_data]}, context0)
# send email to all users (translated in their language)
data = {
'company': user.company_id.name,
'message': wiz.message or "",
'url': wiz.portal_id.url or _("(missing url)"),
'db': cr.dbname,
}
dest_uids = user_obj.search(cr, ROOT_UID, login_cond)
dest_users = user_obj.browse(cr, ROOT_UID, user_ids)
for dest_user in dest_users:
context['lang'] = dest_user.context_lang
data['login'] = dest_user.login
data['password'] = dest_user.password
data['name'] = dest_user.name
email_from = user.user_email
email_to = dest_user.user_email
subject = _(WELCOME_EMAIL_SUBJECT) % data
body = _(WELCOME_EMAIL_BODY) % data
res = email_send(email_from, [email_to], subject, body)
if not res:
logging.getLogger('res.portal.wizard').warning(
'Failed to send email from %s to %s', email_from, email_to)
return {'type': 'ir.actions.act_window_close'}
wizard()
class wizard_user(osv.osv_memory):
"""
A model to configure users in the portal wizard.
"""
_name = 'res.portal.wizard.user'
_description = 'Portal User Config'
_columns = {
'wizard_id': fields.many2one('res.portal.wizard', required=True,
string='Wizard'),
'name': fields.char(size=64, required=True,
string='User Name',
help="The user's real name"),
'user_email': fields.char(size=64, required=True,
string='E-mail',
help="Will be used as user login. "
"Also necessary to send the account information to new users"),
'lang': fields.selection(_lang_get, required=True,
string='Language',
help="The language for the user's user interface"),
'partner_id': fields.many2one('res.partner',
string='Partner'),
}
def _check_email(self, cr, uid, ids):
""" check syntax of email address """
for wuser in self.browse(cr, uid, ids):
if not email_re.match(wuser.user_email): return False
return True
_constraints = [
(_check_email, 'Invalid email address', ['email']),
]
wizard_user()

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- wizard action on res.partner -->
<act_window id="partner_wizard_action"
name="Add Portal Access"
src_model="res.partner"
res_model="res.portal.wizard"
view_type="form" view_mode="form"
key2="client_action_multi" target="new"
groups="group_portal_officer"/>
<!-- wizard action on res.partner.address -->
<act_window id="address_wizard_action"
name="Add Portal Access"
src_model="res.partner.address"
res_model="res.portal.wizard"
view_type="form" view_mode="form"
key2="client_action_multi" target="new"
groups="group_portal_officer"/>
<!-- wizard view -->
<record id="wizard_view" model="ir.ui.view">
<field name="name">Add Portal Access</field>
<field name="model">res.portal.wizard</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Add Portal Access">
<field name="portal_id" widget="selection"/>
<newline/>
<notebook colspan="4">
<page string="Users">
<field name="user_ids" nolabel="1" colspan="4"/>
</page>
<page string="Invitation message">
<label string="The following text will be included in the welcome email sent to users."/>
<field name="message" nolabel="1" colspan="4"/>
</page>
</notebook>
<label colspan="2"/>
<button string="Cancel" special="cancel" icon="gtk-cancel"/>
<button string="Send Invitations"
name="action_create" type="object" icon="gtk-ok"/>
</form>
</field>
</record>
<!-- wizard user list view -->
<record id="wizard_user_tree_view" model="ir.ui.view">
<field name="name">Portal Users</field>
<field name="model">res.portal.wizard.user</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<!-- the attribute 'editable' is set below to make the elements
editable in the web client 6.0 -->
<tree string="Portal Users" editable="bottom">
<field name="name"/>
<field name="user_email"/>
<field name="partner_id"/>
</tree>
</field>
</record>
<!-- wizard user form view -->
<record id="wizard_user_form_view" model="ir.ui.view">
<field name="name">Portal User</field>
<field name="model">res.portal.wizard.user</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Portal User">
<group colspan="2" col="2">
<field name="name"/>
<field name="user_email"/>
<field name="lang"/>
<field name="partner_id"/>
</group>
</form>
</field>
</record>
</data>
</openerp>

View File

@ -186,4 +186,5 @@ class share_wizard_portal(osv.osv_memory):
super(share_wizard_portal,self)._finish_result_lines(cr, uid, wizard_data, share_group_id, context=context) super(share_wizard_portal,self)._finish_result_lines(cr, uid, wizard_data, share_group_id, context=context)
self.copy_share_group_access_and_delete(cr, wizard_data, share_group_id, context=context) self.copy_share_group_access_and_delete(cr, wizard_data, share_group_id, context=context)
share_wizard_portal() share_wizard_portal()

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- groups wizard action -->
<record id="groups_wizard_action" model="ir.actions.act_window">
<field name="name">Add/Remove Groups</field>
<field name="res_model">res.portal.groups</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<!-- groups wizard form -->
<record id="groups_wizard_form" model="ir.ui.view">
<field name="name">Portal Groups Wizard</field>
<field name="model">res.portal.groups</field>
<field name="type">form</field>
<field name="priority" eval="16"/>
<field name="arch" type="xml">
<form string="Portal Groups Wizard">
<group colspan="4">
<field name="portal_id"/>
</group>
<separator string="Add Groups" colspan="2"/>
<separator string="Remove Groups" colspan="2"/>
<field name="add_group_ids" nolabel="1" colspan="2"/>
<field name="remove_group_ids" nolabel="1" colspan="2"/>
<separator colspan="4"/>
<label colspan="2"/>
<button special="cancel"
string="Cancel" icon="gtk-cancel"/>
<button name="do_apply" type="object"
string="Apply" icon="gtk-apply"/>
</form>
</field>
</record>
<!-- add a button in the portal form view -->
<record id="portal_form_with_groups_wizard" model="ir.ui.view">
<field name="name">Portal Form</field>
<field name="model">res.portal</field>
<field name="inherit_id" ref="portal_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='user_panel']" position="inside">
<button name="%(groups_wizard_action)d" type="action"
string="Add/Remove Groups"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -527,7 +527,7 @@ class stock_warehouse_orderpoint(osv.osv):
help="The procurement quantity will be rounded up to this multiple."), help="The procurement quantity will be rounded up to this multiple."),
'procurement_id': fields.many2one('procurement.order', 'Latest procurement', ondelete="set null"), 'procurement_id': fields.many2one('procurement.order', 'Latest procurement', ondelete="set null"),
'company_id': fields.many2one('res.company','Company',required=True), 'company_id': fields.many2one('res.company','Company',required=True),
'procurement_draft_ids': fields.function(_get_draft_procurements, method=True, type='many2many', relation="procurement.order", \ 'procurement_draft_ids': fields.function(_get_draft_procurements, type='many2many', relation="procurement.order", \
string="Related Procurement Orders",help="Draft procurement of the product and location of that orderpoint"), string="Related Procurement Orders",help="Draft procurement of the product and location of that orderpoint"),
} }
_defaults = { _defaults = {

View File

@ -32,7 +32,6 @@ class res_partner(osv.osv):
relation='product.pricelist', relation='product.pricelist',
domain=[('type','=','sale')], domain=[('type','=','sale')],
string="Sale Pricelist", string="Sale Pricelist",
method=True,
view_load=True, view_load=True,
help="This pricelist will be used, instead of the default one, for sales to the current partner"), help="This pricelist will be used, instead of the default one, for sales to the current partner"),
} }

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