bzr revid: hmo@tinyerp.com-20120907114436-9qw3gakx3fmn9xwy
This commit is contained in:
Harry (OpenERP) 2012-09-07 17:14:36 +05:30
commit 927e3abe2b
597 changed files with 21674 additions and 12228 deletions

View File

@ -30,6 +30,8 @@ from osv import fields, osv
import decimal_precision as dp
from tools.translate import _
from tools.float_utils import float_round
from openerp import SUPERUSER_ID
_logger = logging.getLogger(__name__)
@ -109,7 +111,7 @@ class account_payment_term_line(osv.osv):
'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \
"If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),
'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."),
'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True),
'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True, ondelete='cascade'),
}
_defaults = {
'value': 'balance',
@ -746,9 +748,11 @@ class account_journal(osv.osv):
'profit_account_id' : fields.many2one('account.account', 'Profit Account'),
'loss_account_id' : fields.many2one('account.account', 'Loss Account'),
'internal_account_id' : fields.many2one('account.account', 'Internal Transfers Account', select=1),
'cash_control' : fields.boolean('Cash Control', help='If you want the journal should be control at opening/closing, check this option'),
}
_defaults = {
'cash_control' : False,
'with_last_closing_balance' : False,
'user_id': lambda self, cr, uid, context: uid,
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
@ -817,7 +821,7 @@ class account_journal(osv.osv):
if not 'sequence_id' in vals or not vals['sequence_id']:
# if we have the right to create a journal, we should be able to
# create it's sequence.
vals.update({'sequence_id': self.create_sequence(cr, 1, vals, context)})
vals.update({'sequence_id': self.create_sequence(cr, SUPERUSER_ID, vals, context)})
return super(account_journal, self).create(cr, uid, vals, context)
def name_get(self, cr, user, ids, context=None):
@ -1371,7 +1375,7 @@ class account_move(osv.osv):
balance = 0.0
for line in line_ids:
if line[2]:
balance += (line[2]['debit'] or 0.00)- (line[2]['credit'] or 0.00)
balance += (line[2].get('debit',0.00)- (line[2].get('credit',0.00)))
return {'value': {'balance': balance}}
def write(self, cr, uid, ids, vals, context=None):
@ -1856,7 +1860,7 @@ class account_tax(osv.osv):
def get_precision_tax():
def change_digit_tax(cr):
res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, 1, 'Account')
res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, SUPERUSER_ID, 'Account')
return (16, res+2)
return change_digit_tax
@ -3345,13 +3349,11 @@ class wizard_multi_charts_accounts(osv.osv_memory):
# Install all the templates objects and generate the real objects
acc_template_ref, taxes_ref, tax_code_ref = self._install_template(cr, uid, obj_wizard.chart_template_id.id, company_id, code_digits=obj_wizard.code_digits, obj_wizard=obj_wizard, context=context)
# write values of default taxes for product
# write values of default taxes for product as super user
if obj_wizard.sale_tax and taxes_ref:
ir_values_obj.set(cr, uid, key='default', key2=False, name="taxes_id", company=company_id,
models =[('product.product',False)], value=[taxes_ref[obj_wizard.sale_tax.id]])
ir_values_obj.set_default(cr, SUPERUSER_ID, 'product.product', "taxes_id", [taxes_ref[obj_wizard.sale_tax.id]], for_all_users=True, company_id=company_id)
if obj_wizard.purchase_tax and taxes_ref:
ir_values_obj.set(cr, uid, key='default', key2=False, name="supplier_taxes_id", company=company_id,
models =[('product.product',False)], value=[taxes_ref[obj_wizard.purchase_tax.id]])
ir_values_obj.set_default(cr, SUPERUSER_ID, 'product.product', "supplier_taxes_id", [taxes_ref[obj_wizard.purchase_tax.id]], for_all_users=True, company_id=company_id)
# Create Bank journals
self._create_bank_journals_from_o2m(cr, uid, obj_wizard, company_id, acc_template_ref, context=context)

View File

@ -430,7 +430,7 @@ class account_bank_statement(osv.osv):
'name': st_number,
'balance_end_real': st.balance_end
}, context=context)
self.message_append_note(cr, uid, [st.id], body=_('Statement %s is confirmed, journal items are created.') % (st_number,), context=context)
self.message_post(cr, uid, [st.id], body=_('Statement %s confirmed, journal items were created.') % (st_number,), context=context)
return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
def button_cancel(self, cr, uid, ids, context=None):

View File

@ -194,12 +194,27 @@ class account_cash_statement(osv.osv):
journal = self.pool.get('account.journal').browse(cr, uid, vals['journal_id'], context=context)
if journal and (journal.type == 'cash') and not vals.get('details_ids'):
vals['details_ids'] = []
last_pieces = None
if journal.with_last_closing_balance == True:
domain = [('journal_id', '=', journal.id),
('state', '=', 'confirm')]
last_bank_statement_ids = self.search(cr, uid, domain, limit=1, order='create_date desc', context=context)
if last_bank_statement_ids:
last_bank_statement = self.browse(cr, uid, last_bank_statement_ids[0], context=context)
last_pieces = dict(
(line.pieces, line.number_closing) for line in last_bank_statement.details_ids
)
for value in journal.cashbox_line_ids:
nested_values = {
'number_closing' : 0,
'number_opening' : 0,
'number_opening' : last_pieces.get(value.pieces, 0) if isinstance(last_pieces, dict) else 0,
'pieces' : value.pieces
}
vals['details_ids'].append([0, False, nested_values])
res_id = super(account_cash_statement, self).create(cr, uid, vals, context=context)

View File

@ -1045,7 +1045,7 @@ class account_invoice(osv.osv):
if obj_inv.type in ('out_invoice', 'out_refund'):
ctx = self.get_log_context(cr, uid, context=ctx)
message = _("Invoice '%s' is validated.") % name
self.message_append_note(cr, uid, [inv_id], body=message, context=context)
self.message_post(cr, uid, [inv_id], body=message, context=context)
return True
def action_cancel(self, cr, uid, ids, *args):
@ -1275,7 +1275,7 @@ class account_invoice(osv.osv):
# TODO: use currency's formatting function
msg = _("Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining).") % \
(name, pay_amount, code, invoice.amount_total, code, total, code)
self.message_append_note(cr, uid, [inv_id], body=msg, context=context)
self.message_post(cr, uid, [inv_id], body=msg, context=context)
self.pool.get('account.move.line').reconcile_partial(cr, uid, line_ids, 'manual', context)
# Update the stored value (fields.function), so we write to trigger recompute
@ -1288,24 +1288,25 @@ class account_invoice(osv.osv):
def _get_document_type(self, type):
type_dict = {
'out_invoice': 'Customer invoice',
'in_invoice': 'Supplier invoice',
'out_refund': 'Customer Refund',
'in_refund': 'Supplier Refund',
# Translation markers will have no effect at runtime, only used to properly flag export
'out_invoice': _('Customer invoice'),
'in_invoice': _('Supplier invoice'),
'out_refund': _('Customer Refund'),
'in_refund': _('Supplier Refund'),
}
return type_dict.get(type, 'Invoice')
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_append_note(cr, uid, [obj.id],body=_("%s <b>created</b>.") % (self._get_document_type(obj.type)), context=context)
self.message_post(cr, uid, [obj.id], body=_("%s <b>created</b>.") % (_(self._get_document_type(obj.type))), context=context)
def confirm_paid_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_append_note(cr, uid, [obj.id], body=_("%s <b>paid</b>.") % (self._get_document_type(obj.type)), context=context)
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("%s <b>paid</b>.") % (_(self._get_document_type(obj.type))), context=context)
def invoice_cancel_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_append_note(cr, uid, [obj.id], body=_("%s <b>cancelled</b>.") % (self._get_document_type(obj.type)), context=context)
self.message_post(cr, uid, [obj.id], body=_("%s <b>cancelled</b>.") % (_(self._get_document_type(obj.type))), context=context)
account_invoice()
@ -1361,10 +1362,16 @@ class account_invoice_line(osv.osv):
'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True)
}
def _default_account_id(self, cr, uid, ids, context=None):
prop = self.pool.get('ir.property').get(cr, uid, 'property_account_income_categ', 'product.category', context=context)
return prop and prop.id or False
_defaults = {
'quantity': 1,
'discount': 0.0,
'price_unit': _price_unit_default,
'account_id': _default_account_id,
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
@ -1473,10 +1480,11 @@ class account_invoice_line(osv.osv):
prod = self.pool.get('product.product').browse(cr, uid, product, context=context)
prod_uom = self.pool.get('product.uom').browse(cr, uid, uom, context=context)
if prod.uom_id.category_id.id != prod_uom.category_id.id:
warning = {
warning = {
'title': _('Warning!'),
'message': _('The selected unit of measure is not compatible with the unit of measure of the product.')
}
}
res['value'].update({'uos_id': prod.uom_id.id})
return {'value': res['value'], 'warning': warning}
return res

View File

@ -191,17 +191,23 @@
<page string="Invoice">
<field context="{'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False, 'type': type}" name="invoice_line">
<tree string="Invoice lines" editable="bottom">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id,parent.partner_id,parent.type,parent.fiscal_position,account_id)" groups="base.group_account_user"/>
<field name="invoice_line_tax_id" view_mode="2" context="{'type':parent.type}" domain="[('parent_id','=',False)]"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="product_id"
on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]"/>
<field name="quantity"/>
<field name="uos_id" groups="product.group_uom"
on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="price_unit"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="invoice_line_tax_id" widget="many2many_tags" context="{'type':parent.type}"
domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id,parent.partner_id,parent.type,parent.fiscal_position,account_id)" invisible="1"/>
<!-- Removed if subtotal is set -->
<field name="name" invisible="1"/>
<field name="uos_id" invisible="1"/>
</tree>
</field>
<group class="oe_subtotal_footer oe_right">
@ -342,17 +348,22 @@
<page string="Invoice Lines">
<field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}">
<tree string="Invoice Lines" editable="bottom">
<field name="invoice_line_tax_id" invisible="1"/>
<field name="product_id" />
<field name="product_id"
on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]"/>
<field name="quantity"/>
<field name="uos_id" groups="product.group_uom"
on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
<field name="price_unit"/>
<field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="invoice_line_tax_id" widget="many2many_tags" context="{'type':parent.type}"
domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal"/>
</tree>
</field>

View File

@ -515,7 +515,7 @@
<separator colspan="4" string="Accounts Allowed (empty for no control)"/>
<field colspan="4" name="account_control_ids" nolabel="1"/>
</page>
<page string="Cash Registers" attrs="{'invisible':[('type', '!=', 'cash')]}">
<page string="Cash Registers">
<group>
<group string="Accounts">
<field name="profit_account_id"/>
@ -524,10 +524,11 @@
</group>
<group string="Miscellaneous">
<field name="with_last_closing_balance"/>
<field name="cash_control"/>
</group>
</group>
<separator string="Available Coins" colspan="4" />
<field name="cashbox_line_ids" nolabel="1" string="Unit Of Currency Definition" colspan="4">
<separator string="Available Coins" colspan="4" attrs="{'invisible' : [('cash_control', '=', False)] }"/>
<field name="cashbox_line_ids" nolabel="1" string="Unit Of Currency Definition" colspan="4" attrs="{'invisible' : [('cash_control', '=', False)]}">
<tree string="CashBox Lines" editable="bottom">
<field name="pieces" />
</tree>

View File

@ -29,7 +29,6 @@
<form string="Account Board" version="7.0">
<board style="2-1">
<column>
<action name="%(account.action_invoice_tree1)d" creatable="true" string="Draft Customer Invoices" domain="[('state','in',('draft','proforma2')), ('type','=','out_invoice')]"/>
<action name="%(action_company_analysis_tree)d" string="Company Analysis"/>
</column>
<column>

View File

@ -381,6 +381,11 @@
<field name="name">Cash Journal - (test)</field>
<field name="code">TCSH</field>
<field name="type">cash</field>
<field name="profit_account_id" model="account.account" ref="rsa" />
<field name="loss_account_id" model="account.account" ref="rsa" />
<field name="internal_account_id" model="account.account" ref="rsa" />
<field name="with_last_closing_balance" eval="True" />
<field name="cash_control" eval="True" />
<field name="view_id" ref="account_journal_bank_view"/>
<field name="sequence_id" ref="sequence_cash_journal"/>
<field model="account.account" name="default_debit_account_id" ref="cash"/>

View File

@ -123,64 +123,6 @@
</div>
</div>
]]></field>
<field name="body_text"><![CDATA[
Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},
A new invoice is available for ${object.partner_id.name}:
| Invoice number: *${object.number}*
| Invoice total: *${object.amount_total} ${object.currency_id.name}*
| Invoice date: ${object.date_invoice}
% if object.origin:
| Order reference: ${object.origin}
% endif
| Your contact: ${object.user_id.name} ${object.user_id.email and '<%s>'%(object.user_id.email) or ''}
You can view the invoice document, download it and pay online using the following link:
${ctx.get('edi_web_url_view') or 'n/a'}
% if object.company_id.paypal_account and object.type in ('out_invoice', 'in_refund'):
<%
comp_name = quote(object.company_id.name)
inv_number = quote(object.number)
paypal_account = quote(object.company_id.paypal_account)
inv_amount = quote(str(object.amount_total))
cur_name = quote(object.currency_id.name)
paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Invoice%%20%s"\
"&invoice=%s&amount=%s&currency_code=%s&button_subtype=services&no_note=1&bn=OpenERP_Invoice_PayNow_%s" % \
(paypal_account,comp_name,inv_number,inv_number,inv_amount,cur_name,cur_name)
%>
It is also possible to directly pay with Paypal:
${paypal_url}
% endif
If you have any question, do not hesitate to contact us.
Thank you for choosing ${object.company_id.name}!
--
${object.user_id.name} ${object.user_id.email and '<%s>'%(object.user_id.email) or ''}
${object.company_id.name}
% if object.company_id.street:
${object.company_id.street or ''}
% endif
% if object.company_id.street2:
${object.company_id.street2}
% endif
% if object.company_id.city or object.company_id.zip:
${object.company_id.zip or ''} ${object.company_id.city or ''}
% endif
% if object.company_id.country_id:
${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}
% endif
% if object.company_id.phone:
Phone: ${object.company_id.phone}
% endif
% if object.company_id.website:
${object.company_id.website or ''}
% endif
]]></field>
</record>
</data>
</openerp>

View File

@ -9538,7 +9538,7 @@ msgid "Refund"
msgstr ""
#. module: account
#: model:email.template,body_text:account.email_template_edi_invoice
#: model:email.template,body:account.email_template_edi_invoice
msgid "\n"
"Hello${object.address_invoice_id.name and ' ' or ''}${object.address_invoice_id.name or ''},\n"
"\n"

View File

@ -7,7 +7,7 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Accounting" groups="base.group_user">
<page string="Accounting" groups="account.group_account_user">
<group name="properties">
<group>
<field name="property_account_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('sale_ok','=',0)]}"/>

View File

@ -186,19 +186,23 @@
<search string="Search Analytic Lines">
<field name="name" string="Analytic Line"/>
<field name="date"/>
<filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" icon="terp-camera_test" help="Analytic Journal Items related to a sale journal."/>
<filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" icon="terp-purchase" help="Analytic Journal Items related to a purchase journal."/>
<filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]" icon="terp-folder-orange"/>
<filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/>
<filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/>
<filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/>
<separator/>
<filter string="My Entries" domain="[('user_id','=',uid)]" icon="terp-personal"/>
<filter string="My Entries" domain="[('user_id','=',uid)]"/>
<field name="account_id"/>
<field name="user_id"/>
<group string="Group By..." expand="0">
<filter string="Account" context="{'group_by':'account_id'}" icon="terp-folder-green"/>
<filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-orange"/>
<filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
<filter string="Fin.Account" context="{'group_by':'general_account_id'}" icon="terp-folder-green"/>
<filter string="Product" context="{'group_by':'product_id'}" icon="terp-accessories-archiver"/>
<filter string="Analytic Account" context="{'group_by':'account_id'}"/>
<filter string="Fin. Account" context="{'group_by':'general_account_id'}"/>
<filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
<separator/>
<filter string="Product" context="{'group_by':'product_id'}"/>
<filter string="User" context="{'group_by':'user_id'}"/>
<separator/>
<filter string="Date" context="{'group_by':'date'}" name="group_date"/>
</group>
</search>
</field>
@ -357,16 +361,6 @@
action="action_account_analytic_journal_tree"
id="account_analytic_journal_print" parent="account.next_id_40"/>
<act_window
context="{'search_default_account_id': [active_id], 'search_default_user_id': False, 'default_account_id': active_id}"
id="act_acc_analytic_acc_5_report_hr_timesheet_invoice_journal"
name="All Analytic Entries"
res_model="account.analytic.line"
src_model="account.analytic.account"
view_mode="tree,form"
view_type="form"/>
<record id="view_account_journal_1" model="ir.ui.view">
<field name="name">account.journal.form.1</field>
<field name="model">account.journal</field>

View File

@ -30,9 +30,11 @@ class account_common_report(osv.osv_memory):
_description = "Account Common Report"
def onchange_chart_id(self, cr, uid, ids, chart_account_id=False, context=None):
res = {}
if chart_account_id:
company_id = self.pool.get('account.account').browse(cr, uid, chart_account_id, context=context).company_id.id
return {'value': {'company_id': company_id}}
res['value'] = {'company_id': company_id}
return res
_columns = {
'chart_account_id': fields.many2one('account.account', 'Chart of Account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]),

View File

@ -40,6 +40,10 @@ class CashBox(osv.osv_memory):
return {}
def _create_bank_statement_line(self, cr, uid, box, record, context=None):
values = self._compute_values_for_statement_line(cr, uid, box, record, context=context)
return self.pool.get('account.bank.statement.line').create(cr, uid, values, context=context)
class CashBoxIn(CashBox):
_name = 'cash.box.in'
@ -49,30 +53,24 @@ class CashBoxIn(CashBox):
'ref' : fields.char('Reference', size=32),
})
def _create_bank_statement_line(self, cr, uid, box, record, context=None):
absl_proxy = self.pool.get('account.bank.statement.line')
values = {
def _compute_values_for_statement_line(self, cr, uid, box, record, context=None):
return {
'statement_id' : record.id,
'journal_id' : record.journal_id.id,
'account_id' : record.journal_id.internal_account_id.id,
'amount' : box.amount or 0.0,
'ref' : "%s" % (box.ref or ''),
'ref' : '%s' % (box.ref or ''),
'name' : box.name,
}
return absl_proxy.create(cr, uid, values, context=context)
CashBoxIn()
class CashBoxOut(CashBox):
_name = 'cash.box.out'
def _create_bank_statement_line(self, cr, uid, box, record, context=None):
absl_proxy = self.pool.get('account.bank.statement.line')
def _compute_values_for_statement_line(self, cr, uid, box, record, context=None):
amount = box.amount or 0.0
values = {
return {
'statement_id' : record.id,
'journal_id' : record.journal_id.id,
'account_id' : record.journal_id.internal_account_id.id,
@ -80,6 +78,4 @@ class CashBoxOut(CashBox):
'name' : box.name,
}
return absl_proxy.create(cr, uid, values, context=context)
CashBoxOut()

View File

@ -21,13 +21,14 @@
</record>
<!-- Notify all employees of module installation -->
<function model="mail.group" name="message_append_note">
<!-- ids, subject, body, parent_id=False, type='notification', content_subtype='html' -->
<value eval="[ref('mail.group_all_employees')]"/>
<value>Module Accounting and Finance has been installed.</value>
<value>With OpenERP's accounting, you can get an instant access to all your financial data, setup your analytic accounting, forecast your taxes, control your budgets, easily create and send invoices, record bank statements, etc.
<record model="mail.message" id="module_install_notification">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_all_employees"/>
<field name="type">notification</field>
<field name="subject">Accounting and Finance application installed!</field>
<field name="body">With OpenERP's accounting, you get instant access to your financial data, and can setup analytic accounting, forecast taxes, control budgets, easily create and send invoices, record bank statements, etc.
The accounting features are fully integrated with others OpenERP applications to automate all your processes: creation of customer invoices, control of supplier invoices, point-of-sale integration, automated follow-ups, etc.</value>
</function>
The accounting features are fully integrated with other OpenERP applications to automate all your processes: creation of customer invoices, control of supplier invoices, point-of-sale integration, automated follow-ups, etc.</field>
</record>
</data>
</openerp>

View File

@ -40,6 +40,9 @@ Adds menu to show relevant information to each manager.You can also view the rep
'account_analytic_analysis_menu.xml',
'account_analytic_analysis_cron.xml',
],
'css': [
'static/src/css/analytic.css'
],
'demo': [],
'installable': True,
'auto_install': False,

View File

@ -451,8 +451,8 @@ class account_analytic_account(osv.osv):
'real_margin_rate': fields.function(_real_margin_rate_calc, type='float', string='Real Margin Rate (%)',
help="Computes using the formula: (Real Margin / Total Costs) * 100.",
digits_compute=dp.get_precision('Account')),
'fix_price_invoices' : fields.boolean('Fix Price Invoices'),
'invoice_on_timesheets' : fields.boolean("Invoice On Timesheets"),
'fix_price_invoices' : fields.boolean('Fixed Price'),
'invoice_on_timesheets' : fields.boolean("On Timesheets"),
'month_ids': fields.function(_analysis_all, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),
'user_ids': fields.function(_analysis_all, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'),
'hours_qtt_est': fields.float('Estimation of Hours to Invoice'),

View File

@ -6,12 +6,11 @@
Analytic Account form
-->
<act_window
id="action_sales_order"
name="Sales Orders"
res_model="sale.order"
src_model="account.analytic.account"
/>
<record model="ir.actions.act_window" id="action_sales_order">
<field name="name">Sales Orders</field>
<field name="res_model">sale.order</field>
<field name="src_model">account.analytic.account</field>
</record>
<record id="account_analytic_account_form_form" model="ir.ui.view">
<field name="name">account.analytic.account.invoice.form.inherit</field>
@ -22,30 +21,27 @@
<xpath expr='//div[@name="duration"]' position="after" version="7.0">
<label for="quantity_max"/>
<div>
<field name="quantity_max" class="oe_inline"/> / Remaining: <field name="remaining_hours" class="oe_inline"/>
<field name="quantity_max" class="oe_inline"/>
</div>
</xpath>
<xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
<group name='invoice_on_timesheets' string="Invoice on Timesheets Options" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}" col="4">
<field name="pricelist_id" attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
<field name="to_invoice" widget="selection" attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
</group>
</xpath>
<xpath expr='//group[@name="master"]' position='after'>
<xpath expr='//separator[@name="description"]' position='before'>
<separator name="toinvoice" string="Invoicing"/>
<table width="100%%">
<table class="oe_form_analytic_account">
<tr>
<th></th>
<th></th>
<th><label string="Est.Tot"/></th>
<th><label string="Invoiced"/></th>
<th><label string="Remaining"/></th>
<th><label string="To Invoice"/></th>
<th class="oe_grey" width="160px"></th>
<th class="oe_grey" width="25px"></th>
<th class="oe_grey" width="100px"><label string="Expected"/></th>
<th class="oe_grey" width="100px"><label string="Invoiced"/></th>
<th class="oe_grey" width="100px"><label string="Remaining"/></th>
<th class="oe_grey" width="100px"><label string="To Invoice"/></th>
<th width="30px"></th>
<th></th>
</tr><tr>
<td>
<td class="oe_grey">
<label for="fix_price_invoices"/>
</td><td>
</td><td class="oe_grey">
<field name="fix_price_invoices" class="oe_inline"/>
</td><td>
<field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
@ -56,13 +52,22 @@
</td><td>
<field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td>
<button name="%(action_sales_order)d" string="All Sales" type="action" context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id],'search_default_project_id': [active_id],'default_project_id': [active_id]}" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
<button name="open_sale_order_lines" string="Lines To Invoice" type="object" context="{'default_partner_id': [partner_id],'default_project_id': active_id,'search_default_uninvoiced': 1,'search_default_project_id': active_id,'search_default_partner_id': [partner_id]}" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td>
</tr><tr attrs="{'invisible':[('use_timesheets','=',False)]}">
<td>
<label for="invoice_on_timesheets"/>
<button name="open_sale_order_lines"
class="oe_link oe_e"
string="/" type="object"
context="{'default_partner_id': [partner_id],'default_project_id': active_id,'search_default_uninvoiced': 1,'search_default_project_id': active_id,'search_default_partner_id': [partner_id]}"
attrs="{'invisible': [('fix_price_to_invoice','=',0)]}"/>
</td><td>
<button name="%(action_sales_order)d" string="Sale Orders"
type="action"
class="oe_link"
context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id],'search_default_project_id': [active_id],'default_project_id': [active_id]}"
attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td>
</tr><tr>
<td class="oe_grey">
<label for="invoice_on_timesheets"/>
</td><td class="oe_grey">
<field name="invoice_on_timesheets"/>
</td><td>
<field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
@ -73,25 +78,44 @@
</td><td>
<field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td>
<button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" string="All Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}" context="{'default_account_id': active_id,'search_default_account_id': active_id}"/>
<button name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Timesheets to Invoice" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
<button name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d"
type="action"
class="oe_link oe_e"
string="/"
attrs="{'invisible': [('ca_to_invoice','=',0.0)]}"/>
</td><td>
<button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d"
string="Timesheets" type="action"
class="oe_link"
attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"
context="{'default_account_id': active_id,'search_default_account_id': active_id}"/>
</td>
</tr><tr name='total'>
<th>
<th class="oe_grey">
<label string="Total"/>
</th><td>
</td><td>
</th><td class="oe_grey">
</td><td class="oe_grey">
<field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td>
</td><td class="oe_grey">
<field name="invoiced_total" class="oe_inline"/>
</td><td>
</td><td class="oe_grey">
<field name="remaining_total" class="oe_inline"/>
</td><td>
</td><td class="oe_grey">
<field name="toinvoice_total" class="oe_inline"/>
</td><td>
</td>
</tr>
</table>
<group name='invoice_on_timesheets' attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
<field name="pricelist_id"
class="oe_inline"
attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
<field name="to_invoice"
class="oe_inline"
widget="selection"
attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
</group>
</xpath>
</field>
</record>

View File

@ -0,0 +1,3 @@
analytic.css: analytic.sass
sass -t expanded analytic.sass analytic.css

View File

@ -0,0 +1,15 @@
@charset "utf-8";
.openerp .oe_form table.oe_form_analytic_account tr {
height: 28px;
}
.openerp .oe_form table.oe_form_analytic_account tr td, .openerp .oe_form table.oe_form_analytic_account tr th {
vertical-align: middle;
}
.openerp .oe_form table.oe_form_analytic_account tr td .oe_form_field_float, .openerp .oe_form table.oe_form_analytic_account tr th .oe_form_field_float {
float: right;
width: auto !important;
}
.openerp .oe_form table.oe_form_analytic_account .oe_grey {
background-color: #eeeeee;
color: #404040;
}

View File

@ -0,0 +1,15 @@
@charset "utf-8"
.openerp .oe_form
table.oe_form_analytic_account
tr
height: 28px
td,th
vertical-align: middle
.oe_form_field_float
float: right
width: auto !important
.oe_grey
background-color: #eeeeee
color: #404040

View File

