[MERGE]:trunk

bzr revid: apa@tinyerp.com-20121029060528-yvb0ez8jdr1sine8
This commit is contained in:
Amit Patel 2012-10-29 11:35:28 +05:30
commit 3eca978451
232 changed files with 2249 additions and 1779 deletions

View File

@ -1007,7 +1007,7 @@ class account_period(osv.osv):
'date_stop': fields.date('End of Period', required=True, states={'done':[('readonly',True)]}), 'date_stop': fields.date('End of Period', required=True, states={'done':[('readonly',True)]}),
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True), 'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
'state': fields.selection([('draft','Open'), ('done','Closed')], 'Status', readonly=True, 'state': fields.selection([('draft','Open'), ('done','Closed')], 'Status', readonly=True,
help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'), help='When monthly periods are created. The status is \'Draft\'. At the end of monthly period it is in \'Done\' status.'),
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True) 'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
} }
_defaults = { _defaults = {
@ -1134,7 +1134,7 @@ class account_journal_period(osv.osv):
'icon': fields.function(_icon_get, string='Icon', type='char', size=32), 'icon': fields.function(_icon_get, string='Icon', type='char', size=32),
'active': fields.boolean('Active', required=True, help="If the active field is set to False, it will allow you to hide the journal period without removing it."), 'active': fields.boolean('Active', required=True, help="If the active field is set to False, it will allow you to hide the journal period without removing it."),
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'Status', required=True, readonly=True, 'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'Status', required=True, readonly=True,
help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'), help='When journal period is created. The status is \'Draft\'. If a report is printed it comes to \'Printed\' status. When all transactions are done, it comes in \'Done\' status.'),
'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'), 'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'),
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True) 'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
} }
@ -1282,7 +1282,7 @@ class account_move(osv.osv):
'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}), 'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'posted':[('readonly',True)]}), 'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'posted':[('readonly',True)]}),
'state': fields.selection([('draft','Unposted'), ('posted','Posted')], 'Status', required=True, readonly=True, 'state': fields.selection([('draft','Unposted'), ('posted','Posted')], 'Status', required=True, readonly=True,
help='All manually created new journal entries are usually in the state \'Unposted\', but you can set the option to skip that state on the related journal. In that case, they will behave as journal entries automatically created by the system on document validation (invoices, bank statements...) and will be created in \'Posted\' state.'), help='All manually created new journal entries are usually in the status \'Unposted\', but you can set the option to skip that status on the related journal. In that case, they will behave as journal entries automatically created by the system on document validation (invoices, bank statements...) and will be created in \'Posted\' status.'),
'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}), 'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}),
'to_check': fields.boolean('To Review', help='Check this box if you are unsure of that journal entry and if you want to note it as \'to be reviewed\' by an accounting expert.'), 'to_check': fields.boolean('To Review', help='Check this box if you are unsure of that journal entry and if you want to note it as \'to be reviewed\' by an accounting expert.'),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True), 'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True),

View File

@ -123,8 +123,8 @@ class account_bank_statement(osv.osv):
('open','Open'), # used by cash statements ('open','Open'), # used by cash statements
('confirm', 'Closed')], ('confirm', 'Closed')],
'Status', required=True, readonly="1", 'Status', required=True, readonly="1",
help='When new statement is created the state will be \'Draft\'.\n' help='When new statement is created the status will be \'Draft\'.\n'
'And after getting confirmation from the bank it will be in \'Confirmed\' state.'), 'And after getting confirmation from the bank it will be in \'Confirmed\' status.'),
'currency': fields.function(_currency, string='Currency', 'currency': fields.function(_currency, string='Currency',
type='many2one', relation='res.currency'), type='many2one', relation='res.currency'),
'account_id': fields.related('journal_id', 'default_debit_account_id', type='many2one', relation='account.account', string='Account used in this journal', readonly=True, help='used in statement reconciliation domain, but shouldn\'t be used elswhere.'), 'account_id': fields.related('journal_id', 'default_debit_account_id', type='many2one', relation='account.account', string='Account used in this journal', readonly=True, help='used in statement reconciliation domain, but shouldn\'t be used elswhere.'),

View File

@ -185,6 +185,7 @@ class account_invoice(osv.osv):
_columns = { _columns = {
'name': fields.char('Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}), 'name': fields.char('Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}), 'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}),
'supplier_invoice_number': fields.char('Supplier Invoice Number', size=64, help="The reference of this invoice as provided by the supplier.", readonly=True, states={'draft':[('readonly',False)]}),
'type': fields.selection([ 'type': fields.selection([
('out_invoice','Customer Invoice'), ('out_invoice','Customer Invoice'),
('in_invoice','Supplier Invoice'), ('in_invoice','Supplier Invoice'),
@ -206,12 +207,12 @@ class account_invoice(osv.osv):
('open','Open'), ('open','Open'),
('paid','Paid'), ('paid','Paid'),
('cancel','Cancelled'), ('cancel','Cancelled'),
],'State', select=True, readonly=True, ],'Status', select=True, readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Invoice. \ help=' * The \'Draft\' status is used when a user is encoding a new and unconfirmed Invoice. \
\n* The \'Pro-forma\' when invoice is in Pro-forma state,invoice does not have an invoice number. \ \n* The \'Pro-forma\' when invoice is in Pro-forma status,invoice does not have an invoice number. \
\n* The \'Open\' state is used when user create invoice,a invoice number is generated.Its in open state till user does not pay invoice. \ \n* The \'Open\' status is used when user create invoice,a invoice number is generated.Its in open status till user does not pay invoice. \
\n* The \'Paid\' state is set automatically when the invoice is paid. Its related journal entries may or may not be reconciled. \ \n* The \'Paid\' status is set automatically when the invoice is paid. Its related journal entries may or may not be reconciled. \
\n* The \'Cancelled\' state is used when user cancel invoice.'), \n* The \'Cancelled\' status is used when user cancel invoice.'),
'sent': fields.boolean('Sent', readonly=True, help="It indicates that the invoice has been sent."), 'sent': fields.boolean('Sent', readonly=True, help="It indicates that the invoice has been sent."),
'date_invoice': fields.date('Invoice Date', readonly=True, states={'draft':[('readonly',False)]}, select=True, help="Keep empty to use the current date"), 'date_invoice': fields.date('Invoice Date', readonly=True, states={'draft':[('readonly',False)]}, select=True, help="Keep empty to use the current date"),
'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}, select=True, 'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}, select=True,
@ -1359,7 +1360,7 @@ class account_invoice_line(osv.osv):
_description = "Invoice Line" _description = "Invoice Line"
_columns = { _columns = {
'name': fields.text('Description', required=True), 'name': fields.text('Description', required=True),
'origin': fields.char('Source', size=256, help="Reference of the document that produced this invoice."), 'origin': fields.char('Source Document', size=256, help="Reference of the document that produced this invoice."),
'sequence': fields.integer('Sequence', help="Gives the sequence of this line when displaying the invoice."), 'sequence': fields.integer('Sequence', help="Gives the sequence of this line when displaying the invoice."),
'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True), 'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True),
'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'), 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'),

View File

@ -168,12 +168,15 @@
context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
domain="[('supplier', '=', True)]"/> domain="[('supplier', '=', True)]"/>
<field name="fiscal_position" widget="selection"/> <field name="fiscal_position" widget="selection"/>
<field name="origin"/> <group>
<label for="reference_type"/> <field name="origin"/>
<div> <field name="supplier_invoice_number"/>
</group>
<label for="reference_type"/>
<div>
<field name="reference_type" class="oe_inline oe_edit_only"/> <field name="reference_type" class="oe_inline oe_edit_only"/>
<field name="reference" class="oe_inline"/> <field name="reference" class="oe_inline"/>
</div> </div>
</group> </group>
<group> <group>
<field name="date_invoice"/> <field name="date_invoice"/>
@ -445,7 +448,7 @@
<field name="model">account.invoice</field> <field name="model">account.invoice</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<search string="Search Invoice"> <search string="Search Invoice">
<field name="number" string="Invoice" filter_domain="['|', ('number','ilike',self),('origin','ilike',self)]"/> <field name="number" string="Invoice" filter_domain="['|','|', ('number','ilike',self), ('origin','ilike',self), ('supplier_invoice_number', 'ilike', self)]"/>
<filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/> <filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
<filter name="proforma" icon="terp-gtk-media-pause" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices" groups="account.group_proforma_invoices"/> <filter name="proforma" icon="terp-gtk-media-pause" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices" groups="account.group_proforma_invoices"/>
<filter name="invoices" icon="terp-dolar" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/> <filter name="invoices" icon="terp-dolar" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>

View File

@ -1862,7 +1862,7 @@
<field name="model_id"/> <field name="model_id"/>
<group expand="0" string="Group By..."> <group expand="0" string="Group By...">
<filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/> <filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/> <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group> </group>
</search> </search>
</field> </field>
@ -2414,32 +2414,6 @@
<field name="view_mode">form</field> <field name="view_mode">form</field>
<field name="target">new</field> <field name="target">new</field>
</record> </record>
<record id="ir_actions_server_action_wizard_multi_chart" model="ir.actions.server">
<field name="type">ir.actions.server</field>
<field name="condition">True</field>
<field name="state">code</field>
<field name="model_id" ref="base.model_ir_actions_todo"/>
<field eval="5" name="sequence"/>
<field name="code">
# check for unconfigured companies
account_installer_obj = self.pool.get('account.installer')
account_installer_obj.check_unconfigured_cmp(cr, uid, context=context)
action_ids = []
# fetch the act_window actions related to chart of account configuration
# we use ir.actions.todo to enable the possibility for other modules to insert their own
# wizards during the configuration process
ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_wizard_multi_chart')
if ref:
action_ids += [ref[1]]
ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_account_configuration_installer')
if ref:
action_ids += [ref[1]]
todo_ids = pool.get('ir.actions.todo').search(cr, uid, [('action_id', 'in', action_ids)], context=context)
pool.get('ir.actions.todo').write(cr, uid, todo_ids, {'state':'open'}, context=context)
action = pool.get('res.config').next(cr, uid, [], context)
</field>
<field name="name">New Company Financial Setting</field>
</record>
<record id="account_account_graph" model="ir.ui.view"> <record id="account_account_graph" model="ir.ui.view">
<field name="name">account.account.graph</field> <field name="name">account.account.graph</field>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -119,15 +119,6 @@ class account_installer(osv.osv_memory):
self.execute_simple(cr, uid, ids, context) self.execute_simple(cr, uid, ids, context)
super(account_installer, self).execute(cr, uid, ids, context=context) super(account_installer, self).execute(cr, uid, ids, context=context)
def action_next(self, cr, uid, ids, context=None):
next = self.execute(cr, uid, ids, context=context)
for installer in self.browse(cr, uid, ids, context=context):
if installer.charts == 'l10n_be':
return {'type': 'ir.actions.act_window_close'}
else :
if next : return next
return self.next(cr, uid, ids, context=context)
def execute_simple(self, cr, uid, ids, context=None): def execute_simple(self, cr, uid, ids, context=None):
if context is None: if context is None:
context = {} context = {}

View File

@ -91,7 +91,7 @@ class account_invoice_report(osv.osv):
('open','Open'), ('open','Open'),
('paid','Done'), ('paid','Done'),
('cancel','Cancelled') ('cancel','Cancelled')
], 'Invoice State', readonly=True), ], 'Invoice Status', readonly=True),
'date_due': fields.date('Due Date', readonly=True), 'date_due': fields.date('Due Date', readonly=True),
'account_id': fields.many2one('account.account', 'Account',readonly=True), 'account_id': fields.many2one('account.account', 'Account',readonly=True),
'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True), 'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),

View File

@ -74,36 +74,18 @@ class account_analytic_account(osv.osv):
for id in ids: for id in ids:
res[id][f] = 0.0 res[id][f] = 0.0
res2 = {} res2 = {}
if parent_ids: for account in accounts:
# Amount uninvoiced hours to invoice at sale price cr.execute("SELECT product_id, user_id, to_invoice, sum(unit_amount), product_uom_id, name " \
# Warning "FROM account_analytic_line as line " \
# This computation doesn't take care of pricelist ! "WHERE account_id = %s " \
# Just consider list_price "AND invoice_id is NULL AND to_invoice IS NOT NULL " \
cr.execute("""SELECT account_analytic_account.id, \ "GROUP BY product_id, user_id, to_invoice, product_uom_id, name", (account.id,))
COALESCE(SUM (product_template.list_price * \
account_analytic_line.unit_amount * \ res[account.id][f] = 0.0
((100-hr_timesheet_invoice_factor.factor)/100)), 0.0) \ for product_id, user_id, factor_id, qty, uom, line_name in cr.fetchall():
AS ca_to_invoice \ price = self.pool.get('account.analytic.line')._get_invoice_price(cr, uid, account, product_id, user_id, qty, context)
FROM product_template \ factor = self.pool.get('hr_timesheet_invoice.factor').browse(cr, uid, factor_id, context=context)
JOIN product_product \ res[account.id][f] += price * qty * (100-factor.factor or 0.0) / 100.0
ON product_template.id = product_product.product_tmpl_id \
JOIN account_analytic_line \
ON account_analytic_line.product_id = product_product.id \
JOIN account_analytic_journal \
ON account_analytic_line.journal_id = account_analytic_journal.id \
JOIN account_analytic_account \
ON account_analytic_account.id = account_analytic_line.account_id \
JOIN hr_timesheet_invoice_factor \
ON hr_timesheet_invoice_factor.id = account_analytic_account.to_invoice \
WHERE account_analytic_account.id IN %s \
AND account_analytic_line.invoice_id IS NULL \
AND account_analytic_line.to_invoice IS NOT NULL \
AND account_analytic_journal.type = 'general' \
GROUP BY account_analytic_account.id;""", (parent_ids,))
for account_id, sum in cr.fetchall():
if account_id not in res:
res[account_id] = {}
res[account_id][f] = round(sum, dp)
# sum both result on account_id # sum both result on account_id
for id in ids: for id in ids:

View File

@ -30,18 +30,18 @@
<separator name="toinvoice" string="Invoicing"/> <separator name="toinvoice" string="Invoicing"/>
<table class="oe_form_analytic_account"> <table class="oe_form_analytic_account">
<tr> <tr>
<th class="oe_grey" width="160px"></th> <th class="oe_timesheet_grey" width="160px"></th>
<th class="oe_grey" width="25px"></th> <th class="oe_timesheet_grey" width="25px"></th>
<th class="oe_grey" width="100px"><label string="Expected"/></th> <th class="oe_timesheet_grey" width="100px"><label string="Expected"/></th>
<th class="oe_grey" width="100px"><label string="Invoiced"/></th> <th class="oe_timesheet_grey" width="100px"><label string="Invoiced"/></th>
<th class="oe_grey" width="100px"><label string="Remaining"/></th> <th class="oe_timesheet_grey" width="100px"><label string="Remaining"/></th>
<th class="oe_grey" width="100px"><label string="To Invoice"/></th> <th class="oe_timesheet_grey" width="100px"><label string="To Invoice"/></th>
<th width="30px"></th> <th width="30px"></th>
<th></th> <th></th>
</tr><tr> </tr><tr>
<td class="oe_grey"> <td class="oe_timesheet_grey">
<label for="fix_price_invoices"/> <label for="fix_price_invoices"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="fix_price_invoices" class="oe_inline"/> <field name="fix_price_invoices" class="oe_inline"/>
</td><td> </td><td>
<field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/> <field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
@ -51,23 +51,28 @@
<field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/> <field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td> </td><td>
<field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/> <field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
</td><td> </td><td attrs="{'invisible': [('fix_price_invoices','=',False)]}" class="oe_timesheet_action">
<button name="open_sale_order_lines" <span attrs="{'invisible': [('fix_price_to_invoice','=',0.0)]}" class="oe_grey">
class="oe_link oe_e" <button name="open_sale_order_lines"
string="/" type="object" class="oe_link"
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]}" string="⇒ Invoice" type="object"
attrs="{'invisible': [('fix_price_to_invoice','=',0)]}"/> 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]}"/>
</td><td> or view
</span>
<span attrs="{'invisible': [('fix_price_to_invoice','&lt;&gt;',0.0)]}" class="oe_grey">
No order to invoice, create
</span>
<button name="%(action_sales_order)d" string="Sale Orders" <button name="%(action_sales_order)d" string="Sale Orders"
type="action" type="action"
class="oe_link" 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]}" 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> </td>
</tr><tr> </tr><tr>
<td class="oe_grey"> <td class="oe_timesheet_grey">
<label for="invoice_on_timesheets"/> <label for="invoice_on_timesheets"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="invoice_on_timesheets"/> <field name="invoice_on_timesheets"/>
</td><td> </td><td>
<field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/> <field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
@ -77,44 +82,55 @@
<field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/> <field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td> </td><td>
<field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/> <field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td> </td><td class="oe_timesheet_action" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
<button name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" <span attrs="{'invisible': [('ca_to_invoice','=',0.0)]}" class="oe_grey">
type="action" <button name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
class="oe_link oe_e" type="action"
string="/" class="oe_link"
attrs="{'invisible': [('ca_to_invoice','=',0.0)]}"/> string="⇒ Invoice"/>
or view
</span>
<span attrs="{'invisible': [('ca_to_invoice','&lt;&gt;',0.0)]}" class="oe_grey">
Nothing to invoice, create
</span>
</td><td>
<button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" <button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d"
string="Timesheets" type="action" string="Timesheets" type="action"
class="oe_link" class="oe_link"
attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"
context="{'default_account_id': active_id,'search_default_account_id': active_id}"/> context="{'default_account_id': active_id,'search_default_account_id': active_id}"/>
</td> </td>
</tr><tr name='total'> </tr><tr name='total'>
<th class="oe_grey"> <th class="oe_timesheet_grey">
<label string="Total"/> <label string="Total"/>
</th><td class="oe_grey"> </th><td class="oe_timesheet_grey">
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/> <field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="invoiced_total" class="oe_inline"/> <field name="invoiced_total" class="oe_inline"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="remaining_total" class="oe_inline"/> <field name="remaining_total" class="oe_inline"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="toinvoice_total" class="oe_inline"/> <field name="toinvoice_total" class="oe_inline"/>
</td><td> </td><td>
</td> </td>
</tr> </tr>
</table> </table>
<group name='invoice_on_timesheets' attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"> <group name='invoice_on_timesheets' attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
<field name="pricelist_id" <p class="oe_grey oe_edit_only" colspan="2">
class="oe_inline" When invoicing on timesheet, OpenERP uses the
attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/> pricelist of the contract which uses the price
<field name="to_invoice" defined on the product related to each employee to
class="oe_inline" define the customer invoice price rate.
widget="selection" </p>
attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/> <group>
<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>
</group> </group>
</xpath> </xpath>
</field> </field>

View File

@ -9,7 +9,11 @@
float: right; float: right;
width: auto !important; width: auto !important;
} }
.openerp .oe_form table.oe_form_analytic_account .oe_grey { .openerp .oe_form table.oe_form_analytic_account tr td.oe_timesheet_action {
width: 250px;
padding-left: 7px;
}
.openerp .oe_form table.oe_form_analytic_account .oe_timesheet_grey {
background-color: #eeeeee; background-color: #eeeeee;
color: #404040; color: #404040;
} }

View File