@ -0,0 +1,546 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-09-02 09:46+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-03 05:21+0000\n"
"X-Generator: Launchpad (build 15890)\n"
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid ""
"This distribution model has been saved.You will be able to reuse it later."
msgstr ""
"Denne fordeling modellen har vært lagret. Du vil kunne bruke den senere."
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,plan_id:0
msgid "Plan Id"
msgstr "Plan ID"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "From Date"
msgstr "Fra dato"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
#: view:account.crossovered.analytic:0
#: model:ir.actions.act_window,name:account_analytic_plans.action_account_crossovered_analytic
#: model:ir.actions.report.xml,name:account_analytic_plans.account_analytic_account_crossovered_analytic
msgid "Crossovered Analytic"
msgstr "Krysset Analyse"
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,name:0
#: field:account.analytic.plan.line,plan_id:0
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_form_action
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_plan_action
msgid "Analytic Plan"
msgstr "Analytisk Plan"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,journal_id:0
#: view:account.crossovered.analytic:0
#: field:account.crossovered.analytic,journal_ids:0
msgid "Analytic Journal"
msgstr "Analytisk journal"
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_line
msgid "Analytic Plan Line"
msgstr "Analytisk plan linje"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
#, python-format
msgid "User Error"
msgstr "Brukerfeil"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
msgid "Analytic Plan Instance"
msgstr "Analytisk Plan forekomst"
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid "Ok"
msgstr "Ok"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,plan_id:0
msgid "Model's Plan"
msgstr "Modell Plan"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account2_ids:0
msgid "Account2 Id"
msgstr "Konto2 ID"
#. module: account_analytic_plans
#: sql_constraint:account.invoice:0
msgid "Invoice Number must be unique per Company!"
msgstr "Fakturanummer må være unik pr. firma!"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Amount"
msgstr "Beløp"
#. module: account_analytic_plans
#: constraint:account.journal:0
msgid ""
"Configuration error! The currency chosen should be shared by the default "
"accounts too."
msgstr ""
"Konfigurasjon feil! Den valgte valutaen bør deles av standard kontoer også."
#. module: account_analytic_plans
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr "Feil kredit eller debet beløp i regnskaps oppføringen !"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account6_ids:0
msgid "Account6 Id"
msgstr "Konto6 ID"
#. module: account_analytic_plans
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_multi_plan_action
msgid "Multi Plans"
msgstr "Multi Planer"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement_line
msgid "Bank Statement Line"
msgstr "Kontoutskriftlinje"
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_form_action_installer
msgid "Define your Analytic Plans"
msgstr "Definer dine analytiske planer."
#. module: account_analytic_plans
#: constraint:account.invoice:0
msgid "Invalid BBA Structured Communication !"
msgstr "Ugyldig BBA Strukturert Kommunikasjon!"
#. module: account_analytic_plans
#: constraint:account.bank.statement:0
msgid "The journal and period chosen have to belong to the same company."
msgstr "Tidsskriftet og perioden valgt å tilhøre samme selskap."
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid ""
"The date of your Journal Entry is not in the defined period! You should "
"change the date or remove this constraint from the journal."
msgstr ""
"Datoen for din bilagsregistrering ikke er i den definerte perioden! Du bør "
"endre datoen eller fjerne denne begrensningen fra tidsskriftet."
#. module: account_analytic_plans
#: sql_constraint:account.journal:0
msgid "The code of the journal must be unique per company !"
msgstr "Journalkoden må være unik pr firma!"
#. module: account_analytic_plans
#: field:account.crossovered.analytic,ref:0
msgid "Analytic Account Reference"
msgstr "Analytisk konto Referanse."
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_sale_order_line
msgid "Sales Order Line"
msgstr "Salgsordrelinje"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:47
#: view:analytic.plan.create.model:0
#, python-format
msgid "Distribution Model Saved"
msgstr "Distribusjon Model Lagret"
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_instance_action
msgid "Analytic Distribution's Models"
msgstr "Analytisk distribusjon modeller"
#. module: account_analytic_plans
#: view:account.crossovered.analytic:0
msgid "Print"
msgstr "Skriv ut"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
#: field:account.analytic.line,percentage:0
msgid "Percentage"
msgstr "Prosentdel"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
#, python-format
msgid "A model having this name and code already exists !"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "No analytic plan defined !"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,rate:0
msgid "Rate (%)"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,plan_ids:0
#: field:account.journal,plan_id:0
msgid "Analytic Plans"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Perc(%)"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,max_required:0
msgid "Maximum Allowed (%)"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Printing date"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
msgid "Analytic Plan Lines"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.bank.statement.line:0
msgid ""
"The amount of the voucher must be the same amount as the one on the "
"statement line"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_invoice_line
msgid "Invoice Line"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid ""
"The selected account of your Journal Entry forces to provide a secondary "
"currency. You should remove the secondary currency on the account or select "
"a multi-currency view on the journal."
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Currency"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,date1:0
msgid "Start Date"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account_ids:0
msgid "Account Id"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account5_ids:0
msgid "Account5 Id"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance_line
msgid "Analytic Instance Line"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,root_analytic_id:0
msgid "Root Account"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "To Date"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:341
#: code:addons/account_analytic_plans/account_analytic_plans.py:485
#, python-format
msgid "You have to define an analytic journal on the '%s' journal!"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,empty_line:0
msgid "Dont show empty lines"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.action_analytic_plan_create_model
msgid "analytic.plan.create.model.action"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account :"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account Reference:"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,name:0
msgid "Plan Name"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan,default_instance_id:0
msgid "Default Entries"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_move_line
msgid "Journal Items"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account1_ids:0
msgid "Account1 Id"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,min_required:0
msgid "Minimum Allowed (%)"
msgstr ""
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_id:0
msgid "Root account of this plan."
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "Error"
msgstr ""
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid "Save This Distribution as a Model"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "You can not create journal items on an account of type view."
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Quantity"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#, python-format
msgid "Please put a name and a code before saving the model !"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_crossovered_analytic
msgid "Print Crossovered Analytic"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:341
#: code:addons/account_analytic_plans/account_analytic_plans.py:485
#, python-format
msgid "No Analytic Journal !"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,analytic_account_id:0
msgid "Analytic Account"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
msgid "Bank Statement"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
msgid "Account3 Id"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.analytic.line:0
msgid "You can not create analytic line on view account."
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_invoice
msgid "Invoice"
msgstr ""
#. module: account_analytic_plans
#: view:account.crossovered.analytic:0
#: view:analytic.plan.create.model:0
msgid "Cancel"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
msgid "Account4 Id"
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "Company must be the same for its related account and period."
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Lines"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
msgid "The Total Should be Between %s and %s"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "at"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Account Name"
msgstr ""
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Line"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,code:0
msgid "Distribution Code"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "%"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "100.00%"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.default,analytics_id:0
#: view:account.analytic.plan.instance:0
#: field:account.analytic.plan.instance,name:0
#: field:account.bank.statement.line,analytics_id:0
#: field:account.invoice.line,analytics_id:0
#: field:account.move.line,analytics_id:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_default
msgid "Analytic Distribution"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_journal
msgid "Journal"
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Code"
msgstr ""
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_analytic_plan_create_model
msgid "analytic.plan.create.model"
msgstr ""
#. module: account_analytic_plans
#: field:account.crossovered.analytic,date2:0
msgid "End Date"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_instance_model_open
msgid "Distribution Models"
msgstr ""
#. module: account_analytic_plans
#: model:ir.actions.act_window,help:account_analytic_plans.account_analytic_plan_form_action_installer
msgid ""
"To setup a multiple analytic plans environment, you must define the root "
"analytic accounts for each plan set. Then, you must attach a plan set to "
"your account journals."
msgstr ""
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "You can not create journal items on closed account."
msgstr ""
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Company"
msgstr ""
#. module: account_analytic_plans
#: field:account.analytic.plan.line,sequence:0
msgid "Sequence"
msgstr ""
#. module: account_analytic_plans
#: sql_constraint:account.journal:0
msgid "The name of the journal must be unique per company !"
msgstr ""
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
msgid "Value Error"
msgstr ""

View File

@ -0,0 +1,839 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-08-28 14:30+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Assets in draft and open states"
msgstr "Eiendeler i utkastet og åpen stater"
#. module: account_asset
#: field:account.asset.category,method_end:0
#: field:account.asset.history,method_end:0 field:asset.modify,method_end:0
msgid "Ending date"
msgstr "Slutt dato"
#. module: account_asset
#: field:account.asset.asset,value_residual:0
msgid "Residual Value"
msgstr "restverdi"
#. module: account_asset
#: field:account.asset.category,account_expense_depreciation_id:0
msgid "Depr. Expense Account"
msgstr "Avskr. utgiftskonto"
#. module: account_asset
#: view:asset.depreciation.confirmation.wizard:0
msgid "Compute Asset"
msgstr "Beregn eiendel"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Group By..."
msgstr "Grupper etter ..."
#. module: account_asset
#: field:asset.asset.report,gross_value:0
msgid "Gross Amount"
msgstr "bruttobeløp"
#. module: account_asset
#: view:account.asset.asset:0 field:account.asset.asset,name:0
#: field:account.asset.depreciation.line,asset_id:0
#: field:account.asset.history,asset_id:0 field:account.move.line,asset_id:0
#: view:asset.asset.report:0 field:asset.asset.report,asset_id:0
#: model:ir.model,name:account_asset.model_account_asset_asset
msgid "Asset"
msgstr "Eiendel"
#. module: account_asset
#: help:account.asset.asset,prorata:0 help:account.asset.category,prorata:0
msgid ""
"Indicates that the first depreciation entry for this asset have to be done "
"from the purchase date instead of the first January"
msgstr ""
"Angir at den første avskrivninger oppføring for denne eiendelen må gjøres "
"fra kjøpsdato i stedet for første januar"
#. module: account_asset
#: field:account.asset.history,name:0
msgid "History name"
msgstr "Historie navn"
#. module: account_asset
#: field:account.asset.asset,company_id:0
#: field:account.asset.category,company_id:0 view:asset.asset.report:0
#: field:asset.asset.report,company_id:0
msgid "Company"
msgstr "Firma"
#. module: account_asset
#: view:asset.modify:0
msgid "Modify"
msgstr "Modifiser"
#. module: account_asset
#: selection:account.asset.asset,state:0 view:asset.asset.report:0
#: selection:asset.asset.report,state:0
msgid "Running"
msgstr "Løper"
#. module: account_asset
#: field:account.asset.depreciation.line,amount:0
msgid "Depreciation Amount"
msgstr "avskrivningsbeløpet"
#. module: account_asset
#: view:asset.asset.report:0
#: model:ir.actions.act_window,name:account_asset.action_asset_asset_report
#: model:ir.model,name:account_asset.model_asset_asset_report
#: model:ir.ui.menu,name:account_asset.menu_action_asset_asset_report
msgid "Assets Analysis"
msgstr "eiendeler Analyse"
#. module: account_asset
#: field:asset.modify,name:0
msgid "Reason"
msgstr "Grunn"
#. module: account_asset
#: field:account.asset.asset,method_progress_factor:0
#: field:account.asset.category,method_progress_factor:0
msgid "Degressive Factor"
msgstr "degressive faktor"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_normal
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_list_normal
msgid "Asset Categories"
msgstr "Eiendel kategorier"
#. module: account_asset
#: view:asset.depreciation.confirmation.wizard:0
msgid ""
"This wizard will post the depreciation lines of running assets that belong "
"to the selected period."
msgstr ""
"Denne veiviseren vil legge inn avskrivning linjer som kjører eiendeler som "
"tilhører den valgte perioden."
#. module: account_asset
#: field:account.asset.asset,account_move_line_ids:0
#: field:account.move.line,entry_ids:0
#: model:ir.actions.act_window,name:account_asset.act_entries_open
msgid "Entries"
msgstr "Inngang"
#. module: account_asset
#: view:account.asset.asset:0
#: field:account.asset.asset,depreciation_line_ids:0
msgid "Depreciation Lines"
msgstr "Avskrivninger linjer"
#. module: account_asset
#: help:account.asset.asset,salvage_value:0
msgid "It is the amount you plan to have that you cannot depreciate."
msgstr "det er mengden du har tenkt å ha du ikke kan avskrive."
#. module: account_asset
#: field:account.asset.depreciation.line,depreciation_date:0
#: view:asset.asset.report:0 field:asset.asset.report,depreciation_date:0
msgid "Depreciation Date"
msgstr "Avskrivninger Dato"
#. module: account_asset
#: field:account.asset.category,account_asset_id:0
msgid "Asset Account"
msgstr "Eiendel Konto"
#. module: account_asset
#: field:asset.asset.report,posted_value:0
msgid "Posted Amount"
msgstr "Skrevet Beløp"
#. module: account_asset
#: view:account.asset.asset:0 view:asset.asset.report:0
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_form
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_form
#: model:ir.ui.menu,name:account_asset.menu_finance_assets
#: model:ir.ui.menu,name:account_asset.menu_finance_config_assets
msgid "Assets"
msgstr "Eiendeler"
#. module: account_asset
#: field:account.asset.category,account_depreciation_id:0
msgid "Depreciation Account"
msgstr "avskrivnings konto"
#. module: account_asset
#: view:account.asset.asset:0 view:account.asset.category:0
#: view:account.asset.history:0 view:asset.modify:0 field:asset.modify,note:0
msgid "Notes"
msgstr "Notater"
#. module: account_asset
#: field:account.asset.depreciation.line,move_id:0
msgid "Depreciation Entry"
msgstr "Avskrivnings Inngang"
#. module: account_asset
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr "Feil kredit eller debet beløp i regnskaps oppføringen !"
#. module: account_asset
#: view:asset.asset.report:0 field:asset.asset.report,nbr:0
msgid "# of Depreciation Lines"
msgstr "Ant. Avskrivninger linjer"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Assets in draft state"
msgstr "Eiendeler i utkast"
#. module: account_asset
#: field:account.asset.asset,method_end:0
#: selection:account.asset.asset,method_time:0
#: selection:account.asset.category,method_time:0
#: selection:account.asset.history,method_time:0
msgid "Ending Date"
msgstr "Sluttdato"
#. module: account_asset
#: field:account.asset.asset,code:0
msgid "Reference"
msgstr "Referanse"
#. module: account_asset
#: constraint:account.invoice:0
msgid "Invalid BBA Structured Communication !"
msgstr "Ugyldig BBA Strukturert Kommunikasjon!"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Account Asset"
msgstr "Konto Eiendel"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard
#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard
msgid "Compute Assets"
msgstr "Beregn Eiendeler"
#. module: account_asset
#: field:account.asset.depreciation.line,sequence:0
msgid "Sequence of the depreciation"
msgstr "Sekvens av svekkelsen"
#. module: account_asset
#: field:account.asset.asset,method_period:0
#: field:account.asset.category,method_period:0
#: field:account.asset.history,method_period:0
#: field:asset.modify,method_period:0
msgid "Period Length"
msgstr "Periode lengde"
#. module: account_asset
#: selection:account.asset.asset,state:0 view:asset.asset.report:0
#: selection:asset.asset.report,state:0
msgid "Draft"
msgstr "Kladd"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Date of asset purchase"
msgstr "Dato for kjøpsavtalen"
#. module: account_asset
#: help:account.asset.asset,method_number:0
msgid "Calculates Depreciation within specified interval"
msgstr "Beregner Avskrivninger innen angitt intervall"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Change Duration"
msgstr "Endre Varighet"
#. module: account_asset
#: field:account.asset.category,account_analytic_id:0
msgid "Analytic account"
msgstr "Analytisk konto"
#. module: account_asset
#: field:account.asset.asset,method:0 field:account.asset.category,method:0
msgid "Computation Method"
msgstr "Beregningsmetoden"
#. module: account_asset
#: help:account.asset.asset,method_period:0
msgid "State here the time during 2 depreciations, in months"
msgstr "Oppgi her tiden under 2 avskrivninger, i måneder."
#. module: account_asset
#: constraint:account.asset.asset:0
msgid ""
"Prorata temporis can be applied only for time method \"number of "
"depreciations\"."
msgstr ""
"Prorata temporis kan bare brukes for tiden metoden \"antall avskrivninger\"."
#. module: account_asset
#: help:account.asset.history,method_time:0
msgid ""
"The method to use to compute the dates and number of depreciation lines.\n"
"Number of Depreciations: Fix the number of depreciation lines and the time "
"between 2 depreciations.\n"
"Ending Date: Choose the time between 2 depreciations and the date the "
"depreciations won't go beyond."
msgstr ""
"Metode for å beregne datoene og antall avskrivninger linjer.\n"
"Antall Avskrivninger: Fest antall avskrivninger linjer og tiden mellom to "
"avskrivninger.\n"
"Sluttdato: Velg mellom 2 avskrivninger og datoen avskrivninger vil ikke gå "
"utover."
#. module: account_asset
#: field:account.asset.asset,purchase_value:0
msgid "Gross value "
msgstr "Bruttoverdi "
#. module: account_asset
#: constraint:account.asset.asset:0
msgid "Error ! You can not create recursive assets."
msgstr "Feil! Du kan ikke lage rekrusive eiendeler."
#. module: account_asset
#: help:account.asset.history,method_period:0
msgid "Time in month between two depreciations"
msgstr "Tiden i måneden mellom to avskrivninger"
#. module: account_asset
#: view:asset.asset.report:0 field:asset.asset.report,name:0
msgid "Year"
msgstr "År"
#. module: account_asset
#: view:asset.modify:0
#: model:ir.actions.act_window,name:account_asset.action_asset_modify
#: model:ir.model,name:account_asset.model_asset_modify
msgid "Modify Asset"
msgstr "Endre eiendel"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Other Information"
msgstr "Annen informasjon"
#. module: account_asset
#: field:account.asset.asset,salvage_value:0
msgid "Salvage Value"
msgstr "Restverdi"
#. module: account_asset
#: field:account.invoice.line,asset_category_id:0 view:asset.asset.report:0
msgid "Asset Category"
msgstr "Eiendel kategori"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Set to Close"
msgstr "Satt til Lukk."
#. module: account_asset
#: model:ir.actions.wizard,name:account_asset.wizard_asset_compute
msgid "Compute assets"
msgstr "Beregn eiendeler"
#. module: account_asset
#: model:ir.actions.wizard,name:account_asset.wizard_asset_modify
msgid "Modify asset"
msgstr "Endre eiendel."
#. module: account_asset
#: view:account.asset.asset:0
msgid "Assets in closed state"
msgstr "Eiendeler i lukket tilstand"
#. module: account_asset
#: field:account.asset.asset,parent_id:0
msgid "Parent Asset"
msgstr "overordnede Eiendel"
#. module: account_asset
#: view:account.asset.history:0
#: model:ir.model,name:account_asset.model_account_asset_history
msgid "Asset history"
msgstr "Eiendel historie"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Assets purchased in current year"
msgstr "Eiendeler som er kjøpt i inneværende år"
#. module: account_asset
#: field:account.asset.asset,state:0 field:asset.asset.report,state:0
msgid "State"
msgstr "Stat"
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_invoice_line
msgid "Invoice Line"
msgstr "Fakturalinje"
#. module: account_asset
#: constraint:account.move.line:0
msgid ""
"The selected account of your Journal Entry forces to provide a secondary "
"currency. You should remove the secondary currency on the account or select "
"a multi-currency view on the journal."
msgstr ""
"Den valgte kontoen av dine Bilagsregistrering blir tvunget for å gi en "
"sekundær valuta. Du bør fjerne den sekundære valuta på konto eller velg en "
"flervaluta syn på tidsskriftet."
#. module: account_asset
#: view:asset.asset.report:0
msgid "Month"
msgstr "Måned"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation Board"
msgstr "Avskrivninger Styret"
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_move_line
msgid "Journal Items"
msgstr "Journal Elementer"
#. module: account_asset
#: field:asset.asset.report,unposted_value:0
msgid "Unposted Amount"
msgstr "Ikke resultatført beløp"
#. module: account_asset
#: field:account.asset.asset,method_time:0
#: field:account.asset.category,method_time:0
#: field:account.asset.history,method_time:0
msgid "Time Method"
msgstr "tid Metode"
#. module: account_asset
#: view:account.asset.category:0
msgid "Analytic Information"
msgstr ""
#. module: account_asset
#: view:asset.modify:0
msgid "Asset Durations to Modify"
msgstr ""
#. module: account_asset
#: constraint:account.move.line:0
msgid ""
"The date of your Journal Entry is not in the defined period! You should "
"change the date or remove this constraint from the journal."
msgstr ""
"Datoen for din bilagsregistrering ikke er i den definerte perioden! Du bør "
"endre datoen eller fjerne denne begrensningen fra tidsskriftet."
#. module: account_asset
#: field:account.asset.asset,note:0 field:account.asset.category,note:0
#: field:account.asset.history,note:0
msgid "Note"
msgstr "Notat"
#. module: account_asset
#: help:account.asset.asset,method:0 help:account.asset.category,method:0
msgid ""
"Choose the method to use to compute the amount of depreciation lines.\n"
" * Linear: Calculated on basis of: Gross Value / Number of Depreciations\n"
" * Degressive: Calculated on basis of: Remaining Value * Degressive Factor"
msgstr ""
"Velg metoden som skal brukes for å beregne mengden av avskrivninger linjer.\n"
"* Lineær: Beregnet på grunnlag av: bruttoverdi / Antall Avskrivninger\n"
"* Degressiv: Beregnet på grunnlag av: restverdi * degressiv faktor"
#. module: account_asset
#: help:account.asset.asset,method_time:0
#: help:account.asset.category,method_time:0
msgid ""
"Choose the method to use to compute the dates and number of depreciation "
"lines.\n"
" * Number of Depreciations: Fix the number of depreciation lines and the "
"time between 2 depreciations.\n"
" * Ending Date: Choose the time between 2 depreciations and the date the "
"depreciations won't go beyond."
msgstr ""
"Velg metoden som skal brukes for å beregne datoene og antall avskrivninger "
"linjer.\n"
" * Antall Avskrivninger: Fest antall avskrivninger linjer og tiden mellom to "
"avskrivninger.\n"
" * Sluttdato: Velg mellom 2 avskrivninger og datoen avskrivninger vil ikke "
"gå utover."
#. module: account_asset
#: view:asset.asset.report:0
msgid "Assets in running state"
msgstr "Eiendeler i rennende staten"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Closed"
msgstr "Lukket"
#. module: account_asset
#: field:account.asset.asset,partner_id:0
#: field:asset.asset.report,partner_id:0
msgid "Partner"
msgstr "Partner"
#. module: account_asset
#: view:asset.asset.report:0 field:asset.asset.report,depreciation_value:0
msgid "Amount of Depreciation Lines"
msgstr "Størrelsen på avskrivningene linjer"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Posted depreciation lines"
msgstr "Postet avskrivninger linjer"
#. module: account_asset
#: constraint:account.move.line:0
msgid "Company must be the same for its related account and period."
msgstr "Selskapet må være den samme for tilhørende konto og periode"
#. module: account_asset
#: field:account.asset.asset,child_ids:0
msgid "Children Assets"
msgstr "Barn Eiendeler"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Date of depreciation"
msgstr "Dato av avskrivninger"
#. module: account_asset
#: field:account.asset.history,user_id:0
msgid "User"
msgstr "Bruker"
#. module: account_asset
#: field:account.asset.history,date:0
msgid "Date"
msgstr "Dato"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Assets purchased in current month"
msgstr "Eiendeler som er kjøpt i inneværende måned"
#. module: account_asset
#: constraint:account.move.line:0
msgid "You can not create journal items on an account of type view."
msgstr "Du kan ikke lage journalregistreringer på konto av typen vis"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Extended Filters..."
msgstr "Utvidet Filtere ..."
#. module: account_asset
#: view:account.asset.asset:0 view:asset.depreciation.confirmation.wizard:0
msgid "Compute"
msgstr "Beregn"
#. module: account_asset
#: view:account.asset.category:0
msgid "Search Asset Category"
msgstr "Søk eiendel Kategori"
#. module: account_asset
#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard
msgid "asset.depreciation.confirmation.wizard"
msgstr "eiendel.avskrivninger.bekreftelse.veiviseren"
#. module: account_asset
#: field:account.asset.asset,active:0
msgid "Active"
msgstr "Aktiv"
#. module: account_asset
#: model:ir.actions.wizard,name:account_asset.wizard_asset_close
msgid "Close asset"
msgstr "Lukket eiendel"
#. module: account_asset
#: field:account.asset.depreciation.line,parent_state:0
msgid "State of Asset"
msgstr "State av eiendel."
#. module: account_asset
#: field:account.asset.depreciation.line,name:0
msgid "Depreciation Name"
msgstr "Avskrivninger Navn"
#. module: account_asset
#: view:account.asset.asset:0 field:account.asset.asset,history_ids:0
msgid "History"
msgstr "Historie"
#. module: account_asset
#: sql_constraint:account.invoice:0
msgid "Invoice Number must be unique per Company!"
msgstr "Fakturanummer må være unik pr. firma!"
#. module: account_asset
#: field:asset.depreciation.confirmation.wizard,period_id:0
msgid "Period"
msgstr "Periode"
#. module: account_asset
#: view:account.asset.asset:0
msgid "General"
msgstr "Genrelt"
#. module: account_asset
#: field:account.asset.asset,prorata:0 field:account.asset.category,prorata:0
msgid "Prorata Temporis"
msgstr ""
#. module: account_asset
#: view:account.asset.category:0
msgid "Accounting Information"
msgstr ""
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_invoice
msgid "Invoice"
msgstr "Faktura"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_form_normal
msgid "Review Asset Categories"
msgstr "Gjennomgå eiendel kategorier"
#. module: account_asset
#: view:asset.depreciation.confirmation.wizard:0 view:asset.modify:0
msgid "Cancel"
msgstr "Avbryt"
#. module: account_asset
#: selection:account.asset.asset,state:0 selection:asset.asset.report,state:0
msgid "Close"
msgstr "Lukke"
#. module: account_asset
#: view:account.asset.asset:0 view:account.asset.category:0
msgid "Depreciation Method"
msgstr "Avskrivningsmetode"
#. module: account_asset
#: field:account.asset.asset,purchase_date:0 view:asset.asset.report:0
#: field:asset.asset.report,purchase_date:0
msgid "Purchase Date"
msgstr "Kjøpsdato"
#. module: account_asset
#: selection:account.asset.asset,method:0
#: selection:account.asset.category,method:0
msgid "Degressive"
msgstr ""
#. module: account_asset
#: help:asset.depreciation.confirmation.wizard,period_id:0
msgid ""
"Choose the period for which you want to automatically post the depreciation "
"lines of running assets"
msgstr ""
"Velg den perioden du ønsker å automatisk legge inn avskrivninger linjer av "
"kjører eiendeler."
#. module: account_asset
#: view:account.asset.asset:0
msgid "Current"
msgstr "Nåværende"
#. module: account_asset
#: field:account.asset.depreciation.line,remaining_value:0
msgid "Amount to Depreciate"
msgstr "Beløp å avskrive"
#. module: account_asset
#: field:account.asset.category,open_asset:0
msgid "Skip Draft State"
msgstr "Hopp over Utkast stat"
#. module: account_asset
#: view:account.asset.asset:0 view:account.asset.category:0
#: view:account.asset.history:0
msgid "Depreciation Dates"
msgstr "Avskrivninger datoer"
#. module: account_asset
#: field:account.asset.asset,currency_id:0
msgid "Currency"
msgstr "Valuta"
#. module: account_asset
#: field:account.asset.category,journal_id:0
msgid "Journal"
msgstr "Journal"
#. module: account_asset
#: field:account.asset.depreciation.line,depreciated_value:0
msgid "Amount Already Depreciated"
msgstr "Beløp Allerede Avskrives"
#. module: account_asset
#: field:account.asset.depreciation.line,move_check:0
#: view:asset.asset.report:0 field:asset.asset.report,move_check:0
msgid "Posted"
msgstr "Lagt inn"
#. module: account_asset
#: help:account.asset.asset,state:0
msgid ""
"When an asset is created, the state is 'Draft'.\n"
"If the asset is confirmed, the state goes in 'Running' and the depreciation "
"lines can be posted in the accounting.\n"
"You can manually close an asset when the depreciation is over. If the last "
"line of depreciation is posted, the asset automatically goes in that state."
msgstr ""
"Når en eiendel er opprettet, er staten \"Kladd\".\n"
"Dersom eiendelen er bekreftet, går staten i 'Running' og avskrivninger "
"linjer kan bli lagt i regnskapssystemet.\n"
"Du kan manuelt lukke et aktivum når avskrivningen er over. Hvis den siste "
"linjen av avskrivninger er lagt ut, går eiendelen automatisk i den "
"tilstanden."
#. module: account_asset
#: field:account.asset.category,name:0
msgid "Name"
msgstr "Navn"
#. module: account_asset
#: help:account.asset.category,open_asset:0
msgid ""
"Check this if you want to automatically confirm the assets of this category "
"when created by invoices."
msgstr ""
"Sjekk dette hvis du ønsker å automatisk bekrefte eiendeler i denne "
"kategorien når laget av fakturaer."
#. module: account_asset
#: view:account.asset.asset:0
msgid "Set to Draft"
msgstr "Sett som utkast"
#. module: account_asset
#: selection:account.asset.asset,method:0
#: selection:account.asset.category,method:0
msgid "Linear"
msgstr "Lineær"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Month-1"
msgstr "Måned-1"
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_asset_depreciation_line
msgid "Asset depreciation line"
msgstr "Eiendel avskrinings linje"
#. module: account_asset
#: field:account.asset.asset,category_id:0 view:account.asset.category:0
#: field:asset.asset.report,asset_category_id:0
#: model:ir.model,name:account_asset.model_account_asset_category
msgid "Asset category"
msgstr "Eiendel kategori"
#. module: account_asset
#: view:asset.asset.report:0
msgid "Assets purchased in last month"
msgstr "Eiendeler som er kjøpt i forrige måned."
#. module: account_asset
#: code:addons/account_asset/wizard/wizard_asset_compute.py:49
#, python-format
msgid "Created Asset Moves"
msgstr "Opprettet eiendel trekk."
#. module: account_asset
#: constraint:account.move.line:0
msgid "You can not create journal items on closed account."
msgstr "Du kan ikke lage journal elementer på en lukket konto."
#. module: account_asset
#: model:ir.actions.act_window,help:account_asset.action_asset_asset_report
msgid ""
"From this report, you can have an overview on all depreciation. The tool "
"search can also be used to personalise your Assets reports and so, match "
"this analysis to your needs;"
msgstr ""
"Fra denne rapporten, kan du ha en oversikt over alle avskrivninger. "
"Verktøyet søk kan også brukes til å tilpasse dine eiendeler rapporter og så "
"matche denne analysen til dine behov;"
#. module: account_asset
#: help:account.asset.category,method_period:0
msgid "State here the time between 2 depreciations, in months"
msgstr "Angi tiden mellom to avskrivninger, i måneder"
#. module: account_asset
#: field:account.asset.asset,method_number:0
#: selection:account.asset.asset,method_time:0
#: field:account.asset.category,method_number:0
#: selection:account.asset.category,method_time:0
#: field:account.asset.history,method_number:0
#: selection:account.asset.history,method_time:0
#: field:asset.modify,method_number:0
msgid "Number of Depreciations"
msgstr "Antall Avskrivninger"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Create Move"
msgstr ""
#. module: account_asset
#: view:asset.depreciation.confirmation.wizard:0
msgid "Post Depreciation Lines"
msgstr "Innlegg Avskrivninger linjer"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Confirm Asset"
msgstr "Bekreft eiendel"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_tree
#: model:ir.ui.menu,name:account_asset.menu_action_account_asset_asset_tree
msgid "Asset Hierarchy"
msgstr "Eiendel Hierarki."
#~ msgid "Asset durations to modify"
#~ msgstr "Eiendel lengder å endre"
#~ msgid "Analytic information"
#~ msgstr "analytisk informasjon"
#~ msgid "Accounting information"
#~ msgstr "Regnskapsopplysninger"

View File