@ -9,7 +9,10 @@
.oe_form_field_float .oe_form_field_float
float: right float: right
width: auto !important width: auto !important
.oe_grey td.oe_timesheet_action
width: 250px
padding-left: 7px
.oe_timesheet_grey
background-color: #eeeeee background-color: #eeeeee
color: #404040 color: #404040

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n" "POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2011-04-15 19:38+0000\n" "PO-Revision-Date: 2012-10-25 12:32+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n" "Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:15+0000\n" "X-Launchpad-Export-Date: 2012-10-26 04:56+0000\n"
"X-Generator: Launchpad (build 16165)\n" "X-Generator: Launchpad (build 16194)\n"
#. module: account_analytic_plans #. module: account_analytic_plans
#: view:analytic.plan.create.model:0 #: view:analytic.plan.create.model:0
@ -136,7 +136,7 @@ msgstr "Определить аналитический план счетов"
#. module: account_analytic_plans #. module: account_analytic_plans
#: constraint:account.invoice:0 #: constraint:account.invoice:0
msgid "Invalid BBA Structured Communication !" msgid "Invalid BBA Structured Communication !"
msgstr "" msgstr "Неверна структурная связь BBA!"
#. module: account_analytic_plans #. module: account_analytic_plans
#: constraint:account.bank.statement:0 #: constraint:account.bank.statement:0
@ -149,6 +149,8 @@ msgid ""
"The date of your Journal Entry is not in the defined period! You should " "The date of your Journal Entry is not in the defined period! You should "
"change the date or remove this constraint from the journal." "change the date or remove this constraint from the journal."
msgstr "" msgstr ""
"Дата проводки в журнале не в определённом периоде! Вы должны сменить дату "
"или удалить это ограничение из журнала."
#. module: account_analytic_plans #. module: account_analytic_plans
#: sql_constraint:account.journal:0 #: sql_constraint:account.journal:0
@ -251,6 +253,8 @@ msgid ""
"currency. You should remove the secondary currency on the account or select " "currency. You should remove the secondary currency on the account or select "
"a multi-currency view on the journal." "a multi-currency view on the journal."
msgstr "" msgstr ""
"Выбранный счёт проводки в журнале нуждается во вторичной валюте. Вы должны "
"удалить вторичную валюту по счёту или выбрать мульти-валютный вид по журналу."
#. module: account_analytic_plans #. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0 #: report:account.analytic.account.crossovered.analytic:0
@ -429,7 +433,7 @@ msgstr "Счет 4 уровня"
#. module: account_analytic_plans #. module: account_analytic_plans
#: constraint:account.move.line:0 #: constraint:account.move.line:0
msgid "Company must be the same for its related account and period." msgid "Company must be the same for its related account and period."
msgstr "" msgstr "Для счета и периода должна быть одна компания."
#. module: account_analytic_plans #. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0 #: view:account.analytic.plan.instance.line:0
@ -515,11 +519,14 @@ msgid ""
"analytic accounts for each plan set. Then, you must attach a plan set to " "analytic accounts for each plan set. Then, you must attach a plan set to "
"your account journals." "your account journals."
msgstr "" msgstr ""
"Для настройки нескольких планов счетов аналитики, вы должны определить "
"корневые счета аналитики для каждого набора плана. Затем вы можете "
"прикрепить набор плана к вашим учётным журналам."
#. module: account_analytic_plans #. module: account_analytic_plans
#: constraint:account.move.line:0 #: constraint:account.move.line:0
msgid "You can not create journal items on closed account." msgid "You can not create journal items on closed account."
msgstr "" msgstr "Нельзя создать элемент журнала по закрытому счету ."
#. module: account_analytic_plans #. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0 #: report:account.analytic.account.crossovered.analytic:0

View File

@ -226,9 +226,9 @@ class account_asset_asset(osv.osv):
'child_ids': fields.one2many('account.asset.asset', 'parent_id', 'Children Assets'), 'child_ids': fields.one2many('account.asset.asset', 'parent_id', 'Children Assets'),
'purchase_date': fields.date('Purchase Date', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'purchase_date': fields.date('Purchase Date', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft','Draft'),('open','Running'),('close','Close')], 'Status', required=True, 'state': fields.selection([('draft','Draft'),('open','Running'),('close','Close')], 'Status', required=True,
help="When an asset is created, the state is 'Draft'.\n" \ help="When an asset is created, the status is 'Draft'.\n" \
"If the asset is confirmed, the state goes in 'Running' and the depreciation lines can be posted in the accounting.\n" \ "If the asset is confirmed, the status 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."), "You can manually close an asset when the depreciation is over. If the last line of depreciation is posted, the asset automatically goes in that status."),
'active': fields.boolean('Active'), 'active': fields.boolean('Active'),
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True, states={'draft':[('readonly',False)]}), 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True, states={'draft':[('readonly',False)]}),
'method': fields.selection([('linear','Linear'),('degressive','Degressive')], 'Computation Method', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose the method to use to compute the amount of depreciation lines.\n"\ 'method': fields.selection([('linear','Linear'),('degressive','Degressive')], 'Computation Method', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose the method to use to compute the amount of depreciation lines.\n"\

View File

@ -0,0 +1,199 @@
# Polish 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-10-25 16:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-26 04:56+0000\n"
"X-Generator: Launchpad (build 16194)\n"
#. module: account_check_writing
#: selection:res.company,check_layout:0
msgid "Check on Top"
msgstr ""
#. module: account_check_writing
#: model:ir.actions.act_window,help:account_check_writing.action_write_check
msgid ""
"The check payment form allows you to track the payment you do to your "
"suppliers specially by check. When you select a supplier, the payment method "
"and an amount for the payment, OpenERP will propose to reconcile your "
"payment with the open supplier invoices or bills.You can print the check"
msgstr ""
#. module: account_check_writing
#: view:account.voucher:0
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_bottom
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_middle
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_top
msgid "Print Check"
msgstr ""
#. module: account_check_writing
#: selection:res.company,check_layout:0
msgid "Check in middle"
msgstr ""
#. module: account_check_writing
#: help:res.company,check_layout:0
msgid ""
"Check on top is compatible with Quicken, QuickBooks and Microsoft Money. "
"Check in middle is compatible with Peachtree, ACCPAC and DacEasy. Check on "
"bottom is compatible with Peachtree, ACCPAC and DacEasy only"
msgstr ""
#. module: account_check_writing
#: selection:res.company,check_layout:0
msgid "Check on bottom"
msgstr ""
#. module: account_check_writing
#: constraint:res.company:0
msgid "Error! You can not create recursive companies."
msgstr ""
#. module: account_check_writing
#: help:account.journal,allow_check_writing:0
msgid "Check this if the journal is to be used for writing checks."
msgstr ""
#. module: account_check_writing
#: field:account.journal,allow_check_writing:0
msgid "Allow Check writing"
msgstr ""
#. module: account_check_writing
#: report:account.print.check.bottom:0
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Description"
msgstr "Opis"
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_account_journal
msgid "Journal"
msgstr "Dziennik"
#. module: account_check_writing
#: model:ir.actions.act_window,name:account_check_writing.action_write_check
#: model:ir.ui.menu,name:account_check_writing.menu_action_write_check
msgid "Write Checks"
msgstr ""
#. module: account_check_writing
#: report:account.print.check.bottom:0
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Discount"
msgstr ""
#. module: account_check_writing
#: report:account.print.check.bottom:0
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Original Amount"
msgstr ""
#. module: account_check_writing
#: view:res.company:0
msgid "Configuration"
msgstr "Konfiguracja"
#. module: account_check_writing
#: field:account.voucher,allow_check:0
msgid "Allow Check Writing"
msgstr ""
#. module: account_check_writing
#: report:account.print.check.bottom:0
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Payment"
msgstr ""
#. module: account_check_writing
#: field:account.journal,use_preprint_check:0
msgid "Use Preprinted Check"
msgstr ""
#. module: account_check_writing
#: sql_constraint:res.company:0
msgid "The company name must be unique !"
msgstr ""
#. module: account_check_writing
#: report:account.print.check.bottom:0
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Due Date"
msgstr ""
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_res_company
msgid "Companies"
msgstr ""
#. module: account_check_writing
#: view:res.company:0
msgid "Default Check Layout"
msgstr ""
#. module: account_check_writing
#: constraint:account.journal:0
msgid ""
"Configuration error! The currency chosen should be shared by the default "
"accounts too."
msgstr ""
#. module: account_check_writing
#: report:account.print.check.bottom:0
#: report:account.print.check.middle:0
msgid "Balance Due"
msgstr ""
#. module: account_check_writing
#: report:account.print.check.bottom:0
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Check Amount"
msgstr ""
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_account_voucher
msgid "Accounting Voucher"
msgstr ""
#. module: account_check_writing
#: sql_constraint:account.journal:0
msgid "The name of the journal must be unique per company !"
msgstr ""
#. module: account_check_writing
#: sql_constraint:account.journal:0
msgid "The code of the journal must be unique per company !"
msgstr ""
#. module: account_check_writing
#: field:account.voucher,amount_in_word:0
msgid "Amount in Word"
msgstr ""
#. module: account_check_writing
#: report:account.print.check.top:0
msgid "Open Balance"
msgstr ""
#. module: account_check_writing
#: field:res.company,check_layout:0
msgid "Choose Check layout"
msgstr ""

View File

@ -19,11 +19,14 @@
# #
############################################################################## ##############################################################################
import logging
import time import time
from osv import osv, fields from osv import osv, fields
import netsvc import netsvc
_logger = logging.getLogger(__name__)
class payment_mode(osv.osv): class payment_mode(osv.osv):
_name= 'payment.mode' _name= 'payment.mode'
_description= 'Payment Mode' _description= 'Payment Mode'
@ -70,9 +73,7 @@ class payment_order(osv.osv):
#dead code #dead code
def get_wizard(self, type): def get_wizard(self, type):
logger = netsvc.Logger() _logger.warning("No wizard found for the payment type '%s'.", type)
logger.notifyChannel("Warning!", netsvc.LOG_WARNING,
"No wizard is found for the payment type '%s'." % type)
return None return None
def _total(self, cursor, user, ids, name, args, context=None): def _total(self, cursor, user, ids, name, args, context=None):
@ -95,7 +96,7 @@ class payment_order(osv.osv):
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
('open', 'Confirmed'), ('open', 'Confirmed'),
('done', 'Done')], 'Status', select=True, ('done', 'Done')], 'Status', select=True,
help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'), help='When an order is placed the status is \'Draft\'.\n Once the bank is confirmed the status is set to \'Confirmed\'.\n Then the order is paid the status is \'Done\'.'),
'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}), 'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
'total': fields.function(_total, string="Total", type='float'), 'total': fields.function(_total, string="Total", type='float'),
'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}), 'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),

View File

@ -293,10 +293,10 @@ class account_voucher(osv.osv):
('proforma','Pro-forma'), ('proforma','Pro-forma'),
('posted','Posted') ('posted','Posted')
], 'Status', readonly=True, size=32, ], 'Status', readonly=True, size=32,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \ help=' * The \'Draft\' status is used when a user is encoding a new and unconfirmed Voucher. \
\n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \ \n* The \'Pro-forma\' when voucher is in Pro-forma status,voucher does not have an voucher number. \
\n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \ \n* The \'Posted\' status is used when user create voucher,a voucher number is generated and voucher entries are created in account \
\n* The \'Cancelled\' state is used when user cancel voucher.'), \n* The \'Cancelled\' status is used when user cancel voucher.'),
'amount': fields.float('Total', digits_compute=dp.get_precision('Account'), required=True, readonly=True, states={'draft':[('readonly',False)]}), 'amount': fields.float('Total', digits_compute=dp.get_precision('Account'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}), 'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."), 'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),

View File

@ -52,7 +52,7 @@ class sale_receipt_report(osv.osv):
('proforma','Pro-forma'), ('proforma','Pro-forma'),
('posted','Posted'), ('posted','Posted'),
('cancel','Cancelled') ('cancel','Cancelled')
], 'Voucher State', readonly=True), ], 'Voucher Status', readonly=True),
'pay_now':fields.selection([ 'pay_now':fields.selection([
('pay_now','Pay Directly'), ('pay_now','Pay Directly'),
('pay_later','Pay Later or Group Funds'), ('pay_later','Pay Later or Group Funds'),

View File

@ -64,7 +64,7 @@
<button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/> <button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
<button name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/> <button name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" /> <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
<button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/> <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure you want to cancel this receipt?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/> <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/> <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header> </header>
@ -89,7 +89,7 @@
<page string="Sales Information"> <page string="Sales Information">
<field name="line_cr_ids" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}"> <field name="line_cr_ids" on_change="onchange_price(line_cr_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
<tree string="Sales Lines" editable="bottom"> <tree string="Sales Lines" editable="bottom">
<field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection" groups="account.group_account_user"/> <field name="account_id" domain="[('user_type.report_type','=','income'),('type','!=','view')]" widget="selection"/>
<field name="name"/> <field name="name"/>
<field name="amount" sum="Total"/> <field name="amount" sum="Total"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/> <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
@ -209,7 +209,7 @@
<button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/> <button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
<button name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/> <button name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|',('state','=','draft'), ('paid','=',True)]}" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" /> <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
<button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to confirm this record ?"/> <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure you want to cancel this receipt?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/> <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/> <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header> </header>
@ -243,7 +243,7 @@
<page string="Bill Information"> <page string="Bill Information">
<field name="line_dr_ids" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" context="{'journal_id':journal_id,'partner_id':partner_id}"> <field name="line_dr_ids" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" context="{'journal_id':journal_id,'partner_id':partner_id}">
<tree string="Expense Lines" editable="bottom"> <tree string="Expense Lines" editable="bottom">
<field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]" groups="account.group_account_user"/> <field name="account_id" widget="selection" domain="[('user_type.report_type','=','expense'), ('type','!=','view')]"/>
<field name="name"/> <field name="name"/>
<field name="amount"/> <field name="amount"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/> <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>

View File

@ -141,11 +141,11 @@ class account_analytic_account(osv.osv):
'name': fields.char('Account/Contract 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'), 'complete_name': fields.function(_complete_name_calc, type='char', string='Full Account Name'),
'code': fields.char('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, 'type': fields.selection([('view','Analytic View'), ('normal','Analytic Account'),('contract','Contract or Project'),('template','Template of Contract')], '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"\ 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"\ "The type 'Analytic account' stands for usual accounts that you only want to use in accounting.\n"\
"If you select Contract or Project, it offers you the possibility to manage the validity and the invoicing options for this account.\n"\ "If you select Contract or Project, it offers you the possibility to manage the validity and the invoicing options for this account.\n"\
"The special type 'Template of Project' allows you to define a template with default data that you can reuse easily."), "The special type 'Template of Contract' allows you to define a template with default data that you can reuse easily."),
'template_id': fields.many2one('account.analytic.account', 'Template of Contract'), 'template_id': fields.many2one('account.analytic.account', 'Template of Contract'),
'description': fields.text('Description'), 'description': fields.text('Description'),
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2), 'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
@ -156,7 +156,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')), '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')), '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': fields.function(_debit_credit_bal_qtty, type='float', string='Quantity', multi='debit_credit_bal_qtty'),
'quantity_max': fields.float('Prepaid Units', help='Sets the higher limit of time to work on the contract.'), 'quantity_max': fields.float('Prepaid Service Units', help='Sets the higher limit of time to work on the contract, based on the timesheet. (for instance, number of hours in a limited support contract.)'),
'partner_id': fields.many2one('res.partner', 'Customer'), 'partner_id': fields.many2one('res.partner', 'Customer'),
'user_id': fields.many2one('res.users', 'Project Manager'), 'user_id': fields.many2one('res.users', 'Project Manager'),
'manager_id': fields.many2one('res.users', 'Account Manager'), 'manager_id': fields.many2one('res.users', 'Account Manager'),
@ -255,27 +255,27 @@ class account_analytic_account(osv.osv):
if context is None: if context is None:
context={} context={}
if context.get('current_model') == 'project.project': if context.get('current_model') == 'project.project':
cr.execute("select analytic_account_id from project_project") project_obj = self.pool.get("account.analytic.account")
project_ids = [x[0] for x in cr.fetchall()] project_ids = project_obj.search(cr, uid, args)
return self.name_get(cr, uid, project_ids, context=context) return self.name_get(cr, uid, project_ids, context=context)
if name: if name:
account = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context) account_ids = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context)
if not account: if not account_ids:
names=map(lambda i : i.strip(),name.split('/')) names=map(lambda i : i.strip(),name.split('/'))
for i in range(len(names)): for i in range(len(names)):
dom=[('name', operator, names[i])] dom=[('name', operator, names[i])]
if i>0: if i>0:
dom+=[('id','child_of',account)] dom+=[('id','child_of',account_ids)]
account = self.search(cr, uid, dom, limit=limit, context=context) account_ids = self.search(cr, uid, dom, limit=limit, context=context)
newacc = account newacc = account_ids
while newacc: while newacc:
newacc = self.search(cr, uid, [('parent_id', 'in', newacc)], limit=limit, context=context) newacc = self.search(cr, uid, [('parent_id', 'in', newacc)], limit=limit, context=context)
account += newacc account_ids += newacc
if args: if args:
account = self.search(cr, uid, [('id', 'in', account)] + args, limit=limit, context=context) account_ids = self.search(cr, uid, [('id', 'in', account_ids)] + args, limit=limit, context=context)
else: else:
account = self.search(cr, uid, args, limit=limit, context=context) account_ids = self.search(cr, uid, args, limit=limit, context=context)
return self.name_get(cr, uid, account, context=context) return self.name_get(cr, uid, account_ids, context=context)
def create(self, cr, uid, vals, context=None): def create(self, cr, uid, vals, context=None):
contract = super(account_analytic_account, self).create(cr, uid, vals, context=context) contract = super(account_analytic_account, self).create(cr, uid, vals, context=context)

View File

@ -21,7 +21,7 @@
<group name="main"> <group name="main">
<group> <group>
<field name="partner_id" on_change="on_change_partner_id(partner_id, name)" attrs="{'required':[('type','=','contract')]}"/> <field name="partner_id" on_change="on_change_partner_id(partner_id, name)"/>
<field name="manager_id"/> <field name="manager_id"/>
<field name="code"/> <field name="code"/>
<field name="currency_id" attrs="{'invisible': ['|',('type', '&lt;&gt;', 'view'), ('company_id', '&lt;&gt;', False)]}"/> <field name="currency_id" attrs="{'invisible': ['|',('type', '&lt;&gt;', 'view'), ('company_id', '&lt;&gt;', False)]}"/>
@ -39,8 +39,10 @@
<p colspan="2" class="oe_grey oe_edit_only"> <p colspan="2" class="oe_grey oe_edit_only">
Once the end date of the contract is Once the end date of the contract is
passed or the maximum number of service passed or the maximum number of service
units is reached, the account manager units (e.g. support contract) is
is warned by email to renew the contract. reached, the account manager is warned
by email to renew the contract with the
customer.
</p> </p>
<field name="date_start"/> <field name="date_start"/>
<label for="date" string="End Date"/> <label for="date" string="End Date"/>

View File

@ -9,9 +9,9 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr='//tr[@name="total"]' position='before'> <xpath expr='//tr[@name="total"]' position='before'>
<tr> <tr>
<td class="oe_grey"> <td class="oe_timesheet_grey">
<label for="charge_expenses"/> <label for="charge_expenses"/>
</td><td class="oe_grey"> </td><td class="oe_timesheet_grey">
<field name="charge_expenses"/> <field name="charge_expenses"/>
</td><td> </td><td>
<field class="oe_form_inline" name="est_expenses" attrs="{'invisible': [('charge_expenses','=',False)]}"/> <field class="oe_form_inline" name="est_expenses" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
@ -21,17 +21,22 @@
<field class="oe_form_inline" name="remaining_expense" attrs="{'invisible': [('charge_expenses','=',False)]}"/> <field class="oe_form_inline" name="remaining_expense" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td><td> </td><td>
<field class="oe_form_inline" name="expense_to_invoice" attrs="{'invisible': [('charge_expenses','=',False)]}"/> <field class="oe_form_inline" name="expense_to_invoice" attrs="{'invisible': [('charge_expenses','=',False)]}"/>
</td><td> </td><td attrs="{'invisible': [('charge_expenses','=',False)]}" class="oe_timesheet_action">
<button <span attrs="{'invisible': [('expense_to_invoice','=',0)]}" class="oe_grey">
name="hr_to_invoice_expense" <button
class="oe_link oe_e" name="hr_to_invoice_expense"
string="/" type="object" class="oe_link"
attrs="{'invisible': [('expense_to_invoice','=',0)]}"/> string="⇒ Invoice" type="object"
</td><td> />
or view
</span>
<span attrs="{'invisible': [('expense_to_invoice','&lt;&gt;',0)]}" class="oe_grey">
Nothing to invoice, create
</span>
<button <button
name="open_hr_expense" name="open_hr_expense"
class="oe_link" class="oe_link"
string="Expenses" type="object" attrs="{'invisible': [('charge_expenses','=',False)]}"/> string="expenses" type="object"/>
</td> </td>
</tr> </tr>
</xpath> </xpath>

View File