@ -0,0 +1,382 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-08-28 12:44+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Search Bank Transactions"
msgstr "Søk Bank Transaksjon"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
#: selection:account.bank.statement.line,state:0
msgid "Confirmed"
msgstr "Bekreftet"
#. module: account_bank_statement_extensions
#: view:account.bank.statement:0
#: view:account.bank.statement.line:0
msgid "Glob. Id"
msgstr "Glob. Id"
#. module: account_bank_statement_extensions
#: selection:account.bank.statement.line.global,type:0
msgid "CODA"
msgstr "CODA"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,parent_id:0
msgid "Parent Code"
msgstr "overordnede kode"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Debit"
msgstr "Debet"
#. module: account_bank_statement_extensions
#: view:cancel.statement.line:0
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_cancel_statement_line
#: model:ir.model,name:account_bank_statement_extensions.model_cancel_statement_line
msgid "Cancel selected statement lines"
msgstr "Avbryt valgte setning linjer"
#. module: account_bank_statement_extensions
#: constraint:res.partner.bank:0
msgid "The RIB and/or IBAN is not valid"
msgstr "RIB og / eller IBAN er ikke gyldig"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Group By..."
msgstr "Grupper etter ..."
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,state:0
msgid "State"
msgstr "Stat"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
#: selection:account.bank.statement.line,state:0
msgid "Draft"
msgstr "Kladd"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Statement"
msgstr "Uttalelse"
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_confirm_statement_line
#: model:ir.model,name:account_bank_statement_extensions.model_confirm_statement_line
msgid "Confirm selected statement lines"
msgstr "Bekreft utvalgte uttalelse linjer"
#. module: account_bank_statement_extensions
#: report:bank.statement.balance.report:0
#: model:ir.actions.report.xml,name:account_bank_statement_extensions.bank_statement_balance_report
msgid "Bank Statement Balances Report"
msgstr "Bank erklæring Balanserer Rapporter"
#. module: account_bank_statement_extensions
#: view:cancel.statement.line:0
msgid "Cancel Lines"
msgstr "Avbryt linjer"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line.global:0
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement_line_global
msgid "Batch Payment Info"
msgstr "Satsvis Betalingsinformasjon"
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
msgid "Confirm Lines"
msgstr "Bekreft linjer."
#. module: account_bank_statement_extensions
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:130
#, python-format
msgid ""
"Delete operation not allowed ! Please go to the associated bank "
"statement in order to delete and/or modify this bank statement line"
msgstr ""
"Slett operasjonen ikke tillatt! Vennligst gå til den tilknyttede "
"kontoutskrift for å slette og / eller endre denne kontoutskrift linjen."
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,type:0
msgid "Type"
msgstr "Type"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
#: field:account.bank.statement.line,journal_id:0
#: report:bank.statement.balance.report:0
msgid "Journal"
msgstr "Journal"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Confirmed Statement Lines."
msgstr "Bekreftet erklæring linjer."
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Credit Transactions."
msgstr "Kreditt transaksjoner."
#. module: account_bank_statement_extensions
#: model:ir.actions.act_window,help:account_bank_statement_extensions.action_cancel_statement_line
msgid "cancel selected statement lines."
msgstr "Avbryte utvalgte uttalelse linjer."
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,counterparty_number:0
msgid "Counterparty Number"
msgstr "Motpart nummer"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line.global:0
msgid "Transactions"
msgstr "Transaksjoner"
#. module: account_bank_statement_extensions
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:130
#, python-format
msgid "Warning"
msgstr "Advarsel"
#. module: account_bank_statement_extensions
#: report:bank.statement.balance.report:0
msgid "Closing Balance"
msgstr "Sluttsaldo"
#. module: account_bank_statement_extensions
#: report:bank.statement.balance.report:0
msgid "Date"
msgstr "Dato"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
#: field:account.bank.statement.line,globalisation_amount:0
msgid "Glob. Amount"
msgstr "glob Beløp"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Debit Transactions."
msgstr "Debet transaksjoner."
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Extended Filters..."
msgstr "Utvidet Filtere ..."
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
msgid "Confirmed lines cannot be changed anymore."
msgstr "Bekreftet samband kan ikke lenger endres."
#. module: account_bank_statement_extensions
#: constraint:res.partner.bank:0
msgid ""
"\n"
"Please define BIC/Swift code on bank for bank type IBAN Account to make "
"valid payments"
msgstr ""
"\n"
"Vennligst definere BIC / Swift-kode på bank for bank typen IBAN-konto for å "
"fatte gyldige betalinger"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,val_date:0
msgid "Valuta Date"
msgstr "Valuta dato"
#. module: account_bank_statement_extensions
#: model:ir.actions.act_window,help:account_bank_statement_extensions.action_confirm_statement_line
msgid "Confirm selected statement lines."
msgstr "Bekreft utvalgte uttalelse linjer"
#. module: account_bank_statement_extensions
#: view:cancel.statement.line:0
msgid "Are you sure you want to cancel the selected Bank Statement lines ?"
msgstr "Er du sikker på at du vil avbryte de valgte kontoutskrift linjer?"
#. module: account_bank_statement_extensions
#: report:bank.statement.balance.report:0
msgid "Name"
msgstr "Navn"
#. module: account_bank_statement_extensions
#: selection:account.bank.statement.line.global,type:0
msgid "ISO 20022"
msgstr "ISO 20022"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Notes"
msgstr "Notater"
#. module: account_bank_statement_extensions
#: selection:account.bank.statement.line.global,type:0
msgid "Manual"
msgstr "Manuell"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Credit"
msgstr "Kredit"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,amount:0
msgid "Amount"
msgstr "Beløp"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Fin.Account"
msgstr "Fin.Konto"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,counterparty_currency:0
msgid "Counterparty Currency"
msgstr "Motpart Valuta"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,counterparty_bic:0
msgid "Counterparty BIC"
msgstr "Motpart BIC"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,child_ids:0
msgid "Child Codes"
msgstr "Underordnet kode"
#. module: account_bank_statement_extensions
#: view:confirm.statement.line:0
msgid "Are you sure you want to confirm the selected Bank Statement lines ?"
msgstr "Er du sikker på at du vil bekrefte de valgte kontoutskrift linjer?"
#. module: account_bank_statement_extensions
#: constraint:account.bank.statement.line:0
msgid ""
"The amount of the voucher must be the same amount as the one on the "
"statement line"
msgstr ""
"Mengden av bilaget må være det samme beløp som den på setningen linje"
#. module: account_bank_statement_extensions
#: help:account.bank.statement.line,globalisation_id:0
msgid ""
"Code to identify transactions belonging to the same globalisation level "
"within a batch payment"
msgstr ""
"Kode for å identifisere transaksjoner tilhører samme globalisering nivå "
"innenfor en batch betaling"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Draft Statement Lines."
msgstr "Utkast linjer."
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Glob. Am."
msgstr "Glob.Am."
#. module: account_bank_statement_extensions
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement_line
msgid "Bank Statement Line"
msgstr "Kontoutskriftlinje"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,code:0
msgid "Code"
msgstr "Kode"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,counterparty_name:0
msgid "Counterparty Name"
msgstr "Motpartens navn"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,name:0
msgid "Communication"
msgstr "Kommunikasjon"
#. module: account_bank_statement_extensions
#: model:ir.model,name:account_bank_statement_extensions.model_res_partner_bank
msgid "Bank Accounts"
msgstr "Bankkontoer"
#. module: account_bank_statement_extensions
#: constraint:account.bank.statement:0
msgid "The journal and period chosen have to belong to the same company."
msgstr "Tidsskriftet og perioden valgt å tilhøre samme selskap."
#. module: account_bank_statement_extensions
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement
msgid "Bank Statement"
msgstr "Kontoutskrift"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Statement Line"
msgstr "erklæring Linje"
#. module: account_bank_statement_extensions
#: sql_constraint:account.bank.statement.line.global:0
msgid "The code must be unique !"
msgstr "Koden må være unik!"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line.global,bank_statement_line_ids:0
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_bank_statement_line
#: model:ir.ui.menu,name:account_bank_statement_extensions.bank_statement_line
msgid "Bank Statement Lines"
msgstr "Kontoutskrift linjer."
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line.global:0
msgid "Child Batch Payments"
msgstr "Underholdene Batch Betalinger."
#. module: account_bank_statement_extensions
#: view:cancel.statement.line:0
#: view:confirm.statement.line:0
msgid "Cancel"
msgstr "Avbryt"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Statement Lines"
msgstr "Erklæring linjer"
#. module: account_bank_statement_extensions
#: view:account.bank.statement.line:0
msgid "Total Amount"
msgstr "Totalt beløp"
#. module: account_bank_statement_extensions
#: field:account.bank.statement.line,globalisation_id:0
msgid "Globalisation ID"
msgstr "Globalisering ID"

View File

@ -213,8 +213,6 @@ class account_followup_print_all(osv.osv_memory):
mod_obj = self.pool.get('ir.model.data')
move_obj = self.pool.get('account.move.line')
user_obj = self.pool.get('res.users')
line_obj = self.pool.get('account_followup.stat')
mail_message = self.pool.get('mail.message')
if context is None:
context = {}
@ -235,13 +233,7 @@ class account_followup_print_all(osv.osv_memory):
total_amt += line.debit - line.credit
dest = False
if partner:
if partner.type=='contact':
if adr.email:
dest = [partner.email]
if (not dest) and partner.type=='default':
if partner.email:
dest = [partner.email]
src = tools.config.options['email_from']
dest = [partner.email]
if not data.partner_lang:
body = data.email_body
else:
@ -281,7 +273,12 @@ class account_followup_print_all(osv.osv_memory):
msg = ''
if dest:
try:
mail_message.schedule_with_attach(cr, uid, src, dest, sub, body, context=context)
vals = {'state': 'outgoing',
'subject': sub,
'body_html': '<pre>%s</pre>' % body,
'email_to': dest,
'email_from': data_user.email or tools.config.options['email_from']}
self.pool.get('mail.mail').create(cr, uid, vals, context=context)
msg_sent += partner.name + '\n'
except Exception, e:
raise osv.except_osv('Error !', e )

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2009-01-30 12:43+0000\n"
"Last-Translator: <>\n"
"PO-Revision-Date: 2012-08-29 15:27+0000\n"
"Last-Translator: Eric Huang <eh@cenoq.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:20+0000\n"
"X-Launchpad-Export-Date: 2012-08-30 05:12+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: account_payment
@ -24,7 +24,7 @@ msgstr ""
#. module: account_payment
#: field:payment.line,currency:0
msgid "Partner Currency"
msgstr "伴貨幣"
msgstr "業務夥伴貨幣"
#. module: account_payment
#: view:payment.order:0
@ -40,7 +40,7 @@ msgstr "選取要應用之付款模式。"
#: view:payment.mode:0
#: view:payment.order:0
msgid "Group By..."
msgstr "分組根據..."
msgstr "分類方式..."
#. module: account_payment
#: field:payment.order,line_ids:0
@ -84,7 +84,7 @@ msgstr "首選日期"
#. module: account_payment
#: model:res.groups,name:account_payment.group_account_payment
msgid "Accounting / Payments"
msgstr ""
msgstr "會計/付款"
#. module: account_payment
#: selection:payment.line,state:0
@ -111,7 +111,7 @@ msgstr "到期日"
#. module: account_payment
#: view:account.move.line:0
msgid "Account Entry Line"
msgstr ""
msgstr "會計分錄明細"
#. module: account_payment
#: view:payment.order.create:0
@ -222,7 +222,7 @@ msgstr ""
#: view:payment.order:0
#: field:payment.order,state:0
msgid "State"
msgstr ""
msgstr "狀態"
#. module: account_payment
#: view:payment.line:0
@ -307,7 +307,7 @@ msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Select Invoices to Pay"
msgstr ""
msgstr "選擇要付款的發票"
#. module: account_payment
#: view:payment.line:0
@ -329,12 +329,12 @@ msgstr "通訊類型"
#: field:payment.mode,partner_id:0
#: report:payment.order:0
msgid "Partner"
msgstr "伴"
msgstr "業務夥伴"
#. module: account_payment
#: field:payment.line,bank_statement_line_id:0
msgid "Bank statement line"
msgstr ""
msgstr "銀行對帳單明細"
#. module: account_payment
#: selection:payment.order,date_prefered:0
@ -399,7 +399,7 @@ msgstr "付款類型"
#. module: account_payment
#: help:payment.line,amount_currency:0
msgid "Payment amount in the partner currency"
msgstr "以伴貨幣計算之付款總額"
msgstr "以業務夥伴貨幣計算之付款總額"
#. module: account_payment
#: view:payment.order:0
@ -441,7 +441,7 @@ msgstr ""
#. module: account_payment
#: field:payment.order,user_id:0
msgid "User"
msgstr ""
msgstr "使用者"
#. module: account_payment
#: field:account.payment.populate.statement,lines:0
@ -504,7 +504,7 @@ msgstr "匯入付款明細"
#. module: account_payment
#: field:account.move.line,amount_to_pay:0
msgid "Amount to pay"
msgstr "付總額"
msgstr "付總額"
#. module: account_payment
#: field:payment.line,amount:0

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:41+0000\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: account_sequence

View File