@ -21,39 +21,51 @@
from osv import fields,osv from osv import fields,osv
from tools.translate import _ from tools.translate import _
import decimal_precision as dp
class analytic_user_funct_grid(osv.osv): class analytic_user_funct_grid(osv.osv):
_name="analytic.user.funct.grid" _name="analytic.user.funct.grid"
_description= "Relation table between users and products on a analytic account" _description= "Price per User"
_columns={ _columns={
'user_id': fields.many2one("res.users", "User", required=True,), 'user_id': fields.many2one("res.users", "User", required=True,),
'product_id': fields.many2one("product.product", "Product", required=True,), 'product_id': fields.many2one("product.product", "Service", required=True,),
'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,), 'account_id': fields.many2one("account.analytic.account", "Analytic Account", required=True,),
} 'uom_id': fields.related("product_id", "uom_id", relation="product.uom", string="Unit of Measure", type="many2one", readonly=True),
'price': fields.float('Price', digits_compute=dp.get_precision('Product Price'), help="Price per hour for this user.", required=True),
}
def onchange_user_product_id(self, cr, uid, ids, user_id, product_id, context=None):
if not user_id:
return {}
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', user_id)], context=context)
if not emp_id:
return {}
analytic_user_funct_grid() value = {}
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
if emp.product_id and not product_id:
value['product_id'] = emp.product_id.id
prod = emp.product_id
if product_id:
prod = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
if prod:
value['price'] = prod.list_price
value['uom_id'] = prod.uom_id.id
return {'value': value}
class account_analytic_account(osv.osv): class account_analytic_account(osv.osv):
_inherit = "account.analytic.account" _inherit = "account.analytic.account"
_columns = { _columns = {
'user_product_ids': fields.one2many('analytic.user.funct.grid', 'account_id', 'Users/Products Rel.'), 'user_product_ids': fields.one2many('analytic.user.funct.grid', 'account_id', 'Users/Products Rel.'),
} }
account_analytic_account()
class hr_analytic_timesheet(osv.osv): class hr_analytic_timesheet(osv.osv):
_inherit = "hr.analytic.timesheet" _inherit = "hr.analytic.timesheet"
# Look in account, if no value for the user => look in parent until there is no more parent to look # Look in account, if no value for the user => look in parent until there is no more parent to look
# Take the first found... if nothing found => return False # Take the first found... if nothing found => return False
def _get_related_user_account_recursiv(self, cr, uid, user_id, account_id): def _get_related_user_account_recursiv(self, cr, uid, user_id, account_id):
temp=self.pool.get('analytic.user.funct.grid').search(cr, uid, [('user_id', '=', user_id),('account_id', '=', account_id) ]) temp=self.pool.get('analytic.user.funct.grid').search(cr, uid, [('user_id', '=', user_id),('account_id', '=', account_id) ])
account=self.pool.get('account.analytic.account').browse(cr, uid, account_id) account=self.pool.get('account.analytic.account').browse(cr, uid, account_id)
if temp: if temp:
@ -64,7 +76,6 @@ class hr_analytic_timesheet(osv.osv):
else: else:
return False return False
def on_change_account_id(self, cr, uid, ids, account_id, user_id=False, unit_amount=0): def on_change_account_id(self, cr, uid, ids, account_id, user_id=False, unit_amount=0):
res = {} res = {}
if not (account_id): if not (account_id):
@ -106,12 +117,6 @@ class hr_analytic_timesheet(osv.osv):
return res return res
def on_change_user_id(self, cr, uid, ids, user_id, account_id, unit_amount=0): def on_change_user_id(self, cr, uid, ids, user_id, account_id, unit_amount=0):
res = {}
if not (user_id):
#avoid a useless call to super
return res
#get the old values from super
res = super(hr_analytic_timesheet, self).on_change_user_id(cr, uid, ids, user_id) res = super(hr_analytic_timesheet, self).on_change_user_id(cr, uid, ids, user_id)
if account_id: if account_id:
@ -141,7 +146,11 @@ class hr_analytic_timesheet(osv.osv):
res ['value']['general_account_id']= a res ['value']['general_account_id']= a
return res return res
hr_analytic_timesheet() class account_analytic_line(osv.osv):
_inherit = "account.analytic.line"
def _get_invoice_price(self, cr, uid, account, product_id, user_id, qty, context = {}):
for grid in account.user_product_ids:
if grid.user_id.id==user_id:
return grid.price
return super(account_analytic_line, self)._get_invoice_price(cr, uid, account, product_id, user_id, qty, context)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -7,9 +7,11 @@
<field name="name">analytic_user_funct_grid.tree</field> <field name="name">analytic_user_funct_grid.tree</field>
<field name="model">analytic.user.funct.grid</field> <field name="model">analytic.user.funct.grid</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="User's Product for this Analytic Account" editable="bottom"> <tree string="Invoicing Data" editable="bottom">
<field name="user_id" required="1"/> <field name="user_id" on_change="onchange_user_product_id(user_id, product_id)"/>
<field name="product_id" required="1" /> <field name="product_id" on_change="onchange_user_product_id(user_id, product_id)" domain="[('type','=','service')]"/>
<field name="price"/>
<field name="uom_id"/>
</tree> </tree>
</field> </field>
</record> </record>
@ -18,9 +20,13 @@
<field name="name">analytic_user_funct_grid.form</field> <field name="name">analytic_user_funct_grid.form</field>
<field name="model">analytic.user.funct.grid</field> <field name="model">analytic.user.funct.grid</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="User's Product for this Analytic Account"> <form string="Invoicing Data">
<field name="user_id" required="1"/> <group>
<field name="product_id" required="1"/> <field name="user_id" on_change="onchange_user_product_id(user_id, product_id)"/>
<field name="product_id" domain="[('type','=','service')]" on_change="onchange_user_product_id(user_id, product_id)"/>
<field name="price"/>
<field name="uom_id"/>
</group>
</form> </form>
</field> </field>
</record> </record>
@ -29,13 +35,26 @@
<record model="ir.ui.view" id="view_account_analytic_account_form_inherit"> <record model="ir.ui.view" id="view_account_analytic_account_form_inherit">
<field name="name">account.analytic.account.form</field> <field name="name">account.analytic.account.form</field>
<field name="model">account.analytic.account</field> <field name="model">account.analytic.account</field>
<field eval="60" name="priority"/>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/> <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//notebook/page" position="after"> <separator name="description" position="before">
<page string="Users/Products Rel."> <div name="user_function_price" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
<field name="user_product_ids" colspan="4" nolabel="1"/> <separator string="Invoice Price Rate per User"/>
</page> <p class="oe_grey oe_edit_only">
</xpath> Define a specific service (e.g. Senior Consultant)
and price for some users to use these data instead
of the default values when invoicing the customer.
</p>
<p class="oe_grey oe_edit_only">
OpenERP will recursively search on parent accounts
to check if specific conditions are defined for a
specific user. This allows to set invoicing
conditions for a group of contracts.
</p>
<field name="user_product_ids"/>
</div>
</separator>
</field> </field>
</record> </record>

View File

@ -0,0 +1,112 @@
# Polish 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-10-25 17:11+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-26 04:56+0000\n"
"X-Generator: Launchpad (build 16194)\n"
#. #-#-#-#-# auth_openid.pot (OpenERP Server 6.1rc1) #-#-#-#-#
#. module: auth_openid
#. #-#-#-#-# auth_openid.pot.web (PROJECT VERSION) #-#-#-#-#
#. openerp-web
#: view:res.users:0
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:12
msgid "OpenID"
msgstr ""
#. #-#-#-#-# auth_openid.pot (OpenERP Server 6.1rc1) #-#-#-#-#
#. module: auth_openid
#. #-#-#-#-# auth_openid.pot.web (PROJECT VERSION) #-#-#-#-#
#. openerp-web
#: field:res.users,openid_url:0
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:47
msgid "OpenID URL"
msgstr ""
#. module: auth_openid
#: help:res.users,openid_email:0
msgid "Used for disambiguation in case of a shared OpenID URL"
msgstr ""
#. module: auth_openid
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr ""
#. module: auth_openid
#: field:res.users,openid_email:0
msgid "OpenID Email"
msgstr ""
#. module: auth_openid
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr ""
#. module: auth_openid
#: field:res.users,openid_key:0
msgid "OpenID Key"
msgstr ""
#. module: auth_openid
#: model:ir.model,name:auth_openid.model_res_users
msgid "res.users"
msgstr ""
#. openerp-web
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:8
msgid "Password"
msgstr "Hasło"
#. openerp-web
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:9
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:10
msgid "Google"
msgstr "Google"
#. openerp-web
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:10
msgid "Google Apps"
msgstr ""
#. openerp-web
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:11
msgid "Launchpad"
msgstr "Launchpad"
#. openerp-web
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:20
msgid "Google Apps Domain:"
msgstr ""
#. openerp-web
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:24
msgid "Username:"
msgstr ""
#. openerp-web
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:28
msgid "OpenID URL:"
msgstr ""
#. openerp-web
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:35
msgid "Google Apps Domain"
msgstr ""
#. openerp-web
#: /home/odo/repositories/addons/trunk/auth_openid/static/src/xml/auth_openid.xml:41
msgid "Username"
msgstr ""

View File

@ -138,7 +138,7 @@ class res_users(osv.Model):
for user in self.browse(cr, uid, ids, context)) for user in self.browse(cr, uid, ids, context))
_columns = { _columns = {
'state': fields.function(_get_state, string='State', type='selection', 'state': fields.function(_get_state, string='Status', type='selection',
selection=[('new', 'New'), ('active', 'Active'), ('reset', 'Resetting Password')]), selection=[('new', 'New'), ('active', 'Active'), ('reset', 'Resetting Password')]),
} }

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n" "POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-05-10 17:50+0000\n" "PO-Revision-Date: 2012-10-25 16:32+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n" "Last-Translator: ccdos <Unknown>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n" "Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:35+0000\n" "X-Launchpad-Export-Date: 2012-10-26 04:56+0000\n"
"X-Generator: Launchpad (build 16165)\n" "X-Generator: Launchpad (build 16194)\n"
#. module: base_action_rule #. module: base_action_rule
#: help:base.action.rule,act_mail_to_user:0 #: help:base.action.rule,act_mail_to_user:0
@ -315,7 +315,7 @@ msgstr "激活"
#: code:addons/base_action_rule/base_action_rule.py:329 #: code:addons/base_action_rule/base_action_rule.py:329
#, python-format #, python-format
msgid "No Email ID Found for your Company address!" msgid "No Email ID Found for your Company address!"
msgstr "" msgstr "公司地址中没有设置Email !"
#. module: base_action_rule #. module: base_action_rule
#: field:base.action.rule,act_remind_user:0 #: field:base.action.rule,act_remind_user:0

View File

@ -1023,10 +1023,10 @@ rule or repeating pattern of time to exclude from the recurring rule."),
'rrule': fields.function(_get_rulestring, type='char', size=124, \ 'rrule': fields.function(_get_rulestring, type='char', size=124, \
fnct_inv=_rrule_write, store=True, string='Recurrent Rule'), fnct_inv=_rrule_write, store=True, string='Recurrent Rule'),
'rrule_type': fields.selection([ 'rrule_type': fields.selection([
('daily', 'Daily'), ('daily', 'Day(s)'),
('weekly', 'Weekly'), ('weekly', 'Week(s)'),
('monthly', 'Monthly'), ('monthly', 'Month(s)'),
('yearly', 'Yearly') ('yearly', 'Year(s)')
], 'Recurrency', states={'done': [('readonly', True)]}, ], 'Recurrency', states={'done': [('readonly', True)]},
help="Let the event automatically repeat at that interval"), help="Let the event automatically repeat at that interval"),
'alarm_id': fields.many2one('res.alarm', 'Reminder', states={'done': [('readonly', True)]}, 'alarm_id': fields.many2one('res.alarm', 'Reminder', states={'done': [('readonly', True)]},

View File

@ -86,7 +86,7 @@
</h2> </h2>
</div> </div>
<notebook> <notebook>
<page string="Meeting Detail"> <page string="Meeting Details">
<group> <group>
<group> <group>
<field name="date" string="Starting at"/> <field name="date" string="Starting at"/>
@ -170,12 +170,7 @@
</group> </group>
</group> </group>
</page> </page>
<!-- <page string="Invitations" groups="base.group_no_one">
Temporarily removing invitation feature as the implementation
was not clean. Invitation should be trigerred automatically
based on partner_ids.
-->
<page string="Invitations">
<field name="attendee_ids" widget="one2many" mode="tree"> <field name="attendee_ids" widget="one2many" mode="tree">
<tree string="Invitation details" editable="top"> <tree string="Invitation details" editable="top">
<field name="partner_id"/> <field name="partner_id"/>
@ -333,9 +328,6 @@
<field name="view_id" ref="view_crm_meeting_gantt"/> <field name="view_id" ref="view_crm_meeting_gantt"/>
</record> </record>
<menuitem id="menu_crm_meeting" parent="base.menu_sales" sequence="8"
name="Calendar" action="action_crm_meeting"/>
<menuitem name="Calendar" <menuitem name="Calendar"
id="mail_menu_calendar" parent="mail.mail_my_stuff" id="mail_menu_calendar" parent="mail.mail_my_stuff"
sequence="10" action="action_crm_meeting"/> sequence="10" action="action_crm_meeting"/>

View File

@ -156,5 +156,11 @@
border-right: 1px solid #D0D0D0; border-right: 1px solid #D0D0D0;
} }
.oe_import .oe_import_error_report > p {
background: #efc9cb;
}
.oe_import .select2-results {
font-size: 12px;
}

View File

@ -11,7 +11,7 @@
<label for="vat"/> <label for="vat"/>
<div> <div>
<field name="vat" on_change="vat_change(vat)" placeholder="e.g. BE0477472701" class="oe_inline"/> <field name="vat" on_change="vat_change(vat)" placeholder="e.g. BE0477472701" class="oe_inline"/>
<button colspan="2" name="button_check_vat" string="Check VAT" type="object" icon="gtk-execute" class="oe_inline"/> <button colspan="2" name="button_check_vat" string="Check Validity" type="object" icon="gtk-execute" class="oe_inline"/>
<field name="vat_subjected" class="oe_inline"/> <field name="vat_subjected" class="oe_inline"/>
</div> </div>
</field> </field>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n" "POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2010-10-30 10:01+0000\n" "PO-Revision-Date: 2012-10-26 09:05+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n" "Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:20+0000\n" "X-Launchpad-Export-Date: 2012-10-27 04:59+0000\n"
"X-Generator: Launchpad (build 16165)\n" "X-Generator: Launchpad (build 16194)\n"
#. module: board #. module: board
#: view:res.log.report:0 #: view:res.log.report:0
@ -103,7 +103,7 @@ msgstr "Месячная активность на документ"
#. module: board #. module: board
#: view:board.board:0 #: view:board.board:0
msgid "Configuration Overview" msgid "Configuration Overview"
msgstr "" msgstr "Обзор конфигурации"
#. module: board #. module: board
#: model:ir.actions.act_window,name:board.action_view_board_list_form #: model:ir.actions.act_window,name:board.action_view_board_list_form
@ -211,7 +211,7 @@ msgstr "Январь"
#. module: board #. module: board
#: view:board.board:0 #: view:board.board:0
msgid "Users" msgid "Users"
msgstr "" msgstr "Пользователи"
#. module: board #. module: board
#: selection:res.log.report,month:0 #: selection:res.log.report,month:0
@ -262,7 +262,7 @@ msgstr "Модель"
#. module: board #. module: board
#: model:ir.actions.act_window,name:board.board_homepage_action #: model:ir.actions.act_window,name:board.board_homepage_action
msgid "Home Page" msgid "Home Page"
msgstr "" msgstr "Домашняя страница"
#. module: board #. module: board
#: model:ir.actions.act_window,name:board.action_latest_activities_tree #: model:ir.actions.act_window,name:board.action_latest_activities_tree

View File

@ -86,7 +86,6 @@ Dashboard for CRM will include:
'crm_lead_menu.xml', 'crm_lead_menu.xml',
'crm_meeting_menu.xml', 'crm_meeting_menu.xml',
'crm_meeting_shortcut_data.xml',
'crm_phonecall_view.xml', 'crm_phonecall_view.xml',
'crm_phonecall_menu.xml', 'crm_phonecall_menu.xml',

View File

@ -77,7 +77,7 @@ class crm_case_stage(osv.osv):
help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."), help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."),
'state': fields.selection(AVAILABLE_STATES, 'Related Status', required=True, 'state': fields.selection(AVAILABLE_STATES, 'Related Status', required=True,
help="The status of your document will automatically change regarding the selected stage. " \ help="The status of your document will automatically change regarding the selected stage. " \
"For example, if a stage is related to the state 'Close', when your document reaches this stage, it is automatically closed."), "For example, if a stage is related to the status 'Close', when your document reaches this stage, it is automatically closed."),
'case_default': fields.boolean('Common to All Teams', 'case_default': fields.boolean('Common to All Teams',
help="If you check this field, this stage will be proposed by default on each sales team. It will not assign this stage to existing teams."), help="If you check this field, this stage will be proposed by default on each sales team. It will not assign this stage to existing teams."),
'fold': fields.boolean('Hide in Views when Empty', 'fold': fields.boolean('Hide in Views when Empty',

View File

@ -6,13 +6,6 @@
<field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/> <field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/>
</record> </record>
<record id="ir_ui_view_sc_calendar_demo" model="ir.ui.view_sc">
<field name="name">Meetings</field>
<field name="resource">ir.ui.menu</field>
<field name="user_id" ref="base.user_demo"/>
<field name="res_id" ref="base_calendar.menu_crm_meeting"/>
</record>
<record model="crm.case.section" id="crm_case_section_1"> <record model="crm.case.section" id="crm_case_section_1">
<field name="name">Sales Marketing Department</field> <field name="name">Sales Marketing Department</field>
<field name="code">SMD</field> <field name="code">SMD</field>

View File

@ -223,11 +223,11 @@ class crm_lead(base_stage, format_address, osv.osv):
'day_close': fields.function(_compute_day, string='Days to Close', \ 'day_close': fields.function(_compute_day, string='Days to Close', \
multi='day_close', type="float", store=True), multi='day_close', type="float", store=True),
'state': fields.related('stage_id', 'state', type="selection", store=True, 'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=crm.AVAILABLE_STATES, string="State", readonly=True, selection=crm.AVAILABLE_STATES, string="Status", readonly=True,
help='The state is set to \'Draft\', when a case is created.\ help='The Status is set to \'Draft\', when a case is created.\
If the case is in progress the state is set to \'Open\'.\ If the case is in progress the Status is set to \'Open\'.\
When the case is over, the state is set to \'Done\'.\ When the case is over, the Status is set to \'Done\'.\
If the case needs to be reviewed then the state is \ If the case needs to be reviewed then the Status is \
set to \'Pending\'.'), set to \'Pending\'.'),
# Only used for type opportunity # Only used for type opportunity

View File

@ -1,13 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record id="ir_ui_view_sc_calendar0" model="ir.ui.view_sc">
<field name="name">Meetings</field>
<field name="resource">ir.ui.menu</field>
<field name="user_id" ref="base.user_root"/>
<field name="res_id" ref="base_calendar.menu_crm_meeting"/>
</record>
</data>
</openerp>

View File

@ -50,10 +50,10 @@ class crm_phonecall(base_state, osv.osv):
('cancel', 'Cancelled'), ('cancel', 'Cancelled'),
('done', 'Held'),], ('done', 'Held'),],
string='Status', size=16, readonly=True, string='Status', size=16, readonly=True,
help='The state is set to \'Todo\', when a case is created.\ help='The status is set to \'Todo\', when a case is created.\
If the case is in progress the state is set to \'Open\'.\ If the case is in progress the status is set to \'Open\'.\
When the call is over, the state is set to \'Held\'.\ When the call is over, the status is set to \'Held\'.\
If the call needs to be done then the state is set to \'Not Held\'.'), If the call needs to be done then the status is set to \'Not Held\'.'),
'email_from': fields.char('Email', size=128, help="These people will receive email."), 'email_from': fields.char('Email', size=128, help="These people will receive email."),
'date_open': fields.datetime('Opened', readonly=True), 'date_open': fields.datetime('Opened', readonly=True),
# phonecall fields # phonecall fields

View File