@ -1293,17 +1293,17 @@ class account_voucher(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s <b>created</b>." % self._document_type[obj.type or False]
self.message_append_note(cr, uid, [obj.id], body=message, context=context)
self.message_post(cr, uid, [obj.id], body=message, context=context)
def post_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s '%s' is <b>posted</b>." % (self._document_type[obj.type or False], obj.move_id.name)
self.message_append_note(cr, uid, [obj.id], body=message, context=context)
self.message_post(cr, uid, [obj.id], body=message, context=context)
def reconcile_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
message = "%s <b>reconciled</b>." % self._document_type[obj.type or False]
self.message_append_note(cr, uid, [obj.id], body=message, context=context)
self.message_post(cr, uid, [obj.id], body=message, context=context)
account_voucher()

View File

@ -2,15 +2,16 @@
<openerp>
<data noupdate="1">
<!-- notify all employees of module installation -->
<function model="mail.group" name="message_append_note">
<!-- ids, subject, body, parent_id=False, type='notification', content_subtype='html' -->
<value eval="[ref('mail.group_all_employees')]"/>
<value>Module eInvoicing &amp; Payments has been installed.</value>
<value>OpenERP's electronic invoicing allows to ease and fasten the creation of invoices and collection of customer payments. Invoices are created in a few clicks and your customers receive them by email. They can pay online and/or import them in their own system.
<record model="mail.message" id="module_install_notification">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_all_employees"/>
<field name="type">notification</field>
<field name="subject">eInvoicing &amp; Payments application installed!</field>
<field name="body">OpenERP's electronic invoicing accelerates the creation of invoices and collection of customer payments. Invoices are created in a few clicks and your customers receive them by email. They can pay online and/or import them in their own system.
You can track customer payments easily and automate the reminders. You get an overview of the discussion with your customers on each invoice to ensure a full traceability.
You can track customer payments easily and automate follow-ups. You get an overview of the discussion with your customers on each invoice for easier traceability.
If you want to use advanced accounting features, you should install the "Accounting and Finance" module.</value>
</function>
For advanced accounting features, you should install the "Accounting and Finance" module.</field>
</record>
</data>
</openerp>

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:26+0000\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: account_voucher

View File

@ -153,9 +153,9 @@ class account_analytic_account(osv.osv):
return result
_columns = {
'name': fields.char('Account Name', size=128, required=True),
'name': fields.char('Account/Contract Name', size=128, required=True),
'complete_name': fields.function(_complete_name_calc, type='char', string='Full Account Name'),
'code': fields.char('Code/Reference', size=24, select=True),
'code': fields.char('Reference', size=24, select=True),
'type': fields.selection([('view','Analytic View'), ('normal','Analytic Account'),('contract','Contract or Project'),('template','Template of Project')], 'Type of Account', required=True,
help="If you select the View Type, it means you won\'t allow to create journal entries using that account.\n"\
"The type 'Analytic account' stands for usual accounts that you only want to use in accounting.\n"\
@ -171,7 +171,7 @@ class account_analytic_account(osv.osv):
'debit': fields.function(_debit_credit_bal_qtty, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
'credit': fields.function(_debit_credit_bal_qtty, type='float', string='Credit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
'quantity': fields.function(_debit_credit_bal_qtty, type='float', string='Quantity', multi='debit_credit_bal_qtty'),
'quantity_max': fields.float('Maximum Time', help='Sets the higher limit of time to work on the contract.'),
'quantity_max': fields.float('Prepaid Units', help='Sets the higher limit of time to work on the contract.'),
'partner_id': fields.many2one('res.partner', 'Customer'),
'user_id': fields.many2one('res.users', 'Project Manager'),
'manager_id': fields.many2one('res.users', 'Account Manager'),
@ -297,7 +297,7 @@ class account_analytic_account(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_append_note(cr, uid, [obj.id], body=_("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name), context=context)
self.message_post(cr, uid, [obj.id], body=_("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name), context=context)
account_analytic_account()

View File

@ -8,35 +8,43 @@
<field name="arch" type="xml">
<form string="Analytic Account" version="7.0">
<sheet string="Analytic Account">
<div class="oe_right oe_button_box" name="buttons">
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name"/>
</h1>
<group>
<h1>
<field name="name" class="oe_inline"/>
</h1>
<div name="project"/>
</div>
<group name="main">
<group>
<field name="partner_id" on_change="on_change_partner_id(partner_id, name)" attrs="{'required':[('type','=','contract')]}"/>
<field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract','template'])]}"/>
<field name="type"/>
<field name="template_id" on_change="on_change_template(template_id,context)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
<field name="manager_id"/>
<field name="code"/>
</group>
<group>
<field name="code"/>
<field name="manager_id"/>
<field name="type"/>
<field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract','template'])]}"/>
<field name="template_id" on_change="on_change_template(template_id,context)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
<field name="company_id" on_change="on_change_company(company_id)" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/>
</group>
</group>
<notebook>
<page string="Contract Information" name="contract_page" attrs="{'invisible':[('type','not in',['contract', 'template'])]}">
<group name="master">
<group string="Validity" name="contract">
<label for="date_start" string="Duration"/>
<div name="duration">
<field name="date_start" class="oe_inline"/> - <field name="date" class="oe_inline"/>
</div>
</group>
<group name="project">
<separator string="Project Management" name="project_sep" invisible="1"/>
</group>
<group string="Renewal" name="contract">
<p colspan="2" class="oe_grey oe_edit_only">
Once the end date of the contract is
passed or the maximum number of service
units is reached, the account manager
is warned by email to renew the contract.
</p>
<label for="date" string="End Date"/>
<div name="duration">
<field name="date" class="oe_inline"/>
</div>
</group>
<separator string="Terms and Conditions" name="description"/>
<field name="description"/>

View File

@ -1,37 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv
class project_project(osv.osv):
_inherit = "project.project"
def open_hr_expense(self, cr, uid, ids, context=None):
account_ids = [x.analytic_account_id.id for x in self.browse(cr, uid, ids, context=context)]
return self.pool.get('account.analytic.account').open_hr_expense(cr, uid, account_ids, context=context)
def hr_to_invoice_expense(self, cr, uid, ids, context=None):
account_ids = [x.analytic_account_id.id for x in self.browse(cr, uid, ids, context=context)]
return self.pool.get('account.analytic.account').hr_to_invoice_expense(cr, uid, account_ids, context=context)
project_project()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="project_form_expense_form" model="ir.ui.view">
<field name="name">project.project.form.expense.inherit</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="analytic_contract_project.project_account_analytic_account_form"/>
<field eval="20" name="priority"/>
<field name="arch" type="xml">
<xpath expr='//tr[@name="total"]' position='before'>
<tr>
<td>
<label for="charge_expenses"/>
</td><td>
<field name="charge_expenses"/>
</td><td>
<field class="oe_inline" name="est_expenses" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td><td>
<field class="oe_inline" name="expense_invoiced" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td><td>
<field class="oe_inline" name="remaining_expense" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td><td>
<field class="oe_inline" name="expense_to_invoice" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td><td>
<button name="open_hr_expense" string="All Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
<button name="hr_to_invoice_expense" string="Expenses to Invoice" type="object" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td>
</tr>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -5,12 +5,13 @@
<field name="name">account.analytic.account.form.expense.inherit</field>
<field name="model">account.analytic.account</field>
<field eval="60" name="priority"/>
<field name="inherit_id" ref="account_analytic_analysis.account_analytic_account_form_form"/>
<field name="arch" type="xml">
<xpath expr='//tr[@name="total"]' position='before'>
<tr>
<td>
<td class="oe_grey">
<label for="charge_expenses"/>
</td><td>
</td><td class="oe_grey">
<field name="charge_expenses"/>
</td><td>
<field class="oe_form_inline" name="est_expenses" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
@ -21,10 +22,16 @@
</td><td>
<field class="oe_form_inline" name="expense_to_invoice" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td><td>
<group>
<button name="open_hr_expense" string="All Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
<button name="hr_to_invoice_expense" string="Expenses to Invoice" type="object" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</group>
<button
name="hr_to_invoice_expense"
class="oe_link oe_e"
string="/" type="object"
attrs="{'invisible': [('expense_to_invoice','=',0)]}"/>
</td><td>
<button
name="open_hr_expense"
class="oe_link"
string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td>
</tr>
</xpath>

View File

@ -1,84 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
class project_project(osv.osv):
_inherit = 'project.project'
_defaults = {
'use_timesheets': True,
}
def open_sale_order_lines(self,cr,uid,ids,context=None):
account_ids = [x.analytic_account_id.id for x in self.browse(cr, uid, ids, context=context)]
return self.pool.get('account.analytic.account').open_sale_order_lines(cr, uid, account_ids, context=context)
def open_timesheets_to_invoice(self,cr,uid,ids,context=None):
if context is None:
context = {}
analytic_account_id = self.browse(cr, uid, ids[0], context=context).analytic_account_id.id
context.update({'search_default_account_id': analytic_account_id, 'default_account_id': analytic_account_id, 'search_default_to_invoice': 1})
return {
'type': 'ir.actions.act_window',
'name': _('Timesheet Lines to Invoice'),
'view_type': 'form',
'view_mode': 'tree,form',
'context': context,
'domain' : [('invoice_id','=',False),('to_invoice','!=',False), ('journal_id.type', '=', 'general')],
'res_model': 'account.analytic.line',
'nodestroy': True,
}
def open_timesheets(self, cr, uid, ids, context=None):
""" open Timesheets view """
project = self.browse(cr, uid, ids[0], context)
try:
journal_id = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_timesheet', 'analytic_journal').id
except ValueError:
journal_id = False
view_context = {
'search_default_account_id': [project.analytic_account_id.id],
'default_account_id': project.analytic_account_id.id,
'default_journal_id': journal_id,
}
return {
'type': 'ir.actions.act_window',
'name': _('Bill Tasks Works'),
'res_model': 'account.analytic.line',
'view_type': 'form',
'view_mode': 'tree,form',
'context': view_context,
'nodestroy': True,
}
project_project()
class task(osv.osv):
_inherit = "project.task"
def create(self, cr, uid, vals, context=None):
task_id = super(task, self).create(cr, uid, vals, context=context)
task_browse = self.browse(cr, uid, task_id, context=context)
if task_browse.project_id.analytic_account_id:
self.pool.get('account.analytic.account').message_append_note(cr, uid, [task_browse.project_id.analytic_account_id.id], body=_("Task <em>%s</em> has been <b>created</b>.") % (task_browse.name), context=context)
return task_id
task()

View File

@ -1,127 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="project_account_analytic_account_form" model="ir.ui.view">
<field name="name">project.project.form.inherit</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<xpath expr='//page[@name="team"]' position='after'>
<page string="Contract Data">
<group>
<group string="Validity">
<label for="date_start" string="Duration"/>
<div name="duration">
<field name="date_start" class="oe_inline"/>
<label attrs="{'invisible':[('date','=',False)]}" class="oe_inline" string=" - "/>
<field name="date" class="oe_inline"/>
</div>
<label for="quantity_max"/>
<div>
<field name="quantity_max" class="oe_inline"/>
<field name="company_uom_id" readonly="1" class="oe_inline"/> / Remaining:
<field name="remaining_hours" class="oe_inline"/>
<field name="company_uom_id" readonly="1" class="oe_inline"/>
</div>
</group>
<group string="Invoice Options">
<field name="manager_id" />
<field name="pricelist_id" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
<field name="to_invoice" widget="selection" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>
</group>
</group>
<separator name="toinvoice" string="Invoicing"/>
<table width="100%%">
<tr>
<th></th>
<th></th>
<th><label string="Est.Tot"/></th>
<th><label string="Invoiced"/></th>
<th><label string="Remaining"/></th>
<th><label string="To Invoice"/></th>
<th></th>
</tr><tr>
<td>
<label for="fix_price_invoices"/>
</td><td>
<field name="fix_price_invoices" class="oe_inline"/>
</td><td>
<field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td>
<field class="oe_inline" name="ca_invoiced" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td>
<field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td>
<field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td>
<button name="%(account_analytic_analysis.action_sales_order)d" string="All Sales" type="action" context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id], 'default_project_id': analytic_account_id, 'search_default_project_id': analytic_account_id}" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
<button name="open_sale_order_lines" string="Lines To Invoice" type="object" context="{'default_partner_id': [partner_id],'default_project_id': analytic_account_id,'search_default_uninvoiced': 1,'search_default_project_id': analytic_account_id,'search_default_partner_id': [partner_id]}" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/></td>
</tr><tr attrs="{'invisible':[('use_timesheets','=',False)]}">
<td>
<label for="invoice_on_timesheets"/>
</td><td>
<field name="invoice_on_timesheets"/>
</td><td>
<field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td>
<field class="oe_inline" name="timesheet_ca_invoiced" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td>
<field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td>
<field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td>
<button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" string="All Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}" context="{'default_account_id': analytic_account_id,'search_default_account_id': analytic_account_id}"/>
<button name="open_timesheets_to_invoice" string="Timesheets to Invoice" type="object" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td>
</tr><tr name="total">
<th>
<label string="Total"/>
</th><td>
</td><td>
<field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td>
<field name="invoiced_total" class="oe_inline"/>
</td><td>
<field name="remaining_total" class="oe_inline"/>
</td><td>
<field name="toinvoice_total" class="oe_inline"/>
</td><td>
</td>
</tr>
</table>
<separator string="Terms and Conditions" name="description"/>
<field name="description"/>
</page>
</xpath>
</field>
</record>
<record id="project_invoice_form" model="ir.ui.view">
<field name="name">Inherit project form : Invoicing Data</field>
<field name="model">project.project</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<xpath expr='//tr[@name="use_tasks_row"]' position='after'>
<tr>
<td><group><field name="use_timesheets"/></group></td>
<td><button icon="terp-gtk-go-back-rtl" name="open_timesheets" string="Timesheets" type="object" attrs="{'invisible':[('use_timesheets','=', 0)]}"/></td>
</tr>
</xpath>
</field>
</record>
<record id="contract_inherited_form" model="ir.ui.view">
<field name="name">Inherit contract form : adding UoM</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field name="priority">50</field>
<field name="arch" type="xml">
<xpath expr='//field[@name="remaining_hours"]' position='after'>
<field name="company_uom_id" readonly="1" class="oe_inline"/>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,213 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-08-28 12:11+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard
msgid "ir.model.fields.anonymize.wizard"
msgstr "ir.modell.felt.anonymisere.veiviseren"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_name:0
msgid "Field Name"
msgstr "Feltnavn"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_id:0
msgid "Field"
msgstr "Felt"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,state:0
#: field:ir.model.fields.anonymize.wizard,state:0
msgid "State"
msgstr "Stat"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_import:0
msgid "Import"
msgstr "Importer"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization
msgid "ir.model.fields.anonymization"
msgstr "ir.modell.felt.anonymisering"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,direction:0
msgid "Direction"
msgstr "Retning"
#. 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 "Anonymiserte Felter"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization
msgid "Database anonymization"
msgstr "database anonymisering"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "clear -> anonymized"
msgstr "klar -> anonymiseres"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Anonymized"
msgstr "Anonymiseres"
#. module: anonymization
#: field:ir.model.fields.anonymization,state:0
msgid "unknown"
msgstr "ukjent"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_id:0
msgid "Object"
msgstr "Objekt"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,filepath:0
msgid "File path"
msgstr "filbane"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,date:0
msgid "Date"
msgstr "Dato"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_export:0
msgid "Export"
msgstr "Eksporter"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Reverse the Database Anonymization"
msgstr "Reversere Database anonymisering"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Database Anonymization"
msgstr "database anonymisering"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard
msgid "Anonymize database"
msgstr "anonymisere database"
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,field_ids:0
msgid "Fields"
msgstr "Felter"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Clear"
msgstr "fjerne"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
#: field:ir.model.fields.anonymize.wizard,summary:0
msgid "Summary"
msgstr "Oppsummering"
#. module: anonymization
#: view:ir.model.fields.anonymization:0
msgid "Anonymized Field"
msgstr "Anonymisert Felt"
#. module: anonymization
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Unstable"
msgstr "Ustabil"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Exception occured"
msgstr "unntak oppstod"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Not Existing"
msgstr "Eksisterer ikke"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_name:0
msgid "Object Name"
msgstr "Objektnavn"
#. 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 "Anonymisering Historie"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history
msgid "ir.model.fields.anonymization.history"
msgstr "ir.modell.felt.anonymisering.historie"
#. 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 "Anonymisere Database"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,name:0
msgid "File Name"
msgstr "Filnavn"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "anonymized -> clear"
msgstr "Anonymisert -> klart"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Started"
msgstr "Startet"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Done"
msgstr "Utført"
#. 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 "Beskjed"
#. module: anonymization
#: code:addons/anonymization/anonymization.py:55
#: sql_constraint:ir.model.fields.anonymization:0
#, python-format
msgid "You cannot have two fields with the same name on the same object!"
msgstr "Du kan ikke ha to felt med samme navn på samme objekt!"

View File

@ -0,0 +1,213 @@
# Chinese (Traditional) translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-08-29 03:38+0000\n"
"Last-Translator: Eric Huang <eh@cenoq.com>\n"
"Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-30 05:12+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard
msgid "ir.model.fields.anonymize.wizard"
msgstr "ir.model.fields.anonymize.wizard"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_name:0
msgid "Field Name"
msgstr "欄位名稱"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_id:0
msgid "Field"
msgstr "欄位"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,state:0
#: field:ir.model.fields.anonymize.wizard,state:0
msgid "State"
msgstr "狀態"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_import:0
msgid "Import"
msgstr "匯入"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization
msgid "ir.model.fields.anonymization"
msgstr "ir.model.fields.anonymization"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,direction:0
msgid "Direction"
msgstr "方向"
#. 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 "匿名欄位"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization
msgid "Database anonymization"
msgstr "資料庫匿名"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "clear -> anonymized"
msgstr "清楚->匿名"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Anonymized"
msgstr "匿名"
#. module: anonymization
#: field:ir.model.fields.anonymization,state:0
msgid "unknown"
msgstr "不明"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_id:0
msgid "Object"
msgstr "物件"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,filepath:0
msgid "File path"
msgstr "檔案路徑"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,date:0
msgid "Date"
msgstr "日期"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_export:0
msgid "Export"
msgstr "匯出"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Reverse the Database Anonymization"
msgstr "回復資料庫匿名"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Database Anonymization"
msgstr "資料庫匿名"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard
msgid "Anonymize database"
msgstr "匿名資料庫"
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,field_ids:0
msgid "Fields"
msgstr "欄位"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Clear"
msgstr "清除"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
#: field:ir.model.fields.anonymize.wizard,summary:0
msgid "Summary"
msgstr "摘要"
#. module: anonymization
#: view:ir.model.fields.anonymization:0
msgid "Anonymized Field"
msgstr "匿名欄位"
#. module: anonymization
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Unstable"
msgstr "不穩定版"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Exception occured"
msgstr "發生意外狀況"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Not Existing"
msgstr "不存在"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_name:0
msgid "Object Name"
msgstr "物件名稱"
#. 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 "匿名紀錄"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history
msgid "ir.model.fields.anonymization.history"
msgstr "ir.model.fields.anonymization.history"
#. 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 "匿名資料庫"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,name:0
msgid "File Name"
msgstr "檔案名稱"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "anonymized -> clear"
msgstr "匿名->清楚"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Started"
msgstr "開始"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Done"
msgstr "完成"
#. 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 "訊息"
#. module: anonymization
#: code:addons/anonymization/anonymization.py:55
#: sql_constraint:ir.model.fields.anonymization:0
#, python-format
msgid "You cannot have two fields with the same name on the same object!"
msgstr "在同一個物件不能有二個相同名稱的欄位!"

View File

@ -0,0 +1,144 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2012-08-28 11:22+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: association
#: field:profile.association.config.install_modules_wizard,wiki:0
msgid "Wiki"
msgstr "Wiki"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Event Management"
msgstr "Arrangementsledelse"
#. module: association
#: field:profile.association.config.install_modules_wizard,project_gtd:0
msgid "Getting Things Done"
msgstr "Å få ting gjort"
#. module: association
#: model:ir.module.module,description:association.module_meta_information
msgid "This module is to create Profile for Associates"
msgstr "Denne modulen er å skape profil for Tilknyttede."
#. module: association
#: field:profile.association.config.install_modules_wizard,progress:0
msgid "Configuration Progress"
msgstr "Konfigurasjonsprosess"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid ""
"Here are specific applications related to the Association Profile you "
"selected."
msgstr ""
"Her er spesifikke programmer knyttet til foreningen profil du har valgt."
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "title"
msgstr "tittel"
#. module: association
#: help:profile.association.config.install_modules_wizard,event_project:0
msgid "Helps you to manage and organize your events."
msgstr "Hjelper deg å administrere og organisere hendelser."
#. module: association
#: field:profile.association.config.install_modules_wizard,config_logo:0
msgid "Image"
msgstr "Bilde"
#. module: association
#: help:profile.association.config.install_modules_wizard,hr_expense:0
msgid ""
"Tracks and manages employee expenses, and can automatically re-invoice "
"clients if the expenses are project-related."
msgstr ""
"Spor og styrer ansattes utgifter, og kan automatisk re-faktura klienter "
"dersom utgiftene prosjekt-relatert."
#. module: association
#: help:profile.association.config.install_modules_wizard,project_gtd:0
msgid ""
"GTD is a methodology to efficiently organise yourself and your tasks. This "
"module fully integrates GTD principle with OpenERP's project management."
msgstr ""
"GTD er en metode for å effektivt organisere deg selv og dine oppgaver. Denne "
"modulen integrerer fullt GTD prinsippet med OpenERP prosjektledelse."
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Resources Management"
msgstr "Ressurser ledelse"
#. module: association
#: model:ir.module.module,shortdesc:association.module_meta_information
msgid "Association profile"
msgstr "Tilknytning profilen"
#. module: association
#: field:profile.association.config.install_modules_wizard,hr_expense:0
msgid "Expenses Tracking"
msgstr "Utgift Sporing"
#. module: association
#: model:ir.actions.act_window,name:association.action_config_install_module
#: view:profile.association.config.install_modules_wizard:0
msgid "Association Application Configuration"
msgstr "Tilknytning applikasjon konfigurasjon"
#. module: association
#: help:profile.association.config.install_modules_wizard,wiki:0
msgid ""
"Lets you create wiki pages and page groups in order to keep track of "
"business knowledge and share it with and between your employees."
msgstr ""
"Lar deg opprette wikisider og sidegrupper for å holde oversikt over "
"virksomheten kunnskap og dele den med og mellom de ansatte."
#. module: association
#: help:profile.association.config.install_modules_wizard,project:0
msgid ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
msgstr ""
"Hjelper deg med å håndtere dine prosjekter og oppgaver ved å spore dem, "
"generere planer, osv..."
#. module: association
#: model:ir.model,name:association.model_profile_association_config_install_modules_wizard
msgid "profile.association.config.install_modules_wizard"
msgstr "Profil.foreningen.konfigurasjon.installere_moduler_veiviseren"
#. module: association
#: field:profile.association.config.install_modules_wizard,event_project:0
msgid "Events"
msgstr "Arrangementer"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
#: field:profile.association.config.install_modules_wizard,project:0
msgid "Project Management"
msgstr "Prosjektledelse"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Configure"
msgstr "Konfigurer"

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:39+0000\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: association

View File

@ -25,6 +25,7 @@ from tools.translate import _
import pooler
import time
import tools
from openerp import SUPERUSER_ID
class audittrail_rule(osv.osv):
"""
@ -252,10 +253,10 @@ class audittrail_objects_proxy(object_proxy):
pool = pooler.get_pool(cr.dbname)
resource_pool = pool.get(model)
model_pool = pool.get('ir.model')
model_ids = model_pool.search(cr, 1, [('model', '=', model)])
model_ids = model_pool.search(cr, SUPERUSER_ID, [('model', '=', model)])
model_id = model_ids and model_ids[0] or False
assert model_id, _("'%s' Model does not exist..." %(model))
model = model_pool.browse(cr, 1, model_id)
model = model_pool.browse(cr, SUPERUSER_ID, model_id)
# fields to log. currently only used by log on read()
field_list = []
@ -322,7 +323,7 @@ class audittrail_objects_proxy(object_proxy):
data = {}
resource_pool = pool.get(model.model)
# read all the fields of the given resources in super admin mode
for resource in resource_pool.read(cr, 1, res_ids):
for resource in resource_pool.read(cr, SUPERUSER_ID, res_ids):
values = {}
values_text = {}
resource_id = resource['id']
@ -332,19 +333,19 @@ class audittrail_objects_proxy(object_proxy):
continue
values[field] = resource[field]
# get the textual value of that field for this record
values_text[field] = self.get_value_text(cr, 1, pool, resource_pool, method, field, resource[field])
values_text[field] = self.get_value_text(cr, SUPERUSER_ID, pool, resource_pool, method, field, resource[field])
field_obj = resource_pool._all_columns.get(field).column
if field_obj._type in ('one2many','many2many'):
# check if an audittrail rule apply in super admin mode
if self.check_rules(cr, 1, field_obj._obj, method):
if self.check_rules(cr, SUPERUSER_ID, field_obj._obj, method):
# check if the model associated to a *2m field exists, in super admin mode
x2m_model_ids = pool.get('ir.model').search(cr, 1, [('model', '=', field_obj._obj)])
x2m_model_ids = pool.get('ir.model').search(cr, SUPERUSER_ID, [('model', '=', field_obj._obj)])
x2m_model_id = x2m_model_ids and x2m_model_ids[0] or False
assert x2m_model_id, _("'%s' Model does not exist..." %(field_obj._obj))
x2m_model = pool.get('ir.model').browse(cr, 1, x2m_model_id)
x2m_model = pool.get('ir.model').browse(cr, SUPERUSER_ID, x2m_model_id)
#recursive call on x2m fields that need to be checked too
data.update(self.get_data(cr, 1, pool, resource[field], x2m_model, method))
data.update(self.get_data(cr, SUPERUSER_ID, pool, resource[field], x2m_model, method))
data[(model.id, resource_id)] = {'text':values_text, 'value': values}
return data
@ -389,12 +390,12 @@ class audittrail_objects_proxy(object_proxy):
field_obj = field_definition.column
if field_obj._type in ('one2many','many2many'):
# checking if an audittrail rule apply in super admin mode
if self.check_rules(cr, 1, field_obj._obj, method):
if self.check_rules(cr, SUPERUSER_ID, field_obj._obj, method):
# checking if the model associated to a *2m field exists, in super admin mode
x2m_model_ids = pool.get('ir.model').search(cr, 1, [('model', '=', field_obj._obj)])
x2m_model_ids = pool.get('ir.model').search(cr, SUPERUSER_ID, [('model', '=', field_obj._obj)])
x2m_model_id = x2m_model_ids and x2m_model_ids[0] or False
assert x2m_model_id, _("'%s' Model does not exist..." %(field_obj._obj))
x2m_model = pool.get('ir.model').browse(cr, 1, x2m_model_id)
x2m_model = pool.get('ir.model').browse(cr, SUPERUSER_ID, x2m_model_id)
# the resource_ids that need to be checked are the sum of both old and previous values (because we
# need to log also creation or deletion in those lists).
x2m_old_values_ids = old_values.get(key, {'value': {}})['value'].get(field_name, [])
@ -402,7 +403,7 @@ class audittrail_objects_proxy(object_proxy):
# We use list(set(...)) to remove duplicates.
res_ids = list(set(x2m_old_values_ids + x2m_new_values_ids))
for res_id in res_ids:
lines.update(self.prepare_audittrail_log_line(cr, 1, pool, x2m_model, res_id, method, old_values, new_values, field_list))
lines.update(self.prepare_audittrail_log_line(cr, SUPERUSER_ID, pool, x2m_model, res_id, method, old_values, new_values, field_list))
# if the value value is different than the old value: record the change
if key not in old_values or key not in new_values or old_values[key]['value'][field_name] != new_values[key]['value'][field_name]:
data = {
@ -459,9 +460,9 @@ class audittrail_objects_proxy(object_proxy):
vals.update({'method': 'unlink'})
# create the audittrail log in super admin mode, only if a change has been detected
if lines[(model_id, resource_id)]:
log_id = pool.get('audittrail.log').create(cr, 1, vals)
log_id = pool.get('audittrail.log').create(cr, SUPERUSER_ID, vals)
model = pool.get('ir.model').browse(cr, uid, model_id)
self.create_log_line(cr, 1, log_id, model, lines[(model_id, resource_id)])
self.create_log_line(cr, SUPERUSER_ID, log_id, model, lines[(model_id, resource_id)])
return True
def check_rules(self, cr, uid, model, method):
@ -475,11 +476,11 @@ class audittrail_objects_proxy(object_proxy):
"""
pool = pooler.get_pool(cr.dbname)
if 'audittrail.rule' in pool.models:
model_ids = pool.get('ir.model').search(cr, 1, [('model', '=', model)])
model_ids = pool.get('ir.model').search(cr, SUPERUSER_ID, [('model', '=', model)])
model_id = model_ids and model_ids[0] or False
if model_id:
rule_ids = pool.get('audittrail.rule').search(cr, 1, [('object_id', '=', model_id), ('state', '=', 'subscribed')])
for rule in pool.get('audittrail.rule').read(cr, 1, rule_ids, ['user_id','log_read','log_write','log_create','log_unlink','log_action','log_workflow']):
rule_ids = pool.get('audittrail.rule').search(cr, SUPERUSER_ID, [('object_id', '=', model_id), ('state', '=', 'subscribed')])
for rule in pool.get('audittrail.rule').read(cr, SUPERUSER_ID, rule_ids, ['user_id','log_read','log_write','log_create','log_unlink','log_action','log_workflow']):
if len(rule['user_id']) == 0 or uid in rule['user_id']:
if rule.get('log_'+method,0):
return True

View File

@ -7,31 +7,31 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2009-01-23 17:17+0000\n"
"Last-Translator: <>\n"
"PO-Revision-Date: 2012-08-30 13:46+0000\n"
"Last-Translator: Eric Huang <eh@cenoq.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:25+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-08-31 04:56+0000\n"
"X-Generator: Launchpad (build 15887)\n"
#. module: audittrail
#: code:addons/audittrail/audittrail.py:75
#, python-format
msgid "WARNING: audittrail is not part of the pool"
msgstr ""
msgstr "警告:稽核追蹤不屬於此池"
#. module: audittrail
#: field:audittrail.log.line,log_id:0
msgid "Log"
msgstr ""
msgstr "日誌"
#. module: audittrail
#: view:audittrail.rule:0
#: selection:audittrail.rule,state:0
msgid "Subscribed"
msgstr ""
msgstr "已訂閱"
#. module: audittrail
#: sql_constraint:audittrail.rule:0
@ -39,330 +39,332 @@ msgid ""
"There is already a rule defined on this object\n"
" You cannot define another: please edit the existing one."
msgstr ""
"該對象已經定義了稽核規則。\n"
"您不能再次定義,請直接編輯現有的稽核規則。"
#. module: audittrail
#: view:audittrail.rule:0
msgid "Subscribed Rule"
msgstr ""
msgstr "已訂閱規則"
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_rule
msgid "Audittrail Rule"
msgstr ""
msgstr "稽核追蹤規則"
#. module: audittrail
#: view:audittrail.view.log:0
#: model:ir.actions.act_window,name:audittrail.action_audittrail_log_tree
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_log_tree
msgid "Audit Logs"
msgstr ""
msgstr "稽核日誌"
#. module: audittrail
#: view:audittrail.log:0
#: view:audittrail.rule:0
msgid "Group By..."
msgstr ""
msgstr "分類方式..."
#. module: audittrail
#: view:audittrail.rule:0
#: field:audittrail.rule,state:0
msgid "State"
msgstr ""
msgstr "狀態"
#. module: audittrail
#: view:audittrail.rule:0
msgid "_Subscribe"
msgstr ""
msgstr "訂閱(_S)"
#. module: audittrail
#: view:audittrail.rule:0
#: selection:audittrail.rule,state:0
msgid "Draft"
msgstr ""
msgstr "草稿"
#. module: audittrail
#: field:audittrail.log.line,old_value:0
msgid "Old Value"
msgstr ""
msgstr "舊值"
#. module: audittrail
#: model:ir.actions.act_window,name:audittrail.action_audittrail_view_log
msgid "View log"
msgstr ""
msgstr "查看日誌"
#. module: audittrail
#: help:audittrail.rule,log_read:0
msgid ""
"Select this if you want to keep track of read/open on any record of the "
"object of this rule"
msgstr ""
msgstr "如果你需要追蹤對該對象的任何記錄的讀和打開動作請選擇此項"
#. module: audittrail
#: field:audittrail.log,method:0
msgid "Method"
msgstr ""
msgstr "方法"
#. module: audittrail
#: field:audittrail.view.log,from:0
msgid "Log From"
msgstr ""
msgstr "日誌來源"
#. module: audittrail
#: field:audittrail.log.line,log:0
msgid "Log ID"
msgstr ""
msgstr "日誌標識"
#. module: audittrail
#: field:audittrail.log,res_id:0
msgid "Resource Id"
msgstr ""
msgstr "資源標識"
#. module: audittrail
#: help:audittrail.rule,user_id:0
msgid "if User is not added then it will applicable for all users"
msgstr ""
msgstr "如果未加入使用者則適用於所有使用者"
#. module: audittrail
#: help:audittrail.rule,log_workflow:0
msgid ""
"Select this if you want to keep track of workflow on any record of the "
"object of this rule"
msgstr ""
msgstr "如果您需要追蹤該對象所有記錄的工作流程請選擇此項"
#. module: audittrail
#: field:audittrail.rule,user_id:0
msgid "Users"
msgstr ""
msgstr "使用者"
#. module: audittrail
#: view:audittrail.log:0
msgid "Log Lines"
msgstr ""
msgstr "日誌明細"
#. module: audittrail
#: view:audittrail.log:0
#: field:audittrail.log,object_id:0
#: field:audittrail.rule,object_id:0
msgid "Object"
msgstr ""
msgstr "對象"
#. module: audittrail
#: view:audittrail.rule:0
msgid "AuditTrail Rule"
msgstr ""
msgstr "稽核追蹤規則"
#. module: audittrail
#: field:audittrail.view.log,to:0
msgid "Log To"
msgstr ""
msgstr "記錄到"
#. module: audittrail
#: view:audittrail.log:0
msgid "New Value Text: "
msgstr ""
msgstr "新值內容: "
#. module: audittrail
#: view:audittrail.rule:0
msgid "Search Audittrail Rule"
msgstr ""
msgstr "搜索稽核追蹤規則"
#. module: audittrail
#: model:ir.actions.act_window,name:audittrail.action_audittrail_rule_tree
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree
msgid "Audit Rules"
msgstr ""
msgstr "稽核規則"
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value : "
msgstr ""
msgstr "舊值: "
#. module: audittrail
#: field:audittrail.log,name:0
msgid "Resource Name"
msgstr ""
msgstr "資源名稱"
#. module: audittrail
#: view:audittrail.log:0
#: field:audittrail.log,timestamp:0
msgid "Date"
msgstr ""
msgstr "日期"
#. module: audittrail
#: help:audittrail.rule,log_write:0
msgid ""
"Select this if you want to keep track of modification on any record of the "
"object of this rule"
msgstr ""
msgstr "如果您要追蹤此對象所有記錄的變更請選擇此項。"
#. module: audittrail
#: field:audittrail.rule,log_create:0
msgid "Log Creates"
msgstr ""
msgstr "建立日誌"
#. module: audittrail
#: help:audittrail.rule,object_id:0
msgid "Select object for which you want to generate log."
msgstr ""
msgstr "選擇您要生成稽核日誌的對象"
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value Text : "
msgstr ""
msgstr "舊值內容: "
#. module: audittrail
#: field:audittrail.rule,log_workflow:0
msgid "Log Workflow"
msgstr ""
msgstr "記錄工作流"
#. module: audittrail
#: field:audittrail.rule,log_read:0
msgid "Log Reads"
msgstr ""
msgstr "記錄讀操作"
#. module: audittrail
#: code:addons/audittrail/audittrail.py:76
#, python-format
msgid "Change audittrail depends -- Setting rule as DRAFT"
msgstr ""
msgstr "修改檢查稽核依賴 - 設定規則為草稿"
#. module: audittrail
#: field:audittrail.log,line_ids:0
msgid "Log lines"
msgstr ""
msgstr "日誌明細"
#. module: audittrail
#: field:audittrail.log.line,field_id:0
msgid "Fields"
msgstr ""
msgstr "欄位列表"
#. module: audittrail
#: view:audittrail.rule:0
msgid "AuditTrail Rules"
msgstr ""
msgstr "稽核追蹤規則"
#. module: audittrail
#: help:audittrail.rule,log_unlink:0
msgid ""
"Select this if you want to keep track of deletion on any record of the "
"object of this rule"
msgstr ""
msgstr "如果你要追蹤所有刪除這個對象記錄的操作請選擇此項"
#. module: audittrail
#: view:audittrail.log:0
#: field:audittrail.log,user_id:0
msgid "User"
msgstr ""
msgstr "使用者"
#. module: audittrail
#: field:audittrail.rule,action_id:0
msgid "Action ID"
msgstr ""
msgstr "動作ID"
#. module: audittrail
#: view:audittrail.rule:0
msgid "Users (if User is not added then it will applicable for all users)"
msgstr ""
msgstr "使用者(如果沒有選擇使用者則適用於所有使用者)"
#. module: audittrail
#: view:audittrail.rule:0
msgid "UnSubscribe"
msgstr ""
msgstr "取消訂閱"
#. module: audittrail
#: field:audittrail.rule,log_unlink:0
msgid "Log Deletes"
msgstr ""
msgstr "記錄刪除操作"
#. module: audittrail
#: field:audittrail.log.line,field_description:0
msgid "Field Description"
msgstr ""
msgstr "欄位說明"
#. module: audittrail
#: view:audittrail.log:0
msgid "Search Audittrail Log"
msgstr ""
msgstr "搜尋稽核追蹤日誌"
#. module: audittrail
#: field:audittrail.rule,log_write:0
msgid "Log Writes"
msgstr ""
msgstr "記錄修改操作"
#. module: audittrail
#: view:audittrail.view.log:0
msgid "Open Logs"
msgstr ""
msgstr "打開日誌"
#. module: audittrail
#: field:audittrail.log.line,new_value_text:0
msgid "New value Text"
msgstr ""
msgstr "新值內容"
#. module: audittrail
#: field:audittrail.rule,name:0
msgid "Rule Name"
msgstr ""
msgstr "規則名稱"
#. module: audittrail
#: field:audittrail.log.line,new_value:0
msgid "New Value"
msgstr ""
msgstr "新值"
#. module: audittrail
#: view:audittrail.log:0
msgid "AuditTrail Logs"
msgstr ""
msgstr "稽核追蹤日誌"
#. module: audittrail
#: view:audittrail.rule:0
msgid "Draft Rule"
msgstr ""
msgstr "草稿規則"
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_log
msgid "Audittrail Log"
msgstr ""
msgstr "稽核追蹤日誌"
#. module: audittrail
#: help:audittrail.rule,log_action:0
msgid ""
"Select this if you want to keep track of actions on the object of this rule"
msgstr ""
msgstr "如果你要追蹤這個對象所有記錄執行的操作請選擇此項"
#. module: audittrail
#: view:audittrail.log:0
msgid "New Value : "
msgstr ""
msgstr "新值: "
#. module: audittrail
#: field:audittrail.log.line,old_value_text:0
msgid "Old value Text"
msgstr ""
msgstr "舊值內容"
#. module: audittrail
#: view:audittrail.view.log:0
msgid "Cancel"
msgstr ""
msgstr "取消"
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_view_log
msgid "View Log"
msgstr ""
msgstr "查看日誌"
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_log_line
msgid "Log Line"
msgstr ""
msgstr "日誌明細"
#. module: audittrail
#: field:audittrail.rule,log_action:0
msgid "Log Action"
msgstr ""
msgstr "記錄動作"
#. module: audittrail
#: help:audittrail.rule,log_create:0
msgid ""
"Select this if you want to keep track of creation on any record of the "
"object of this rule"
msgstr ""
msgstr "如果你想追蹤此對象所有記錄的建立請選擇此項"

View File

@ -7,6 +7,7 @@ import werkzeug.utils
import openerp.modules.registry
import openerp.addons.web.controllers.main
import openerp.addons.web.common.http as openerpweb
from openerp import SUPERUSER_ID
_logger = logging.getLogger(__name__)
@ -18,7 +19,7 @@ class OAuthController(openerpweb.Controller):
registry = openerp.modules.registry.RegistryManager.get(dbname)
with registry.cursor() as cr:
providers = registry.get('auth.oauth.provider')
l = providers.read(cr, 1, providers.search(cr, 1, [('enabled','=',True)]))
l = providers.read(cr, SUPERUSER_ID, providers.search(cr, SUPERUSER_ID, [('enabled','=',True)]))
return l
@openerpweb.httprequest
@ -30,7 +31,7 @@ class OAuthController(openerpweb.Controller):
with registry.cursor() as cr:
try:
u = registry.get('res.users')
credentials = u.auth_oauth(cr, 1, provider, kw)
credentials = u.auth_oauth(cr, SUPERUSER_ID, provider, kw)
cr.commit()
return openerp.addons.web.controllers.main.login_and_redirect(req, *credentials)
except AttributeError:

View File

@ -6,6 +6,7 @@ import simplejson
import openerp
from openerp.osv import osv, fields
from openerp import SUPERUSER_ID
_logger = logging.getLogger(__name__)
@ -63,7 +64,7 @@ class res_users(osv.Model):
try:
return super(res_users, self).check_credentials(cr, uid, password)
except openerp.exceptions.AccessDenied:
res = self.search(cr, 1, [('id','=',uid),('oauth_access_token','=',password)])
res = self.search(cr, SUPERUSER_ID, [('id','=',uid),('oauth_access_token','=',password)])
if not res:
raise

View File

@ -23,6 +23,7 @@ import logging
import os
import tempfile
import urllib
from openerp import SUPERUSER_ID
import werkzeug.urls
import werkzeug.exceptions
@ -176,7 +177,7 @@ class OpenIDController(openerpweb.Controller):
with registry.cursor() as cr:
Modules = registry.get('ir.module.module')
installed = Modules.search_count(cr, 1, ['&', ('name', '=', 'auth_openid'), ('state', '=', 'installed')]) == 1
installed = Modules.search_count(cr, SUPERUSER_ID, ['&', ('name', '=', 'auth_openid'), ('state', '=', 'installed')]) == 1
if installed:
Users = registry.get('res.users')
@ -196,13 +197,13 @@ class OpenIDController(openerpweb.Controller):
domain += [('openid_url', '=', openid_url), ('active', '=', True)]
ids = Users.search(cr, 1, domain)
ids = Users.search(cr, SUPERUSER_ID, domain)
assert len(ids) < 2
if ids:
user_id = ids[0]
login = Users.browse(cr, 1, user_id).login
login = Users.browse(cr, SUPERUSER_ID, user_id).login
key = randomString(utils.KEY_LENGTH, '0123456789abcdef')
Users.write(cr, 1, [user_id], {'openid_key': key})
Users.write(cr, SUPERUSER_ID, [user_id], {'openid_key': key})
# TODO fill empty fields with the ones from sreg/ax
cr.commit()

View File

@ -4,7 +4,7 @@
<t t-extend="Login">
<t t-jquery=".oe_login .oe_login_logo" t-operation="after">
<ul class="openid_providers">
<ul class="openid_providers oe_semantic_html_override">
<li><a href="#login,password" title="Password" data-url="" id="btn_password">Password</a></li>
<li><a href="#google" title="Google" data-url="https://www.google.com/accounts/o8/id">Google</a></li>
<li><a href="#googleapps" title="Google Apps" data-url="https://www.google.com/accounts/o8/site-xrds?hd={id}">Google</a></li>

View File

@ -6,6 +6,7 @@ import urlparse
from openerp.tools import config
from openerp.osv import osv, fields
from openerp import SUPERUSER_ID
TWENTY_FOUR_HOURS = 24 * 60 * 60
@ -76,9 +77,9 @@ class res_users(osv.osv):
MailMessage.send(cr, uid, [msg_id], context=context)
def send_reset_password_request(self, cr, uid, email, context=None):
ids = self.pool.get('res.users').search(cr, 1, [('user_email', '=', email)], context=context)
ids = self.pool.get('res.users').search(cr, SUPERUSER_ID, [('user_email', '=', email)], context=context)
if ids:
self._auth_reset_password_send_email(cr, 1, email, 'reset_password_email', ids[0], context=context)
self._auth_reset_password_send_email(cr, SUPERUSER_ID, email, 'reset_password_email', ids[0], context=context)
return True
#else:
# _m, company_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'main_company')
@ -109,7 +110,7 @@ class auth_reset_password(osv.TransientModel):
Users = self.pool.get('res.users')
data = Users._auth_reset_password_check_token(cr, uid, values.get('token', ''))
if data:
Users.write(cr, 1, data['uid'], {'password': pw}, context=context)
Users.write(cr, SUPERUSER_ID, data['uid'], {'password': pw}, context=context)
else:
raise osv.except_osv('Error', 'Invalid token')

View File

@ -9,16 +9,13 @@
<field name="email_from"><![CDATA[${object.company_id.name} <${object.company_id.email}>]]></field>
<field name="email_to" eval="False"><!--(set by reset_password module)--></field>
<field name="subject">Password reset</field>
<field name="body_text"><![CDATA[
A password reset was requested the OpenERP account linked to this email on ${object._auth_reset_password_host()}
<field name="body_html"><![CDATA[
<p>A password reset was requested the OpenERP account linked to this email on ${object._auth_reset_password_host()}</p>
You may change your password following this link:
<p>You may change your password following this <a href="${object._auth_reset_password_link()}">link</a>,
or by copy-pasting the following URL in your browser: ${object._auth_reset_password_link()}</p>
${object._auth_reset_password_link()}
If you don't have asked for password reset, you can safely ignore this email.
]]></field>
<p>Note: If you did not ask for a password reset, you can safely ignore this email.</p>]]></field>
</record>
<!-- TODO get own css -->

View File

@ -31,7 +31,10 @@ Allow users to sign up.
'website': 'http://www.openerp.com',
'installable': True,
'depends': ['base_setup'],
'data': ['res_config.xml'],
'data': [
'auth_signup_data.xml',
'res_config.xml',
],
'js': ['static/src/js/auth_signup.js'],
'qweb': ['static/src/xml/auth_signup.xml'],
}

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data noupdate="1">
<!-- Default template user for new users signing in -->
<record id="default_template_user" model="res.users">
<field name="name">Template User</field>
<field name="login">portaltemplate</field>
<!-- No password: this template user doesn't need to log in -->
<field name="password"></field>
<field name="active" eval="False"/>
<!-- Avoid auto-including this user in any default group, just like a typical portal member -->
<field name="groups_id" eval="[(5,)]"/>
</record>
<record id="default_template_user" model="ir.config_parameter">
<field name="key">auth_signup.template_user_id</field>
<field name="value" ref="default_template_user"/>
</record>
</data>
</openerp>

View File

@ -5,6 +5,7 @@ import werkzeug.urls
from openerp.modules.registry import RegistryManager
from openerp.addons.web.controllers.main import login_and_redirect
import openerp.addons.web.common.http as openerpweb
from openerp import SUPERUSER_ID
_logger = logging.getLogger(__name__)
@ -18,7 +19,7 @@ class OpenIDController(openerpweb.Controller):
with registry.cursor() as cr:
try:
Users = registry.get('res.users')
credentials = Users.auth_signup(cr, 1, name, login, password)
credentials = Users.auth_signup(cr, SUPERUSER_ID, name, login, password)
cr.commit()
return login_and_redirect(req, *credentials)
except AttributeError:

View File

@ -29,13 +29,13 @@ class base_config_settings(osv.TransientModel):
'auth_signup_template_user_id': fields.many2one('res.users', 'Template user for new users created through signup'),
}
def get_default_signup(self, cr, uid, fields, context=None):
def get_default_auth_signup_template_user_id(self, cr, uid, fields, context=None):
icp = self.pool.get('ir.config_parameter')
return {
'auth_signup_template_user_id': icp.get_param(cr, uid, 'auth.signup_template_user_id', 0) or False
'auth_signup_template_user_id': icp.get_param(cr, uid, 'auth_signup.template_user_id', 0) or False
}
def set_signup(self, cr, uid, ids, context=None):
def set_auth_signup_template_user_id(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context=context)
icp = self.pool.get('ir.config_parameter')
icp.set_param(cr, uid, 'auth.signup_template_user_id', config.auth_signup_template_user_id.id)
icp.set_param(cr, uid, 'auth_signup.template_user_id', config.auth_signup_template_user_id.id)

View File

@ -12,9 +12,9 @@
<field name="auth_signup_uninvited" class="oe_inline"/>
<label for="auth_signup_uninvited"/>
</div>
<div>
<div attrs="{'invisible':[('auth_signup_uninvited','=',False)]}">
<label for="auth_signup_template_user_id"/>
<field name="auth_signup_template_user_id" class="oe_inline"/>
<field name="auth_signup_template_user_id" class="oe_inline" domain="['|',('active','=',0),('active','=',1)]"/>
</div>
</xpath>
</field>

View File

@ -1,5 +1,6 @@
import openerp
from openerp.osv import osv
from openerp import SUPERUSER_ID
class res_users(osv.Model):
_inherit = 'res.users'
@ -15,9 +16,9 @@ class res_users(osv.Model):
#
user_template_id = self.pool.get('ir.config_parameter').get_param(cr, uid, 'auth.signup_template_user_id', 0)
if user_template_id:
self.pool.get('res.users').copy(cr, 1, user_template_id, new_user, context=context)
self.pool.get('res.users').copy(cr, SUPERUSER_ID, user_template_id, new_user, context=context)
else:
self.pool.get('res.users').create(cr, 1, new_user, context=context)
self.pool.get('res.users').create(cr, SUPERUSER_ID, new_user, context=context)
def auth_signup(self, cr, uid, name, login, password, context=None):
r = (cr.dbname, login, password)

View File

@ -302,33 +302,27 @@ the rule to mark CC(mail to any other person defined in actions)."),
return self.format_body(body % data)
def email_send(self, cr, uid, obj, emails, body, emailfrom=None, context=None):
""" send email
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param email: pass the emails
@param emailfrom: Pass name the email From else False
@param context: A standard dictionary for contextual values """
if not emailfrom:
emailfrom = tools.config.get('email_from', False)
if context is None:
context = {}
mail_message = self.pool.get('mail.message')
emailfrom = tools.config.get('email_from')
body = self.format_mail(obj, body)
if not emailfrom:
if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.email:
emailfrom = obj.user_id.email
name = '[%d] %s' % (obj.id, tools.ustr(obj.name))
if not emailfrom and hasattr(obj, 'user_id') and obj.user_id and obj.user_id.email:
emailfrom = obj.user_id.email
emailfrom = tools.ustr(emailfrom)
reply_to = emailfrom
if not emailfrom:
raise osv.except_osv(_('Error!'),
_("No email ID found for your company address."))
return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model='base.action.rule', reply_to=reply_to, res_id=obj.id)
_("Missing default email address or missing email on responsible user"))
return self.pool.get('mail.mail').create(cr, uid,
{ 'email_from': emailfrom,
'email_to': emails.join(','),
'reply_to': reply_to,
'state': 'outgoing',
'subject': '[%d] %s' % (obj.id, tools.ustr(obj.name)),
'body_html': '<pre>%s</pre>' % body,
'res_id': obj.id,
'model': obj._table_name,
'auto_delete': True
}, context=context)
def do_check(self, cr, uid, action, obj, context=None):
@ -438,11 +432,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
if len(emails) and action.act_mail_body:
emails = list(set(emails))
email_from = safe_eval(action.act_email_from, {}, locals_for_emails)
def to_email(text):
return re.findall(r'([^ ,<@]+@[^> ,]+)', text or '')
emails = to_email(','.join(filter(None, emails)))
email_froms = to_email(email_from)
emails = tools.email_split(','.join(filter(None, emails)))
email_froms = tools.email_split(email_from)
if email_froms:
self.email_send(cr, uid, obj, emails, action.act_mail_body, emailfrom=email_froms[0])
return True

View File

@ -0,0 +1,536 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-09-03 16:43+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-04 04:52+0000\n"
"X-Generator: Launchpad (build 15890)\n"
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_user:0
msgid ""
"Check this if you want the rule to send an email to the responsible person."
msgstr ""
"Sjekk dette hvis du vil at regelen skal sende en e-post til ansvarlig person."
#. module: base_action_rule
#: field:base.action.rule,act_remind_partner:0
msgid "Remind Partner"
msgstr "Påminn partner"
#. module: base_action_rule
#: field:base.action.rule,trg_partner_categ_id:0
msgid "Partner Category"
msgstr "Partner Kategori"
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_watchers:0
msgid "Mail to Watchers (CC)"
msgstr "Post til overvåkere (CC)"
#. module: base_action_rule
#: field:base.action.rule,trg_state_to:0
msgid "Button Pressed"
msgstr "Knapp trykket"
#. module: base_action_rule
#: field:base.action.rule,model_id:0
msgid "Object"
msgstr "Objekt"
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_email:0
msgid "Mail to these Emails"
msgstr "Send mail til disse e-postene"
#. module: base_action_rule
#: field:base.action.rule,act_state:0
msgid "Set State to"
msgstr "Still stat til"
#. module: base_action_rule
#: field:base.action.rule,act_email_from:0
msgid "Email From"
msgstr "E-post fra"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Body"
msgstr "E-post kropp"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Days"
msgstr "Dager"
#. module: base_action_rule
#: field:base.action.rule,last_run:0
msgid "Last Run"
msgstr "Siste kjøring"
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:328
#, python-format
msgid "Error!"
msgstr "Feil!"
#. module: base_action_rule
#: field:base.action.rule,act_reply_to:0
msgid "Reply-To"
msgstr "Svar til"
#. module: base_action_rule
#: help:base.action.rule,act_email_cc:0
msgid ""
"These people will receive a copy of the future communication between partner "
"and users by email"
msgstr ""
"Disse menneskene vil motta en kopi av den fremtidige kommunikasjon mellom "
"partner og brukere av e-post"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Minutes"
msgstr "Minutter"
#. module: base_action_rule
#: field:base.action.rule,name:0
msgid "Rule Name"
msgstr "Regelnavn"
#. module: base_action_rule
#: help:base.action.rule,act_remind_partner:0
msgid ""
"Check this if you want the rule to send a reminder by email to the partner."
msgstr ""
"Sjekk dette hvis du vil at regelen skal sende en påminnelse via e-post til "
"partneren."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Partner"
msgstr "Forholdene på Modell Partner"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Deadline"
msgstr "Frist"
#. module: base_action_rule
#: field:base.action.rule,trg_partner_id:0
msgid "Partner"
msgstr "Partner"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_subject)s = Object subject"
msgstr "%(object_subject)s = Object subject"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Reminders"
msgstr "E-post påminnelser"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Special Keywords to be Used in the Body"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,trg_state_from:0
msgid "State"
msgstr "Stat"
#. module: base_action_rule
#: model:ir.actions.act_window,help:base_action_rule.base_action_rule_act
msgid ""
"Use automated actions to automatically trigger actions for various screens. "
"Example: a lead created by a specific user may be automatically set to a "
"specific sales team, or an opportunity which still has status pending after "
"14 days might trigger an automatic reminder email."
msgstr ""
"Bruke automatiserte tiltak for å automatisk utløse tiltak for ulike "
"skjermer. Eksempel: en leder er opprettet av en bestemt bruker kan bli satt "
"automatisk til en bestemt salgsteam, eller en mulighet som fortsatt har "
"status påvente etter 14 dager kan utløse en automatisk påminnelse e-post."
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_email:0
msgid "Email-id of the persons whom mail is to be sent"
msgstr "E-post ID av personer som post skal sendes"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Action Rule"
msgstr "Handling regel"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Fields to Change"
msgstr "Felter å endre"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Creation Date"
msgstr "Opprettelsesdato"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Last Action Date"
msgstr "Siste handlingsdato"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Hours"
msgstr "Timer"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_id)s = Object ID"
msgstr "%(object_ID)s = Object ID"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Delay After Trigger Date"
msgstr "Forsinkelse Etter utløser Dato"
#. module: base_action_rule
#: field:base.action.rule,act_remind_attach:0
msgid "Remind with Attachment"
msgstr "Minn med vedlegg"
#. module: base_action_rule
#: constraint:ir.cron:0
msgid "Invalid arguments"
msgstr "Ugyldige argumenter"
#. module: base_action_rule
#: field:base.action.rule,act_user_id:0
msgid "Set Responsible to"
msgstr "Satt Ansvarlig for å"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "None"
msgstr "Ingen"
#. module: base_action_rule
#: help:base.action.rule,act_email_to:0
msgid ""
"Use a python expression to specify the right field on which one than we will "
"use for the 'To' field of the header"
msgstr ""
"Bruk en python uttrykk for å angi høyre feltet på hvilken enn vi vil bruke "
"for Til-feltet på header."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_phone)s = Responsible phone"
msgstr "% (object_bruker_telefonen) s = Ansvarlig telefon"
#. module: base_action_rule
#: view:base.action.rule:0
msgid ""
"The rule uses the AND operator. The model must match all non-empty fields so "
"that the rule executes the action described in the 'Actions' tab."
msgstr ""
"Regelen bruker AND-operatoren. Modellen må matche alle-ikke tomme felt, slik "
"at regelen utfører handlingen som er beskrevet i \"Handlinger\"-fanen."
#. module: base_action_rule
#: field:base.action.rule,trg_date_range_type:0
msgid "Delay type"
msgstr "forsinkelse typen"
#. module: base_action_rule
#: help:base.action.rule,regex_name:0
msgid ""
"Regular expression for matching name of the resource\n"
"e.g.: 'urgent.*' will search for records having name starting with the "
"string 'urgent'\n"
"Note: This is case sensitive search."
msgstr ""
"Regulært uttrykk for matchende navnet på ressursen\n"
"f.eks: \". haster * 'vil søke etter poster som har navn som starter med "
"strengen\" haster \"\n"
"Merk: Dette er små bokstaver søk."
#. module: base_action_rule
#: field:base.action.rule,act_method:0
msgid "Call Object Method"
msgstr "Kall objektmetode"
#. module: base_action_rule
#: field:base.action.rule,act_email_to:0
msgid "Email To"
msgstr "E-post til."
#. module: base_action_rule
#: help:base.action.rule,act_mail_to_watchers:0
msgid ""
"Check this if you want the rule to mark CC(mail to any other person defined "
"in actions)."
msgstr ""
"Sjekk dette hvis du vil at regelen skal merkes CC (mail til en annen person "
"som er definert i handlinger)."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner)s = Partner name"
msgstr "%(partner)s = Navn på partner"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Note"
msgstr "Notat"
#. module: base_action_rule
#: help:base.action.rule,act_email_from:0
msgid ""
"Use a python expression to specify the right field on which one than we will "
"use for the 'From' field of the header"
msgstr ""
"Bruk en python uttrykk for å angi høyre feltet på hvilken enn vi vil bruke "
"for Fra-feltet på overskriften"
#. module: base_action_rule
#: field:base.action.rule,trg_date_range:0
msgid "Delay after trigger date"
msgstr "Forsinkelse etter triggerdato"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions"
msgstr "Betingelser"
#. module: base_action_rule
#: help:base.action.rule,trg_date_range:0
msgid ""
"Delay After Trigger Date,specifies you can put a negative number. If you "
"need a delay before the trigger date, like sending a reminder 15 minutes "
"before a meeting."
msgstr ""
"Forsinkelse Etter utløser Dato, spesifiserer du kan sette et negativt tall. "
"Hvis du trenger en forsinkelse før avtrekkeren dato, som å sende en "
"påminnelse 15 minutter før et møte."
#. module: base_action_rule
#: field:base.action.rule,active:0
msgid "Active"
msgstr "Aktiv"
#. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:329
#, python-format
msgid "No Email ID Found for your Company address!"
msgstr ""
#. module: base_action_rule
#: field:base.action.rule,act_remind_user:0
msgid "Remind Responsible"
msgstr "Minn Ansvarlig"
#. module: base_action_rule
#: help:base.action.rule,sequence:0
msgid "Gives the sequence order when displaying a list of rules."
msgstr "Gir sekvens ordre når du viser en liste over regler."
#. module: base_action_rule
#: selection:base.action.rule,trg_date_range_type:0
msgid "Months"
msgstr "Måneder"
#. module: base_action_rule
#: field:base.action.rule,filter_id:0
msgid "Filter"
msgstr "Filtrer"
#. module: base_action_rule
#: selection:base.action.rule,trg_date_type:0
msgid "Date"
msgstr "Dato"
#. module: base_action_rule
#: help:base.action.rule,server_action_id:0
msgid ""
"Describes the action name.\n"
"eg:on which object which action to be taken on basis of which condition"
msgstr ""
"Beskriver handlingens navn.\n"
"f.eks: på hvilket objekt som tiltak som skal iverksettes på grunnlag av "
"hvilken tilstand"
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_ir_cron
msgid "ir.cron"
msgstr "ir.actions.actions"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_description)s = Object description"
msgstr "% (object_beskrivelse) s = Object beskrivelse"
#. module: base_action_rule
#: constraint:base.action.rule:0
msgid "Error: The mail is not well formated"
msgstr "Feil: E-posten er ikke godt nok formatert"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Actions"
msgstr "E-post handlinger"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Email Information"
msgstr "E-post Informasjon"
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_base_action_rule
msgid "Action Rules"
msgstr "Handlingsregler"
#. module: base_action_rule
#: help:base.action.rule,act_mail_body:0
msgid "Content of mail"
msgstr "Innholdet av post"
#. module: base_action_rule
#: field:base.action.rule,trg_user_id:0
msgid "Responsible"
msgstr "Ansvarlig"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(partner_email)s = Partner Email"
msgstr "% (partner_e-post) s = Partner E-post"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_date)s = Creation date"
msgstr "%(object_dato)s = opprettelsesdato"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user_email)s = Responsible Email"
msgstr "% (object_brukerens_e-post) s = Ansvarlig e-post"
#. module: base_action_rule
#: field:base.action.rule,act_mail_body:0
msgid "Mail body"
msgstr "Mail kropp"
#. module: base_action_rule
#: help:base.action.rule,act_remind_user:0
msgid ""
"Check this if you want the rule to send a reminder by email to the user."
msgstr ""
"Kryss av her hvis du vil at regelen skal sende en påminnelse til brukeren "
"via e-post."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Server Action to be Triggered"
msgstr "Server Tiltak som skal Utløses"
#. module: base_action_rule
#: field:base.action.rule,act_mail_to_user:0
msgid "Mail to Responsible"
msgstr "send mail til ansvarlig"
#. module: base_action_rule
#: field:base.action.rule,act_email_cc:0
msgid "Add Watchers (Cc)"
msgstr "Legg til overvåkere (Cc)"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Model Fields"
msgstr "Forholdene på Modell Felter"
#. module: base_action_rule
#: model:ir.actions.act_window,name:base_action_rule.base_action_rule_act
#: model:ir.ui.menu,name:base_action_rule.menu_base_action_rule_form
msgid "Automated Actions"
msgstr "Automatiserte handinger"
#. module: base_action_rule
#: field:base.action.rule,server_action_id:0
msgid "Server Action"
msgstr "Tjenerhandling"
#. module: base_action_rule
#: field:base.action.rule,regex_name:0
msgid "Regex on Resource Name"
msgstr "Regex på Ressursnavn"
#. module: base_action_rule
#: help:base.action.rule,act_remind_attach:0
msgid ""
"Check this if you want that all documents attached to the object be attached "
"to the reminder email sent."
msgstr ""
"Kryss av her om du vil at alle dokumenter knyttet til objektet festes til "
"påminnelse e-post sendt."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on Timing"
msgstr "Vilkår for timing"
#. module: base_action_rule
#: field:base.action.rule,sequence:0
msgid "Sequence"
msgstr "Sekvens"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Actions"
msgstr "Handlinger"
#. module: base_action_rule
#: help:base.action.rule,active:0
msgid ""
"If the active field is set to False, it will allow you to hide the rule "
"without removing it."
msgstr ""
"Hvis det aktive feltet er satt til False, vil det tillate deg å skjule "
"regelen uten å fjerne den."
#. module: base_action_rule
#: view:base.action.rule:0
msgid "%(object_user)s = Responsible name"
msgstr "% (object_bruker) s = Ansvarlig navn"
#. module: base_action_rule
#: field:base.action.rule,create_date:0
msgid "Create Date"
msgstr "Opprettet dato"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Conditions on States"
msgstr "Vilkår for tilstander"
#. module: base_action_rule
#: field:base.action.rule,trg_date_type:0
msgid "Trigger Date"
msgstr "Uttløser dato"
#~ msgid "Special Keywords to Be Used in The Body"
#~ msgstr "Spesielle nøkkelord for bruk i meldingsinnhold"
#, python-format
#~ msgid "No E-Mail ID Found for your Company address!"
#~ msgstr "Ingen E-post ID funnet for din firmaadresse!"

View File

@ -471,18 +471,10 @@ property or property parameter."),
def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context=None):
"""
Send mail for event invitation to event attendees.
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of attendees IDs.
@param email_from: Email address for user sending the mail
@param context: A standard dictionary for contextual values
@return: True
"""
if context is None:
context = {}
company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.name
mail_message = self.pool.get('mail.message')
for att in self.browse(cr, uid, ids, context=context):
sign = att.sent_by_uid and att.sent_by_uid.signature or ''
sign = '<br>'.join(sign and sign.split('\n') or [])
@ -508,17 +500,18 @@ property or property parameter."),
}
body = html_invitation % body_vals
if mail_to and email_from:
attach = self.get_ics_file(cr, uid, res_obj, context=context)
mail_message.schedule_with_attach(cr, uid,
email_from,
mail_to,
sub,
body,
attachments=attach and {'invitation.ics': attach} or None,
content_subtype='html',
reply_to=email_from,
context=context
)
ics_file = self.get_ics_file(cr, uid, res_obj, context=context)
vals = {'email_from': email_from,
'email_to': mail_to,
'state': 'outgoing',
'subject': sub,
'body_html': body,
'auto_delete': True}
if ics_file:
vals['attachment_ids'] = [(0,0,{'name': 'invitation.ics',
'datas_fname': 'invitation.ics',
'datas': str(ics_file).encode('base64')})]
self.pool.get('mail.mail').create(cr, uid, vals, context=context)
return True
def onchange_user_id(self, cr, uid, ids, user_id, *args, **argv):
@ -812,7 +805,6 @@ class calendar_alarm(osv.osv):
"""
if context is None:
context = {}
mail_message = self.pool.get('mail.message')
current_datetime = datetime.now()
alarm_ids = self.search(cr, uid, [('state', '!=', 'done')], context=context)
@ -849,36 +841,10 @@ class calendar_alarm(osv.osv):
else:
re_dates = [alarm.trigger_date]
for r_date in re_dates:
ref = alarm.model_id.model + ',' + str(alarm.res_id)
# search for alreay sent requests
#if request_obj.search(cr, uid, [('trigger_date', '=', r_date), ('ref_doc1', '=', ref)], context=context):
#continue
# Deactivated because of the removing of res.request
# TODO: when cleaning calendar module, re-add this in a new mechanism
#if alarm.action == 'display':
#value = {
#'name': alarm.name,
#'act_from': alarm.user_id.id,
#'act_to': alarm.user_id.id,
#'body': alarm.description,
#'trigger_date': r_date,
#'ref_doc1': ref
#}
#request_id = request_obj.create(cr, uid, value)
#request_ids = [request_id]
#for attendee in res_obj.attendee_ids:
#if attendee.user_id:
#value['act_to'] = attendee.user_id.id
#request_id = request_obj.create(cr, uid, value)
#request_ids.append(request_id)
#request_obj.request_send(cr, uid, request_ids)
if re_dates:
if alarm.action == 'email':
sub = '[Openobject Reminder] %s' % (alarm.name)
body = """
sub = '[OpenERP Reminder] %s' % (alarm.name)
body = """<pre>
Event: %s
Event Date: %s
Description: %s
@ -888,20 +854,21 @@ From:
----
%s
</pre>
""" % (alarm.name, alarm.trigger_date, alarm.description, \
alarm.user_id.name, alarm.user_id.signature)
mail_to = [alarm.user_id.email]
for att in alarm.attendee_ids:
mail_to.append(att.user_id.email)
if mail_to:
mail_message.schedule_with_attach(cr, uid,
tools.config.get('email_from', False),
mail_to,
sub,
body,
context=context
)
vals = {
'state': 'outgoing',
'subject': sub,
'body_html': body,
'email_to': mail_to,
'email_from': tools.config.get('email_from', mail_to),
}
self.pool.get('mail.mail').create(cr, uid, vals, context=context)
if next_trigger_date:
update_vals.update({'trigger_date': next_trigger_date})
else:
@ -1616,36 +1583,6 @@ class calendar_todo(osv.osv):
calendar_todo()
class ir_attachment(osv.osv):
_name = 'ir.attachment'
_inherit = 'ir.attachment'
def search_count(self, cr, user, args, context=None):
new_args = []
for domain_item in args:
if isinstance(domain_item, (list, tuple)) and len(domain_item) == 3 and domain_item[0] == 'res_id':
new_args.append((domain_item[0], domain_item[1], base_calendar_id2real_id(domain_item[2])))
else:
new_args.append(domain_item)
return super(ir_attachment, self).search_count(cr, user, new_args, context)
def create(self, cr, uid, vals, context=None):
if context:
id = context.get('default_res_id', False)
context.update({'default_res_id' : base_calendar_id2real_id(id)})
return super(ir_attachment, self).create(cr, uid, vals, context=context)
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
new_args = []
for domain_item in args:
if isinstance(domain_item, (list, tuple)) and len(domain_item) == 3 and domain_item[0] == 'res_id':
new_args.append((domain_item[0], domain_item[1], base_calendar_id2real_id(domain_item[2])))
else:
new_args.append(domain_item)
return super(ir_attachment, self).search(cr, uid, new_args, offset=offset,
limit=limit, order=order, context=context, count=False)
ir_attachment()
class ir_values(osv.osv):
_inherit = 'ir.values'

View File

@ -43,7 +43,7 @@ class crm_meeting(base_state, osv.Model):
_name = 'crm.meeting'
_description = "Meeting"
_order = "id desc"
_inherit = ["calendar.event", 'ir.needaction_mixin', "mail.thread"]
_inherit = ["calendar.event", "mail.thread", 'ir.needaction_mixin']
_columns = {
# base_state required fields
'create_date': fields.datetime('Creation Date', readonly=True),
@ -70,13 +70,17 @@ class crm_meeting(base_state, osv.Model):
# OpenChatter
# ----------------------------------------
# shows events of the day for this user
def needaction_domain_get(self, cr, uid, domain=[], context={}):
return [('date','<=',time.strftime('%Y-%M-%D 23:59:59')), ('date_deadline','>=', time.strftime('%Y-%M-%D 00:00:00')), ('user_id','=',uid)]
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
return 'Meeting'
def case_open_send_note(self, cr, uid, ids, context=None):
return self.message_append_note(cr, uid, ids, body=_("Meeting has been <b>confirmed</b>."), context=context)
return self.message_post(cr, uid, ids, body=_("Meeting <b>confirmed</b>."), context=context)
def case_close_send_note(self, cr, uid, ids, context=None):
return self.message_append_note(cr, uid, ids, body=_("Meeting has been <b>done</b>."), context=context)
return self.message_post(cr, uid, ids, body=_("Meeting <b>completed</b>."), context=context)

View File

@ -172,7 +172,8 @@
<page string="Invitation Detail">
<button string="Invite People"
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
icon="terp-partner" type="action"
type="action"
attrs="{'readonly': [('state', '=', 'done')]}"
context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/>
<field name="attendee_ids" widget="one2many" mode="tree">
<tree string="Invitation details" editable="top">
@ -184,17 +185,16 @@
<button name="do_tentative"
states="needs-action,declined,accepted"
string="Uncertain" type="object"
icon="terp-crm" />
/>
<button name="do_accept" string="Accept"
states="needs-action,tentative,declined"
type="object" icon="gtk-apply" />
type="object" />
<button name="do_decline" string="Decline"
states="needs-action,tentative,accepted"
type="object" icon="gtk-cancel" />
type="object" />
<button
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
string="Delegate" type="action"
icon="gtk-sort-descending"
states="needs-action,tentative,declined,accepted"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
</tree>
@ -202,16 +202,16 @@
<header>
<button name="do_tentative" type="object"
states="needs-action,declined,accepted"
string="Uncertain" icon="terp-crm" />
string="Uncertain" />
<button name="do_accept" type="object"
states="needs-action,tentative,declined"
string="Accept" icon="gtk-apply" />
string="Accept" />
<button name="do_decline" type="object"
states="needs-action,tentative,accepted"
string="Decline" icon="gtk-cancel" />
string="Decline" />
<button name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d" type="action"
states="needs-action,tentative,declined,accepted"
string="Delegate" icon="gtk-sort-descending"
string="Delegate"
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
<field name="state" widget="statusbar" statusbar_visible="draft,open,done"/>
</header>
@ -246,13 +246,13 @@
<field name="name">CRM - Meetings Tree</field>
<field name="model">crm.meeting</field>
<field name="arch" type="xml">
<tree string="Meetings" fonts="bold:needaction_pending==True">
<tree string="Meetings" fonts="bold:message_unread==True">
<field name="name" string="Subject" />
<field name="user_id"/>
<field name="date"/>
<field name="state" invisible="True"/>
<field name="duration" />
<field name="needaction_pending" invisible="1"/>
<field name="message_unread" invisible="1"/>
</tree>
</field>
</record>
@ -289,9 +289,9 @@
<field name="arch" type="xml">
<search string="Search Meetings">
<field name="name" string="Meeting" filter_domain="[('name','ilike',self)]"/>
<filter string="Inbox" help="Unread messages" icon="terp-mail-message-new" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
<filter string="Inbox" help="Unread messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
<filter string="My Meetings" help="My Meetings" icon="terp-personal" domain="[('user_id','=',uid)]"/>
<filter string="My Meetings" help="My Meetings" domain="[('user_id','=',uid)]"/>
<field name="user_id"/>
<field name="partner_ids"/>
</search>

View File

@ -1,8 +1,8 @@
# -*- encoding: utf-8 -*-
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2004-2010 Openerp sa (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -11,7 +11,7 @@
#
# 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
# 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
@ -19,7 +19,8 @@
#
##############################################################################
#import hr_evaluation_mail
import mail_compose_message
import res_company
import ir_translation
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -18,24 +18,33 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Projects Management: hr_expense link',
'version': '1.1',
'category': 'Hidden',
'name': 'Automated Translations through Gengo API',
'version': '0.1',
'category': 'Tools',
'description': """
This module is for modifying project view to show some data related to the hr_expense module.
=============================================================================================
""",
'author': 'OpenERP S.A.',
'website': 'http://www.openerp.com/',
'depends': ['analytic_contract_hr_expense','project'],
'data': ['analytic_contract_expense_project_view.xml'],
'demo': [],
'css' : [],
Automated Translations through Gengo API
----------------------------------------
This module will install passive scheduler job for automated translations
using the Gengo API. To activate it, you must
1) Configure your Gengo authentication parameters under `Settings > Companies > Gengo Parameters`
2) Launch the wizard under `Settings > Application Terms > Gengo: Manual Request of Translation` and follow the wizard.
This wizard will activate the CRON job and the Scheduler and will start the automatic translation via Gengo Services for all the terms where you requested it.
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': ['gengo_sync_schedular_data.xml'],
'update_xml': [
'ir_translation.xml',
'res_company_view.xml',
'wizard/base_gengo_translations_view.xml',
],
'demo_xml': [],
'test': [],
'installable': True,
'auto_install': True,
'auto_install': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--Scheduler sync Receive Request-->
<record id="gengo_sync_receive_request_scheduler" model="ir.cron">
<field name="name" >Gengo Sync Translation (Response)</field>
<field eval="False" name="active"/>
<field name="interval_number">20</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field eval="'base.gengo.translations'" name="model"></field>
<field eval="'_sync_response'" name="function"/>
<field eval="'(20,)'" name="args"/>
</record>
<!--Scheduler Sync Send Request-->
<record id="gengo_sync_send_request_scheduler" model="ir.cron">
<field name="name" >Gengo Sync Translation (Request)</field>
<field eval="False" name="active"/>
<field name="interval_number">20</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field eval="'base.gengo.translations'" name="model"></field>
<field eval="'_sync_request'" name="function"/>
<field eval="'(20,)'" name="args"/>
</record>
</data>
</openerp>

View File