@ -125,7 +125,7 @@
</div> </div>
<div class="oe_title"> <div class="oe_title">
<div class="oe_edit_only"> <div class="oe_edit_only">
<label for="name" string="Title"/> <label for="name"/>
</div> </div>
<h1><field name="name" required="1"/></h1> <h1><field name="name" required="1"/></h1>
<div class="oe_edit_only"> <div class="oe_edit_only">

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n" "POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-03-22 16:17+0000\n" "PO-Revision-Date: 2012-10-25 16:22+0000\n"
"Last-Translator: Wei \"oldrev\" Li <oldrev@gmail.com>\n" "Last-Translator: fenshuajiang <openerp@126.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-08-28 06:06+0000\n" "X-Launchpad-Export-Date: 2012-10-26 04:56+0000\n"
"X-Generator: Launchpad (build 15864)\n" "X-Generator: Launchpad (build 16194)\n"
#. module: crm #. module: crm
#: view:crm.lead.report:0 #: view:crm.lead.report:0
@ -172,7 +172,7 @@ msgstr "预计结束月份"
#. module: crm #. module: crm
#: view:crm.lead2opportunity.partner.mass:0 #: view:crm.lead2opportunity.partner.mass:0
msgid "Assigned Opportunities to" msgid "Assigned Opportunities to"
msgstr "" msgstr "分配商机给"
#. module: crm #. module: crm
#: view:crm.lead:0 field:crm.lead,partner_id:0 view:crm.lead.report:0 #: view:crm.lead:0 field:crm.lead,partner_id:0 view:crm.lead.report:0
@ -583,7 +583,7 @@ msgstr "结束日期"
#. module: crm #. module: crm
#: view:crm.opportunity2phonecall:0 view:crm.phonecall2phonecall:0 #: view:crm.opportunity2phonecall:0 view:crm.phonecall2phonecall:0
msgid "Schedule/Log a Call" msgid "Schedule/Log a Call"
msgstr "" msgstr "计划/记录一个电话"
#. module: crm #. module: crm
#: constraint:base.action.rule:0 #: constraint:base.action.rule:0
@ -763,7 +763,7 @@ msgstr "继续"
#. module: crm #. module: crm
#: field:crm.segmentation,som_interval:0 #: field:crm.segmentation,som_interval:0
msgid "Days per Period" msgid "Days per Period"
msgstr "" msgstr "每阶段的天数"
#. module: crm #. module: crm
#: field:crm.meeting,byday:0 #: field:crm.meeting,byday:0
@ -926,7 +926,7 @@ msgstr "开启天数"
#. module: crm #. module: crm
#: view:crm.meeting:0 #: view:crm.meeting:0
msgid "Show Time as" msgid "Show Time as"
msgstr "" msgstr "显示时间为"
#. module: crm #. module: crm
#: view:crm.phonecall2partner:0 #: view:crm.phonecall2partner:0
@ -1299,7 +1299,7 @@ msgstr "写日期"
#. module: crm #. module: crm
#: view:crm.meeting:0 #: view:crm.meeting:0
msgid "End of Recurrency" msgid "End of Recurrency"
msgstr "" msgstr "结束循环"
#. module: crm #. module: crm
#: view:crm.meeting:0 #: view:crm.meeting:0
@ -1835,7 +1835,7 @@ msgstr "回复到"
#. module: crm #. module: crm
#: view:crm.case.section:0 #: view:crm.case.section:0
msgid "Select Stages for this Sales Team" msgid "Select Stages for this Sales Team"
msgstr "" msgstr "为这个销售团队选择阶段"
#. module: crm #. module: crm
#: view:board.board:0 #: view:board.board:0
@ -2683,7 +2683,7 @@ msgstr "这联系的邮件地址"
#. module: crm #. module: crm
#: field:crm.lead,referred:0 #: field:crm.lead,referred:0
msgid "Referred by" msgid "Referred by"
msgstr "" msgstr "推荐人"
#. module: crm #. module: crm
#: view:crm.lead:0 model:ir.model,name:crm.model_crm_add_note #: view:crm.lead:0 model:ir.model,name:crm.model_crm_add_note

View File

@ -50,7 +50,7 @@ class crm_claim_stage(osv.osv):
'sequence': fields.integer('Sequence', help="Used to order stages. Lower is better."), 'sequence': fields.integer('Sequence', help="Used to order stages. Lower is better."),
'section_ids':fields.many2many('crm.case.section', 'section_claim_stage_rel', 'stage_id', 'section_id', string='Sections', 'section_ids':fields.many2many('crm.case.section', 'section_claim_stage_rel', 'stage_id', 'section_id', string='Sections',
help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."), help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', required=True, help="The related state for the stage. The state of your document will automatically change regarding the selected stage. For example, if a stage is related to the state 'Close', when your document reaches this stage, it will be automatically have the 'closed' state."), 'state': fields.selection(crm.AVAILABLE_STATES, 'Status', required=True, help="The related status for the stage. The status of your document will automatically change regarding the selected stage. For example, if a stage is related to the status 'Close', when your document reaches this stage, it will be automatically have the 'closed' status."),
'case_refused': fields.boolean('Refused stage', 'case_refused': fields.boolean('Refused stage',
help='Refused stages are specific stages for done.'), help='Refused stages are specific stages for done.'),
'case_default': fields.boolean('Common to All Teams', 'case_default': fields.boolean('Common to All Teams',
@ -108,11 +108,11 @@ class crm_claim(base_stage, osv.osv):
domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"), domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),
'cause': fields.text('Root Cause'), 'cause': fields.text('Root Cause'),
'state': fields.related('stage_id', 'state', type="selection", store=True, 'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=crm.AVAILABLE_STATES, string="State", readonly=True, selection=crm.AVAILABLE_STATES, string="Status", readonly=True,
help='The state is set to \'Draft\', when a case is created.\ help='The status is set to \'Draft\', when a case is created.\
If the case is in progress the state is set to \'Open\'.\ If the case is in progress the status is set to \'Open\'.\
When the case is over, the state is set to \'Done\'.\ When the case is over, the status is set to \'Done\'.\
If the case needs to be reviewed then the state is \ If the case needs to be reviewed then the status is \
set to \'Pending\'.'), set to \'Pending\'.'),
} }

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n" "POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2011-03-16 00:04+0000\n" "PO-Revision-Date: 2012-10-24 05:01+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n" "Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:33+0000\n" "X-Launchpad-Export-Date: 2012-10-25 05:35+0000\n"
"X-Generator: Launchpad (build 16165)\n" "X-Generator: Launchpad (build 16179)\n"
#. module: crm_claim #. module: crm_claim
#: field:crm.claim.report,nbr:0 #: field:crm.claim.report,nbr:0
@ -85,12 +85,12 @@ msgstr ""
#: code:addons/crm_claim/crm_claim.py:132 #: code:addons/crm_claim/crm_claim.py:132
#, python-format #, python-format
msgid "The claim '%s' has been opened." msgid "The claim '%s' has been opened."
msgstr "" msgstr "Претензия '%s' была открыта"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
msgid "Date Closed" msgid "Date Closed"
msgstr "" msgstr "Дата закрытия"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
@ -151,12 +151,12 @@ msgstr "Ссылка"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "Date of claim" msgid "Date of claim"
msgstr "" msgstr "Дата претензии"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
msgid "All pending Claims" msgid "All pending Claims"
msgstr "" msgstr "Все ожидающие претензии"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
@ -187,7 +187,7 @@ msgstr "Контрагент"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "Month of claim" msgid "Month of claim"
msgstr "" msgstr "Месяц претензии"
#. module: crm_claim #. module: crm_claim
#: selection:crm.claim,type_action:0 #: selection:crm.claim,type_action:0
@ -227,7 +227,7 @@ msgstr "Отправить новое эл. письмо"
#: selection:crm.claim,state:0 #: selection:crm.claim,state:0
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "New" msgid "New"
msgstr "" msgstr "Новый"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
@ -254,7 +254,7 @@ msgstr "Следующее действие"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "My Sales Team(s)" msgid "My Sales Team(s)"
msgstr "" msgstr "Мои отделы продаж"
#. module: crm_claim #. module: crm_claim
#: model:crm.case.stage,name:crm_claim.stage_claim3 #: model:crm.case.stage,name:crm_claim.stage_claim3
@ -321,7 +321,7 @@ msgstr "Контакт"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "Month-1" msgid "Month-1"
msgstr "" msgstr "Месяц-1"
#. module: crm_claim #. module: crm_claim
#: model:ir.actions.act_window,name:crm_claim.action_report_crm_claim #: model:ir.actions.act_window,name:crm_claim.action_report_crm_claim
@ -380,7 +380,7 @@ msgstr "Дата изменения"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "Year of claim" msgid "Year of claim"
msgstr "" msgstr "Год претензи"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
@ -402,7 +402,7 @@ msgstr "Значение претензии"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
msgid "Responsible User" msgid "Responsible User"
msgstr "" msgstr "Ответственный пользователь"
#. module: crm_claim #. module: crm_claim
#: help:crm.claim,email_cc:0 #: help:crm.claim,email_cc:0
@ -474,7 +474,7 @@ msgstr "Июнь"
#. module: crm_claim #. module: crm_claim
#: view:res.partner:0 #: view:res.partner:0
msgid "Partners Claim" msgid "Partners Claim"
msgstr "" msgstr "Претензии партнера"
#. module: crm_claim #. module: crm_claim
#: field:crm.claim,partner_phone:0 #: field:crm.claim,partner_phone:0
@ -489,7 +489,7 @@ msgstr "Пользователь"
#. module: crm_claim #. module: crm_claim
#: field:crm.claim,active:0 #: field:crm.claim,active:0
msgid "Active" msgid "Active"
msgstr "" msgstr "Активен"
#. module: crm_claim #. module: crm_claim
#: selection:crm.claim.report,month:0 #: selection:crm.claim.report,month:0
@ -621,13 +621,13 @@ msgstr "Открыть"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
msgid "New Claims" msgid "New Claims"
msgstr "" msgstr "Новые претензии"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
#: selection:crm.claim,state:0 #: selection:crm.claim,state:0
msgid "In Progress" msgid "In Progress"
msgstr "Выполняется" msgstr "В работе"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
@ -638,17 +638,17 @@ msgstr "Ответственный"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "Claims created in current year" msgid "Claims created in current year"
msgstr "" msgstr "Претензии созданные в текущем году"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
msgid "Unassigned Claims" msgid "Unassigned Claims"
msgstr "" msgstr "Не назначенные претензии"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "Claims created in current month" msgid "Claims created in current month"
msgstr "" msgstr "Претензии созданные в текущем месяце"
#. module: crm_claim #. module: crm_claim
#: field:crm.claim.report,delay_expected:0 #: field:crm.claim.report,delay_expected:0
@ -718,7 +718,7 @@ msgstr "Выполненные действия"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "Claims created in last month" msgid "Claims created in last month"
msgstr "" msgstr "Претензии созданные в прошлом месяце"
#. module: crm_claim #. module: crm_claim
#: model:crm.case.stage,name:crm_claim.stage_claim5 #: model:crm.case.stage,name:crm_claim.stage_claim5
@ -760,7 +760,7 @@ msgstr "Год"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim.report:0 #: view:crm.claim.report:0
msgid "My company" msgid "My company"
msgstr "" msgstr "Моя компания"
#. module: crm_claim #. module: crm_claim
#: selection:crm.claim.report,month:0 #: selection:crm.claim.report,month:0
@ -780,7 +780,7 @@ msgstr "Идентификатор"
#. module: crm_claim #. module: crm_claim
#: constraint:res.partner:0 #: constraint:res.partner:0
msgid "Error ! You cannot create recursive associated members." msgid "Error ! You cannot create recursive associated members."
msgstr "" msgstr "Ошибка! Вы не можете создавать рекурсивные ссылки на участников."
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
@ -810,7 +810,7 @@ msgstr "Дата создания"
#. module: crm_claim #. module: crm_claim
#: view:crm.claim:0 #: view:crm.claim:0
msgid "In Progress Claims" msgid "In Progress Claims"
msgstr "" msgstr "Претензии \"В работе\""
#~ msgid "Probability" #~ msgid "Probability"
#~ msgstr "Вероятность" #~ msgstr "Вероятность"

View File

@ -73,10 +73,10 @@ class crm_helpdesk(base_state, base_stage, osv.osv):
('object_id.model', '=', 'crm.helpdesk')]"), ('object_id.model', '=', 'crm.helpdesk')]"),
'duration': fields.float('Duration', states={'done': [('readonly', True)]}), 'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
'state': fields.selection(crm.AVAILABLE_STATES, 'Status', size=16, readonly=True, 'state': fields.selection(crm.AVAILABLE_STATES, 'Status', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\ help='The status is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\ \nIf the case is in progress the status is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\ \nWhen the case is over, the status is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'), \nIf the case needs to be reviewed then the status is set to \'Pending\'.'),
} }
_defaults = { _defaults = {

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n" "POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2010-12-20 08:54+0000\n" "PO-Revision-Date: 2012-10-24 05:08+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n" "Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n" "Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:34+0000\n" "X-Launchpad-Export-Date: 2012-10-25 05:35+0000\n"
"X-Generator: Launchpad (build 16165)\n" "X-Generator: Launchpad (build 16179)\n"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk.report,delay_close:0 #: field:crm.helpdesk.report,delay_close:0
@ -46,7 +46,7 @@ msgstr "Март"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Helpdesk requests occurred in current year" msgid "Helpdesk requests occurred in current year"
msgstr "" msgstr "Запросы на техподдержку в текущем году"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,company_id:0 #: field:crm.helpdesk,company_id:0
@ -80,7 +80,7 @@ msgstr "Добавить внутреннею заметку"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Date of helpdesk requests" msgid "Date of helpdesk requests"
msgstr "" msgstr "Дата запросов техподдержки"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -95,7 +95,7 @@ msgstr "Сообщения"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "My company" msgid "My company"
msgstr "" msgstr "Моя компания"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,state:0 #: selection:crm.helpdesk,state:0
@ -156,7 +156,7 @@ msgstr "Раздел"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Helpdesk requests occurred in last month" msgid "Helpdesk requests occurred in last month"
msgstr "" msgstr "последний месяц"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -166,14 +166,14 @@ msgstr "Отправить новое эл. письмо"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Helpdesk requests during last 7 days" msgid "Helpdesk requests during last 7 days"
msgstr "" msgstr "Запросы на техподдержку за последние 7 дней"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
#: selection:crm.helpdesk,state:0 #: selection:crm.helpdesk,state:0
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "New" msgid "New"
msgstr "" msgstr "Новый"
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.model,name:crm_helpdesk.model_crm_helpdesk_report #: model:ir.model,name:crm_helpdesk.model_crm_helpdesk_report
@ -207,7 +207,7 @@ msgstr "# Писем"
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "My Sales Team(s)" msgid "My Sales Team(s)"
msgstr "" msgstr "Мои отделы продаж"
#. module: crm_helpdesk #. module: crm_helpdesk
#: field:crm.helpdesk,create_date:0 #: field:crm.helpdesk,create_date:0
@ -252,7 +252,7 @@ msgstr "Категории"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "New Helpdesk Request" msgid "New Helpdesk Request"
msgstr "" msgstr "Новый запрос техподдержки"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -267,13 +267,13 @@ msgstr "Даты"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Month of helpdesk requests" msgid "Month of helpdesk requests"
msgstr "" msgstr "Месяц запросов техподдержки"
#. module: crm_helpdesk #. module: crm_helpdesk
#: code:addons/crm_helpdesk/crm_helpdesk.py:101 #: code:addons/crm_helpdesk/crm_helpdesk.py:101
#, python-format #, python-format
msgid "No Subject" msgid "No Subject"
msgstr "" msgstr "Без темы"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
@ -283,12 +283,12 @@ msgstr "№ техподдержки"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "All pending Helpdesk Request" msgid "All pending Helpdesk Request"
msgstr "" msgstr "Все ожидающие запросы техподдержки"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Year of helpdesk requests" msgid "Year of helpdesk requests"
msgstr "" msgstr "Год запросов техподдержки"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -324,7 +324,7 @@ msgstr "Дата изменения"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Helpdesk requests occurred in current month" msgid "Helpdesk requests occurred in current month"
msgstr "" msgstr "Запросы техподдержки в текущем месяце"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
@ -345,7 +345,7 @@ msgstr "Категория"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Responsible User" msgid "Responsible User"
msgstr "" msgstr "Ответственный пользователь"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -361,7 +361,7 @@ msgstr "Планируемые затраты"
#. module: crm_helpdesk #. module: crm_helpdesk
#: help:crm.helpdesk,channel_id:0 #: help:crm.helpdesk,channel_id:0
msgid "Communication channel." msgid "Communication channel."
msgstr "" msgstr "Канал общения"
#. module: crm_helpdesk #. module: crm_helpdesk
#: help:crm.helpdesk,email_cc:0 #: help:crm.helpdesk,email_cc:0
@ -575,7 +575,7 @@ msgstr "Дерево поддержи"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,state:0 #: selection:crm.helpdesk,state:0
msgid "In Progress" msgid "In Progress"
msgstr "" msgstr "В работе"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
@ -660,7 +660,7 @@ msgstr "Название"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk.report:0 #: view:crm.helpdesk.report:0
msgid "Month-1" msgid "Month-1"
msgstr "" msgstr "Месяц-1"
#. module: crm_helpdesk #. module: crm_helpdesk
#: model:ir.ui.menu,name:crm_helpdesk.menu_help_support_main #: model:ir.ui.menu,name:crm_helpdesk.menu_help_support_main
@ -699,17 +699,17 @@ msgstr ""
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Todays's Helpdesk Requests" msgid "Todays's Helpdesk Requests"
msgstr "" msgstr "Запросы техподдержки за сегодня"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Request Date" msgid "Request Date"
msgstr "" msgstr "Дата запроса"
#. module: crm_helpdesk #. module: crm_helpdesk
#: view:crm.helpdesk:0 #: view:crm.helpdesk:0
msgid "Open Helpdesk Request" msgid "Open Helpdesk Request"
msgstr "" msgstr "Открыть запрос техподдержки"
#. module: crm_helpdesk #. module: crm_helpdesk
#: selection:crm.helpdesk,priority:0 #: selection:crm.helpdesk,priority:0

View File

@ -87,7 +87,7 @@ class res_partner(osv.osv):
help="Gives the probability to assign a lead to this partner. (0 means no assignation.)"), help="Gives the probability to assign a lead to this partner. (0 means no assignation.)"),
'opportunity_assigned_ids': fields.one2many('crm.lead', 'partner_assigned_id',\ 'opportunity_assigned_ids': fields.one2many('crm.lead', 'partner_assigned_id',\
'Assigned Opportunities'), 'Assigned Opportunities'),
'grade_id': fields.many2one('res.partner.grade', 'Partner Grade'), 'grade_id': fields.many2one('res.partner.grade', 'Partner Level'),
'activation' : fields.many2one('res.partner.activation', 'Activation', select=1), 'activation' : fields.many2one('res.partner.activation', 'Activation', select=1),
'date_partnership' : fields.date('Partnership Date'), 'date_partnership' : fields.date('Partnership Date'),
'date_review' : fields.date('Latest Partner Review'), 'date_review' : fields.date('Latest Partner Review'),

View File

@ -0,0 +1,49 @@
# Polish 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-10-25 16:50+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-26 04:56+0000\n"
"X-Generator: Launchpad (build 16194)\n"
#. module: decimal_precision
#: field:decimal.precision,digits:0
msgid "Digits"
msgstr "Cyfry"
#. module: decimal_precision
#: model:ir.actions.act_window,name:decimal_precision.action_decimal_precision_form
#: model:ir.ui.menu,name:decimal_precision.menu_decimal_precision_form
msgid "Decimal Accuracy"
msgstr ""
#. module: decimal_precision
#: field:decimal.precision,name:0
msgid "Usage"
msgstr "Użycie"
#. module: decimal_precision
#: sql_constraint:decimal.precision:0
msgid "Only one value can be defined for each given usage!"
msgstr ""
#. module: decimal_precision
#: view:decimal.precision:0
msgid "Decimal Precision"
msgstr ""
#. module: decimal_precision
#: model:ir.model,name:decimal_precision.model_decimal_precision
msgid "decimal.precision"
msgstr ""

View File

@ -103,7 +103,7 @@ class DocIndex(indexer):
return _to_unicode(data) return _to_unicode(data)
except OSError: except OSError:
_logger.warn("Failed attempt to execute antiword (MS Word reader). Antiword is necessary to index the file %s of MIME type %s. Detailed error available at DEBUG level.", fname, self._getMimeTypes()[0]) _logger.warning("Failed attempt to execute antiword (MS Word reader). Antiword is necessary to index the file %s of MIME type %s. Detailed error available at DEBUG level.", fname, self._getMimeTypes()[0])
_logger.debug("Trace of the failed file indexing attempt.", exc_info=True) _logger.debug("Trace of the failed file indexing attempt.", exc_info=True)
return False return False

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n" "POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-08-13 12:11+0000\n" "PO-Revision-Date: 2012-10-24 05:09+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n" "Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:39+0000\n" "X-Launchpad-Export-Date: 2012-10-25 05:35+0000\n"
"X-Generator: Launchpad (build 16165)\n" "X-Generator: Launchpad (build 16179)\n"
#. module: document_page #. module: document_page
#: field:document.page.type,template:0 #: field:document.page.type,template:0
@ -270,7 +270,7 @@ msgstr "История всех страниц"
#. module: document_page #. module: document_page
#: model:ir.model,name:document_page.model_wiki_wiki #: model:ir.model,name:document_page.model_wiki_wiki
msgid "document.page" msgid "document.page"
msgstr "" msgstr "document.page"
#. module: document_page #. module: document_page
#: help:document.page.type,method:0 #: help:document.page.type,method:0
@ -285,7 +285,7 @@ msgstr "Закрыть"
#. module: document_page #. module: document_page
#: model:ir.model,name:document_page.model_wizard_wiki_history_show_diff #: model:ir.model,name:document_page.model_wizard_wiki_history_show_diff
msgid "wizard.document.page.history.show_diff" msgid "wizard.document.page.history.show_diff"
msgstr "" msgstr "wizard.document.page.history.show_diff"
#. module: document_page #. module: document_page
#: field:document.page.history,wiki_id:0 #: field:document.page.history,wiki_id:0
@ -357,7 +357,7 @@ msgstr "Это существенные изменения ?"
#: model:ir.model,name:document_page.model_wiki_groups #: model:ir.model,name:document_page.model_wiki_groups
#: model:ir.ui.menu,name:document_page.menu_action_wiki_groups view:document.page.type:0 #: model:ir.ui.menu,name:document_page.menu_action_wiki_groups view:document.page.type:0
msgid "Document Types" msgid "Document Types"
msgstr "" msgstr "Типы документов"
#. module: document_page #. module: document_page
#: view:document.page:0 #: view:document.page:0
@ -374,7 +374,7 @@ msgstr "Изменено"
#: field:document.page,type:0 #: field:document.page,type:0
#, python-format #, python-format
msgid "Type" msgid "Type"
msgstr "" msgstr "Тип"
#. module: document_page #. module: document_page
#: view:document.page.type:0 view:document.page.page.open:0 #: view:document.page.type:0 view:document.page.page.open:0

View File

@ -29,7 +29,7 @@ _logger = logging.getLogger(__name__)
try: try:
import controllers import controllers
except ImportError: except ImportError:
_logger.warn( _logger.warning(
"""Could not load openerp-web section of EDI, EDI will not behave correctly """Could not load openerp-web section of EDI, EDI will not behave correctly
To fix, launch openerp-web in embedded mode""") To fix, launch openerp-web in embedded mode""")

View File

@ -201,7 +201,7 @@ class event_event(osv.osv):
('confirm', 'Confirmed'), ('confirm', 'Confirmed'),
('done', 'Done')], ('done', 'Done')],
'Status', readonly=True, required=True, 'Status', readonly=True, required=True,
help='If event is created, the state is \'Draft\'.If event is confirmed for the particular dates the state is set to \'Confirmed\'. If the event is over, the state is set to \'Done\'.If event is cancelled the state is set to \'Cancelled\'.'), help='If event is created, the status is \'Draft\'.If event is confirmed for the particular dates the status is set to \'Confirmed\'. If the event is over, the status is set to \'Done\'.If event is cancelled the status is set to \'Cancelled\'.'),
'email_registration_id' : fields.many2one('email.template','Registration Confirmation Email', help='This field contains the template of the mail that will be automatically sent each time a registration for this event is confirmed.'), 'email_registration_id' : fields.many2one('email.template','Registration Confirmation Email', help='This field contains the template of the mail that will be automatically sent each time a registration for this event is confirmed.'),
'email_confirmation_id' : fields.many2one('email.template','Event Confirmation Email', help="If you set an email template, each participant will receive this email announcing the confirmation of the event."), 'email_confirmation_id' : fields.many2one('email.template','Event Confirmation Email', help="If you set an email template, each participant will receive this email announcing the confirmation of the event."),
'reply_to': fields.char('Reply-To Email', size=64, readonly=False, states={'done': [('readonly', True)]}, help="The email address of the organizer is likely to be put here, with the effect to be in the 'Reply-To' of the mails sent automatically at event or registrations confirmation. You can also put the email address of your mail gateway if you use one."), 'reply_to': fields.char('Reply-To Email', size=64, readonly=False, states={'done': [('readonly', True)]}, help="The email address of the organizer is likely to be put here, with the effect to be in the 'Reply-To' of the mails sent automatically at event or registrations confirmation. You can also put the email address of your mail gateway if you use one."),
@ -330,7 +330,7 @@ class event_registration(osv.osv):
_inherit = ['ir.needaction_mixin','mail.thread'] _inherit = ['ir.needaction_mixin','mail.thread']
_columns = { _columns = {
'id': fields.integer('ID'), 'id': fields.integer('ID'),
'origin': fields.char('Source', size=124,readonly=True,help="Name of the sale order which create the registration"), 'origin': fields.char('Source Document', size=124,readonly=True,help="Name of the sale order which create the registration"),
'nb_register': fields.integer('Number of Participants', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'nb_register': fields.integer('Number of Participants', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'event_id': fields.many2one('event.event', 'Event', required=True, readonly=True, states={'draft': [('readonly', False)]}), 'event_id': fields.many2one('event.event', 'Event', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}), 'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),

View File

@ -15,7 +15,7 @@
id="event_main_menu" id="event_main_menu"
groups="base.group_user" groups="base.group_user"
sequence="80"/> sequence="80"/>
<menuitem name="Events Organisation" id="base.menu_event_main" parent="event_main_menu"/> <menuitem name="Events Organization" id="base.menu_event_main" parent="event_main_menu"/>
<!-- EVENTS --> <!-- EVENTS -->
@ -219,7 +219,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Events" fonts="bold:message_unread==True" colors="red:(register_min and register_min&gt;register_current) or (register_max and register_max&lt;register_current);grey:state=='cancel'"> <tree string="Events" fonts="bold:message_unread==True" colors="red:(register_min and register_min&gt;register_current) or (register_max and register_max&lt;register_current);grey:state=='cancel'">
<field name="name" string="Name"/> <field name="name" string="Name"/>
<field name="type"/> <field name="type" string="Event Category"/>
<field name="date_begin"/> <field name="date_begin"/>
<field name="date_end"/> <field name="date_end"/>
<field name="register_current"/> <field name="register_current"/>
@ -267,17 +267,17 @@
<t t-if="record.country_id.raw_value">@<field name="country_id"/><br/></t> <t t-if="record.country_id.raw_value">@<field name="country_id"/><br/></t>
<t t-if="record.user_id.raw_value">Organized by <field name="user_id"/><br/></t> <t t-if="record.user_id.raw_value">Organized by <field name="user_id"/><br/></t>
<t t-if="record.register_avail.raw_value lte 10 and record.register_avail.raw_value gt 0"><i>Only</i></t> <t t-if="record.register_avail.raw_value lte 10 and record.register_avail.raw_value gt 0"><i>Only</i></t>
<t t-if="record.register_avail.raw_value == 0"><i>No ticket available.</i></t> <t t-if="record.register_avail.raw_value == 9999"><i>No ticket available.</i></t>
<t t-if="record.register_avail.raw_value != 0"> <t t-if="record.register_avail.raw_value != 9999">
<i><b><t t-if="record.register_avail.raw_value != 9999"><field name="register_avail"/></t></b></i> <i><b><t t-if="record.register_avail.raw_value != 9999"><field name="register_avail"/></t></b></i>
<i> <i>
<t t-if="record.register_avail.raw_value > 1">tickets </t> <t t-if="record.register_avail.raw_value > 1">tickets </t>
<t t-if="record.register_avail.raw_value == 1 || !record.register_avail.raw_value > 1">ticket </t> <t t-if="record.register_avail.raw_value lte 1">ticket </t>
available. available.
</i> </i>
</t> </t>
</p> </p>
<t t-if="record.register_avail.raw_value != 0"> <t t-if="record.register_avail.raw_value gt 0 and record.register_avail.raw_value lt 9999">
<t t-if="!record.is_subscribed.raw_value"> <t t-if="!record.is_subscribed.raw_value">
<input t-att-id="record.id.raw_value" type="text" name="subscribe" class="no_of_seats" value="1" onchange="document.getElementById('btn_sub' +this.id).setAttribute('data-context',JSON.stringify({'ticket':this.value}))"/> <input t-att-id="record.id.raw_value" type="text" name="subscribe" class="no_of_seats" value="1" onchange="document.getElementById('btn_sub' +this.id).setAttribute('data-context',JSON.stringify({'ticket':this.value}))"/>
<button t-att-id="'btn_sub'+record.id.raw_value" type="object" name="subscribe_to_event" class="oe_subscribe_button"> <button t-att-id="'btn_sub'+record.id.raw_value" type="object" name="subscribe_to_event" class="oe_subscribe_button">

View File

@ -8,7 +8,7 @@
<form string="Configure Moodle" version="7.0"> <form string="Configure Moodle" version="7.0">
<header> <header>
<button type="object" name="configure_moodle" <button type="object" name="configure_moodle"
string="Configure Moodle" class="oe_highlight" /> string="Apply" class="oe_highlight" />
or or
<button string="Cancel" class="oe_link" special="cancel" /> <button string="Cancel" class="oe_link" special="cancel" />
</header> </header>
@ -16,12 +16,12 @@
<separator string="Server" colspan="4"/> <separator string="Server" colspan="4"/>
<field name="server_moodle"/> <field name="server_moodle"/>
<newline/> <newline/>
<separator string="Connexion with a Token" colspan="4"/> <separator string="Connection with a Token" colspan="4"/>
<label string="The easiest way to connect OpenERP with a moodle server is to create a 'token' in Moodle. It will be used to authenticate OpenERP as a trustable application." colspan="4"/> <label string="The easiest way to connect OpenERP with a moodle server is to create a 'token' in Moodle. It will be used to authenticate OpenERP as a trustable application." colspan="4"/>
<field name="moodle_token"/> <field name="moodle_token"/>
<newline/> <newline/>
<separator string="Connexion with Password and Username" colspan="4"/> <separator string="Connection with username and password" colspan="4"/>
<label string="Another approach is to create a user for OpenERP in Moodle. If you do so, make sure that this user has enough access rights" colspan="4"/> <label string="Another approach is to create a user for OpenERP in Moodle. If you do so, make sure that this user has appropriate access rights." colspan="4"/>
<field name="moodle_username"/> <field name="moodle_username"/>
<field name="moodle_password" password="True"/> <field name="moodle_password" password="True"/>
</group> </group>

View File

@ -112,7 +112,7 @@ class hr_job(osv.osv):
'requirements': fields.text('Requirements'), 'requirements': fields.text('Requirements'),
'department_id': fields.many2one('hr.department', 'Department'), 'department_id': fields.many2one('hr.department', 'Department'),
'company_id': fields.many2one('res.company', 'Company'), 'company_id': fields.many2one('res.company', 'Company'),
'state': fields.selection([('open', 'In Position'), ('recruit', 'In Recruitement')], 'Status', readonly=True, required=True, 'state': fields.selection([('open', 'No Recruitment'), ('recruit', 'Recruitement in Progress')], 'Status', readonly=True, required=True,
help="By default 'In position', set it to 'In Recruitment' if recruitment process is going on for this job position."), help="By default 'In position', set it to 'In Recruitment' if recruitment process is going on for this job position."),
} }
_defaults = { _defaults = {

View File

@ -330,8 +330,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Job" version="7.0"> <form string="Job" version="7.0">
<header> <header>
<button name="job_recruitement" string="In Recruitement" states="open" type="object" class="oe_highlight" groups="base.group_user"/> <button name="job_recruitement" string="Launch Recruitement" states="open" type="object" class="oe_highlight" groups="base.group_user"/>
<button name="job_open" string="Recruitment Done" states="recruit" type="object" class="oe_highlight" groups="base.group_user"/> <button name="job_open" string="Stop Recruitment" states="recruit" type="object" class="oe_highlight" groups="base.group_user"/>
<field name="state" widget="statusbar" statusbar_visible="recruit,open"/> <field name="state" widget="statusbar" statusbar_visible="recruit,open"/>
</header> </header>
<sheet> <sheet>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n" "POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-08-18 17:32+0000\n" "PO-Revision-Date: 2012-10-25 16:29+0000\n"
"Last-Translator: Heling Yao <Unknown>\n" "Last-Translator: fenshuajiang <openerp@126.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:21+0000\n" "X-Launchpad-Export-Date: 2012-10-26 04:56+0000\n"
"X-Generator: Launchpad (build 16165)\n" "X-Generator: Launchpad (build 16194)\n"
#. module: hr #. module: hr
#: model:process.node,name:hr.process_node_openerpuser0 #: model:process.node,name:hr.process_node_openerpuser0
@ -181,7 +181,7 @@ msgstr "女性"
#: help:hr.job,expected_employees:0 #: help:hr.job,expected_employees:0
msgid "" msgid ""
"Expected number of employees for this job position after new recruitment." "Expected number of employees for this job position after new recruitment."
msgstr "" msgstr "新的招聘后这个工作岗位上期望的员工人数"
#. module: hr #. module: hr
#: model:ir.ui.menu,name:hr.menu_open_view_attendance_reason_new_config #: model:ir.ui.menu,name:hr.menu_open_view_attendance_reason_new_config
@ -685,7 +685,7 @@ msgstr "下属"
#. module: hr #. module: hr
#: field:hr.job,no_of_employee:0 #: field:hr.job,no_of_employee:0
msgid "Number of employees currently occupying this job position." msgid "Number of employees currently occupying this job position."
msgstr "" msgstr "这个工作岗位上现有的员工人数"
#. module: hr #. module: hr
#: field:hr.job,no_of_recruitment:0 #: field:hr.job,no_of_recruitment:0

View File

@ -28,7 +28,7 @@ class hr_config_settings(osv.osv_memory):
_columns = { _columns = {
'module_hr_timesheet_sheet': fields.boolean('Allow timesheets validation by managers', 'module_hr_timesheet_sheet': fields.boolean('Allow timesheets validation by managers',
help ="""This installs the module hr_timesheet_sheet."""), help ="""This installs the module hr_timesheet_sheet."""),
'module_hr_attendance': fields.boolean('Track attendances', 'module_hr_attendance': fields.boolean('Install attendances feature',
help ="""This installs the module hr_attendance."""), help ="""This installs the module hr_attendance."""),
'module_hr_timesheet': fields.boolean('Manage timesheets', 'module_hr_timesheet': fields.boolean('Manage timesheets',
help ="""This installs the module hr_timesheet."""), help ="""This installs the module hr_timesheet."""),
@ -42,6 +42,8 @@ class hr_config_settings(osv.osv_memory):
help ="""This installs the module hr_contract."""), help ="""This installs the module hr_contract."""),
'module_hr_evaluation': fields.boolean('Organize employees periodic evaluation', 'module_hr_evaluation': fields.boolean('Organize employees periodic evaluation',
help ="""This installs the module hr_evaluation."""), help ="""This installs the module hr_evaluation."""),
'module_account_analytic_analysis': fields.boolean('Allow invoicing based on timesheets (will install the sale application)',
help ="""This installs the module account_analytic_analysis, which will install sales management too."""),
'module_hr_payroll': fields.boolean('Manage payroll', 'module_hr_payroll': fields.boolean('Manage payroll',
help ="""This installs the module hr_payroll."""), help ="""This installs the module hr_payroll."""),
} }

View File

@ -69,6 +69,10 @@
<field name="module_hr_timesheet_sheet" class="oe_inline"/> <field name="module_hr_timesheet_sheet" class="oe_inline"/>
<label for="module_hr_timesheet_sheet"/> <label for="module_hr_timesheet_sheet"/>
</div> </div>
<div name="account_analytic_analysis">
<field name="module_account_analytic_analysis" class="oe_inline"/>
<label for="module_account_analytic_analysis"/>
</div>
<div name="hr_attendance"> <div name="hr_attendance">
<field name="module_hr_attendance" on_change="onchange_hr_attendance(module_hr_attendance)" class="oe_inline"/> <field name="module_hr_attendance" on_change="onchange_hr_attendance(module_hr_attendance)" class="oe_inline"/>
<label for="module_hr_attendance"/> <label for="module_hr_attendance"/>

View File

@ -25,7 +25,7 @@ class hr_attendance_config_settings(osv.osv_memory):
_inherit = 'hr.config.settings' _inherit = 'hr.config.settings'
_columns = { _columns = {
'group_hr_attendance': fields.boolean('Track attendances', 'group_hr_attendance': fields.boolean('Track attendances for all employees',
implied_group='base.group_hr_attendance', implied_group='base.group_hr_attendance',
help="Allocates attendance group to all users."), help="Allocates attendance group to all users."),
} }

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n" "POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-05-10 17:47+0000\n" "PO-Revision-Date: 2012-10-25 17:16+0000\n"
"Last-Translator: Jeff Wang <wjfonhand@hotmail.com>\n" "Last-Translator: ccdos <Unknown>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n" "Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:27+0000\n" "X-Launchpad-Export-Date: 2012-10-26 04:56+0000\n"
"X-Generator: Launchpad (build 16165)\n" "X-Generator: Launchpad (build 16194)\n"
#. module: hr_evaluation #. module: hr_evaluation
#: help:hr_evaluation.plan.phase,send_anonymous_manager:0 #: help:hr_evaluation.plan.phase,send_anonymous_manager:0
@ -304,7 +304,7 @@ msgstr "上个月完成的评估"
#. module: hr_evaluation #. module: hr_evaluation
#: model:ir.model,name:hr_evaluation.model_mail_compose_message #: model:ir.model,name:hr_evaluation.model_mail_compose_message
msgid "Email composition wizard" msgid "Email composition wizard"
msgstr "" msgstr "电子邮件撰写向导"
#. module: hr_evaluation #. module: hr_evaluation
#: view:hr.evaluation.report:0 #: view:hr.evaluation.report:0

View File

@ -64,15 +64,15 @@ class hr_expense_expense(osv.osv):
_description = "Expense" _description = "Expense"
_order = "id desc" _order = "id desc"
_columns = { _columns = {
'name': fields.char('Description', size=128, required=True), 'name': fields.char('Description', size=128),
'id': fields.integer('Sheet ID', readonly=True), 'id': fields.integer('Sheet ID', readonly=True),
'date': fields.date('Date', select=True), 'date': fields.date('Date', select=True),
'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is done."), 'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is done."),
'employee_id': fields.many2one('hr.employee', "Employee", required=True), 'employee_id': fields.many2one('hr.employee', "Employee", required=True),
'user_id': fields.many2one('res.users', 'User', required=True), 'user_id': fields.many2one('res.users', 'User', required=True),
'date_confirm': fields.date('Confirmation Date', select=True, help = "Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."), 'date_confirm': fields.date('Confirmation Date', select=True, help="Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."),
'date_valid': fields.date('Validation Date', select=True, help = "Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."), 'date_valid': fields.date('Validation Date', select=True, help="Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."),
'user_valid': fields.many2one('res.users', 'Validation User'), 'user_valid': fields.many2one('res.users', 'Validation By'),
'account_move_id': fields.many2one('account.move', 'Ledger Posting'), 'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ), 'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
'note': fields.text('Note'), 'note': fields.text('Note'),
@ -189,7 +189,7 @@ class hr_expense_expense(osv.osv):
raise osv.except_osv(_('Error!'), _('The employee must have a home address.')) raise osv.except_osv(_('Error!'), _('The employee must have a home address.'))
acc = exp.employee_id.address_home_id.property_account_payable.id acc = exp.employee_id.address_home_id.property_account_payable.id
voucher = { voucher = {
'name': exp.name, 'name': exp.name or '/',
'reference': sequence_obj.get(cr, uid, 'hr.expense.invoice'), 'reference': sequence_obj.get(cr, uid, 'hr.expense.invoice'),
'account_id': acc, 'account_id': acc,
'type': 'purchase', 'type': 'purchase',
@ -233,7 +233,7 @@ hr_expense_expense()
class product_product(osv.osv): class product_product(osv.osv):
_inherit = "product.product" _inherit = "product.product"
_columns = { _columns = {
'hr_expense_ok': fields.boolean('Can Constitute an Expense', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."), 'hr_expense_ok': fields.boolean('Can be Expensed', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
} }
def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok): def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok):

View File

@ -79,7 +79,7 @@
</group> </group>
<group> <group>
<field name="name"/> <field name="name"/>
<field name="user_valid"/> <field name="user_valid" attrs="{'invisible': [('state','=','draft')]}"/>
<field name="currency_id" groups="base.group_multi_currency" on_change="onchange_currency_id(currency_id, company_id)"/> <field name="currency_id" groups="base.group_multi_currency" on_change="onchange_currency_id(currency_id, company_id)"/>
</group> </group>
</group> </group>
@ -128,9 +128,9 @@
</group> </group>
</group> </group>
</page> </page>
<page string="Other Info"> <page string="Accounting" groups="account.group_account_user">
<group> <group>
<group string="Accounting Data" groups="account.group_account_user"> <group string="Accounting Data">
<field name="journal_id" widget="selection" domain="[('type', '=', 'purchase')]"/> <field name="journal_id" widget="selection" domain="[('type', '=', 'purchase')]"/>
<field name="voucher_id" context="{'form_view_ref': 'account_voucher.view_purchase_receipt_form'}"/> <field name="voucher_id" context="{'form_view_ref': 'account_voucher.view_purchase_receipt_form'}"/>
</group> </group>

View File

@ -115,10 +115,10 @@ class hr_holidays(osv.osv):
_columns = { _columns = {
'name': fields.char('Description', size=64), 'name': fields.char('Description', size=64),
'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')], 'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')],
'State', readonly=True, help='The state is set to \'To Submit\', when a holiday request is created.\ 'Status', readonly=True, help='The status is set to \'To Submit\', when a holiday request is created.\
\nThe state is \'To Approve\', when holiday request is confirmed by user.\ \nThe status is \'To Approve\', when holiday request is confirmed by user.\
\nThe state is \'Refused\', when holiday request is refused by manager.\ \nThe status is \'Refused\', when holiday request is refused by manager.\
\nThe state is \'Approved\', when holiday request is approved by manager.'), \nThe status is \'Approved\', when holiday request is approved by manager.'),
'user_id':fields.related('employee_id', 'user_id', type='many2one', relation='res.users', string='User', store=True), 'user_id':fields.related('employee_id', 'user_id', type='many2one', relation='res.users', string='User', store=True),
'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, select=True), 'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, select=True),
'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}), 'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),