@ -0,0 +1,88 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# 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 fields, osv
from tools.translate import _
LANG_CODE_MAPPING = {
'ar_SA': ('ar', 'Arabic'),
'id_ID': ('id', 'Indonesian'),
'nl_NL': ('nl', 'Dutch'),
'fr_CA': ('fr-ca', 'French (Canada)'),
'pl_PL': ('pl', 'Polish'),
'zh_TW': ('zh-tw', 'Chinese (Traditional)'),
'sv_SE': ('sv', 'Swedish'),
'ko_KR': ('ko', 'Korean'),
'pt_PT': ('pt', 'Portuguese (Europe)'),
'en_US': ('en', 'English'),
'ja_JP': ('ja', 'Japanese'),
'es_ES': ('es', 'Spanish (Spain)'),
'zh_CN': ('zh', 'Chinese (Simplified)'),
'de_DE': ('de', 'German'),
'fr_FR': ('fr', 'French'),
'fr_BE': ('fr', 'French'),
'ru_RU': ('ru', 'Russian'),
'it_IT': ('it', 'Italian'),
'pt_BR': ('pt-br', 'Portuguese (Brazil)')
}
class ir_translation(osv.Model):
_name = "ir.translation"
_inherit = "ir.translation"
_columns = {
'gengo_comment': fields.text("Comments & Activity Linked to Gengo"),
'job_id': fields.char('Gengo Job ID', size=32),
"gengo_translation": fields.selection([('machine', 'Translation By Machine'),
('standard', 'Standard'),
('pro', 'Pro'),
('ultra', 'Ultra')], "Gengo Translation Service Level", help='You can select here the service level you want for an automatic translation using Gengo.'),
}
def _get_all_supported_languages(self, cr, uid, context=None):
flag, gengo = self.pool.get('base.gengo.translations').gengo_authentication(cr, uid, context=context)
if not flag:
raise osv.except_osv(_('Gengo Authentication Error'), gengo)
supported_langs = {}
lang_pair = gengo.getServiceLanguagePairs(lc_src='en')
if lang_pair['opstat'] == 'ok':
for g_lang in lang_pair['response']:
if g_lang['lc_tgt'] not in supported_langs:
supported_langs[g_lang['lc_tgt']] = []
supported_langs[g_lang['lc_tgt']] += [g_lang['tier']]
return supported_langs
def _get_gengo_corresponding_language(cr, lang):
return lang in LANG_CODE_MAPPING and LANG_CODE_MAPPING[lang][0] or lang
def _check_lang_support(self, cr, uid, ids, context=None):
for term in self.browse(cr, uid, ids, context=context):
if term.gengo_translation:
supported_langs = self._get_all_supported_languages(cr, uid, context=context)
if supported_langs:
tier = "nonprofit" if term.gengo_translation == 'machine' else term.gengo_translation
language = self._get_gengo_corresponding_language(term.lang)
if tier not in supported_langs.get(language,[]):
return False
return True
_constraints = [
(_check_lang_support, 'The Gengo translation service selected is not supported for this language.', ['gengo_translation'])
]

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_translation_search" model="ir.ui.view">
<field name="name">Translations</field>
<field name="model">ir.translation</field>
<field name="inherit_id" ref="base.view_translation_search"/>
<field name="arch" type="xml">
<search string="Translations">
<filter string="To Approve In Gengo" domain="[('state','=','inprogress'),('gengo_translation','=',True)]"></filter>
</search>
</field>
</record>
<!-- ir.translation form view -->
<record model="ir.ui.view" id="view_ir_translation_inherit_base_gengo_form">
<field name="name">ir.translation.form.inherit</field>
<field name="inherit_id" ref="base.view_translation_form"/>
<field name="model">ir.translation</field>
<field name="arch" type="xml">
<xpath expr="//form[@string='Translations']/sheet" position="inside">
<group string="Gengo Translation Service" col="4" colspan="4">
<field name="gengo_translation" />
<label string="Note: If the translation state is 'In Progress', it means that the translation has to be approved to be uploaded in this system. You are supposed to do that directly by using your Gengo Account"/>
<field name="gengo_comment" nolabel="1" placeholder="Gengo Comments &amp; Activity..." colspan="4"/>
</group>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -19,20 +19,19 @@
#
##############################################################################
{
'name' : 'Contract on Project',
'version': '1.1',
'author' : 'OpenERP SA',
'category': 'Hidden',
'website' : 'http://www.openerp.com',
'depends' : ['project', 'account_analytic_analysis'],
'description': """
Add "Contract Data" in project view.
====================================
""",
'data': ['analytic_contract_project_view.xml'],
'demo': [],
'installable': True,
'auto_install': True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
from osv import fields, osv
class res_company(osv.Model):
_name = "res.company"
_inherit = "res.company"
_columns = {
"gengo_private_key": fields.text("Gengo Private Key"),
"gengo_public_key": fields.text("Gengo Public Key"),
"gengo_comment": fields.text("Comments", help="This comment will be automatically be enclosed in each an every request sent to Gengo"),
"gengo_auto_approve": fields.boolean("Auto Approve Translation ?", help="Jobs are Automatically Approved by Gengo."),
}
_defaults = {
"gengo_auto_approve": True,
}

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- res.company form view -->
<record model="ir.ui.view" id="view_company_inherit_base_gengo_form">
<field name="name">res.company.form.inherit</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="model">res.company</field>
<field name="arch" type="xml">
<xpath expr="//notebook[last()]" position="inside">
<page string="Gengo Parameters">
<group col="2">
<group col="1" string="Public Key">
<field name="gengo_public_key" nolabel="1" placeholder="Add Gengo login Public Key..."/>
</group>
<group col="1" string="Private Key">
<field name="gengo_private_key" password="True" nolabel="1" placeholder="Add Gengo login Private Key..."/>
</group>
</group>
<group col="4">
<field name="gengo_auto_approve"/>
</group>
<group string="Comments for Translator" col="1">
<field name="gengo_comment" nolabel="1" placeholder="Add your comments here for translator...."/>
</group>
</page>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -19,6 +19,6 @@
#
##############################################################################
import project_mailgate
import base_gengo_translations
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,253 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# 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 _
import re
try:
from mygengo import MyGengo
except ImportError:
raise osv.except_osv(_('Gengo ImportError'), _('Please install mygengo lib from http://pypi.python.org/pypi/mygengo'))
import logging
import tools
import time
_logger = logging.getLogger(__name__)
GENGO_DEFAULT_LIMIT = 20
DEFAULT_CRON_VALS = {
'active': True,
'interval_number': 20,
'interval_type': 'minutes',
'model': "'base.gengo.translations'",
'args': "'(%s,)'" % (str(GENGO_DEFAULT_LIMIT)),
}
class base_gengo_translations(osv.osv_memory):
_name = 'base.gengo.translations'
_columns = {
'restart_send_job': fields.boolean("Restart Sending Job"),
'lang_id': fields.many2one('res.lang', 'Language', help="Leave empty if you don't want to restrict the request to a single language"),
}
def gengo_authentication(self, cr, uid, context=None):
'''
This method tries to open a connection with Gengo. For that, it uses the Public and Private
keys that are linked to the company (given by Gengo on subscription). It returns a tuple with
* as first element: a boolean depicting if the authentication was a success or not
* as second element: the connection, if it was a success, or the error message returned by
Gengo when the connection failed.
This error message can either be displayed in the server logs (if the authentication was called
by the cron) or in a dialog box (if requested by the user), thus it's important to return it
translated.
'''
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if not user.company_id.gengo_public_key or not user.company_id.gengo_private_key:
return (False, _("Invalid Gengo configuration. Gengo authentication `Public Key` or `Private Key` is missing. Complete Gengo authentication parameters under `Settings > Companies > Gengo Parameters`."))
try:
gengo = MyGengo(
public_key=user.company_id.gengo_public_key.encode('ascii'),
private_key=user.company_id.gengo_private_key.encode('ascii'),
sandbox=True,
)
gengo.getAccountStats()
return (True, gengo)
except Exception, e:
return (False, _("Gengo Connection Error\n%s") %e)
def do_check_schedular(self, cr, uid, xml_id, name, fn, context=None):
"""
This function is used to reset a cron to its default values, or to recreate it if it was deleted.
"""
cron_pool = self.pool.get('ir.cron')
cron_vals = DEFAULT_CRON_VALS.copy()
cron_vals.update({'name': name, "function": fn})
try:
res = []
model, res = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base_gengo', xml_id)
cron_pool.write(cr, uid, [res], cron_vals, context=context)
except:
#the cron job was not found, probably deleted previously, so we create it again using default values
cron_vals.update({'numbercall': -1})
return cron_pool.create(cr, uid, cron_vals, context=context)
def act_update(self, cr, uid, ids, context=None):
'''
Function called by the wizard.
'''
if context == None:
context = {}
flag, gengo = self.gengo_authentication(cr, uid, context=context)
if not flag:
raise osv.except_osv(_('Gengo Authentication Error'), gengo)
for wizard in self.browse(cr, uid, ids, context=context):
supported_langs = self.pool.get('ir.translation')._get_all_supported_languages(cr, uid, context=context)
language = self.pool.get('ir.translation')._get_gengo_corresponding_language(wizard.lang_id.code)
if language not in supported_langs:
raise osv.except_osv(_("Warning"), _('This language is not supported by the Gengo translation services.'))
#send immediately a new request for the selected language (if any)
ctx = context.copy()
ctx['gengo_language'] = wizard.lang_id.id
self._sync_request(cr, uid, limit=GENGO_DEFAULT_LIMIT, context=ctx)
self._sync_response( cr, uid, limit=GENGO_DEFAULT_LIMIT, context=ctx)
#check the cron jobs and eventually restart/recreate them
if wizard.restart_send_job:
self.do_check_schedular(cr, uid, 'gengo_sync_send_request_scheduler', _('Gengo Sync Translation (Request)'), '_sync_request', context=context)
self.do_check_schedular(cr, uid, 'gengo_sync_receive_request_scheduler', _('Gengo Sync Translation (Response)'), '_sync_response', context=context)
return {'type': 'ir.actions.act_window_close'}
def _sync_response(self, cr, uid, limit=GENGO_DEFAULT_LIMIT, context=None):
"""
This method will be called by cron services to get translations from
Gengo. It will read translated terms and comments from Gengo and will
update respective ir.translation in openerp.
"""
translation_pool = self.pool.get('ir.translation')
flag, gengo = self.gengo_authentication(cr, uid, context=context)
if not flag:
_logger.warning("%s", gengo)
else:
translation_id = translation_pool.search(cr, uid, [('state', '=', 'inprogress'), ('gengo_translation', 'in', ('machine','standard','pro','ultra'))], limit=limit, context=context)
for term in translation_pool.browse(cr, uid, translation_id, context=context):
up_term = up_comment = 0
if term.job_id:
vals={}
job_response = gengo.getTranslationJob(id=term.job_id)
if job_response['opstat'] != 'ok':
_logger.warning("Invalid Response! Skipping translation Terms with `id` %s." % (term.job_id))
continue
if job_response['response']['job']['status'] == 'approved':
vals.update({'state': 'translated',
'value': job_response['response']['job']['body_tgt']})
up_term += 1
job_comment = gengo.getTranslationJobComments(id=term.job_id)
if job_comment['opstat']=='ok':
gengo_comments=""
for comment in job_comment['response']['thread']:
gengo_comments += _('%s\n\n--\n Commented on %s by %s.') % (comment['body'], time.ctime(comment['ctime']), comment['author'])
vals.update({'gengo_comment': gengo_comments})
up_comment += 1
if vals:
translation_pool.write(cr, uid, term.id, vals)
_logger.info("Successfully Updated `%d` terms and %d Comments." % (up_term, up_comment ))
else:
_logger.warning("%s", 'Cannot retrieve the Gengo job ID for translation %s: %s' % (term.id, term.src))
return True
def _update_terms(self, cr, uid, response, context=None):
"""
Update the terms after their translation were requested to Gengo
"""
translation_pool = self.pool.get('ir.translation')
for jobs in response['jobs']:
for t_id, res in jobs.items():
vals = {}
t_id = int(t_id)
tier = translation_pool.read(cr, uid, [t_id], ['gengo_translation'], context=context)[0]['gengo_translation']
if tier == "machine":
vals.update({'value': res['body_tgt'], 'state': 'translated'})
else:
vals.update({'job_id': res['job_id'], 'state': 'inprogress'})
translation_pool.write(cr, uid, [t_id], vals, context=context)
return
def pack_jobs_request(self, cr, uid, term_ids, context=None):
''' prepare the terms that will be requested to gengo and returns them in a dictionary with following format
{'jobs': {
'term1.id': {...}
'term2.id': {...}
}
}'''
translation_pool = self.pool.get('ir.translation')
jobs = {}
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
auto_approve = 1 if user.company_id.gengo_auto_approve else 0
for term in translation_pool.browse(cr, uid, term_ids, context=context):
if re.search(r"\w", term.src or ""):
jobs[term.id] = {'type': 'text',
'slug': 'single::English to ' + term.lang,
'tier': tools.ustr(term.gengo_translation),
'body_src': term.src,
'lc_src': 'en',
'lc_tgt': translation_pool._get_gengo_corresponding_language(term.lang),
'auto_approve': auto_approve,
'comment': user.company_id.gengo_comment,
}
return {'jobs': jobs}
def _send_translation_terms(self, cr, uid, term_ids, context=None):
"""
Send a request to Gengo with all the term_ids in a different job, get the response and update the terms in
database accordingly.
"""
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
flag, gengo = self.gengo_authentication(cr, uid, context=context)
if flag:
request = self.pack_jobs_request(cr, uid, term_ids, context=context)
if request['jobs']:
result = gengo.postTranslationJobs(jobs=request)
if result['opstat'] == 'ok':
self._update_terms(cr, uid, result['response'], context=context)
else:
_logger.error(gengo)
return True
def _sync_request(self, cr, uid, limit=GENGO_DEFAULT_LIMIT, context=None):
"""
This scheduler will send a job request to the gengo , which terms are
waiing to be translated and for which gengo_translation is enabled.
A special key 'gengo_language' can be passed in the context in order to
request only translations of that language only. Its value is the language
ID in openerp.
"""
if context is None:
context = {}
language_pool = self.pool.get('res.lang')
translation_pool = self.pool.get('ir.translation')
try:
#by default, the request will be made for all terms that needs it, whatever the language
lang_ids = language_pool.search(cr, uid, [], context=context)
if context.get('gengo_language'):
#but if this specific key is given, then we restrict the request on terms of this language only
lang_ids = [context.get('gengo_language')]
langs = [lang.code for lang in language_pool.browse(cr, uid, lang_ids, context=context)]
#search for the n first terms to translate
term_ids = translation_pool.search(cr, uid, [('state', '=', 'to_translate'), ('gengo_translation', 'in', ('machine','standard','pro','ultra')), ('lang', 'in', langs)], limit=limit, context=context)
if term_ids:
self._send_translation_terms(cr, uid, term_ids, context=context)
_logger.info("%s Translation terms have been posted to Gengo successfully", len(term_ids))
else:
_logger.info('No Translation terms to process.')
except Exception, e:
_logger.error("%s", e)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="base_gengo_translation_wizard_from">
<field name="name">base.gengo.translation.form</field>
<field name="model">base.gengo.translations</field>
<field name="arch" type="xml">
<form string="Gengo Request Form" version="7.0">
<group col="4">
<group>
<field name="lang_id" required="1"/>
<field name="restart_send_job"/>
</group>
<group>
<label colspan="2" string="Leave empty for requesting all the terms to Gengo that needs it, regardless of their language"/>
</group>
</group>
<footer>
<button name="act_update" string="Send" type="object" class="oe_highlight"/>
or
<button name="act_cancel" special="cancel" string="Cancel" type="object" class="oe_link"/>
</footer>
</form>
</field>
</record>
<record id="action_wizard_base_gengo_translations" model="ir.actions.act_window">
<field name="name">Gengo: Manual Request of Translation</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">base.gengo.translations</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem action="action_wizard_base_gengo_translations" id="menu_action_wizard_base_gengo_translations" parent="base.menu_translation_app"/>
</data>
</openerp>

View File

@ -0,0 +1,95 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-08-28 13:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: base_iban
#: constraint:res.partner.bank:0
msgid ""
"\n"
"Please define BIC/Swift code on bank for bank type IBAN Account to make "
"valid payments"
msgstr ""
"\n"
"Vennligst definere BIC / Swift-kode på bank for bank typen IBAN-konto for å "
"fatte gyldige betalinger"
#. module: base_iban
#: code:addons/base_iban/base_iban.py:139
#, python-format
msgid "This IBAN does not pass the validation check, please verify it"
msgstr "Dette IBAN passer ikke valideringskontrollen, du bekrefte den."
#. module: base_iban
#: model:res.partner.bank.type,format_layout:base_iban.bank_iban
msgid "%(bank_name)s: IBAN %(acc_number)s - BIC %(bank_bic)s"
msgstr "%(bank_navn)s: IBAN %(konto_nummer)s - BIC %(bank_bic)s"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_swift_field
msgid "bank_bic"
msgstr "bank_bic"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_zip_field
msgid "zip"
msgstr "Zip"
#. module: base_iban
#: help:res.partner.bank,iban:0
msgid "International Bank Account Number"
msgstr "Internasjonal bank kontonummer"
#. module: base_iban
#: model:ir.model,name:base_iban.model_res_partner_bank
msgid "Bank Accounts"
msgstr "Bankkontoer"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_country_field
msgid "country_id"
msgstr "country_id"
#. module: base_iban
#: code:addons/base_iban/base_iban.py:136
#, python-format
msgid ""
"The IBAN does not seem to be correct. You should have entered something like "
"this %s"
msgstr ""
"IBAN synes ikke å være korrekt. Du bør ha angitt noe sånt som dette% s"
#. module: base_iban
#: field:res.partner.bank,iban:0
msgid "IBAN"
msgstr "IBAN"
#. module: base_iban
#: code:addons/base_iban/base_iban.py:140
#, python-format
msgid "The IBAN is invalid, it should begin with the country code"
msgstr "IBAN er ugyldig, Det burde begynne med landskode"
#. module: base_iban
#: model:res.partner.bank.type,name:base_iban.bank_iban
msgid "IBAN Account"
msgstr "IBAN Konto"
#. module: base_iban
#: constraint:res.partner.bank:0
msgid "The RIB and/or IBAN is not valid"
msgstr "RIB og / eller IBAN er ikke gyldig"

View File

@ -0,0 +1,271 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-09-04 13:40+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,category:0
msgid "Category"
msgstr "Kategori"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save:0
msgid "Information"
msgstr "Informasjon"
#. module: base_module_record
#: model:ir.model,name:base_module_record.model_ir_module_record
msgid "ir.module.record"
msgstr "ir.modul.opptak"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_data,info,end:0
#: wizard_button:base_module_record.module_record_data,save_yaml,end:0
msgid "End"
msgstr "Slutt"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,init:0
#: wizard_view:base_module_record.module_record_objects,init:0
msgid "Choose objects to record"
msgstr "Velg objekter til opptak"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,author:0
msgid "Author"
msgstr "Forfatter"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,directory_name:0
msgid "Directory Name"
msgstr "Navn på katalog"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,init,filter_cond:0
#: wizard_field:base_module_record.module_record_objects,init,filter_cond:0
msgid "Records only"
msgstr "Bare opptak"
#. module: base_module_record
#: selection:base_module_record.module_record_objects,info,data_kind:0
msgid "Demo Data"
msgstr "Demo data"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,save,module_filename:0
msgid "Filename"
msgstr "Filnavn"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,version:0
msgid "Version"
msgstr "Versjon"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,info:0
#: wizard_view:base_module_record.module_record_data,init:0
#: wizard_view:base_module_record.module_record_data,save_yaml:0
#: wizard_view:base_module_record.module_record_objects,init:0
msgid "Objects Recording"
msgstr "objekter Innspilling"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save:0
msgid ""
"If you think your module could interest other people, we'd like you to "
"publish it on http://www.openerp.com, in the 'Modules' section. You can do "
"it through the website or using features of the 'base_module_publish' module."
msgstr ""
"Hvis du tror din modul kan interessere andre mennesker, vil vi gjerne at du "
"publisere den på http://www.openerp.com, i 'Moduler-delen. Du kan gjøre det "
"gjennom nettstedet eller bruke funksjonene i «base_module_publish»-modulen."
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,init,check_date:0
#: wizard_field:base_module_record.module_record_objects,init,check_date:0
msgid "Record from Date"
msgstr "Dato fra opptak"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,end:0
#: wizard_view:base_module_record.module_record_objects,end:0
#: wizard_view:base_module_record.module_record_objects,info:0
#: wizard_view:base_module_record.module_record_objects,save:0
#: wizard_view:base_module_record.module_record_objects,save_yaml:0
msgid "Module Recording"
msgstr "Modul innspilling"
#. module: base_module_record
#: model:ir.actions.wizard,name:base_module_record.wizard_base_module_record_objects
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_module_record_objects
msgid "Export Customizations As a Module"
msgstr "Eksporter Tilpasninger som en modul"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save:0
msgid "Thanks in advance for your contribution."
msgstr "Takk på forhånd for ditt bidrag."
#. module: base_module_record
#: help:base_module_record.module_record_data,init,objects:0
#: help:base_module_record.module_record_objects,init,objects:0
msgid "List of objects to be recorded"
msgstr "Liste over objekter som skal spilles inn"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,description:0
msgid "Full Description"
msgstr "Full beskrivelse"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,name:0
msgid "Module Name"
msgstr "Modulnavn"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,init,objects:0
#: wizard_field:base_module_record.module_record_objects,init,objects:0
msgid "Objects"
msgstr "Objekter"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,save,module_file:0
#: wizard_field:base_module_record.module_record_objects,save_yaml,yaml_file:0
msgid "Module .zip File"
msgstr "Modul .zip fil"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save:0
msgid "Module successfully created!"
msgstr ""
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,save_yaml:0
msgid "YAML file successfully created !"
msgstr "YAML fil opprettet!"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,info:0
#: wizard_view:base_module_record.module_record_data,save_yaml:0
msgid "Result, paste this to your module's xml"
msgstr "Resultatet, lim denne til modulen xml"
#. module: base_module_record
#: selection:base_module_record.module_record_data,init,filter_cond:0
#: selection:base_module_record.module_record_objects,init,filter_cond:0
msgid "Created"
msgstr "Opprettet"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_data,end:0
#: wizard_view:base_module_record.module_record_objects,end:0
msgid "Thanks For using Module Recorder"
msgstr "Takk for at du brukte Modul opptaker."
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,website:0
msgid "Documentation URL"
msgstr "Dokumentasjon URL"
#. module: base_module_record
#: selection:base_module_record.module_record_data,init,filter_cond:0
#: selection:base_module_record.module_record_objects,init,filter_cond:0
msgid "Modified"
msgstr "Modifisert"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_data,init,record:0
#: wizard_button:base_module_record.module_record_objects,init,record:0
msgid "Record"
msgstr "Opptak"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_objects,info,save:0
msgid "Continue"
msgstr "Fortsett"
#. module: base_module_record
#: model:ir.actions.wizard,name:base_module_record.wizard_base_module_record_data
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_module_record_data
msgid "Export Customizations As Data File"
msgstr "Eksport Tilpasninger Som datafil"
#. module: base_module_record
#: code:addons/base_module_record/wizard/base_module_save.py:129
#, python-format
msgid "Error"
msgstr "Feil"
#. module: base_module_record
#: selection:base_module_record.module_record_objects,info,data_kind:0
msgid "Normal Data"
msgstr "Normal data"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_data,end,end:0
#: wizard_button:base_module_record.module_record_objects,end,end:0
msgid "OK"
msgstr "Ok"
#. module: base_module_record
#: model:ir.ui.menu,name:base_module_record.menu_wizard_base_mod_rec
msgid "Module Creation"
msgstr "modul Skapelsen"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_objects,info,data_kind:0
msgid "Type of Data"
msgstr "Type data"
#. module: base_module_record
#: wizard_view:base_module_record.module_record_objects,info:0
msgid "Module Information"
msgstr "Modul informasjon"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,init,info_yaml:0
#: wizard_field:base_module_record.module_record_objects,init,info_yaml:0
msgid "YAML"
msgstr "YAML"
#. module: base_module_record
#: wizard_field:base_module_record.module_record_data,info,res_text:0
#: wizard_field:base_module_record.module_record_data,save_yaml,res_text:0
msgid "Result"
msgstr "Resultat"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_data,init,end:0
#: wizard_button:base_module_record.module_record_objects,info,end:0
#: wizard_button:base_module_record.module_record_objects,init,end:0
msgid "Cancel"
msgstr "Kanseller"
#. module: base_module_record
#: wizard_button:base_module_record.module_record_objects,save,end:0
#: wizard_button:base_module_record.module_record_objects,save_yaml,end:0
msgid "Close"
msgstr "Lukke"
#. module: base_module_record
#: selection:base_module_record.module_record_data,init,filter_cond:0
#: selection:base_module_record.module_record_objects,init,filter_cond:0
msgid "Created & Modified"
msgstr "Laget & Modifisert"
#~ msgid "Module successfully created !"
#~ msgstr "Modulen opprettet!"

View File

@ -0,0 +1,204 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-09-04 13:59+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-05 04:46+0000\n"
"X-Generator: Launchpad (build 15901)\n"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_base_report_sxw
msgid "base.report.sxw"
msgstr "basen.rapport.sxw"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "OpenERP Report Designer Configuration"
msgstr "OpenERP Rapport Designer Konfigurasjon"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid ""
"This plug-in allows you to create/modify OpenERP Reports into OpenOffice "
"Writer."
msgstr ""
"Denne plug-in tillater deg å lage / endre OpenERP rapporter i OpenOffice "
"Writer."
#. module: base_report_designer
#: view:base.report.file.sxw:0
msgid "Upload the modified report"
msgstr "Laste opp den endrede rapporten"
#. module: base_report_designer
#: view:base.report.file.sxw:0
msgid "The .SXW report"
msgstr ".SXW rapport"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_base_report_designer_installer
msgid "base_report_designer.installer"
msgstr "basen.rapport.designer.installatør"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "_Close"
msgstr "_Lukk"
#. module: base_report_designer
#: view:base.report.rml.save:0
msgid "The RML Report"
msgstr ""
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "Configure"
msgstr "Konfigurer"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "title"
msgstr "tittel"
#. module: base_report_designer
#: field:base.report.file.sxw,report_id:0
#: field:base.report.sxw,report_id:0
msgid "Report"
msgstr "Rapport"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_base_report_rml_save
msgid "base.report.rml.save"
msgstr "Basen.rapport.rml.lagre"
#. module: base_report_designer
#: model:ir.ui.menu,name:base_report_designer.menu_action_report_designer_wizard
msgid "Report Designer"
msgstr "Rapportdesigner"
#. module: base_report_designer
#: field:base_report_designer.installer,name:0
msgid "File name"
msgstr "Filnavn"
#. module: base_report_designer
#: view:base.report.file.sxw:0
#: view:base.report.sxw:0
msgid "Get a report"
msgstr "Få en rapport"
#. module: base_report_designer
#: view:base_report_designer.installer:0
#: model:ir.actions.act_window,name:base_report_designer.action_report_designer_wizard
msgid "OpenERP Report Designer"
msgstr "OpenERP Rapport designer"
#. module: base_report_designer
#: view:base.report.sxw:0
msgid "Continue"
msgstr "Fortsett"
#. module: base_report_designer
#: field:base.report.rml.save,file_rml:0
msgid "Save As"
msgstr "Lagre som"
#. module: base_report_designer
#: help:base_report_designer.installer,plugin_file:0
msgid ""
"OpenObject Report Designer plug-in file. Save as this file and install this "
"plug-in in OpenOffice."
msgstr ""
"OpenObject Report Designer plug-in-filen. Lagre som denne filen og "
"installere denne plugin-modulen i OpenOffice."
#. module: base_report_designer
#: view:base.report.rml.save:0
msgid "Save RML FIle"
msgstr "Lagre RML fil"
#. module: base_report_designer
#: field:base.report.file.sxw,file_sxw:0
#: field:base.report.file.sxw,file_sxw_upload:0
msgid "Your .SXW file"
msgstr "Din .SXW fil"
#. module: base_report_designer
#: view:base_report_designer.installer:0
msgid "Installation and Configuration Steps"
msgstr "Installasjon og Konfigurasjon trinn"
#. module: base_report_designer
#: field:base_report_designer.installer,description:0
msgid "Description"
msgstr "Beskrivelse:"
#. module: base_report_designer
#: view:base.report.file.sxw:0
msgid ""
"This is the template of your requested report.\n"
"Save it as a .SXW file and open it with OpenOffice.\n"
"Don't forget to install the OpenERP SA OpenOffice package to modify it.\n"
"Once it is modified, re-upload it in OpenERP using this wizard."
msgstr ""
"Dette er malen for den forespurte rapporten.\n"
"Lagre det som en. Sxw fil og åpne den med OpenOffice.\n"
"Ikke glem å installere OpenERP SA OpenOffice-pakken til å endre det.\n"
"Når den er modifisert, laste opp det i OpenERP bruke denne veiviseren."
#. module: base_report_designer
#: field:base_report_designer.installer,config_logo:0
msgid "Image"
msgstr "Bilde"
#. module: base_report_designer
#: model:ir.actions.act_window,name:base_report_designer.action_view_base_report_sxw
msgid "Base Report sxw"
msgstr "Basen rapport sxw"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_base_report_file_sxw
msgid "base.report.file.sxw"
msgstr "basen.rapport.fil.sxw"
#. module: base_report_designer
#: field:base_report_designer.installer,plugin_file:0
msgid "OpenObject Report Designer Plug-in"
msgstr "OpenObject Rapport Designer Plug-in"
#. module: base_report_designer
#: model:ir.actions.act_window,name:base_report_designer.action_report_designer_installer
msgid "OpenERP Report Designer Installation"
msgstr "OpenERP Rapport Designer Installasjon"
#. module: base_report_designer
#: view:base.report.file.sxw:0
#: view:base.report.rml.save:0
#: view:base.report.sxw:0
#: view:base_report_designer.installer:0
msgid "Cancel"
msgstr "Kanseller"
#. module: base_report_designer
#: model:ir.model,name:base_report_designer.model_ir_actions_report_xml
msgid "ir.actions.report.xml"
msgstr "ir.handlinger.rapport.xml"
#. module: base_report_designer
#: view:base.report.sxw:0
msgid "Select your report"
msgstr "Velg din rapport"
#~ msgid "The RML report"
#~ msgstr "RML rapport"

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-01-20 19:34+0000\n"
"PO-Revision-Date: 2012-08-30 17:01+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:08+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-08-31 04:56+0000\n"
"X-Generator: Launchpad (build 15887)\n"
#. module: base_setup
#: field:user.preferences.config,menu_tips:0
@ -79,12 +79,12 @@ msgstr ""
#. module: base_setup
#: field:product.installer,customers:0
msgid "Customers"
msgstr ""
msgstr "Заказчики"
#. module: base_setup
#: selection:user.preferences.config,view:0
msgid "Extended"
msgstr ""
msgstr "Расширенный"
#. module: base_setup
#: selection:base.setup.terminology,partner:0
@ -197,7 +197,7 @@ msgstr ""
#. module: base_setup
#: selection:base.setup.terminology,partner:0
msgid "Client"
msgstr ""
msgstr "Клиент"
#. module: base_setup
#: field:migrade.application.installer.modules,import_saleforce:0
@ -207,7 +207,7 @@ msgstr ""
#. module: base_setup
#: field:user.preferences.config,context_tz:0
msgid "Timezone"
msgstr ""
msgstr "Часовой пояс"
#. module: base_setup
#: model:ir.actions.act_window,name:base_setup.action_partner_terminology_config_form
@ -224,6 +224,8 @@ msgstr ""
msgid ""
"Check out this box if you want to always display tips on each menu action"
msgstr ""
"Отметьте этот квадратик, если вы хотите всегда выводить советы для каждого "
"пункта меню"
#. module: base_setup
#: field:base.setup.terminology,config_logo:0
@ -261,7 +263,7 @@ msgstr ""
#. module: base_setup
#: selection:user.preferences.config,view:0
msgid "Simplified"
msgstr ""
msgstr "Упрощенный"
#. module: base_setup
#: help:migrade.application.installer.modules,import_sugarcrm:0
@ -271,7 +273,7 @@ msgstr ""
#. module: base_setup
#: selection:base.setup.terminology,partner:0
msgid "Partner"
msgstr ""
msgstr "Контрагент"
#. module: base_setup
#: view:base.setup.terminology:0

View File

@ -297,55 +297,31 @@ class base_stage(object):
destination=False)
def remind_user(self, cr, uid, ids, context=None, attach=False, destination=True):
mail_message = self.pool.get('mail.message')
for case in self.browse(cr, uid, ids, context=context):
if not destination and not case.email_from:
return False
if not case.user_id.email:
return False
if destination and case.section_id.user_id:
case_email = case.section_id.user_id.email
else:
case_email = case.user_id.email
src = case_email
dest = case.user_id.email or ""
body = case.description or ""
for message in case.message_ids:
if message.email_from and message.body_text:
body = message.body_text
break
if not destination:
src, dest = dest, case.email_from
if body and case.user_id.signature:
if body:
body += '\n\n%s' % (case.user_id.signature)
else:
body = '\n\n%s' % (case.user_id.signature)
body = self.format_body(body)
attach_to_send = {}
if attach:
attach_ids = self.pool.get('ir.attachment').search(cr, uid, [('res_model', '=', self._name), ('res_id', '=', case.id)])
attach_to_send = self.pool.get('ir.attachment').read(cr, uid, attach_ids, ['datas_fname', 'datas'])
attach_to_send = dict(map(lambda x: (x['datas_fname'], base64.decodestring(x['datas'])), attach_to_send))
# Send an email
subject = "Reminder: [%s] %s" % (str(case.id), case.name, )
mail_message.schedule_with_attach(cr, uid,
src,
[dest],
subject,
body,
model=self._name,
reply_to=case.section_id.reply_to,
res_id=case.id,
attachments=attach_to_send,
context=context
)
if 'message_post' in self:
for case in self.browse(cr, uid, ids, context=context):
if destination:
recipient_id = case.user_id.partner_id.id
else:
if not case.email_from:
return False
recipient_id = self.pool.get('res.partner').find_or_create(cr, uid, case.email_from, context=context)
body = case.description or ""
for message in case.message_ids:
if message.type == 'email' and message.body:
body = message.body
break
body = self.format_body(body)
attach_to_send = {}
if attach:
attach_ids = self.pool.get('ir.attachment').search(cr, uid, [('res_model', '=', self._name), ('res_id', '=', case.id)])
attach_to_send = self.pool.get('ir.attachment').read(cr, uid, attach_ids, ['datas_fname', 'datas'])
attach_to_send = dict(map(lambda x: (x['datas_fname'], x['datas'].decode('base64')), attach_to_send))
subject = "Reminder: [%s] %s" % (case.id, case.name)
self.message_post(cr, uid, case.id, body=body,
subject=subject, attachments=attach_to_send,
partner_ids=[recipient_id], context=context)
return True
def _check(self, cr, uid, ids=False, context=None):
@ -360,17 +336,6 @@ class base_stage(object):
def format_mail(self, obj, body):
return self.pool.get('base.action.rule').format_mail(obj, body)
def message_thread_followers(self, cr, uid, ids, context=None):
res = {}
for case in self.browse(cr, uid, ids, context=context):
l=[]
if case.email_cc:
l.append(case.email_cc)
if case.user_id and case.user_id.email:
l.append(case.user_id.email)
res[case.id] = l
return res
# ******************************
# Notifications
# ******************************
@ -395,31 +360,31 @@ class base_stage(object):
def case_open_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been <b>opened</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_close_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been <b>closed</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_cancel_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been <b>canceled</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_pending_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s is now <b>pending</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_reset_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been <b>renewed</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_escalate_send_note(self, cr, uid, ids, new_section=None, context=None):
@ -428,5 +393,5 @@ class base_stage(object):
msg = '%s has been <b>escalated</b> to <b>%s</b>.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context), new_section.name)
else:
msg = '%s has been <b>escalated</b>.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], 'System Notification', msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True

View File

@ -179,13 +179,13 @@ class base_state(object):
# Notifications
# ******************************
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
return ''
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
return ''
def case_open_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been <b>opened</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_escalate_send_note(self, cr, uid, ids, new_section=None, context=None):
@ -194,29 +194,29 @@ class base_state(object):
msg = '%s has been <b>escalated</b> to <b>%s</b>.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context), new_section.name)
else:
msg = '%s has been <b>escalated</b>.' % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], 'System Notification', msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_close_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been <b>closed</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_cancel_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been <b>canceled</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_pending_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s is now <b>pending</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True
def case_reset_send_note(self, cr, uid, ids, context=None):
for id in ids:
msg = _('%s has been <b>renewed</b>.') % (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=msg, context=context)
self.message_post(cr, uid, [id], body=msg, context=context)
return True

View File

@ -0,0 +1,30 @@
# Lithuanian translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2012-08-28 13:53+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Lithuanian <lt@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: base_tools
#: model:ir.module.module,shortdesc:base_tools.module_meta_information
msgid "Common base for tools modules"
msgstr ""
#. module: base_tools
#: model:ir.module.module,description:base_tools.module_meta_information
msgid ""
"\n"
" "
msgstr ""

View File

@ -1,70 +1,54 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * base_vat
# Spanish (Mexico) translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-12-25 18:58+0000\n"
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
"<jesteve@zikzakmedia.com>\n"
"Language-Team: \n"
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-09-07 00:31+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Spanish (Mexico) <es_MX@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-09-05 05:10+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2012-09-07 04:57+0000\n"
"X-Generator: Launchpad (build 15914)\n"
#. module: base_vat
#: code:addons/base_vat/base_vat.py:87
#: code:addons/base_vat/base_vat.py:141
#, python-format
msgid ""
"The Vat does not seems to be correct. You should have entered something like "
"this %s"
msgstr ""
"El CIF/NIF parece que no sea correcto. Debería haber introducido algo como "
"esto %s"
"This VAT number does not seem to be valid.\n"
"Note: the expected format is %s"
msgstr "El RFC no es válido. El formato esperado es %s"
#. module: base_vat
#: model:ir.module.module,description:base_vat.module_meta_information
msgid ""
"\n"
" Enable the VAT Number for the partner. Check the validity of that VAT "
"Number.\n"
"\n"
" This module follows the methods stated at http://sima-pc.com/nif.php "
"for\n"
" checking the validity of VAT Number assigned to partners in European "
"countries.\n"
" "
#: sql_constraint:res.company:0
msgid "The company name must be unique !"
msgstr ""
"\n"
" Permite la validación del CIF/NIF de las empresas. Comprueba si el "
"CIF/NIF es un número válido.\n"
"\n"
" Este módulo usa los métodos especificados en http://sima-pc.com/nif.php "
"para\n"
" la validación del CIF/NIF asignado a las empresas de los países "
"europeos.\n"
" "
#. module: base_vat
#: model:ir.module.module,shortdesc:base_vat.module_meta_information
msgid "Base VAT - To check VAT number validity"
msgstr "Base CIF/NIF - Para comprobar la validez de los CIF/NIF"
#. module: base_vat
#: constraint:res.partner:0
msgid "Error ! You can not create recursive associated members."
msgstr "¡Error! No puede crear miembros asociados recursivos."
msgid "Error ! You cannot create recursive associated members."
msgstr ""
#. module: base_vat
#: code:addons/base_vat/base_vat.py:88
#, python-format
msgid "The VAT is invalid, It should begin with the country code"
msgstr "El CIF/NIF no es válido, debería empezar con el código del país"
#: field:res.company,vat_check_vies:0
msgid "VIES VAT Check"
msgstr ""
#. module: base_vat
#: model:ir.model,name:base_vat.model_res_company
msgid "Companies"
msgstr ""
#. module: base_vat
#: constraint:res.company:0
msgid "Error! You can not create recursive companies."
msgstr ""
#. module: base_vat
#: help:res.partner,vat_subjected:0
@ -72,27 +56,20 @@ msgid ""
"Check this box if the partner is subjected to the VAT. It will be used for "
"the VAT legal statement."
msgstr ""
"Marque esta opción si la empresa está sujeta al IVA. Será utilizado para la "
"declaración legal del IVA."
#. module: base_vat
#: model:ir.model,name:base_vat.model_res_partner
msgid "Partner"
msgstr "Empresa"
msgstr ""
#. module: base_vat
#: help:res.company,vat_check_vies:0
msgid ""
"If checked, Partners VAT numbers will be fully validated against EU's VIES "
"service rather than via a simple format validation (checksum)."
msgstr ""
#. module: base_vat
#: field:res.partner,vat_subjected:0
msgid "VAT Legal Statement"
msgstr "Sujeto a IVA"
#~ msgid "Invalid XML for View Architecture!"
#~ msgstr "¡XML inválido para la definición de la vista!"
#~ msgid ""
#~ "Enable the VAT Number for the partner. Check the validity of that VAT Number."
#~ msgstr ""
#~ "Activa el IVA (Impuesto Valor Añadido) para la empresa. Comprueba la validez "
#~ "del CIF/NIF."
#~ msgid "VAT"
#~ msgstr "IVA"
msgstr ""

View File