View File

@ -272,10 +272,10 @@ class hr_payslip(osv.osv):
('done', 'Done'), ('done', 'Done'),
('cancel', 'Rejected'), ('cancel', 'Rejected'),
], 'Status', select=True, readonly=True, ], 'Status', select=True, readonly=True,
help='* When the payslip is created the state is \'Draft\'.\ help='* When the payslip is created the status is \'Draft\'.\
\n* If the payslip is under verification, the state is \'Waiting\'. \ \n* If the payslip is under verification, the status is \'Waiting\'. \
\n* If the payslip is confirmed then state is set to \'Done\'.\ \n* If the payslip is confirmed then status is set to \'Done\'.\
\n* When user cancel payslip the state is \'Rejected\'.'), \n* When user cancel payslip the status is \'Rejected\'.'),
# 'line_ids': fields.one2many('hr.payslip.line', 'slip_id', 'Payslip Line', required=False, readonly=True, states={'draft': [('readonly', False)]}), # 'line_ids': fields.one2many('hr.payslip.line', 'slip_id', 'Payslip Line', required=False, readonly=True, states={'draft': [('readonly', False)]}),
'line_ids': one2many_mod2('hr.payslip.line', 'slip_id', 'Payslip Lines', readonly=True, states={'draft':[('readonly',False)]}), 'line_ids': one2many_mod2('hr.payslip.line', 'slip_id', 'Payslip Lines', readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=False, readonly=True, states={'draft': [('readonly', False)]}), 'company_id': fields.many2one('res.company', 'Company', required=False, readonly=True, states={'draft': [('readonly', False)]}),

View File

@ -62,7 +62,7 @@ class hr_recruitment_stage(osv.osv):
'name': fields.char('Name', size=64, required=True, translate=True), 'name': fields.char('Name', size=64, required=True, translate=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of stages."), 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of stages."),
'department_id':fields.many2one('hr.department', 'Specific to a Department', help="Stages of the recruitment process may be different per department. If this stage is common to all departments, keep this field empty."), 'department_id':fields.many2one('hr.department', 'Specific to a Department', help="Stages of the recruitment process may be different per department. If this stage is common to all departments, keep this field empty."),
'state': fields.selection(AVAILABLE_STATES, 'State', required=True, help="The related state for the stage. The state of your document will automatically change according to the selected stage. Example, a stage is related to the state 'Close', when your document reach this stage, it will be automatically closed."), 'state': fields.selection(AVAILABLE_STATES, 'Status', required=True, help="The related status for the stage. The status of your document will automatically change according to the selected stage. Example, a stage is related to the status 'Close', when your document reach this stage, it will be automatically closed."),
'fold': fields.boolean('Hide in views if empty', help="This stage is not visible, for example in status bar or kanban view, when there are no records in that stage to display."), 'fold': fields.boolean('Hide in views if empty', help="This stage is not visible, for example in status bar or kanban view, when there are no records in that stage to display."),
'requirements': fields.text('Requirements'), 'requirements': fields.text('Requirements'),
} }
@ -189,11 +189,11 @@ class hr_applicant(base_stage, osv.Model):
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage', 'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage',
domain="['&', ('fold', '=', False), '|', ('department_id', '=', department_id), ('department_id', '=', False)]"), domain="['&', ('fold', '=', False), '|', ('department_id', '=', department_id), ('department_id', '=', False)]"),
'state': fields.related('stage_id', 'state', type="selection", store=True, 'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=AVAILABLE_STATES, string="State", readonly=True, selection=AVAILABLE_STATES, string="Status", readonly=True,
help='The state is set to \'Draft\', when a case is created.\ help='The status is set to \'Draft\', when a case is created.\
If the case is in progress the state is set to \'Open\'.\ If the case is in progress the status is set to \'Open\'.\
When the case is over, the state is set to \'Done\'.\ When the case is over, the status is set to \'Done\'.\
If the case needs to be reviewed then the state is \ If the case needs to be reviewed then the status is \
set to \'Pending\'.'), set to \'Pending\'.'),
'categ_ids': fields.many2many('hr.applicant_category', string='Tags'), 'categ_ids': fields.many2many('hr.applicant_category', string='Tags'),
'company_id': fields.many2one('res.company', 'Company'), 'company_id': fields.many2one('res.company', 'Company'),

View File

@ -107,7 +107,7 @@
<form string="Jobs - Recruitment Form" version="7.0"> <form string="Jobs - Recruitment Form" version="7.0">
<header> <header>
<button name="case_close_with_emp" string="Hire" type="object" <button name="case_close_with_emp" string="Hire" type="object"
states="draft,open,pending" class="oe_highlight"/> states="draft,open,pending,done" class="oe_highlight"/>
<button name="case_cancel" string="Refuse" type="object" <button name="case_cancel" string="Refuse" type="object"
states="draft,open,pending" class="oe_highlight"/> states="draft,open,pending" class="oe_highlight"/>
<field name="stage_id" widget="statusbar" clickable="True"/> <field name="stage_id" widget="statusbar" clickable="True"/>

View File

@ -41,7 +41,7 @@ class hr_recruitment_report(osv.osv):
_columns = { _columns = {
'user_id': fields.many2one('res.users', 'User', readonly=True), 'user_id': fields.many2one('res.users', 'User', readonly=True),
'nbr': fields.integer('# of Applications', readonly=True), 'nbr': fields.integer('# of Applications', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True), 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
'month':fields.selection([('01', 'January'), ('02', 'February'), \ 'month':fields.selection([('01', 'January'), ('02', 'February'), \
('03', 'March'), ('04', 'April'),\ ('03', 'March'), ('04', 'April'),\
('05', 'May'), ('06', 'June'), \ ('05', 'May'), ('06', 'June'), \

View File

@ -154,7 +154,7 @@ class hr_analytic_timesheet(osv.osv):
'date': lambda self, cr, uid, ctx: ctx.get('date', fields.date.context_today(self,cr,uid,context=ctx)), 'date': lambda self, cr, uid, ctx: ctx.get('date', fields.date.context_today(self,cr,uid,context=ctx)),
'user_id': lambda obj, cr, uid, ctx: ctx.get('user_id', uid), 'user_id': lambda obj, cr, uid, ctx: ctx.get('user_id', uid),
} }
def on_change_account_id(self, cr, uid, ids, account_id): def on_change_account_id(self, cr, uid, ids, account_id, context=None):
return {'value':{}} return {'value':{}}
def on_change_date(self, cr, uid, ids, date): def on_change_date(self, cr, uid, ids, date):
@ -190,17 +190,14 @@ class hr_analytic_timesheet(osv.osv):
'journal_id': self._getAnalyticJournal(cr, uid, context), 'journal_id': self._getAnalyticJournal(cr, uid, context),
}} }}
hr_analytic_timesheet()
class account_analytic_account(osv.osv): class account_analytic_account(osv.osv):
_inherit = 'account.analytic.account' _inherit = 'account.analytic.account'
_description = 'Analytic Account' _description = 'Analytic Account'
_columns = { _columns = {
'use_timesheets': fields.boolean('Timesheets', help="Check this field if this project manages timesheets"), 'use_timesheets': fields.boolean('Use Timesheets', help="Check this field if this project manages timesheets"),
} }
def on_change_template(self, cr, uid, ids, template_id, context=None): def on_change_template(self, cr, uid, ids, template_id, context=None):
res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, context=context) res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, context=context)
if template_id and 'value' in res: if template_id and 'value' in res:
@ -208,6 +205,4 @@ class account_analytic_account(osv.osv):
res['value']['use_timesheets'] = template.use_timesheets res['value']['use_timesheets'] = template.use_timesheets
return res return res
account_analytic_account()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -6,12 +6,12 @@
<field name="name">hr.analytic.timesheet.tree</field> <field name="name">hr.analytic.timesheet.tree</field>
<field name="model">hr.analytic.timesheet</field> <field name="model">hr.analytic.timesheet</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree editable="bottom" string="Timesheet Lines"> <tree editable="bottom" string="Timesheet Activities">
<field name="date" on_change="on_change_date(date)"/> <field name="date" on_change="on_change_date(date)"/>
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/> <field name="user_id" on_change="on_change_user_id(user_id)" required="1" options='{"no_open": True}'/>
<field name="journal_id" invisible="1"/> <field name="journal_id" invisible="1"/>
<field name="name"/> <field name="name"/>
<field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1}"/> <field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1, 'default_type': 'contract'}"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/> <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
<field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/> <field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/> <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
@ -24,7 +24,7 @@
<field name="name">hr.analytic.timesheet.form</field> <field name="name">hr.analytic.timesheet.form</field>
<field name="model">hr.analytic.timesheet</field> <field name="model">hr.analytic.timesheet</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Timesheet Lines" version="7.0"> <form string="Timesheet Activities" version="7.0">
<sheet> <sheet>
<group> <group>
<group> <group>
@ -85,6 +85,23 @@
<field name="src_model">account.analytic.account</field> <field name="src_model">account.analytic.account</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="help" type="html">
<p>
No activity yet on this contract.
</p><p>
In OpenERP, contracts and projects are implemented using
analytic account. So, you can track costs and revenues to analyse
your margins easily.
</p><p>
Costs will be created automatically when you register supplier
invoices, expenses or timesheets.
</p><p>
Revenues will be created automatically when you create customer
invoices. Customer invoices can be created based on sale orders
(fixed price invoices), on timesheets (based on the work done) or
on expenses (e.g. reinvoicing of travel costs).
</p>
</field>
</record> </record>
@ -107,7 +124,7 @@
</record> </record>
<record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window"> <record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
<field name="name">Timesheet Lines</field> <field name="name">Timesheet Activities</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">hr.analytic.timesheet</field> <field name="res_model">hr.analytic.timesheet</field>
<field name="view_type">form</field> <field name="view_type">form</field>
@ -116,12 +133,12 @@
<field name="search_view_id" ref="hr_timesheet_line_search"/> <field name="search_view_id" ref="hr_timesheet_line_search"/>
<field name="help" type="html"> <field name="help" type="html">
<p class="oe_view_nocontent_create"> <p class="oe_view_nocontent_create">
Click to record your timesheets. Click to record activities.
</p><p> </p><p>
You can register and track your workings hours by project every You can register and track your workings hours by project every
day. Every time spent on a project will become a cost in the day. Every time spent on a project will become a cost in the
analytic accounting and can be re-invoiced to customers if analytic accounting/contract and can be re-invoiced to
required. customers if required.
</p> </p>
</field> </field>
</record> </record>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n" "POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-05-10 18:19+0000\n" "PO-Revision-Date: 2012-10-25 17:20+0000\n"
"Last-Translator: Jeff Wang <wjfonhand@hotmail.com>\n" "Last-Translator: ccdos <Unknown>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:15+0000\n" "X-Launchpad-Export-Date: 2012-10-26 04:56+0000\n"
"X-Generator: Launchpad (build 16165)\n" "X-Generator: Launchpad (build 16194)\n"
#. module: hr_timesheet #. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:43 #: code:addons/hr_timesheet/report/user_timesheet.py:43
@ -468,7 +468,7 @@ msgstr "一般信息"
#. module: hr_timesheet #. module: hr_timesheet
#: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_my #: model:ir.actions.act_window,name:hr_timesheet.action_hr_timesheet_my
msgid "My Current Timesheet" msgid "My Current Timesheet"
msgstr "" msgstr "我当前的时间表"
#. module: hr_timesheet #. module: hr_timesheet
#: code:addons/hr_timesheet/report/user_timesheet.py:40 #: code:addons/hr_timesheet/report/user_timesheet.py:40

View File

@ -33,7 +33,7 @@ class hr_so_project(osv.osv_memory):
'date': fields.datetime('Closing Date'), 'date': fields.datetime('Closing Date'),
'analytic_amount': fields.float('Minimum Analytic Amount'), 'analytic_amount': fields.float('Minimum Analytic Amount'),
'name': fields.char('Employees name', size=32, required=True, readonly=True), 'name': fields.char('Employees name', size=32, required=True, readonly=True),
'state': fields.related('emp_id', 'state', string='Current state', type='char', required=True, readonly=True), 'state': fields.related('emp_id', 'state', string='Current Status', type='char', required=True, readonly=True),
'server_date': fields.datetime('Current Date', required=True, readonly=True), 'server_date': fields.datetime('Current Date', required=True, readonly=True),
'emp_id': fields.many2one('hr.employee', 'Employee ID') 'emp_id': fields.many2one('hr.employee', 'Employee ID')
} }
@ -111,7 +111,7 @@ class hr_si_project(osv.osv_memory):
_description = 'Sign In By Project' _description = 'Sign In By Project'
_columns = { _columns = {
'name': fields.char('Employees name', size=32, readonly=True), 'name': fields.char('Employees name', size=32, readonly=True),
'state': fields.related('emp_id', 'state', string='Current state', type='char', required=True, readonly=True), 'state': fields.related('emp_id', 'state', string='Current Status', type='char', required=True, readonly=True),
'date': fields.datetime('Starting Date'), 'date': fields.datetime('Starting Date'),
'server_date': fields.datetime('Current Date', readonly=True), 'server_date': fields.datetime('Current Date', readonly=True),
'emp_id': fields.many2one('hr.employee', 'Employee ID') 'emp_id': fields.many2one('hr.employee', 'Employee ID')

View File

@ -70,8 +70,7 @@ class account_analytic_account(osv.osv):
'amount_invoiced': fields.function(_invoiced_calc, string='Invoiced Amount', 'amount_invoiced': fields.function(_invoiced_calc, string='Invoiced Amount',
help="Total invoiced"), help="Total invoiced"),
'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Timesheet Invoicing Ratio', 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Timesheet Invoicing Ratio',
help="This field allows you to define the rate in case you plan to reinvoice " \ help="You usually invoice 100% of the timesheets. But if you mix fixed price and timesheet invoicing, you may use another ratio. For instance, if you do a 20% advance invoice (fixed price, based on a sale order), you should invoice the rest on timesheet with a 80% ratio."),
"the costs in this analytic account: timesheets, expenses, ..."),
} }
_defaults = { _defaults = {
'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False), 'pricelist_id': lambda self, cr, uid, ctx: ctx.get('pricelist_id', False),

View File

@ -16,5 +16,10 @@
<field name="customer_name">50%</field> <field name="customer_name">50%</field>
<field name="factor">50.0</field> <field name="factor">50.0</field>
</record> </record>
<record id="timesheet_invoice_factor4" model="hr_timesheet_invoice.factor">
<field name="name">80%</field>
<field name="customer_name">80%</field>
<field name="factor">20.0</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -9,8 +9,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr='//separator[@name="description"]' position='before'> <xpath expr='//separator[@name="description"]' position='before'>
<group string="Invoice on Timesheets Options" name="invoice_on_timesheets" col="4"> <group string="Invoice on Timesheets Options" name="invoice_on_timesheets" col="4">
<field name="pricelist_id" /> <field name="pricelist_id" groups="product.group_sale_pricelist"/>
<field name="to_invoice" widget="selection"/> <field name="to_invoice"/>
</group> </group>
</xpath> </xpath>
<xpath expr="//field[@name='use_timesheets']" position="replace"> <xpath expr="//field[@name='use_timesheets']" position="replace">
@ -91,6 +91,20 @@
</field> </field>
</record> </record>
<record id="view_hr_timesheet_line_search_to_invoice" model="ir.ui.view">
<field name="name">hr.analytic.timesheet.search.to_invoice</field>
<field name="model">hr.analytic.timesheet</field>
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='account_id']" position="after">
<separator/>
<filter name="to_invoice" string="To Invoice" context="{'to_invoice': 1}" domain="[('invoice_id','=',False), ('to_invoice','&lt;&gt;',False)]" icon="terp-dolar"/>
<filter name="invoiced" string="Invoiced" domain="[('invoice_id','!=',False), ('to_invoice','&lt;&gt;',False)]" icon="terp-dolar"/>
</xpath>
</field>
</record>
<record id="view_account_analytic_line_tree_inherit" model="ir.ui.view"> <record id="view_account_analytic_line_tree_inherit" model="ir.ui.view">
<field name="name">account.analytic.line.tree.to_invoice</field> <field name="name">account.analytic.line.tree.to_invoice</field>
<field name="model">account.analytic.line</field> <field name="model">account.analytic.line</field>

View File

@ -36,14 +36,17 @@ class final_invoice_create(osv.osv_memory):
_description = 'Create invoice from timesheet final' _description = 'Create invoice from timesheet final'
_columns = { _columns = {
'date': fields.boolean('Date', help='Display date in the history of works'), 'date': fields.boolean('Date', help='Display date in the history of works'),
'time': fields.boolean('Time spent', help='Display time in the history of works'), 'time': fields.boolean('Time Spent', help='Display time in the history of works'),
'name': fields.boolean('Name of entry', help='Display detail of work in the invoice line.'), 'name': fields.boolean('Log of Activity', help='Display detail of work in the invoice line.'),
'price': fields.boolean('Cost', help='Display cost of the item you reinvoice'), 'price': fields.boolean('Cost', help='Display cost of the item you reinvoice'),
'product': fields.many2one('product.product', 'Product', help='The product that will be used to invoice the remaining amount'), 'product': fields.many2one('product.product', 'Product', help='The product that will be used to invoice the remaining amount'),
} }
def do_create(self, cr, uid, ids, context=None): def do_create(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, [], context=context)[0] data = self.read(cr, uid, ids, [], context=context)[0]
# hack for fixing small issue (context should not propagate implicitly between actions)
if 'default_type' in context:
del context['default_type']
ids = self.pool.get('account.analytic.line').search(cr, uid, [('invoice_id','=',False),('to_invoice','<>', False), ('account_id', 'in', context['active_ids'])], context=context) ids = self.pool.get('account.analytic.line').search(cr, uid, [('invoice_id','=',False),('to_invoice','<>', False), ('account_id', 'in', context['active_ids'])], context=context)
invs = self.pool.get('account.analytic.line').invoice_cost_create(cr, uid, ids, data, context=context) invs = self.pool.get('account.analytic.line').invoice_cost_create(cr, uid, ids, data, context=context)
mod_obj = self.pool.get('ir.model.data') mod_obj = self.pool.get('ir.model.data')

View File

@ -29,6 +29,15 @@ from tools.translate import _
class account_analytic_line(osv.osv): class account_analytic_line(osv.osv):
_inherit = "account.analytic.line" _inherit = "account.analytic.line"
def _get_invoice_price(self, cr, uid, account, product_id, user_id, qty, context = {}):
pro_price_obj = self.pool.get('product.pricelist')
if account.pricelist_id:
pl = account.pricelist_id.id
price = pro_price_obj.price_get(cr,uid,[pl], product_id, qty or 1.0, account.partner_id.id, context=context)[pl]
else:
price = 0.0
return price
# #
# data = { # data = {
@ -45,7 +54,6 @@ class account_analytic_line(osv.osv):
invoice_obj = self.pool.get('account.invoice') invoice_obj = self.pool.get('account.invoice')
product_obj = self.pool.get('product.product') product_obj = self.pool.get('product.product')
invoice_factor_obj = self.pool.get('hr_timesheet_invoice.factor') invoice_factor_obj = self.pool.get('hr_timesheet_invoice.factor')
pro_price_obj = self.pool.get('product.pricelist')
fiscal_pos_obj = self.pool.get('account.fiscal.position') fiscal_pos_obj = self.pool.get('account.fiscal.position')
product_uom_obj = self.pool.get('product.uom') product_uom_obj = self.pool.get('product.uom')
invoice_line_obj = self.pool.get('account.invoice.line') invoice_line_obj = self.pool.get('account.invoice.line')
@ -99,13 +107,13 @@ class account_analytic_line(osv.osv):
last_invoice = invoice_obj.create(cr, uid, curr_invoice, context=context2) last_invoice = invoice_obj.create(cr, uid, curr_invoice, context=context2)
invoices.append(last_invoice) invoices.append(last_invoice)
cr.execute("SELECT product_id, to_invoice, sum(unit_amount), product_uom_id, name " \ cr.execute("SELECT product_id, user_id, to_invoice, sum(unit_amount), product_uom_id, name " \
"FROM account_analytic_line as line " \ "FROM account_analytic_line as line " \
"WHERE account_id = %s " \ "WHERE account_id = %s " \
"AND id IN %s AND to_invoice IS NOT NULL " \ "AND id IN %s AND to_invoice IS NOT NULL " \
"GROUP BY product_id, to_invoice, product_uom_id, name", (account.id, tuple(ids),)) "GROUP BY product_id, user_id, to_invoice, product_uom_id, name", (account.id, tuple(ids),))
for product_id, factor_id, qty, uom, line_name in cr.fetchall(): for product_id, user_id, factor_id, qty, uom, line_name in cr.fetchall():
if data.get('product'): if data.get('product'):
product_id = data['product'][0] product_id = data['product'][0]
product = product_obj.browse(cr, uid, product_id, context=context2) product = product_obj.browse(cr, uid, product_id, context=context2)
@ -118,11 +126,8 @@ class account_analytic_line(osv.osv):
ctx = context.copy() ctx = context.copy()
ctx.update({'uom':uom}) ctx.update({'uom':uom})
if account.pricelist_id:
pl = account.pricelist_id.id price = self._get_invoice_price(cr, uid, account, product_id, user_id, qty, ctx)
price = pro_price_obj.price_get(cr,uid,[pl], product_id, qty or 1.0, account.partner_id.id, context=ctx)[pl]
else:
price = 0.0
general_account = product.product_tmpl_id.property_account_income or product.categ_id.property_account_income_categ general_account = product.product_tmpl_id.property_account_income or product.categ_id.property_account_income_categ
if not general_account: if not general_account:
@ -164,7 +169,8 @@ class account_analytic_line(osv.osv):
details.append(line['name']) details.append(line['name'])
note.append(u' - '.join(map(lambda x: unicode(x) or '',details))) note.append(u' - '.join(map(lambda x: unicode(x) or '',details)))
curr_line['name'] += "\n".join(map(lambda x: unicode(x) or '',note)) if note:
curr_line['name'] += "\n" + ("\n".join(map(lambda x: unicode(x) or '',note)))
invoice_line_obj.create(cr, uid, curr_line, context=context) invoice_line_obj.create(cr, uid, curr_line, context=context)
cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s", (last_invoice, account.id, tuple(ids))) cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s", (last_invoice, account.id, tuple(ids)))

View File

@ -26,13 +26,19 @@
<field name="model">hr.timesheet.invoice.create.final</field> <field name="model">hr.timesheet.invoice.create.final</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Invoice contract" version="7.0"> <form string="Invoice contract" version="7.0">
<separator string="Do you want to display work details on the invoice?" colspan="4"/> <p>Do you want to show details of each activity to your customer?</p>
<field name="date"/> <group>
<field name="time"/> <group>
<field name="name"/> <field name="date"/>
<field name="price"/> <field name="time"/>
<separator string="Force to use a special product" colspan="4"/> </group><group>
<field name="product"/> <field name="name"/>
<field name="price"/>
</group>
</group>
<group string="Force to use a special product" groups="base.group_no_one">
<field name="product"/>
</group>
<footer> <footer>
<button name="do_create" string="Create Invoice" type="object" class="oe_highlight"/> <button name="do_create" string="Create Invoice" type="object" class="oe_highlight"/>
or or

View File

@ -34,103 +34,22 @@ class hr_timesheet_sheet(osv.osv):
_order = "id desc" _order = "id desc"
_description="Timesheet" _description="Timesheet"
def _total_attendances(self, cr, uid, ids, name, args, context=None):
""" Get the total attendance for the timesheets
Returns a dict like :
{id: {'total_per_day': {day: timedelta, ...},
},
...
}
"""
context = context or {}
attendance_obj = self.pool.get('hr.attendance')
res = {}
for sheet_id in ids:
sheet = self.browse(cr, uid, sheet_id, context=context)
# field attendances_ids of hr_timesheet_sheet.sheet only
# returns attendances of timesheet's current date
attendance_ids = attendance_obj.search(cr, uid, [('sheet_id', '=', sheet_id)], context=context)
attendances = attendance_obj.browse(cr, uid, attendance_ids, context=context)
total_attendance = {}
for attendance in [att for att in attendances
if att.action in ('sign_in', 'sign_out')]:
day = attendance.name[:10]
if not total_attendance.get(day, False):
total_attendance[day] = timedelta(seconds=0)
attendance_in_time = datetime.strptime(attendance.name, '%Y-%m-%d %H:%M:%S')
attendance_interval = timedelta(hours=attendance_in_time.hour,
minutes=attendance_in_time.minute,
seconds=attendance_in_time.second)
if attendance.action == 'sign_in':
total_attendance[day] -= attendance_interval
else:
total_attendance[day] += attendance_interval
res[sheet_id] = {'total_per_day': total_attendance}
return res
def _total_timesheet(self, cr, uid, ids, name, args, context=None):
""" Get the total of analytic lines for the timesheets
Returns a dict like :
{id: {day: timedelta, ...}}
"""
context = context or {}
sheet_line_obj = self.pool.get('hr.analytic.timesheet')
res = {}
for sheet_id in ids:
# field timesheet_ids of hr_timesheet_sheet.sheet only
# returns lines of timesheet's current date
sheet_lines_ids = sheet_line_obj.search(cr, uid, [('sheet_id', '=', sheet_id)], context=context)
sheet_lines = sheet_line_obj.browse(cr, uid, sheet_lines_ids, context=context)
total_timesheet = {}
for line in sheet_lines:
day = line.date
if not total_timesheet.get(day, False):
total_timesheet[day] = timedelta(seconds=0)
total_timesheet[day] += timedelta(hours=line.unit_amount)
res[sheet_id] = total_timesheet
return res
def _total(self, cr, uid, ids, name, args, context=None): def _total(self, cr, uid, ids, name, args, context=None):
""" Compute the attendances, analytic lines timesheets and differences between them """ Compute the attendances, analytic lines timesheets and differences between them
for all the days of a timesheet and the current day for all the days of a timesheet and the current day
""" """
def sum_all_days(sheet_amounts):
if not sheet_amounts:
return timedelta(seconds=0)
total = reduce(lambda memo, value: memo + value, sheet_amounts.values())
return total
def timedelta_to_hours(delta):
hours = 0.0
seconds = float(delta.seconds)
if delta.microseconds:
seconds += float(delta.microseconds) / 100000
hours += delta.days * 24
if seconds:
hours += seconds / 3600
return hours
res = {} res = {}
all_timesheet_attendances = self._total_attendances(cr, uid, ids, name, args, context=context) for sheet in self.browse(cr, uid, ids, context=context or {}):
all_timesheet_lines = self._total_timesheet(cr, uid, ids, name, args, context=context) res.setdefault(sheet.id, {
for id in ids: 'total_attendance': 0.0,
res[id] = {} 'total_timesheet': 0.0,
'total_difference': 0.0,
all_attendances_sheet = all_timesheet_attendances[id] })
for period in sheet.period_ids:
total_attendances_sheet = all_attendances_sheet['total_per_day'] res[sheet.id]['total_attendance'] += period.total_attendance
total_attendances_all_days = sum_all_days(total_attendances_sheet) res[sheet.id]['total_timesheet'] += period.total_timesheet
res[sheet.id]['total_difference'] += period.total_attendance - period.total_timesheet
total_timesheets_sheet = all_timesheet_lines[id]
total_timesheets_all_days = sum_all_days(total_timesheets_sheet)
total_difference_all_days = total_attendances_all_days - total_timesheets_all_days
res[id]['total_attendance'] = timedelta_to_hours(total_attendances_all_days)
res[id]['total_timesheet'] = timedelta_to_hours(total_timesheets_all_days)
res[id]['total_difference'] = timedelta_to_hours(total_difference_all_days)
return res return res
def check_employee_attendance_state(self, cr, uid, sheet_id, context=None): def check_employee_attendance_state(self, cr, uid, sheet_id, context=None):
@ -206,9 +125,9 @@ class hr_timesheet_sheet(osv.osv):
('draft','Open'), ('draft','Open'),
('confirm','Waiting Approval'), ('confirm','Waiting Approval'),
('done','Approved')], 'Status', select=True, required=True, readonly=True, ('done','Approved')], 'Status', select=True, required=True, readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed timesheet. \ help=' * The \'Draft\' status is used when a user is encoding a new and unconfirmed timesheet. \
\n* The \'Confirmed\' state is used for to confirm the timesheet by user. \ \n* The \'Confirmed\' status is used for to confirm the timesheet by user. \
\n* The \'Done\' state is used when users timesheet is accepted by his/her senior.'), \n* The \'Done\' status is used when users timesheet is accepted by his/her senior.'),
'state_attendance' : fields.related('employee_id', 'state', type='selection', selection=[('absent', 'Absent'), ('present', 'Present')], string='Current Status', readonly=True), 'state_attendance' : fields.related('employee_id', 'state', type='selection', selection=[('absent', 'Absent'), ('present', 'Present')], string='Current Status', readonly=True),
'total_attendance': fields.function(_total, method=True, string='Total Attendance', multi="_total"), 'total_attendance': fields.function(_total, method=True, string='Total Attendance', multi="_total"),
'total_timesheet': fields.function(_total, method=True, string='Total Timesheet', multi="_total"), 'total_timesheet': fields.function(_total, method=True, string='Total Timesheet', multi="_total"),
@ -283,8 +202,8 @@ class hr_timesheet_sheet(osv.osv):
return [] return []
if isinstance(ids, (long, int)): if isinstance(ids, (long, int)):
ids = [ids] ids = [ids]
return [(r['id'], r['date_from'] + ' - ' + r['date_to']) \ return [(r['id'], _('Week ')+datetime.strptime(r['date_from'], '%Y-%m-%d').strftime('%U')) \
for r in self.read(cr, uid, ids, ['date_from', 'date_to'], for r in self.read(cr, uid, ids, ['date_from'],
context=context, load='_classic_write')] context=context, load='_classic_write')]
def unlink(self, cr, uid, ids, context=None): def unlink(self, cr, uid, ids, context=None):

View File

@ -40,6 +40,23 @@
</field> </field>
</record> </record>
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet">
<field name="context">{'search_default_sheet_id': [active_id]}</field>
<field name="name">Timesheet Activities</field>
<field name="res_model">hr.analytic.timesheet</field>
<field name="src_model">hr_timesheet_sheet.sheet</field>
</record>
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_sheet_2_hr_attendance">
<field name="context">{'search_default_sheet_id': [active_id]}</field>
<field name="name">Attendances</field>
<field name="res_model">hr.attendance</field>
<field name="src_model">hr_timesheet_sheet.sheet</field>
</record>
<record id="hr_timesheet_sheet_form" model="ir.ui.view"> <record id="hr_timesheet_sheet_form" model="ir.ui.view">
<field name="name">hr.timesheet.sheet.form</field> <field name="name">hr.timesheet.sheet.form</field>
<field name="model">hr_timesheet_sheet.sheet</field> <field name="model">hr_timesheet_sheet.sheet</field>
@ -53,53 +70,45 @@
<field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/> <field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/>
</header> </header>
<sheet> <sheet>
<label for="employee_id" class="oe_edit_only"/> <div class="oe_right oe_button_box" name="buttons">
<h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1> <button type="action"
name="%(act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet)d"
string="Timesheet Activities" />
<button type="action" groups="base.group_hr_attendance"
name="%(act_hr_timesheet_sheet_sheet_2_hr_attendance)d"
string="Attendances" />
</div>
<div class="oe_title">
<label for="employee_id" class="oe_edit_only"/>
<h1><field name="employee_id" on_change="onchange_employee_id(employee_id)" class="oe_inline"/></h1>
</div>
<group> <group>
<group> <group>
<label for="date_from" string="Timesheet Period"/> <label for="date_from" string="Timesheet Period"/>
<div><field name="date_from"/> to <field name="date_to"/></div> <div><field name="date_from" class="oe_inline"/> to <field name="date_to" class="oe_inline"/></div>
<field name="name" invisible="1"/> <field name="name" invisible="1"/>
<field name="department_id"/> <field name="department_id" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/> <field name="company_id" groups="base.group_multi_company"/>
</group> </group>
<group> <group groups="base.group_hr_attendance">
<field name="total_attendance" widget="float_time" groups="base.group_hr_attendance"/> <field name="total_attendance" widget="float_time"/>
<field name="total_timesheet" widget="float_time"/> <field name="total_timesheet" widget="float_time"/>
<field name="total_difference" widget="float_time" groups="base.group_hr_attendance"/> <field name="total_difference" widget="float_time"/>
<field name="user_id" invisible="1"/> <field name="user_id" invisible="1"/>
</group> </group>
</group> </group>
<notebook> <notebook>
<page string="Weekly"> <page string="Summary">
<widget type="weekly_timesheet"> <widget type="weekly_timesheet">
</widget> </widget>
</page> </page>
<page string="Daily"> <page string="Details">
<group colspan="4" col="3"> <field context="{'user_id':user_id}" name="timesheet_ids" nolabel="1">
<field context="{'user_id':user_id}" name="attendances_ids" nolabel="1" groups="base.group_hr_attendance"> <tree editable="top" string="Timesheet Activities">
<tree string="Attendances" editable="bottom">
<field name="name"/>
<field name="action"/>
<field invisible="1" name="employee_id"/>
</tree>
</field>
<group>
<div align="right" groups="base.group_hr_manager,base.group_hr_attendance">
<button name="attendance_action_change" attrs="{'invisible': [('state_attendance', '=', 'present')]}" type="object" string="Sign In" groups="base.group_hr_attendance"/>
<button name="attendance_action_change" attrs="{'invisible': ['|', ('state_attendance','=',False), ('state_attendance', '=', 'absent')]}" type="object" string="Sign Out" groups="base.group_hr_attendance"/>
</div>
</group>
</group>
<group col="4">
<field name="state_attendance" groups="base.group_hr_attendance"/>
</group>
<field colspan="4" context="{'user_id':user_id}" name="timesheet_ids" nolabel="1">
<tree editable="top" string="Timesheet Lines">
<field name="date"/> <field name="date"/>
<field domain="[('type','in',['normal', 'contract']), ('state', '&lt;&gt;', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id, user_id)" context="{'default_use_timesheets': 1}"/> <field domain="[('type','in',['normal', 'contract']), ('state', '&lt;&gt;', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id, user_id)" context="{'default_use_timesheets': 1}"/>
<field name="name"/> <field name="name"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/> <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time" string="Hours" sum="Hours"/>
<field name="to_invoice" widget="selection"/> <field name="to_invoice" widget="selection"/>
<field invisible="1" name="journal_id"/> <field invisible="1" name="journal_id"/>
<field invisible="1" name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/> <field invisible="1" name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
@ -108,7 +117,7 @@
<field invisible="1" name="general_account_id"/> <field invisible="1" name="general_account_id"/>
<field invisible="1" name="user_id" required="1"/> <field invisible="1" name="user_id" required="1"/>
</tree> </tree>
<form string="Timesheet Lines" version="7.0"> <form string="Timesheet Activities" version="7.0">
<field name="date"/> <field name="date"/>
<field domain="[('type','=','normal'), ('state', '&lt;&gt;', 'close')]" name="account_id" on_change="on_change_account_id(account_id, user_id)"/> <field domain="[('type','=','normal'), ('state', '&lt;&gt;', 'close')]" name="account_id" on_change="on_change_account_id(account_id, user_id)"/>
<field name="name"/> <field name="name"/>
@ -123,13 +132,30 @@
</form> </form>
</field> </field>
</page> </page>
<page string="Summary"> <page string="Attendances" groups="base.group_hr_attendance">
<field colspan="4" name="period_ids" nolabel="1"> <group>
<field context="{'user_id':user_id}" name="attendances_ids" nolabel="1">
<tree string="Attendances" editable="bottom">
<field name="name"/>
<field name="action"/>
<field invisible="1" name="employee_id"/>
</tree>
</field>
<group>
<label for="state_attendance"/>
<div>
<field name="state_attendance"/>
<button name="attendance_action_change" attrs="{'invisible': [('state_attendance', '=', 'present')]}" type="object" string="Sign In" class="oe_link"/>
<button name="attendance_action_change" attrs="{'invisible': ['|', ('state_attendance','=',False), ('state_attendance', '=', 'absent')]}" type="object" string="Sign Out" class="oe_link"/>
</div>
</group>
</group>
<field name="period_ids">
<tree colors="red:total_difference&lt;0.1;blue:total_difference&gt;=0.1" string="Period"> <tree colors="red:total_difference&lt;0.1;blue:total_difference&gt;=0.1" string="Period">
<field name="name"/> <field name="name"/>
<field name="total_attendance" widget="float_time" groups="base.group_hr_attendance"/> <field name="total_attendance" widget="float_time" sum="Attendances"/>
<field name="total_timesheet" widget="float_time"/> <field name="total_timesheet" widget="float_time" sum="Timesheets"/>
<field name="total_difference" widget="float_time" groups="base.group_hr_attendance"/> <field name="total_difference" widget="float_time" sum="Differences"/>
</tree> </tree>
</field> </field>
</page> </page>
@ -149,8 +175,8 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<search string="Search Timesheet"> <search string="Search Timesheet">
<field name="date_from"/> <field name="date_from"/>
<filter icon="terp-document-new" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/> <filter name="new" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
<filter icon="terp-camera_test" string="To Approve" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/> <filter name="to_approve" string="To Approve" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
<field name="employee_id"/> <field name="employee_id"/>
<field name="department_id"/> <field name="department_id"/>
<group expand="0" string="Group By..."> <group expand="0" string="Group By...">
@ -162,23 +188,23 @@
</record> </record>
<record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window"> <record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window">
<field name="name">Timesheets</field> <field name="name">Timesheets to Validate</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field> <field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_id" eval="False"/> <field name="view_id" eval="False"/>
<field name="context">{'search_default_my_timesheet':1}</field> <field name="context">{'search_default_to_approve':1}</field>
<field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/> <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
<field name="help" type="html"> <field name="help" type="html">
<p class="oe_view_nocontent_create"> <p class="oe_view_nocontent_create">
Click to go to your timesheet. New timesheet to approve.
</p><p> </p><p>
You must record timesheets every day and confirm at the end You must record timesheets every day and confirm at the end
of the week. Once the timesheet is confirmed, it his sent to of the week. Once the timesheet is confirmed, it should be
the manager for validation. validated by a manager.
</p><p> </p><p>
Timesheets can also be invoiced to customers, depending on the Timesheets can also be invoiced to customers, depending on the
configuration of the project. configuration of each project's related contract.
</p> </p>
</field> </field>
</record> </record>
@ -289,22 +315,6 @@
name="Timesheet by Day" name="Timesheet by Day"
res_model="hr_timesheet_sheet.sheet.day" res_model="hr_timesheet_sheet.sheet.day"
src_model="hr_timesheet_sheet.sheet"/> src_model="hr_timesheet_sheet.sheet"/>
<act_window
context="{'search_default_sheet_id': [active_id]}"
id="act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet"
name="Timesheet Lines"
res_model="hr.analytic.timesheet"
src_model="hr_timesheet_sheet.sheet"/>
<act_window
context="{'search_default_sheet_id': [active_id]}"
id="act_hr_timesheet_sheet_sheet_2_hr_attendance"
name="Attendances"
res_model="hr.attendance"
src_model="hr_timesheet_sheet.sheet"/>
<record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view"> <record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view">
<field name="name">hr.timesheet.sheet.tree</field> <field name="name">hr.timesheet.sheet.tree</field>
<field name="model">hr_timesheet_sheet.sheet</field> <field name="model">hr_timesheet_sheet.sheet</field>
@ -314,7 +324,7 @@
<field name="employee_id"/> <field name="employee_id"/>
<field name="date_from"/> <field name="date_from"/>
<field name="date_to"/> <field name="date_to"/>
<field name="department_id"/> <field name="department_id" invisible="1"/>
<field name="total_attendance" widget="float_time" groups="base.group_hr_attendance"/> <field name="total_attendance" widget="float_time" groups="base.group_hr_attendance"/>
<field name="total_timesheet" widget="float_time"/> <field name="total_timesheet" widget="float_time"/>
<field name="total_difference" widget="float_time" groups="base.group_hr_attendance"/> <field name="total_difference" widget="float_time" groups="base.group_hr_attendance"/>