@ -28,9 +28,7 @@
Lets the user create a custom dashboard.
========================================
This module also creates the Administration Dashboard.
The user can also publish notes.
Allows users to create custom dashboard.
""",
'author': 'OpenERP SA',
'depends': ['base'],

348
addons/board/i18n/nb.po Normal file
View File

@ -0,0 +1,348 @@
# Norwegian Bokmal translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-09-06 14:01+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Norwegian Bokmal <nb@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-09-07 04:58+0000\n"
"X-Generator: Launchpad (build 15914)\n"
#. module: board
#: view:res.log.report:0
msgid " Year "
msgstr " År "
#. module: board
#: model:ir.model,name:board.model_board_menu_create
msgid "Menu Create"
msgstr "Meny laget"
#. module: board
#: view:board.menu.create:0
msgid "Menu Information"
msgstr "Meny informasjon"
#. module: board
#: view:res.users:0
msgid "Latest Connections"
msgstr "Siste Tilkoblinger"
#. module: board
#: view:res.log.report:0
msgid "Log created in last month"
msgstr "Logg opprettet i forrige måned"
#. module: board
#: view:board.board:0
#: model:ir.actions.act_window,name:board.open_board_administration_form
msgid "Administration Dashboard"
msgstr "Administrasjon kontrollpanel"
#. module: board
#: view:res.log.report:0
msgid "Group By..."
msgstr "Grupper etter ..."
#. module: board
#: view:res.log.report:0
msgid "Log created in current year"
msgstr "Logg opprettet i gjeldende år."
#. module: board
#: model:ir.model,name:board.model_board_board
msgid "Board"
msgstr "Brett"
#. module: board
#: field:board.menu.create,menu_name:0
msgid "Menu Name"
msgstr "Menynavn"
#. module: board
#: model:ir.actions.act_window,name:board.board_weekly_res_log_report_action
#: view:res.log.report:0
msgid "Weekly Global Activity"
msgstr "Ukentlig global aktivitet"
#. module: board
#: field:board.board.line,name:0
msgid "Title"
msgstr "Tittel"
#. module: board
#: field:res.log.report,nbr:0
msgid "# of Entries"
msgstr "# av oppføringer"
#. module: board
#: view:res.log.report:0
#: field:res.log.report,month:0
msgid "Month"
msgstr "Måned"
#. module: board
#: view:res.log.report:0
msgid "Log created in current month"
msgstr "Logg opprettet i gjeldende måned."
#. module: board
#: model:ir.actions.act_window,name:board.board_monthly_res_log_report_action
#: view:res.log.report:0
msgid "Monthly Activity per Document"
msgstr "Månedlig aktivitet per dokument"
#. module: board
#: view:board.board:0
msgid "Configuration Overview"
msgstr "Konfigurasjonsoversikt"
#. module: board
#: model:ir.actions.act_window,name:board.action_view_board_list_form
#: model:ir.ui.menu,name:board.menu_view_board_form
msgid "Dashboard Definition"
msgstr "Kontrollpanel Definisjon"
#. module: board
#: selection:res.log.report,month:0
msgid "March"
msgstr "Mars"
#. module: board
#: selection:res.log.report,month:0
msgid "August"
msgstr "August"
#. module: board
#: model:ir.actions.act_window,name:board.action_user_connection_tree
msgid "User Connections"
msgstr "Brukertilkoblinger"
#. module: board
#: field:res.log.report,creation_date:0
msgid "Creation Date"
msgstr "Opprettelsesdato"
#. module: board
#: view:res.log.report:0
msgid "Log Analysis"
msgstr "Logg analyse"
#. module: board
#: field:res.log.report,res_model:0
msgid "Object"
msgstr "Objekt"
#. module: board
#: selection:res.log.report,month:0
msgid "June"
msgstr "Juni"
#. module: board
#: field:board.board,line_ids:0
msgid "Action Views"
msgstr "Handling Visninger"
#. module: board
#: model:ir.model,name:board.model_res_log_report
msgid "Log Report"
msgstr "Logg rapport"
#. module: board
#: code:addons/board/wizard/board_menu_create.py:46
#, python-format
msgid "Please Insert Dashboard View(s) !"
msgstr "Vennligst Sett Kontrollpanel Vinsning (er)!"
#. module: board
#: selection:res.log.report,month:0
msgid "July"
msgstr "juli"
#. module: board
#: view:res.log.report:0
#: field:res.log.report,day:0
msgid "Day"
msgstr "Dag"
#. module: board
#: view:board.menu.create:0
msgid "Create Menu For Dashboard"
msgstr "Opprett meny for Kontrollpanel."
#. module: board
#: selection:res.log.report,month:0
msgid "February"
msgstr "Februar"
#. module: board
#: selection:res.log.report,month:0
msgid "October"
msgstr "Oktober"
#. module: board
#: model:ir.model,name:board.model_board_board_line
msgid "Board Line"
msgstr "bord Linje"
#. module: board
#: field:board.menu.create,menu_parent_id:0
msgid "Parent Menu"
msgstr "Overordnet meny"
#. module: board
#: view:res.log.report:0
msgid " Month-1 "
msgstr " Måned-1 "
#. module: board
#: selection:res.log.report,month:0
msgid "January"
msgstr "Januar"
#. module: board
#: view:board.board:0
msgid "Users"
msgstr "Brukere"
#. module: board
#: selection:res.log.report,month:0
msgid "November"
msgstr "November"
#. module: board
#: help:board.board.line,sequence:0
msgid ""
"Gives the sequence order when displaying a list of "
"board lines."
msgstr "Gir rekkefølgen av når du viser en liste over bord linjer."
#. module: board
#: selection:res.log.report,month:0
msgid "April"
msgstr "April"
#. module: board
#: view:board.board:0
#: field:board.board,name:0
#: field:board.board.line,board_id:0
#: model:ir.ui.menu,name:board.menu_dasboard
msgid "Dashboard"
msgstr "Kontrollpanel"
#. module: board
#: code:addons/board/wizard/board_menu_create.py:45
#, python-format
msgid "User Error!"
msgstr "Bruker feil!"
#. module: board
#: field:board.board.line,action_id:0
msgid "Action"
msgstr "Handling"
#. module: board
#: field:board.board.line,position:0
msgid "Position"
msgstr "Posisjon"
#. module: board
#: view:res.log.report:0
msgid "Model"
msgstr "Modell"
#. module: board
#: model:ir.actions.act_window,name:board.board_homepage_action
msgid "Home Page"
msgstr "Hjemmeside"
#. module: board
#: model:ir.actions.act_window,name:board.action_latest_activities_tree
msgid "Latest Activities"
msgstr "Senest aktiveter"
#. module: board
#: selection:board.board.line,position:0
msgid "Left"
msgstr "Venstre"
#. module: board
#: field:board.board,view_id:0
msgid "Board View"
msgstr "Bord visning"
#. module: board
#: selection:board.board.line,position:0
msgid "Right"
msgstr "Høyre"
#. module: board
#: field:board.board.line,width:0
msgid "Width"
msgstr "Bredde"
#. module: board
#: view:res.log.report:0
msgid " Month "
msgstr " Måned "
#. module: board
#: field:board.board.line,sequence:0
msgid "Sequence"
msgstr "Sekvens"
#. module: board
#: selection:res.log.report,month:0
msgid "September"
msgstr "September"
#. module: board
#: selection:res.log.report,month:0
msgid "December"
msgstr "Desember"
#. module: board
#: view:board.board:0
#: view:board.menu.create:0
msgid "Create Menu"
msgstr "Opprett meny"
#. module: board
#: field:board.board.line,height:0
msgid "Height"
msgstr "Høyde"
#. module: board
#: model:ir.actions.act_window,name:board.action_board_menu_create
msgid "Create Board Menu"
msgstr "Opprett bord meny"
#. module: board
#: selection:res.log.report,month:0
msgid "May"
msgstr "Mai"
#. module: board
#: view:res.log.report:0
#: field:res.log.report,name:0
msgid "Year"
msgstr "År"
#. module: board
#: view:board.menu.create:0
msgid "Cancel"
msgstr "Kanseller"
#. module: board
#: view:board.board:0
msgid "Dashboard View"
msgstr "Kontrollpanel visning"

View File

@ -0,0 +1,3 @@
dashboard.css: dashboard.sass
sass --trace -t expanded dashboard.sass dashboard.css

View File

@ -5,6 +5,11 @@
.openerp .oe_dashboard {
width: 100%;
}
.openerp .oe_dashboard .oe_dashboard_layout_selector ul, .openerp .oe_dashboard .oe_dashboard_layout_selector li {
margin: 0;
padding: 0;
list-style-type: none;
}
.openerp .oe_dashboard .oe_action {
margin: 0 8px 8px 0;
background-color: white;

View File

@ -14,6 +14,11 @@
margin: 0 4px 6px 0
.oe_dashboard
width: 100%
.oe_dashboard_layout_selector
ul, li
margin: 0
padding: 0
list-style-type: none
.oe_action
margin: 0 8px 8px 0
background-color: white

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:39+0000\n"
"X-Launchpad-Export-Date: 2012-08-29 05:05+0000\n"
"X-Generator: Launchpad (build 15864)\n"
#. module: caldav

View File

@ -2,22 +2,6 @@
<openerp>
<data>
<!-- CRM dashboard -->
<record model="ir.actions.act_window" id="act_my_oppor">
<field name="name">My Opportunities</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">tree</field>
<field name="domain">[('user_id','=',uid),('type', '=', 'opportunity'),('state','not in',('cancel','done'))]</field>
<field name="view_id" ref="crm.crm_case_tree_view_oppor"/>
</record>
<record model="ir.actions.act_window" id="act_crm_tag_tree_view_leads_all">
<field name="name">New Leads</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">tree</field>
<field name="domain">[('user_id','=',uid),('state','=','draft'),('type','=','lead')]</field>
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_stage_graph">
<field name="name">Opportunities By Stage - Graph</field>
<field name="model">crm.lead.report</field>
@ -70,11 +54,9 @@
<form string="Statistics Dashboard" version="7.0">
<board style="1-1">
<column>
<action string="New Leads" name="%(act_crm_tag_tree_view_leads_all)d"/>
<action string="My Opportunities" name="%(act_my_oppor)d"/>
<action string="Planned Revenue by Stage and User" name="%(act_oppor_stage_user)d"/>
</column>
<column>
<action string="Planned Revenue by Stage and User" name="%(act_oppor_stage_user)d"/>
<action string="Opportunities by Stage" name="%(act_opportunity_stage)d"/>
</column>
</board>

View File

@ -46,21 +46,11 @@ class base_action_rule(osv.osv):
}
def email_send(self, cr, uid, obj, emails, body, emailfrom=tools.config.get('email_from', False), context=None):
mail_message = self.pool.get('mail.message')
body = self.format_mail(obj, body)
if not emailfrom:
if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.email:
emailfrom = obj.user_id.email
name = '[%d] %s' % (obj.id, tools.ustr(obj.name))
emailfrom = tools.ustr(emailfrom)
if hasattr(obj, 'section_id') and obj.section_id and obj.section_id.alias_id:
mail_id = super(base_action_rule, self).email_send(cr, uid, obj, emails, body, emailfrom=emailfrom, context=context)
if mail_id and hasattr(obj, 'section_id') and obj.section_id and obj.section_id.alias_id:
reply_to = obj.section_id.alias_id.name_get()[0][1]
else:
reply_to = emailfrom
if not emailfrom:
raise osv.except_osv(_('Error!'), _("There is no email for your company address."))
return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model=obj._name, reply_to=reply_to, res_id=obj.id)
self.pool.get('mail.mail').write(cr, uid, [mail_id], {'reply_to': reply_to}, context=context)
return mail_id
def do_check(self, cr, uid, action, obj, context=None):
ok = super(base_action_rule, self).do_check(cr, uid, action, obj, context=context)
@ -105,8 +95,8 @@ class base_action_rule(osv.osv):
write['email_cc'] = obj.act_email_cc
# Put state change by rule in communication history
if hasattr(obj, 'state') and hasattr(obj, 'message_append') and action.act_state:
model_obj.message_append(cr, uid, [obj], _(action.act_state))
if hasattr(obj, 'state') and hasattr(obj, 'message_post') and action.act_state:
model_obj.message_post(cr, uid, [obj], _(action.act_state), context=context)
model_obj.write(cr, uid, [obj.id], write, context)
super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context)

View File

@ -55,21 +55,20 @@
</record>
<!-- notify all employees of module installation -->
<function model="mail.group" name="message_append_note">
<!-- ids, subject, body, parent_id=False, type='notification', content_subtype='html' -->
<value eval="[ref('mail.group_all_employees')]"/>
<value>Module CRM has been installed</value>
<value>From the top menu Sales, you can: trace leads and opportunities, get accurate forecast on your sales pipeline, plan meetings and phonecalls, get realtime statistics and efficiently organize the communication with your prospects.
<record model="mail.message" id="module_install_notification">
<field name="model">mail.group</field>
<field name="res_id" ref="mail.group_all_employees"/>
<field name="type">notification</field>
<field name="subject">CRM application installed!</field>
<field name="body">From the top Sales menu you can track leads and opportunities, get accurate forecast on your sales pipeline, plan meetings and phonecalls, get realtime statistics and efficiently organize the communication with your prospects.
To manage quotations and sale orders, install the "Sales Management" application.</field>
</record>
To manage quotations and sale orders, install the module "Sales Management".</value>
</function>
<record model="mail.alias" id="default_sales_alias">
<field name="alias_name">sales</field>
<field name="alias_model_id" ref="model_crm_lead"/>
<field name="alias_user_id" ref="base.user_root"/>
<field name="alias_defaults">{'type':'lead'}</field>
</record>
</data>
</openerp>

View File

@ -19,11 +19,9 @@
#
##############################################################################
import binascii
from base_status.base_stage import base_stage
import crm
from datetime import datetime
from mail.mail_message import to_email
from osv import fields, osv
import time
import tools
@ -40,8 +38,7 @@ class crm_lead(base_stage, osv.osv):
_name = "crm.lead"
_description = "Lead/Opportunity"
_order = "priority,date_action,id desc"
_inherit = ['ir.needaction_mixin', 'mail.thread']
_mail_compose_message = True
_inherit = ['mail.thread','ir.needaction_mixin']
def _get_default_section_id(self, cr, uid, context=None):
""" Gives default section by checking if present in the context """
@ -90,8 +87,8 @@ class crm_lead(base_stage, osv.osv):
search_domain = []
section_id = self._resolve_section_id_from_context(cr, uid, context=context)
if section_id:
search_domain += ['|', '&', ('section_ids', '=', section_id), ('fold', '=', False)]
search_domain += ['|', ('id', 'in', ids), '&', ('case_default', '=', True), ('fold', '=', False)]
search_domain += ['|', ('section_ids', '=', section_id)]
search_domain += ['|', ('id', 'in', ids), ('case_default', '=', True)]
# retrieve type from the context (if set: choose 'type' or 'both')
type = self._resolve_type_from_context(cr, uid, context=context)
if type:
@ -101,7 +98,12 @@ class crm_lead(base_stage, osv.osv):
result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
# restore order of the search
result.sort(lambda x,y: cmp(stage_ids.index(x[0]), stage_ids.index(y[0])))
return result
fold = {}
for stage in stage_obj.browse(cr, access_rights_uid, stage_ids, context=context):
fold[stage.id] = stage.fold or False
return result, fold
_group_by_full = {
'stage_id': _read_group_stage_ids
@ -175,16 +177,6 @@ class crm_lead(base_stage, osv.osv):
else:
return [('id', '=', '0')]
def _get_email_subject(self, cr, uid, ids, fields, args, context=None):
res = {}
for obj in self.browse(cr, uid, ids, context=context):
res[obj.id] = ''
for msg in obj.message_ids:
if msg.email_from:
res[obj.id] = msg.subject
break
return res
_columns = {
'partner_id': fields.many2one('res.partner', 'Partner', ondelete='set null',
select=True, help="Optional linked partner, usually after conversion of the lead"),
@ -213,7 +205,7 @@ class crm_lead(base_stage, osv.osv):
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
'date_closed': fields.datetime('Closed', readonly=True),
'stage_id': fields.many2one('crm.case.stage', 'Stage',
domain="['&', '|', ('section_ids', '=', section_id), ('case_default', '=', True), '|', ('type', '=', type), ('type', '=', 'both')]"),
domain="['&', ('fold', '=', False), '&', '|', ('section_ids', '=', section_id), ('case_default', '=', True), '|', ('type', '=', type), ('type', '=', 'both')]"),
'user_id': fields.many2one('res.users', 'Salesperson'),
'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True),
@ -228,7 +220,6 @@ class crm_lead(base_stage, osv.osv):
When the case is over, the state is set to \'Done\'.\
If the case needs to be reviewed then the state is \
set to \'Pending\'.'),
'subjects': fields.function(_get_email_subject, fnct_search=_history_search, string='Subject of Email', type='char', size=64),
# Only used for type opportunity
'probability': fields.float('Success Rate (%)',group_operator="avg"),
@ -449,7 +440,7 @@ class crm_lead(base_stage, osv.osv):
oldest_id = opportunity_ids[0]
return self.browse(cr, uid, oldest_id, context=context)
def _mail_body_text(self, cr, uid, lead, fields, title=False, context=None):
def _mail_body(self, cr, uid, lead, fields, title=False, context=None):
body = []
if title:
body.append("%s\n" % (title))
@ -486,11 +477,11 @@ class crm_lead(base_stage, osv.osv):
for opportunity in opportunities:
subject.append(opportunity.name)
title = "%s : %s" % (merge_message, opportunity.name)
details.append(self._mail_body_text(cr, uid, opportunity, fields, title=title, context=context))
details.append(self._mail_body(cr, uid, opportunity, fields, title=title, context=context))
subject = subject[0] + ", ".join(subject[1:])
details = "\n\n".join(details)
return self.message_append_note(cr, uid, [opportunity_id], subject=subject, body=details)
return self.message_post(cr, uid, [opportunity_id], body=details, subject=subject, context=context)
def _merge_opportunity_history(self, cr, uid, opportunity_id, opportunities, context=None):
message = self.pool.get('mail.message')
@ -546,7 +537,7 @@ class crm_lead(base_stage, osv.osv):
oldest = self._merge_find_oldest(cr, uid, ids, context=context)
if ctx_opportunities :
first_opportunity = ctx_opportunities[0]
tail_opportunities = opportunities_list
tail_opportunities = opportunities_list + ctx_opportunities[1:]
else:
first_opportunity = opportunities_list[0]
tail_opportunities = opportunities_list[1:]
@ -606,19 +597,13 @@ class crm_lead(base_stage, osv.osv):
for lead in self.browse(cr, uid, ids, context=context):
if lead.state in ('done', 'cancel'):
continue
if user_ids or section_id:
self.allocate_salesman(cr, uid, [lead.id], user_ids, section_id, context=context)
vals = self._convert_opportunity_data(cr, uid, lead, customer, section_id, context=context)
self.write(cr, uid, [lead.id], vals, context=context)
self.convert_opportunity_send_note(cr, uid, lead, context=context)
#TOCHECK: why need to change partner details in all messages of lead ?
if lead.partner_id:
msg_ids = [ x.id for x in lead.message_ids]
mail_message.write(cr, uid, msg_ids, {
'partner_id': lead.partner_id.id
}, context=context)
if user_ids or section_id:
self.allocate_salesman(cr, uid, ids, user_ids, section_id, context=context)
return True
def _lead_create_contact(self, cr, uid, lead, name, is_company, parent_id=False, context=None):
@ -630,7 +615,7 @@ class crm_lead(base_stage, osv.osv):
'parent_id': parent_id,
'phone': lead.phone,
'mobile': lead.mobile,
'email': lead.email_from and to_email(lead.email_from)[0],
'email': lead.email_from and tools.email_split(lead.email_from)[0],
'fax': lead.fax,
'title': lead.title and lead.title.id or False,
'function': lead.function,
@ -650,7 +635,7 @@ class crm_lead(base_stage, osv.osv):
partner_id = False
if lead.partner_name and lead.contact_name:
partner_id = self._lead_create_contact(cr, uid, lead, lead.partner_name, True, context=context)
self._lead_create_contact(cr, uid, lead, lead.contact_name, False, partner_id, context=context)
partner_id = self._lead_create_contact(cr, uid, lead, lead.contact_name, False, partner_id, context=context)
elif lead.partner_name and not lead.contact_name:
partner_id = self._lead_create_contact(cr, uid, lead, lead.partner_name, True, context=context)
elif not lead.partner_name and lead.contact_name:
@ -678,32 +663,16 @@ class crm_lead(base_stage, osv.osv):
if context is None:
context = {}
partner_ids = {}
force_partner_id = partner_id
for lead in self.browse(cr, uid, ids, context=context):
if action == 'create':
if not partner_id:
partner_id = self._create_lead_partner(cr, uid, lead, context)
partner_id = force_partner_id or self._create_lead_partner(cr, uid, lead, context=context)
self._lead_set_partner(cr, uid, lead, partner_id, context=context)
partner_ids[lead.id] = partner_id
return partner_ids
def _send_mail_to_salesman(self, cr, uid, lead, context=None):
"""
Send mail to salesman with updated Lead details.
@ lead: browse record of 'crm.lead' object.
"""
#TOFIX: mail template should be used here instead of fix subject, body text.
message = self.pool.get('mail.message')
email_to = lead.user_id and lead.user_id.email
if not email_to:
return False
email_from = lead.section_id and lead.section_id.user_id and lead.section_id.user_id.email or email_to
partner = lead.partner_id and lead.partner_id.name or lead.partner_name
subject = "lead %s converted into opportunity" % lead.name
body = "Info \n Id : %s \n Subject: %s \n Partner: %s \n Description : %s " % (lead.id, lead.name, lead.partner_id.name, lead.description)
return message.schedule_with_attach(cr, uid, email_from, [email_to], subject, body)
def allocate_salesman(self, cr, uid, ids, user_ids, team_id=False, context=None):
index = 0
for lead_id in ids:
@ -821,14 +790,13 @@ class crm_lead(base_stage, osv.osv):
if custom_values is None: custom_values = {}
custom_values.update({
'name': msg.get('subject') or _("No Subject"),
'description': msg.get('body_text'),
'description': msg.get('body'),
'email_from': msg.get('from'),
'email_cc': msg.get('cc'),
'user_id': False,
})
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
custom_values['priority'] = msg.get('priority')
custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from', False), context=context))
return super(crm_lead, self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
@ -841,18 +809,18 @@ class crm_lead(base_stage, osv.osv):
if update_vals is None: update_vals = {}
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
vals['priority'] = msg.get('priority')
update_vals['priority'] = msg.get('priority')
maps = {
'cost':'planned_cost',
'revenue': 'planned_revenue',
'probability':'probability',
}
for line in msg.get('body_text', '').split('\n'):
for line in msg.get('body', '').split('\n'):
line = line.strip()
res = tools.misc.command_re.match(line)
if res and maps.get(res.group(1).lower()):
key = maps.get(res.group(1).lower())
vals[key] = res.group(2).lower()
update_vals[key] = res.group(2).lower()
return super(crm_lead, self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context)
@ -860,15 +828,10 @@ class crm_lead(base_stage, osv.osv):
# OpenChatter methods and notifications
# ----------------------------------------
def message_get_monitored_follower_fields(self, cr, uid, ids, context=None):
""" Add 'user_id' to the monitored fields """
res = super(crm_lead, self).message_get_monitored_follower_fields(cr, uid, ids, context=context)
return res + ['user_id']
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
""" Override of the (void) default notification method. """
stage_name = self.pool.get('crm.case.stage').name_get(cr, uid, [stage_id], context=context)[0][1]
return self.message_append_note(cr, uid, ids, body= _("Stage changed to <b>%s</b>.") % (stage_name), context=context)
return self.message_post(cr, uid, ids, body= _("Stage changed to <b>%s</b>.") % (stage_name), context=context)
def case_get_note_msg_prefix(self, cr, uid, lead, context=None):
if isinstance(lead, (int, long)):
@ -878,33 +841,33 @@ class crm_lead(base_stage, osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for id in ids:
message = _("%s has been <b>created</b>.")% (self.case_get_note_msg_prefix(cr, uid, id, context=context))
self.message_append_note(cr, uid, [id], body=message, context=context)
self.message_post(cr, uid, [id], body=message, context=context)
return True
def case_mark_lost_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been <b>lost</b>.")
return self.message_append_note(cr, uid, ids, body=message, context=context)
return self.message_post(cr, uid, ids, body=message, context=context)
def case_mark_won_send_note(self, cr, uid, ids, context=None):
message = _("Opportunity has been <b>won</b>.")
return self.message_append_note(cr, uid, ids, body=message, context=context)
return self.message_post(cr, uid, ids, body=message, context=context)
def schedule_phonecall_send_note(self, cr, uid, ids, phonecall_id, action, context=None):
phonecall = self.pool.get('crm.phonecall').browse(cr, uid, [phonecall_id], context=context)[0]
if action == 'log': prefix = 'Logged'
else: prefix = 'Scheduled'
message = _("<b>%s a call</b> for the <em>%s</em>.") % (prefix, phonecall.date)
return self.message_append_note(cr, uid, ids, body=message, context=context)
return self.message_post(cr, uid, ids, body=message, context=context)
def _lead_set_partner_send_note(self, cr, uid, ids, context=None):
for lead in self.browse(cr, uid, ids, context=context):
message = _("%s <b>partner</b> is now set to <em>%s</em>." % (self.case_get_note_msg_prefix(cr, uid, lead, context=context), lead.partner_id.name))
lead.message_append_note(body=message)
lead.message_post(body=message)
return True
def convert_opportunity_send_note(self, cr, uid, lead, context=None):
message = _("Lead has been <b>converted to an opportunity</b>.")
lead.message_append_note(body=message)
lead.message_post(body=message)
return True
crm_lead()

View File

@ -55,7 +55,7 @@
<record model="crm.case.stage" id="stage_lead7">
<field name="name">Dead</field>
<field eval="1" name="case_default"/>
<field eval="True" name="fold"/>
<field eval="False" name="fold"/>
<field name="state">cancel</field>
<field eval="'0'" name="probability"/>
<field eval="'16'" name="sequence"/>

View File

@ -23,7 +23,7 @@
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">1</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field name="description">Hello,
I am Jason from Le Club SARL,
@ -47,7 +47,7 @@ Can you send details,</field>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">4</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
</record>
@ -108,7 +108,7 @@ Can you send details,</field>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">3</field>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field name="description">Hi, Can you send a quotation for 20 Computers with speakers?
Regards,
@ -135,7 +135,7 @@ Contact: +1 813 494 5005</field>
<field name="channel_id" ref=""/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
</record>
@ -194,7 +194,7 @@ Contact: +1 813 494 5005</field>
<field name="channel_id" ref="crm_case_channel_phone"/>
<field name="priority">2</field>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
</record>
@ -297,7 +297,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-12')" name="date_action"/>
<field name="title_action">Meeting for pricing information.</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
</record>
@ -342,7 +342,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Call to ask system requirement</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="1" name="active"/>
</record>
@ -411,7 +411,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-4')" name="date_action"/>
<field name="title_action">Call to define real needs about training</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
</record>
@ -434,7 +434,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-5')" name="date_action"/>
<field name="title_action">Ask for the good receprion of the proposition</field>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="1" name="active"/>
</record>
@ -466,7 +466,7 @@ Andrew</field>
<field name="channel_id" ref="crm_case_channel_phone"/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead8"/>
<field eval="1" name="active"/>
</record>
@ -484,7 +484,7 @@ Andrew</field>
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead8"/>
<field eval="1" name="active"/>
</record>
@ -519,7 +519,7 @@ Andrew</field>
<field name="priority">5</field>
<field eval="time.strftime('%Y-%m-6')" name="date_deadline"/>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
</record>
@ -542,7 +542,7 @@ Andrew</field>
<field name="priority">2</field>
<field name="title_action">Conf call with technical service</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_admin"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="1" name="active"/>
</record>
@ -552,86 +552,67 @@ Andrew</field>
<field name="subject">Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html">&lt;![CDATA[Email0 inquiry]]&gt;&lt;div&gt;&lt;font size="2"&gt;Hello,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;Can you please send me product catalogue?&lt;/font&gt;&lt;/div&gt;</field>
<field name="body">&lt;![CDATA[Email0 inquiry]]&gt;&lt;div&gt;&lt;font size="2"&gt;Hello,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;I am interested in your company's product and I plan to buy a new laptop having latest technologies and affordable price.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;Can you please send me product catalogue?&lt;/font&gt;&lt;/div&gt;</field>
<field name="type">email</field>
<field name="state">received</field>
<field name="user_id" ref="base.user_demo"/>
</record>
<record id="message_note0" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="parent_id" ref="message_email0"/>
<field name="content_subtype">plain</field>
<field name="body_text">Dear Customer,
<field name="type">comment</field>
<field name="body">Dear Customer,
Thanks for showing interest in our products.
We have attached the catalogue,
We would like to know your interests, Let us know if we can call you for more details.
Thanks</field>
<field name="type">email</field>
<field name="user_id" ref="base.user_root"/>
<field name="state">sent</field>
<field name="parent_id" ref="message_email0"/>
<field name="author_id" ref="base.partner_root"/>
</record>
<record id="message_note0_comment0" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html">&lt;div&gt;Thanks for the information,&lt;/div&gt;&lt;div&gt;I will visit the store soon.&lt;/div&gt;</field>
<field name="type">comment</field>
<field name="body">&lt;div&gt;Thanks for the information,&lt;/div&gt;&lt;div&gt;I will visit the store soon.&lt;/div&gt;</field>
<field name="parent_id" ref="message_note0"/>
<field name="type">email</field>
<field name="user_id" ref="base.user_demo"/>
<field name="state">received</field>
<field name="author_id" ref="base.partner_demo"/>
</record>
<record id="message_note0_comment1" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">html</field>
<field name="body_html">&lt;font color="#1f1f1f"&gt;Can you tell me if the store is open at 9:00 PM?&lt;/b&gt;&lt;/font&gt;</field>
<field name="type">comment</field>
<field name="body">&lt;font color="#1f1f1f"&gt;Can you tell me if the store is open at 9:00 PM?&lt;/b&gt;&lt;/font&gt;</field>
<field name="parent_id" ref="message_note0"/>
<field name="type">email</field>
<field name="state">received</field>
<field name="user_id" ref="base.user_demo"/>
<field name="author_id" ref="base.partner_demo"/>
</record>
<record id="message_email1" model="mail.message">
<field name="subject">Re: Plan to buy a Laptop</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_15"/>
<field name="content_subtype">plain</field>
<field name="body_text">Yes, its open till 10:00 PM, you are welcome!</field>
<field name="body">Yes, its open till 10:00 PM, you are welcome!</field>
<field name="type">email</field>
<field name="state">sent</field>
<field name="user_id" ref="base.user_root"/>
<field name="author_id" ref="base.partner_root"/>
</record>
<record id="message_email_12" model="mail.message">
<field name="subject">Inquiry</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_1"/>
<field name="content_subtype">plain</field>
<field name="body_text">Hello,
<field name="body">Hello,
I am Jason from Le Club SARL,
I am intertested to attend Training organized in your company,
Can you send details,</field>
<field name="type">email</field>
<field name="state">received</field>
<field name="user_id" ref="base.user_demo"/>
</record>
<record id="message_email_13" model="mail.message">
<field name="subject">Need Details</field>
<field name="model">crm.lead</field>
<field name="res_id" ref="crm_case_2"/>
<field name="content_subtype">plain</field>
<field name="body_text">Want to know features and benifits to use the new software.</field>
<field name="body">Want to know features and benifits to use the new software.</field>
<field name="type">comment</field>
<field name="user_id" ref="base.user_demo"/>
</record>
<!-- Call Function to set the opportunities as Unread -->
<function model="crm.lead" name="message_mark_as_unread"
eval="[ ref('crm_case_15'), ref('crm_case_16'),

View File

@ -246,7 +246,7 @@
<field name="name">Leads</field>
<field name="model">crm.lead</field>
<field name="arch" type="xml">
<tree string="Leads" fonts="bold:needaction_pending==True" colors="grey:state in ('cancel', 'done')">
<tree string="Leads" fonts="bold:message_unread==True" colors="grey:state in ('cancel', 'done')">
<field name="date_deadline" invisible="1"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="name"/>
@ -257,12 +257,11 @@
<field name="stage_id"/>
<field name="user_id" invisible="1"/>
<field name="section_id" invisible="context.get('invisible_section', True)" />
<field name="state" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="referred" invisible="1"/>
<field name="channel_id" invisible="1"/>
<field name="subjects" invisible="1"/>
<field name="needaction_pending" invisible="1"/>
<field name="message_unread" invisible="1"/>
</tree>
</field>
</record>
@ -296,23 +295,16 @@
<field name="user_id"/>
<field name="partner_address_email"/>
<field name="message_summary"/>
<field name="needaction_pending"/>
<field name="message_unread"/>
<templates>
<t t-name="lead_details">
<ul class="oe_kanban_tooltip">
<li t-if="record.phone.raw_value"><b>Phone:</b> <field name="phone"/></li>
<li><b>Probability:</b> <field name="probability"/>%%</li>
<li><b>Creation date:</b> <field name="create_date"/></li>
<li t-if="record.date_deadline.raw_value"><b>Date Deadline:</b> <field name="date_deadline"/></li>
</ul>
</t>
<field name="date_deadline"/>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
<li><a type="edit" >Edit...</a></li>
<li><a type="delete">Delete</a></li>
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
<t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
<li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
<li><a name="%(opportunity2phonecall_act)d" type="action">Log Call</a></li>
<li><a name="action_makeMeeting" type="object">Schedule Meeting</a></li>
@ -342,7 +334,6 @@
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
<div class="oe_kanban_footer_left">
<t t-if="record.needaction_pending.raw_value"><span class="oe_kanban_mail_new">New</span></t>
<t t-raw="record.message_summary.raw_value"/>
</div>
</div>
@ -362,10 +353,8 @@
<search string="Search Leads">
<field name="name" string="Lead / Customer" filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike',self)]" />
<!-- subjects is not set as store=True so, it is placed outside filter_domain-->
<field name="subjects"/>
<field name="create_date"/>
<filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
<filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
<filter icon="terp-check" string="New" name="new" help="New Leads" domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test" string="Open" name="open" domain="[('state','=','open')]"/>
@ -386,7 +375,6 @@
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
<separator orientation="vertical"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Creation" help="Create date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
</group>
<group string="Display">
@ -515,7 +503,7 @@
<field name="day_open" groups="base.group_no_one"/>
<field name="day_close" groups="base.group_no_one"/>
<field name="referred"/>
<field name="state" groups="base.group_no_one"/>
<field name="state" invisible="1"/>
<field name="type" invisible="1"/>
</group>
<group string="References">
@ -545,7 +533,7 @@
<field name="name">Opportunities Tree</field>
<field name="model">crm.lead</field>
<field name="arch" type="xml">
<tree string="Opportunities" fonts="bold:needaction_pending==True" colors="gray:state in ('cancel', 'done');red:date_deadline and (date_deadline &lt; current_date)">
<tree string="Opportunities" fonts="bold:message_unread==True" colors="gray:state in ('cancel', 'done');red:date_deadline and (date_deadline &lt; current_date)">
<field name="date_deadline" invisible="1"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="name" string="Opportunity"/>
@ -555,7 +543,6 @@
<field name="title_action" />
<field name="channel_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="subjects" invisible="1"/>
<field name="stage_id"/>
<field name="planned_revenue" sum="Expected Revenues"/>
<field name="probability" widget="progressbar" avg="Avg. of Probability"/>
@ -563,7 +550,7 @@
<field name="user_id"/>
<field name="priority" invisible="1"/>
<field name="state" groups="base.group_no_one"/>
<field name="needaction_pending" invisible="1"/>
<field name="message_unread" invisible="1"/>
</tree>
</field>
</record>
@ -578,7 +565,7 @@
<field name="name" string="Opportunity / Customer"
filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike', self)]" />
<filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
<filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
<filter icon="terp-check" string="New" help="New Opportunities" name="new" domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test" string="Open" help="Open Opportunities" name="open" domain="[('state','=','open')]"/>
@ -600,7 +587,6 @@
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}"/>
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Creation" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
<filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}" />
</group>

View File

@ -44,7 +44,7 @@ class crm_meeting(osv.Model):
def create_send_note(self, cr, uid, ids, context=None):
if context is None:
context = {}
# update context: if come from phonecall, default state values can make the message_append_note crash
# update context: if come from phonecall, default state values can make the message_post crash
context.pop('default_state', False)
for meeting in self.browse(cr, uid, ids, context=context):
# in the message, transpose meeting.date to the timezone of the current user
@ -53,14 +53,14 @@ class crm_meeting(osv.Model):
if meeting.opportunity_id: # meeting can be create from phonecalls or opportunities, therefore checking for the parent
lead = meeting.opportunity_id
message = _("Meeting linked to the opportunity <em>%s</em> has been <b>created</b> and <b>scheduled</b> on <em>%s</em>.") % (lead.name, meeting_date_tz)
lead.message_append_note(_('System Notification'), message)
lead.message_post(body=message)
elif meeting.phonecall_id:
phonecall = meeting.phonecall_id
message = _("Meeting linked to the phonecall <em>%s</em> has been <b>created</b> and <b>scheduled</b> on <em>%s</em>.") % (phonecall.name, meeting_date_tz)
phonecall.message_append_note(body=message)
phonecall.message_post(body=message)
else:
message = _("A meeting has been <b>scheduled</b> on <em>%s</em>.") % (meeting_date_tz)
meeting.message_append_note(body=message)
meeting.message_post(body=message)
return True
class calendar_attendee(osv.osv):

View File

@ -32,7 +32,7 @@ class crm_phonecall(base_state, osv.osv):
_name = "crm.phonecall"
_description = "Phonecall"
_order = "id desc"
_inherit = ['ir.needaction_mixin', 'mail.thread']
_inherit = ['mail.thread']
_columns = {
# base_state required fields
'date_action_last': fields.datetime('Last Action', readonly=1),
@ -177,11 +177,11 @@ class crm_phonecall(base_state, osv.osv):
if context is None:
context = {}
partner_ids = {}
force_partner_id = partner_id
for call in self.browse(cr, uid, ids, context=context):
if action == 'create':
if not partner_id:
partner_id = self._call_create_partner(cr, uid, call, context=context)
self._call_create_partner_address(cr, uid, call, partner_id, context=context)
partner_id = force_partner_id or self._call_create_partner(cr, uid, call, context=context)
self._call_create_partner_address(cr, uid, call, partner_id, context=context)
self._call_set_partner(cr, uid, [call.id], partner_id, context=context)
partner_ids[call.id] = partner_id
return partner_ids
@ -266,7 +266,7 @@ class crm_phonecall(base_state, osv.osv):
def case_reset_send_note(self, cr, uid, ids, context=None):
message = _('Phonecall has been <b>reset and set as open</b>.')
return self.message_append_note(cr, uid, ids, body=message, context=context)
return self.message_post(cr, uid, ids, body=message, context=context)
def case_open_send_note(self, cr, uid, ids, context=None):
lead_obj = self.pool.get('crm.lead')
@ -280,11 +280,11 @@ class crm_phonecall(base_state, osv.osv):
message = _("Phonecall linked to the opportunity <em>%s</em> has been <b>created</b> and <b>scheduled</b> on <em>%s</em>.") % (lead.name, phonecall_date_str)
else:
message = _("Phonecall has been <b>created and opened</b>.")
phonecall.message_append_note(body=message)
phonecall.message_post(body=message)
return True
def _call_set_partner_send_note(self, cr, uid, ids, context=None):
return self.message_append_note(cr, uid, ids, body=_("Partner has been <b>created</b>."), context=context)
return self.message_post(cr, uid, ids, body=_("Partner has been <b>created</b>."), context=context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -66,8 +66,7 @@
<field name="name">CRM - Phone Calls Tree</field>
<field name="model">crm.phonecall</field>
<field name="arch" type="xml">
<tree fonts="bold:needaction_pending==True" colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
<field name="needaction_pending" invisible="1"/>
<tree colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
<field name="date"/>
<field name="name"/>
<field name="partner_id"/>
@ -76,7 +75,6 @@
<field name="categ_id" invisible="1"/>
<field name="create_date" invisible="1"/>
<field name="opportunity_id" invisible="1"/>
<field name="needaction_pending" invisible="1"/>
<button string="Convert to Opportunity"
name="%(phonecall2opportunity_act)d"
states="open,pending"
@ -165,7 +163,7 @@
<field name="name">CRM - Logged Phone Calls Tree</field>
<field name="model">crm.phonecall</field>
<field name="arch" type="xml">
<tree string="Phone Calls" fonts="bold:needaction_pending==True" editable="top">
<tree string="Phone Calls" editable="top">
<field name="date"/>
<field name="name"/>
<field name="partner_id"
@ -179,7 +177,6 @@
<field name="state" invisible="1"/>
<field name="create_date" invisible="1"/>
<field name="opportunity_id" invisible="1"/>
<field name="needaction_pending" invisible="1"/>
<button string="Schedule Other Call"
icon="terp-call-start"
name="%(phonecall_to_phonecall_act)d"
@ -218,7 +215,6 @@
<search string="Search Phonecalls">
<field name="name" string="Phonecalls"/>
<field name="date"/>
<filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
<separator/>
<filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
<separator/>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-08-06 11:58+0000\n"
"PO-Revision-Date: 2012-08-30 17:52+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:06+0000\n"
"X-Generator: Launchpad (build 15864)\n"
"X-Launchpad-Export-Date: 2012-08-31 04:56+0000\n"
"X-Generator: Launchpad (build 15887)\n"
#. module: crm
#: view:crm.lead.report:0
@ -320,7 +320,7 @@ msgstr "Перспективный партнер"
#: code:addons/crm/crm_lead.py:735
#, python-format
msgid "No Subject"
msgstr ""
msgstr "Без темы"
#. module: crm
#: model:crm.case.resource.type,name:crm.type_lead6
@ -535,7 +535,7 @@ msgstr "Эл. письмо"
#. module: crm
#: view:crm.phonecall:0
msgid "Phonecalls during last 7 days"
msgstr ""
msgstr "Звонки за последние 7 дней"
#. module: crm
#: selection:crm.lead.report,creation_month:0
@ -626,7 +626,7 @@ msgstr "Встреча '%s' была подтверждена."
#. module: crm
#: selection:crm.add.note,state:0 selection:crm.lead,state:0
msgid "In Progress"
msgstr ""
msgstr "В процессе"
#. module: crm
#: help:crm.case.section,reply_to:0
@ -720,7 +720,7 @@ msgstr "Вероятность (%)"
#. module: crm
#: field:crm.lead,company_currency:0
msgid "Company Currency"
msgstr ""
msgstr "Валюта организации"
#. module: crm
#: view:crm.lead:0
@ -763,7 +763,7 @@ msgstr "Остановить процесс"
#. module: crm
#: view:crm.lead.report:0 view:crm.phonecall.report:0
msgid "Month-1"
msgstr ""
msgstr "Месяц-1"
#. module: crm
#: view:crm.phonecall:0
@ -778,7 +778,7 @@ msgstr "Продолжить"
#. module: crm
#: field:crm.segmentation,som_interval:0
msgid "Days per Period"
msgstr ""
msgstr "Дней в периоде"
#. module: crm
#: field:crm.meeting,byday:0
@ -933,7 +933,7 @@ msgstr "Внимание!"
#. module: crm
#: view:crm.phonecall.report:0
msgid "Phone calls made in current year"
msgstr ""
msgstr "Звонки за текущий год"
#. module: crm
#: field:crm.lead,day_open:0
@ -943,7 +943,7 @@ msgstr "Дней до открытия"
#. module: crm
#: view:crm.meeting:0
msgid "Show Time as"
msgstr ""
msgstr "Показать время как"
#. module: crm
#: view:crm.phonecall2partner:0
@ -973,7 +973,7 @@ msgstr "Мои встречи"
#. module: crm
#: view:crm.phonecall:0
msgid "Todays's Phonecalls"
msgstr ""
msgstr "Звонки за сегодня"
#. module: crm
#: view:board.board:0
@ -1030,7 +1030,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Change Color"
msgstr ""
msgstr "Изменить цвет"
#. module: crm
#: view:crm.segmentation:0
@ -1180,7 +1180,7 @@ msgstr "Письмо партнеру"
#. module: crm
#: view:crm.opportunity2phonecall:0 view:crm.phonecall2phonecall:0
msgid "Call Details"
msgstr ""
msgstr "Детали звонка"
#. module: crm
#: field:crm.meeting,class:0
@ -1270,7 +1270,7 @@ msgstr "Продолжительность в минутах"
#. module: crm
#: field:crm.case.channel,name:0
msgid "Channel Name"
msgstr ""
msgstr "Название канала"
#. module: crm
#: field:crm.partner2opportunity,name:0 field:crm.phonecall2opportunity,name:0
@ -1321,7 +1321,7 @@ msgstr "Дата записи"
#. module: crm
#: view:crm.meeting:0
msgid "End of Recurrency"
msgstr ""
msgstr "Конец повторения"
#. module: crm
#: view:crm.meeting:0
@ -1345,7 +1345,7 @@ msgstr "Установить сигнал на это время, перед с
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_categ_phone_create_partner
msgid "Schedule a Call"
msgstr ""
msgstr "Назначить звонок"
#. module: crm
#: view:crm.lead2partner:0 view:crm.phonecall:0 view:crm.phonecall2partner:0
@ -1433,7 +1433,7 @@ msgstr ""
#. module: crm
#: view:crm.phonecall.report:0
msgid "Date of call"
msgstr ""
msgstr "Дата звонка"
#. module: crm
#: help:crm.lead,section_id:0
@ -1549,7 +1549,7 @@ msgstr ""
#. module: crm
#: view:crm.lead:0
msgid "Mail"
msgstr ""
msgstr "Почта"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_phonecall_categ_action
@ -1905,7 +1905,7 @@ msgstr "Преобразовать в предложение"
#: model:ir.model,name:crm.model_crm_case_channel
#: model:ir.ui.menu,name:crm.menu_crm_case_channel
msgid "Channels"
msgstr ""
msgstr "Каналы"
#. module: crm
#: view:crm.phonecall:0 selection:crm.phonecall,state:0
@ -2181,7 +2181,7 @@ msgstr "Создать нового партнера"
#: model:ir.actions.act_window,name:crm.crm_case_categ_phone_outgoing0
#: model:ir.ui.menu,name:crm.menu_crm_case_phone_outbound
msgid "Scheduled Calls"
msgstr ""
msgstr "Запланированные звонки"
#. module: crm
#: view:crm.meeting:0 view:res.partner:0
@ -2191,7 +2191,7 @@ msgstr "Дата начала"
#. module: crm
#: view:crm.phonecall:0
msgid "Scheduled Phonecalls"
msgstr ""
msgstr "Запланированные звонки"
#. module: crm
#: view:crm.meeting:0
@ -2201,7 +2201,7 @@ msgstr "Отклонить"
#. module: crm
#: field:crm.lead,user_email:0
msgid "User Email"
msgstr ""
msgstr "Email пользователя"
#. module: crm
#: help:crm.lead,optin:0
@ -2387,7 +2387,7 @@ msgstr "Прочее"
#. module: crm
#: model:ir.actions.act_window,name:crm.open_board_crm
msgid "Sales"
msgstr ""
msgstr "Продажи"
#. module: crm
#: code:addons/crm/crm.py:430
@ -2575,7 +2575,7 @@ msgstr "Проверка классификации"
#. module: crm
#: field:crm.lead,user_login:0
msgid "User Login"
msgstr ""
msgstr "Логин пользователя"
#. module: crm
#: view:crm.segmentation:0
@ -2706,7 +2706,7 @@ msgstr ""
#. module: crm
#: field:crm.lead,subjects:0
msgid "Subject of Email"
msgstr ""
msgstr "Тема письма"
#. module: crm
#: model:ir.actions.act_window,name:crm.action_view_attendee_form
@ -2822,7 +2822,7 @@ msgstr ""
#. module: crm
#: field:crm.lead,color:0
msgid "Color Index"
msgstr ""
msgstr "Цветовая палитра"
#. module: crm
#: view:crm.lead:0
@ -3010,7 +3010,7 @@ msgstr "Создание предложений из кандидатов"
#: model:ir.actions.act_window,name:crm.open_board_statistical_dash
#: model:ir.ui.menu,name:crm.menu_board_statistics_dash
msgid "CRM Dashboard"
msgstr ""
msgstr "Панель аналитики CRM"
#. module: crm
#: model:crm.case.categ,name:crm.categ_oppor4
@ -3095,7 +3095,7 @@ msgstr "Условие на историю общения"
#. module: crm
#: view:crm.phonecall:0
msgid "Date of Call"
msgstr ""
msgstr "Дата звонка"
#. module: crm
#: help:crm.segmentation,som_interval:0
@ -3398,7 +3398,7 @@ msgstr "Закрыть"
#: selection:crm.opportunity2phonecall,action:0
#: selection:crm.phonecall2phonecall,action:0
msgid "Schedule a call"
msgstr ""
msgstr "Запланировать звонок"
#. module: crm
#: view:crm.lead:0 view:crm.phonecall:0
@ -3408,7 +3408,7 @@ msgstr "Категоризация"
#. module: crm
#: view:crm.lead:0
msgid "Log Call"
msgstr ""
msgstr "Описать звонок"
#. module: crm
#: model:ir.model,name:crm.model_base_action_rule
@ -3438,7 +3438,7 @@ msgstr "Кому"
#. module: crm
#: view:crm.lead:0
msgid "Create date"
msgstr ""
msgstr "Дата создания"
#. module: crm
#: selection:crm.meeting,class:0
@ -3470,7 +3470,7 @@ msgstr "Описание"
#. module: crm
#: view:crm.phonecall.report:0
msgid "Phone calls made in current month"
msgstr ""
msgstr "Звонки, сделанные в текущем месяце"
#. module: crm
#: selection:crm.lead.report,creation_month:0
@ -3565,7 +3565,7 @@ msgstr "Проиграно"
#. module: crm
#: view:crm.lead:0
msgid "Edit"
msgstr ""
msgstr "Изменить"
#. module: crm
#: field:crm.lead,country_id:0 view:crm.lead.report:0
@ -3625,6 +3625,9 @@ msgid ""
"channels that will be maintained at the creation of a document in the "
"system. Some examples of channels can be: Website, Phone Call, Reseller, etc."
msgstr ""
"Отлеживание источников появления кандидатов и предложений путём создания "
"специализированных каналов, обслуживаемых при создании докумета в системе. "
"Например, каналы могут быть такими: сайт, телефонный звонок, реселлер и т.д."
#. module: crm
#: selection:crm.lead2opportunity.partner,name:0
@ -3655,7 +3658,7 @@ msgstr "Последовательность"
#. module: crm
#: model:ir.model,name:crm.model_mail_compose_message
msgid "E-mail composition wizard"
msgstr ""
msgstr "Мастер создания электронной почты"
#. module: crm
#: view:crm.meeting:0
@ -3692,7 +3695,7 @@ msgstr "Год"
#. module: crm
#: constraint:res.partner:0
msgid "Error ! You cannot create recursive associated members."
msgstr ""
msgstr "Ошибка! Вы не можете создавать рекурсивные ссылки на участников."
#. module: crm
#: model:crm.case.resource.type,name:crm.type_lead8

File diff suppressed because it is too large Load Diff

View File

@ -105,21 +105,11 @@
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Stage" name="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}" />
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
<filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'creation_year'}"/>
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'creation_month'}"/>
<filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'creation_day'}"/>
<filter string="Exp. Closing" icon="terp-go-month" domain="[]" context="{'group_by':'deadline_month'}"/>
<filter string="Campaign" icon="terp-gtk-jump-to-rtl"
domain="[]" context="{'group_by':'type_id'}" />
<filter string="Channel" icon="terp-call-start"
domain="[]" context="{'group_by':'channel_id'}" />
<separator orientation="vertical" />
<filter string="Status" icon="terp-stock_effects-object-colorize"
domain="[]" context="{'group_by':'state'}" />
<separator orientation="vertical" />
<filter string="Year" icon="terp-go-year"
domain="[]" context="{'group_by':'creation_year'}"/>
<filter string="Month" icon="terp-go-month"

View File

@ -38,7 +38,7 @@ class crm_configuration(osv.osv_memory):
'module_import_google': fields.boolean("Google (Contacts and Calendar)",
help="""Import google contact in partner address and add google calendar events details in Meeting.
This installs the module import_google."""),
'module_google_map': fields.boolean("add google maps on customer",
'module_google_map': fields.boolean("add google maps on customers",
help="""Locate customers on Google Map.
This installs the module google_map."""),
'group_fund_raising': fields.boolean("Manage Fund Raising",

View File

@ -23,7 +23,7 @@
!python {model: mail.compose.message}: |
lead_ids = self.pool.get('crm.lead').search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
context.update({'active_model': 'crm.lead','active_id': lead_ids[0]})
id = self.create(cr, uid, {'body_text': "Merci à l'intérêt pour notre produit.nous vous contacterons bientôt. Merci", 'email_from': 'sales@mycompany.com'}, context=context)
id = self.create(cr, uid, {'body': "Merci à l'intérêt pour notre produit.nous vous contacterons bientôt. Merci", 'email_from': 'sales@mycompany.com'}, context=context)
try:
self.send_mail(cr, uid, [id], context=context)
except:
@ -34,12 +34,6 @@
!python {model: crm.lead}: |
lead_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right <info@customer.com>')])
self.convert_partner(cr, uid, lead_ids, context=context)
-
Now, I search customer in regular customer list.
-
!python {model: crm.lead}: |
partner_ids = self.message_partner_by_email(cr, uid, 'Mr. John Right <info@customer.com>')
assert partner_ids.get('partner_id'), "Customer is not found in regular customer list."
-
I convert one phonecall request as a customer and put into regular customer list.
-

View File

@ -55,7 +55,7 @@
After communicated with customer, I put some notes with contract details.
-
!python {model: crm.lead}: |
self.message_append_note(cr, uid, [ref('crm_case_4')], subject='Test note', body='ces détails envoyés par le client sur le FAX pour la qualité')
self.message_post(cr, uid, [ref('crm_case_4')], subject='Test note', body='ces détails envoyés par le client sur le FAX pour la qualité')
-
I win this opportunity
-
@ -73,7 +73,7 @@
I convert mass lead into opportunity customer.
-
!python {model: crm.lead2opportunity.partner.mass}: |
context.update({'active_model': 'crm.lead', 'active_ids': [ref("crm_case_11"), ref("crm_case_2")], 'active_id': ref("crm_case_4")})
context.update({'active_model': 'crm.lead', 'active_ids': [ref("crm_case_11"), ref("crm_case_2")], 'active_id': ref("crm_case_11")})
id = self.create(cr, uid, {'user_ids': [ref('base.user_root')], 'section_id': ref('crm.section_sales_department')}, context=context)
self.mass_convert(cr, uid, [id], context=context)
-
@ -83,7 +83,8 @@
opp = self.browse(cr, uid, ref('crm_case_11'))
assert opp.name == "Need estimated cost for new project", "Opportunity name not correct"
assert opp.type == 'opportunity', 'Lead is not converted to opportunity!'
assert opp.partner_id.name == "Thomas Passot", 'Partner mismatch!'
expected_partner = "Thomas Passot"
assert opp.partner_id.name == expected_partner, 'Partner mismatch! %s vs %s' % (opp.partner_id.name, expected_partner)
assert opp.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'
-
Then check for second lead converted on opportunity.

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