View File

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

View File

@ -1,79 +1,65 @@
@charset "utf-8";
.openerp .oe_form_readonly .oe_timesheet_weekly .oe_timesheet_button_add {
display: none;
}
.openerp .oe_form_readonly .oe_timesheet_weekly div.oe_view_nocontent {
display: none;
}
.openerp .oe_timesheet_weekly { .openerp .oe_timesheet_weekly {
overflow-x: auto; overflow-x: auto;
} }
.openerp .oe_timesheet_weekly table { .openerp .oe_timesheet_weekly table {
width: 100%; width: 100%;
} }
.openerp .oe_timesheet_weekly td { .openerp .oe_timesheet_weekly td {
padding-top: 15px; padding: 3px;
text-align: right;
} }
.openerp .oe_timesheet_weekly th { .openerp .oe_timesheet_weekly th {
text-align: right; text-align: center;
color: #069; color: #006699;
font-family: 'Helvetica Neue', Arial, Verdana, 'Nimbus Sans L', sans-serif; font-family: "Helvetica Neue", Arial, Verdana, "Nimbus Sans L", sans-serif;
font-size: 10px; font-size: 10px;
background: #eeeeee;
min-width: 47px;
} }
.openerp .oe_timesheet_weekly .oe_timesheet_total {
.openerp .oe_timesheet_weekly th.oe_timesheet_weekly_date_head { background: #eeeeee;
width: 60px;
} }
.openerp .oe_timesheet_weekly td {
text-align: right;
vertical-align: middle;
}
.openerp .oe_timesheet_weekly .oe_timesheet_weekly_account { .openerp .oe_timesheet_weekly .oe_timesheet_weekly_account {
text-align: left; text-align: left;
padding-right: 30px; }
.openerp .oe_timesheet_weekly .oe_timesheet_first_col {
min-width: 130px;
} }
.openerp .oe_timesheet_weekly td input.oe_timesheet_weekly_input { .openerp .oe_timesheet_weekly td input.oe_timesheet_weekly_input {
border: 1px solid #CCC; padding: 5px 2px !important;
padding: 5px 2px !important; width: 40px;
color: #666 !important; text-align: right;
font-size: 14px; min-width: 0 !important;
font-weight: bold;
width: 38px;
text-align: right;
min-width: 0 !important;
} }
.openerp .oe_timesheet_weekly td.oe_timesheet_total {
.openerp .oe_timesheet_weekly td .oe_timesheet_weekly_box { font-weight: bold;
padding: 5px 2px !important; padding: 5px 3px !important;
color: #666 !important;
font-size: 14px;
font-weight: bold;
width: 38px;
display: inline-block;
} }
.openerp .oe_timesheet_weekly .oe_timesheet_weekly_adding_tot { .openerp .oe_timesheet_weekly .oe_timesheet_weekly_adding_tot {
display: table; display: table;
width: 100%; width: 100%;
} }
.openerp .oe_timesheet_weekly .oe_timesheet_weekly_adding { .openerp .oe_timesheet_weekly .oe_timesheet_weekly_adding {
display: table-cell; display: table-cell;
text-align: left; text-align: left;
} }
.openerp .oe_timesheet_weekly .oe_timesheet_weekly_tottot { .openerp .oe_timesheet_weekly .oe_timesheet_weekly_tottot {
display: table-cell; display: table-cell;
} }
.openerp .oe_timesheet_weekly .oe_timesheet_weekly_add_row td { .openerp .oe_timesheet_weekly .oe_timesheet_weekly_add_row td {
text-align: left; text-align: left;
} }
.openerp .oe_timesheet_weekly .oe_timesheet_weekly_add_row .oe_form_field_many2one { .openerp .oe_timesheet_weekly .oe_timesheet_weekly_add_row .oe_form_field_many2one {
display: inline-block; display: inline-block;
width: 200px; width: 200px;
} }
.openerp .oe_timesheet_weekly .oe_timesheet_weekly_today {
.openerp .oe_timesheet_weekly_today { background: #ffddee;
} }

View File

@ -0,0 +1,52 @@
@charset "utf-8"
.openerp
.oe_form_readonly
.oe_timesheet_weekly
.oe_timesheet_button_add
display: none
div.oe_view_nocontent
display: none
.oe_timesheet_weekly
overflow-x: auto
table
width: 100%
td
padding: 3px
text-align: right
th
text-align: center
color: #069
font-family: 'Helvetica Neue', Arial, Verdana, 'Nimbus Sans L', sans-serif
font-size: 10px
background: #eee
min-width: 47px
.oe_timesheet_total
background: #eee
.oe_timesheet_weekly_account
text-align: left
.oe_timesheet_first_col
min-width: 130px
td input.oe_timesheet_weekly_input
padding: 5px 2px !important
width: 40px
text-align: right
min-width: 0 !important
td.oe_timesheet_total
font-weight: bold
padding: 5px 3px !important
.oe_timesheet_weekly_adding_tot
display: table
width: 100%
.oe_timesheet_weekly_adding
display: table-cell
text-align: left
.oe_timesheet_weekly_tottot
display: table-cell
.oe_timesheet_weekly_add_row td
text-align: left
.oe_timesheet_weekly_add_row .oe_form_field_many2one
display: inline-block
width: 200px
.oe_timesheet_weekly_today
background: #fde

View File

@ -4,6 +4,9 @@ openerp.hr_timesheet_sheet = function(instance) {
var _t = instance.web._t; var _t = instance.web._t;
instance.hr_timesheet_sheet.WeeklyTimesheet = instance.web.form.FormWidget.extend(instance.web.form.ReinitializeWidgetMixin, { instance.hr_timesheet_sheet.WeeklyTimesheet = instance.web.form.FormWidget.extend(instance.web.form.ReinitializeWidgetMixin, {
events: {
"click .oe_timesheet_weekly_account a": "go_to",
},
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.set({ this.set({
@ -26,6 +29,16 @@ openerp.hr_timesheet_sheet = function(instance) {
this.render_drop = new instance.web.DropMisordered(); this.render_drop = new instance.web.DropMisordered();
this.description_line = _t("/"); this.description_line = _t("/");
}, },
go_to: function(event) {
var id = JSON.parse($(event.target).data("id"));
this.do_action({
type: 'ir.actions.act_window',
res_model: "account.analytic.account",
res_id: id,
views: [[false, 'form']],
target: 'current'
});
},
query_sheets: function() { query_sheets: function() {
var self = this; var self = this;
if (self.updating) if (self.updating)
@ -194,6 +207,10 @@ openerp.hr_timesheet_sheet = function(instance) {
['use_timesheets','=',1], ['use_timesheets','=',1],
['id', 'not in', _.pluck(self.accounts, "account")], ['id', 'not in', _.pluck(self.accounts, "account")],
], ],
context: {
default_use_timesheets: 1,
default_type: "contract",
},
modifiers: '{"required": true}', modifiers: '{"required": true}',
}, },
}); });

View File

@ -5,17 +5,17 @@
<div class="oe_timesheet_weekly"> <div class="oe_timesheet_weekly">
<table> <table>
<tr> <tr>
<th> </th> <th class="oe_timesheet_first_col"> </th>
<t t-foreach="widget.dates" t-as="date"> <t t-foreach="widget.dates" t-as="date">
<th t-att-class="'oe_timesheet_weekly_date_head' + (Date.compare(date, Date.today()) === 0 ? ' oe_timesheet_weekly_today' : '')"> <th t-att-class="'oe_timesheet_weekly_date_head' + (Date.compare(date, Date.today()) === 0 ? ' oe_timesheet_weekly_today' : '')">
<t t-esc="date.toString('ddd')"/><br /> <t t-esc="date.toString('ddd')"/><br />
<t t-esc="date.toString('MMM d')"/> <t t-esc="date.toString('MMM d')"/>
</th> </th>
</t> </t>
<th class="oe_timesheet_weekly_date_head">TOTAL</th> <th class="oe_timesheet_weekly_date_head">Total</th>
</tr> </tr>
<tr t-foreach="widget.accounts" t-as="account"> <tr t-foreach="widget.accounts" t-as="account">
<td class="oe_timesheet_weekly_account"><t t-esc="widget.account_names[account.account]"/></td> <td class="oe_timesheet_weekly_account"><a href="javascript:void(0)" t-att-data-id="JSON.stringify(account.account)"><t t-esc="widget.account_names[account.account]"/></a></td>
<t t-set="day_count" t-value="0"/> <t t-set="day_count" t-value="0"/>
<t t-foreach="account.days" t-as="day"> <t t-foreach="account.days" t-as="day">
<td t-att-class="(Date.compare(day.day, Date.today()) === 0 ? 'oe_timesheet_weekly_today' : '')"> <td t-att-class="(Date.compare(day.day, Date.today()) === 0 ? 'oe_timesheet_weekly_today' : '')">
@ -26,31 +26,47 @@
<t t-set="day_count" t-value="day_count + 1"/> <t t-set="day_count" t-value="day_count + 1"/>
</td> </td>
</t> </t>
<td t-att-data-account-total="account.account"> </td> <td t-att-data-account-total="account.account" class="oe_timesheet_total"> </td>
</tr> </tr>
<tr class="oe_timesheet_weekly_add_row" style="display: none"> <tr class="oe_timesheet_weekly_add_row" style="display: none">
<td t-att-colspan="widget.dates.length + 2"> <td t-att-colspan="widget.dates.length + 2">
<button>Add</button> <button class="oe_highlight">Add</button>
</td> </td>
</tr> </tr>
<tr> <tr class="oe_timesheet_total">
<td> <td>
<div class="oe_timesheet_weekly_adding_tot"> <div class="oe_timesheet_weekly_adding_tot">
<div class="oe_timesheet_weekly_adding"><button>Add Row</button></div> <div class="oe_timesheet_weekly_adding"><button class="oe_timesheet_button_add">Add a Line</button></div>
<div class="oe_timesheet_weekly_tottot"><span>TOTAL</span></div> <div class="oe_timesheet_weekly_tottot"><span>Total</span></div>
</div> </div>
</td> </td>
<t t-set="day_count" t-value="0"/> <t t-set="day_count" t-value="0"/>
<t t-foreach="widget.dates" t-as="date"> <t t-foreach="widget.dates" t-as="date">
<td t-att-class="(Date.compare(date, Date.today()) === 0 ? 'oe_timesheet_weekly_today' : '')"> <td class="oe_timesheet_total">
<span class="oe_timesheet_weekly_box" t-att-data-day-total="day_count"> <span class="oe_timesheet_weekly_box" t-att-data-day-total="day_count">
</span> </span>
<t t-set="day_count" t-value="day_count + 1"/> <t t-set="day_count" t-value="day_count + 1"/>
</td> </td>
</t> </t>
<td class="oe_timesheet_weekly_supertotal"> </td> <td class="oe_timesheet_weekly_supertotal oe_timesheet_total"> </td>
</tr> </tr>
</table> </table>
<div t-if="widget.accounts.length == 0">
<div class="oe_view_nocontent">
<p class="oe_view_nocontent_create">
Click to add projects/analytic accounts you worked on.
</p><p>
You will be able to register your working hours and
activities.
</p><p>
By default, you record timesheets on analytic accounts.
But if an analytic account represents a customer
contract, you can change the type of the analytic
account to 'Contract or Project' to setup the invoicing
options.
</p>
</div>
</div>
</div> </div>
</t> </t>
</templates> </templates>

View File

@ -36,7 +36,7 @@ class hr_timesheet_current_open(osv.osv_memory):
user_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)], context=context) user_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)], context=context)
if not len(user_ids): if not len(user_ids):
raise osv.except_osv(_('Error!'), _('Please create an employee and associate it with this user.')) raise osv.except_osv(_('Error!'), _('Please create an employee and associate it with this user.'))
ids = ts.search(cr, uid, [('user_id','=',uid),('state','=','draft'),('date_from','<=',time.strftime('%Y-%m-%d')), ('date_to','>=',time.strftime('%Y-%m-%d'))], context=context) ids = ts.search(cr, uid, [('user_id','=',uid),('state','in',('draft','new')),('date_from','<=',time.strftime('%Y-%m-%d')), ('date_to','>=',time.strftime('%Y-%m-%d'))], context=context)
if len(ids) > 1: if len(ids) > 1:
view_type = 'tree,form' view_type = 'tree,form'

View File

@ -5,7 +5,7 @@
<field name="name">hr_timesheet_current_open.form</field> <field name="name">hr_timesheet_current_open.form</field>
<field name="model">hr.timesheet.current.open</field> <field name="model">hr.timesheet.current.open</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="My Current Timesheet" version="7.0"> <form string="My Timesheet" version="7.0">
<group> <group>
<separator string="It will open your current timesheet"/> <separator string="It will open your current timesheet"/>
</group> </group>
@ -19,7 +19,7 @@
</record> </record>
<record id="action_hr_timesheet_current_open" model="ir.actions.act_window"> <record id="action_hr_timesheet_current_open" model="ir.actions.act_window">
<field name="name">My Current Timesheet</field> <field name="name">My Timesheet</field>
<field name="res_model">hr.timesheet.current.open</field> <field name="res_model">hr.timesheet.current.open</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
@ -28,7 +28,7 @@
<field name="help">My Timesheet opens your timesheet so that you can book your activities into the system. From the same form, you can register your attendances (Sign In/Out) and describe the working hours made on the different projects. At the end of the period defined in the company, the timesheet is confirmed by the user and can be validated by his manager. If required, as defined on the project, you can generate the invoices based on the timesheet.</field> <field name="help">My Timesheet opens your timesheet so that you can book your activities into the system. From the same form, you can register your attendances (Sign In/Out) and describe the working hours made on the different projects. At the end of the period defined in the company, the timesheet is confirmed by the user and can be validated by his manager. If required, as defined on the project, you can generate the invoices based on the timesheet.</field>
</record> </record>
<menuitem action="action_hr_timesheet_current_open" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" name="My Current Timesheet" parent="hr_attendance.menu_hr_time_tracking" sequence="1"/> <menuitem action="action_hr_timesheet_current_open" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" name="My Timesheet" parent="hr_attendance.menu_hr_time_tracking" sequence="1"/>
</data> </data>
</openerp> </openerp>

View File

@ -2,13 +2,9 @@
<openerp> <openerp>
<data> <data>
<record id="config_call_account_template_ar" model="ir.actions.todo"> <record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field> <field name="state">open</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated. </record>
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -1,12 +1,8 @@
<openerp> <openerp>
<data> <data>
<record id="config_call_account_template_at" model="ir.actions.todo"> <record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field> <field name="state">open</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record> </record>
</data> </data>

View File

@ -1,10 +1,6 @@
-
!record {model: ir.actions.todo, id: config_call_account_template}:
action_id: account.action_wizard_multi_chart
type: automatic
- -
!python {model: ir.actions.todo}: | !python {model: ir.actions.todo}: |
install_todo = self.browse(cr, uid, ref('l10n_be.config_call_account_template')) install_todo = self.browse(cr, uid, ref('account.action_wizard_multi_chart_todo'))
if install_todo.state == 'open': if install_todo.state == 'open':
wiz = self.pool.get('wizard.multi.charts.accounts') wiz = self.pool.get('wizard.multi.charts.accounts')
values = { values = {

View File

@ -1,13 +1,9 @@
<openerp> <openerp>
<data> <data>
<record id="config_call_account_template_ca" model="ir.actions.todo"> <record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field> <field name="state">open</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated. </record>
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -1,13 +1,7 @@
<openerp> <openerp>
<data> <data>
<record id="config_call_account_template_l10n_ch" model="ir.actions.todo"> <record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts for l10n_ch</field> <field name="state">open</field>
<field name="note">Generate Chart of Accounts from a Chart Template. Please let the nuber to 0 for Swiss charts.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial
Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="sequence">4</field>
<field name="type">automatic</field>
</record> </record>
</data> </data>
</openerp> </openerp>

View File

@ -1,14 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<openerp> <openerp>
<data> <data>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<record id="config_call_account_template_cl" model="ir.actions.todo"> <field name="state">open</field>
<field name="name">Generate Chart of Accounts from a Chart Template</field> </record>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -1,12 +1,7 @@
<openerp> <openerp>
<data> <data>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<record id="config_call_account_template_cn_chart" model="ir.actions.todo"> <field name="state">open</field>
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record> </record>
</data> </data>

View File

@ -1,10 +1,8 @@
<openerp> <openerp>
<data> <data>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<record id="config_call_account_template" model="ir.actions.todo"> <field name="state">open</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/> </record>
<field name="type">automatic</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -1,12 +1,9 @@
<openerp> <openerp>
<data> <data>
<record id="config_call_account_template_de" model="ir.actions.todo"> <record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generiert Kontenplan aus Vorlage</field> <field name="state">open</field>
<field name="note">Der Assistent generiert einen Kontenplan auf Basis eines Templates (Vorlage). Sie werden aufgefordert den Namen der Firma einzugeben, sowie die entsprechende Kontenvorlage zu wählen. Ausserdem können Sie für die Initialisierung der Journale die gewünschte Stellenanzahl der Konten, sowie die Hauptwährung Ihres Betriebes auswählen. Dieser Assistent ist identisch mit dem Open ERP Menü Finanzen/Konfiguration/Finanzkonten/Erzeuge Konten aus Vorlage.</field> </record>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -1,13 +1,8 @@
<openerp> <openerp>
<data> <data>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<record id="config_call_account_template_ec" model="ir.actions.todo"> <field name="state">open</field>
<field name="name">Generate Chart of Accounts from a Chart Template</field> </record>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -1,9 +1,7 @@
<openerp> <openerp>
<data noupdate="1"> <data noupdate="1">
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<record id="config_call_account_template" model="ir.actions.todo"> <field name="state">open</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record> </record>
</data> </data>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<openerp> <openerp>
<data> <data>
<!-- This ir.actions.todo triggers the screen "Generate your chart of account <record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
from a chart template" in the install wizard of the l10n_fr module --> <field name="state">open</field>
<record id="config_call_account_template_fr" model="ir.actions.todo"> </record>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -1,12 +1,7 @@
<openerp> <openerp>
<data> <data>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<record id="config_call_account_template_gr" model="ir.actions.todo"> <field name="state">open</field>
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record> </record>
</data> </data>

View File

@ -1,14 +1,8 @@
<openerp> <openerp>
<data noupdate="1"> <data noupdate="1">
<record id="config_call_account_template_gt_minimal" model="ir.actions.todo"> <record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="name">Generar la nomenclatura contable a partir de un modelo</field> <field name="state">open</field>
<field name="note">Generar la nomenclatura contable a partir de un modelo. Deberá seleccionar una compañía, el modelo a utilizar, el número de digitos a usar en la nomenclatura, la moneda para crear los diarios.</field>
<!--<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus, the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>-->
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record> </record>
<!-- Moneda Quetzal --> <!-- Moneda Quetzal -->

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