bzr revid: vir@tinyerp.com-20100728050806-y8xzhi2gipff8jo6
This commit is contained in:
Vir (Open ERP)
2010-07-28 10:38:06 +05:30
65 changed files with 3371 additions and 505 deletions
+1 -1
View File
@@ -1030,7 +1030,6 @@ class account_move(osv.osv):
res.append((move.id, name))
return res
def _get_period(self, cr, uid, context):
periods = self.pool.get('account.period').find(cr, uid)
if periods:
@@ -1117,6 +1116,7 @@ class account_move(osv.osv):
'You cannot create entries on different periods/journals in the same move',
['line_id']),
]
def post(self, cr, uid, ids, context=None):
if self.validate(cr, uid, ids, context) and len(ids):
for move in self.browse(cr, uid, ids):
+26
View File
@@ -160,6 +160,32 @@ class account_bank_statement(osv.osv):
'period_id': _get_period,
}
def onchange_date(self, cr, user, ids, date, context={}):
"""
Returns a dict that contains new values and context
@param cr: A database cursor
@param user: ID of the user currently logged in
@param date: latest value from user input for field date
@param args: other arguments
@param context: context arguments, like lang, time zone
@return: Returns a dict which contains new values, and context
"""
res = {}
period_pool = self.pool.get('account.period')
pids = period_pool.search(cr, user, [('date_start','<=',date), ('date_stop','>=',date)])
if pids:
res.update({
'period_id':pids[0]
})
context.update({
'period_id':pids[0]
})
return {
'value':res,
'context':context,
}
def button_confirm_bank(self, cr, uid, ids, context={}):
done = []
res_currency_obj = self.pool.get('res.currency')
+41 -32
View File
@@ -174,6 +174,17 @@ class account_cash_statement(osv.osv):
return company_id
def _get_cash_box_lines(self, cr, uid, ids, context={}):
res = []
curr = [1, 2, 5, 10, 20, 50, 100, 500]
for rs in curr:
dct = {
'pieces':rs,
'number':0
}
res.append(dct)
return res
_columns = {
'company_id':fields.many2one('res.company', 'Company', required=False),
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
@@ -197,24 +208,23 @@ class account_cash_statement(osv.osv):
'date': lambda *a:time.strftime("%Y-%m-%d %H:%M:%S"),
'journal_id': _default_journal_id,
'user_id': lambda self, cr, uid, context=None: uid,
'company_id': _get_company
'company_id': _get_company,
'starting_details_ids':_get_cash_box_lines,
'ending_details_ids':_get_cash_box_lines
}
def create(self, cr, uid, vals, context=None):
company_id = vals and vals.get('company_id',False)
if company_id:
open_jrnl = self.search(cr, uid, [('company_id', '=', vals['company_id']), ('journal_id', '=', vals['journal_id']), ('state', '=', 'open')])
sql = [
('company_id', '=', vals['company_id']),
('journal_id', '=', vals['journal_id']),
('state', '=', 'open')
]
open_jrnl = self.search(cr, uid, sql)
if open_jrnl:
raise osv.except_osv('Error', u'Une caisse de type espèce est déjà ouverte')
if 'starting_details_ids' in vals:
vals['starting_details_ids'] = starting_details_ids = map(list, vals['starting_details_ids'])
for i in starting_details_ids:
if i and i[0] and i[1]:
i[0], i[1] = 0, 0
raise osv.except_osv('Error', _('You can not have two open register for the same journal'))
res_id = super(account_cash_statement, self).create(cr, uid, vals, context=context)
res = self._get_starting_balance(cr, uid, [res_id])
for rs in res:
super(account_cash_statement, self).write(cr, uid, rs, res.get(rs))
return res_id
def write(self, cr, uid, ids, vals, context=None):
@@ -284,27 +294,26 @@ class account_cash_statement(osv.osv):
number = self.pool.get('ir.sequence').get(cr, uid, statement.journal_id.sequence_id.code)
if len(statement.starting_details_ids) > 0:
sid = []
for line in statement.starting_details_ids:
sid.append(line.id)
cash_pool.unlink(cr, uid, sid)
cr.execute("select id from account_bank_statement where journal_id=%s and user_id=%s and state=%s order by id desc limit 1", (statement.journal_id.id, uid, 'confirm'))
rs = cr.fetchone()
rs = rs and rs[0] or None
if rs:
statement = statement_pool.browse(cr, uid, rs)
balance_start = statement.balance_end_real or 0.0
open_ids = cash_pool.search(cr, uid, [('ending_id','=',statement.id)])
for sid in open_ids:
default = {
'ending_id': False,
'starting_id':ids[0]
}
cash_pool.copy(cr, uid, sid, default)
# if len(statement.starting_details_ids) > 0:
# sid = []
# for line in statement.starting_details_ids:
# sid.append(line.id)
# cash_pool.unlink(cr, uid, sid)
#
# cr.execute("select id from account_bank_statement where journal_id=%s and user_id=%s and state=%s order by id desc limit 1", (statement.journal_id.id, uid, 'confirm'))
# rs = cr.fetchone()
# rs = rs and rs[0] or None
# if rs:
# statement = statement_pool.browse(cr, uid, rs)
# balance_start = statement.balance_end_real or 0.0
# open_ids = cash_pool.search(cr, uid, [('ending_id','=',statement.id)])
# for sid in open_ids:
# default = {
# 'ending_id': False,
# 'starting_id':ids[0]
# }
# cash_pool.copy(cr, uid, sid, default)
#
vals = {
'date':time.strftime("%Y-%m-%d %H:%M:%S"),
'state':'open',
+1 -1
View File
@@ -819,7 +819,7 @@ class account_move_line(osv.osv):
fld = []
fields = {}
flds = []
title = self.view_header_get(cr, uid, view_id, view_type, context)
title = "Accounting Entries" #self.view_header_get(cr, uid, view_id, view_type, context)
xml = '''<?xml version="1.0"?>\n<tree string="%s" editable="top" refresh="5" on_write="on_create_write">\n\t''' % (title)
journal_pool = self.pool.get('account.journal')
+11 -11
View File
@@ -477,9 +477,9 @@
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<filter string="Confirm" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<separator orientation="vertical"/>
<field name="journal_id" widget="selection"/>
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">
@@ -498,7 +498,7 @@
<form string="Bank Statement">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="date" select="1"/>
<field name="date" select="1" on_change="onchange_date(date)"/>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" select="1"/>
<field name="period_id"/>
<field name="balance_start"/>
@@ -578,12 +578,12 @@
<field name="filter" eval="True"/>
</record>
<record id="action_bank_statement_tree2" model="ir.actions.act_window">
<field name="name">New Statement</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
</record>
<!-- <record id="action_bank_statement_tree2" model="ir.actions.act_window">-->
<!-- <field name="name">New Statement</field>-->
<!-- <field name="res_model">account.bank.statement</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">form,tree</field>-->
<!-- </record>-->
<record id="view_bank_statement_reconcile" model="ir.ui.view">
<field name="name">account.bank.statement.reconcile.form</field>
@@ -2420,7 +2420,7 @@
</page>
<page string="CashBox">
<group col="2" colspan="2" expand="1">
<field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','=','draft')]}">
<field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','draft')]}">
<tree string = "Opening Balance" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
@@ -2434,7 +2434,7 @@
</field>
</group>
<group col="2" colspan="2" expand="1">
<field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','=','draft')]}">
<field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','!=','open')]}">
<tree string = "Closing Balance" editable="bottom">
<field name="pieces"/>
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
@@ -2455,7 +2455,7 @@
<group col="6" colspan="4">
<group col="2" colspan="2">
<separator string="Dates" colspan="4"/>
<field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}" on_change="onchange_date(date)"/>
<field name="closing_date" select="1" attrs="{'readonly':[('state','=','confirm')]}"/>
</group>
<group col="2" colspan="2">
+6 -10
View File
@@ -27,19 +27,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Board">
<vpaned>
<hpaned>
<child1>
<action colspan="4" height="160" name="%(account.action_invoice_tree1)d" string="Draft Customer Invoices" domain="[('state','=','draft'),('type','=','out_invoice')]"/>
<action colspan="4" height="160" width="400" name="%(account.action_invoice_tree1)d" string="Draft Customer Invoices" domain="[('state','=','draft'),('type','=','out_invoice')]"/>
</child1>
<child2>
<group col="2" colspan="2" expand="1">
<action colspan="4" name="%(action_aged_receivable)d" string="Aged receivables"/>
</group>
<group col="2" colspan="2">
<action colspan="4" height="220" name="%(action_aged_income)d" string="Aged income"/>
</group>
<action colspan="4" height="220" name="%(action_aged_receivable)d" string="Aged receivables"/>
<action colspan="4" height="220" name="%(action_aged_income)d" string="Aged income"/>
</child2>
</vpaned>
</hpaned>
</form>
</field>
</record>
@@ -53,7 +49,7 @@
<field name="view_id" ref="board_account_form"/>
</record>
<menuitem icon="terp-graph" id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting"/>
<menuitem id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting"/>
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/>
</data>
</openerp>
+357 -30
View File
@@ -7,13 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-06-29 22:11+0000\n"
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
"PO-Revision-Date: 2010-07-26 17:47+0000\n"
"Last-Translator: Albert Cervera i Areny - http://www.NaN-tic.com <albert@nan-"
"tic.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-01 03:45+0000\n"
"X-Launchpad-Export-Date: 2010-07-27 03:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -55,7 +56,7 @@ msgstr "Activo"
#. module: account
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nombre de modelo inválido en la definición de acción."
msgstr "Nombre de modelo no válido en la definición de la acción."
#. module: account
#: help:account.journal,currency:0
@@ -193,8 +194,6 @@ msgstr "Seleccionar línea movimineto"
#. module: account
#: rml:account.journal.period.print:0
#: rml:account.tax.code.entries:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
msgid "Entry label"
msgstr "Ref. asiento"
@@ -218,7 +217,7 @@ msgstr "Código para calcular (si tipo=código)"
#: view:account.move:0
#: view:account.move.line:0
msgid "Account Entry Line"
msgstr "Línea del asiento contable"
msgstr "Apunte"
#. module: account
#: wizard_view:account.aged.trial.balance,init:0
@@ -239,7 +238,6 @@ msgstr "Asientos recurrentes"
#: field:account.move,amount:0
#: field:account.tax,amount:0
#: field:account.tax.template,amount:0
#: xsl:account.transfer:0
msgid "Amount"
msgstr "Importe"
@@ -308,7 +306,6 @@ msgstr "Pagos fuera de plazo"
#. module: account
#: wizard_view:account.account.balance.report,checktype:0
#: wizard_view:account.analytic.account.analytic.check.report,init:0
#: wizard_view:account.analytic.account.balance.report,init:0
#: wizard_view:account.analytic.account.cost_ledger.report,init:0
#: wizard_view:account.analytic.account.inverted.balance.report,init:0
#: wizard_view:account.analytic.account.quantity_cost_ledger.report,init:0
@@ -348,6 +345,7 @@ msgid "Delta Debit"
msgstr "Diferencia debe"
#. module: account
#: model:account.account.type,name:account.account_type_tax
#: rml:account.invoice:0
#: field:account.invoice,amount_tax:0
#: field:account.move.line,account_tax_id:0
@@ -362,7 +360,9 @@ msgstr "Trans. debe"
#. module: account
#: field:account.analytic.line,account_id:0
#: field:account.invoice.line,account_analytic_id:0
#: wizard_field:account.invoice.pay,addendum,analytic_id:0
#: field:account.move.line,analytic_account_id:0
#: wizard_field:account.move.line.reconcile,addendum,analytic_id:0
#: field:report.hr.timesheet.invoice.journal,account_id:0
msgid "Analytic Account"
msgstr "Cuenta analítica"
@@ -686,8 +686,11 @@ msgstr "Subtotal :"
#. module: account
#: field:account.analytic.account,line_ids:0
#: view:account.analytic.line:0
#: code:addons/account/project/wizard/wizard_account_analytic_line.py:0
#: model:ir.actions.act_window,name:account.action_account_analytic_line_form
#: model:ir.actions.act_window,name:account.action_account_tree1
#: model:ir.ui.menu,name:account.next_id_41
#, python-format
msgid "Analytic Entries"
msgstr "Asientos analíticos"
@@ -702,6 +705,7 @@ msgid "Associated Partner"
msgstr "Empresa asociada"
#. module: account
#: view:account.invoice:0
#: field:account.invoice,comment:0
msgid "Additional Information"
msgstr "Información adicional"
@@ -1018,7 +1022,7 @@ msgstr "Contabilidad financiera"
#. module: account
#: rml:account.invoice:0
msgid "Net Total:"
msgstr "Total neto:"
msgstr "Base:"
#. module: account
#: view:account.fiscal.position:0
@@ -1486,6 +1490,9 @@ msgstr "Dejarlo vacío para usar la cuenta de ingresos"
#: field:account.bank.statement.reconcile,line_new_ids:0
#: wizard_view:account.move.line.reconcile,init_full:0
#: wizard_view:account.move.line.reconcile,init_partial:0
#: code:addons/account/wizard/wizard_pay_invoice.py:0
#: code:addons/account/wizard/wizard_reconcile.py:0
#, python-format
msgid "Write-Off"
msgstr "Desajuste"
@@ -1896,7 +1903,6 @@ msgstr "x Diario facturas rectificativas (abono) de gastos"
#: field:account.journal,type:0
#: field:account.move,type:0
#: field:account.move.reconcile,type:0
#: xsl:account.transfer:0
msgid "Type"
msgstr "Tipo"
@@ -2094,7 +2100,7 @@ msgstr "Gasto"
#. module: account
#: field:account.journal,invoice_sequence_id:0
msgid "Invoice Sequence"
msgstr "factura de secuencia"
msgstr "Secuencia de facturas"
#. module: account
#: wizard_view:account.automatic.reconcile,init:0
@@ -2109,7 +2115,7 @@ msgstr "Proceso de factura de cliente"
#. module: account
#: rml:account.invoice:0
msgid "Fiscal Position Remark :"
msgstr "Comentario situacion fiscal"
msgstr "Observación posición fiscal :"
#. module: account
#: wizard_field:account.fiscalyear.close,init,period_id:0
@@ -2340,13 +2346,13 @@ msgstr "La cuenta base de la declaración de impuestos."
#: selection:account.general.ledger.report,checktype,sortbydate:0
#: rml:account.journal.period.print:0
#: field:account.move,date:0
#: wizard_field:account.move.line.reconcile,addendum,date_p:0
#: rml:account.overdue:0
#: wizard_field:account.subscription.generate,init,date:0
#: field:account.subscription.line,date:0
#: rml:account.tax.code.entries:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
#: xsl:account.transfer:0
msgid "Date"
msgstr "Fecha"
@@ -2467,10 +2473,11 @@ msgstr "Fecha final"
#: view:account.bank.statement:0
#: field:account.move.reconcile,line_id:0
#: model:ir.actions.act_window,name:account.action_move_line_search
#: model:ir.actions.act_window,name:account.action_move_line_select
#: model:ir.actions.act_window,name:account.action_move_line_tree1
#: model:ir.ui.menu,name:account.menu_action_move_line_search
msgid "Entry Lines"
msgstr "Líneas de asiento"
msgstr "Apuntes"
#. module: account
#: view:account.tax:0
@@ -2660,6 +2667,8 @@ msgstr ""
#. module: account
#: rml:account.analytic.account.journal:0
#: wizard_view:account.invoice.pay,addendum:0
#: wizard_view:account.move.line.reconcile,addendum:0
#: model:ir.ui.menu,name:account.next_id_40
#: model:process.node,name:account.process_node_analytic0
#: model:process.node,name:account.process_node_analyticcost0
@@ -2768,6 +2777,7 @@ msgid "Invoice Number"
msgstr "Número factura"
#. module: account
#: wizard_field:account.analytic.account.balance.report,init,date2:0
#: field:account.period,date_stop:0
msgid "End of Period"
msgstr "Fin de período"
@@ -2780,7 +2790,7 @@ msgstr "_Aceptar"
#. module: account
#: field:account.invoice,amount_untaxed:0
msgid "Untaxed"
msgstr "Sin impuestos"
msgstr "Base"
#. module: account
#: model:ir.actions.report.xml,name:account.account_analytic_account_inverted_balance
@@ -2954,8 +2964,6 @@ msgstr "Nombre completo de la cuenta"
#: rml:account.journal.period.print:0
#: rml:account.partner.balance:0
#: rml:account.tax.code.entries:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
#: rml:account.vat.declaration:0
msgid "1cm 27.7cm 20cm 27.7cm"
msgstr "1cm 27.7cm 20cm 27.7cm"
@@ -3005,16 +3013,18 @@ msgstr "Conciliación de asientos de órdenes de pago."
#: model:ir.actions.act_window,name:account.act_account_journal_2_account_move_line
#: model:ir.model,name:account.model_account_move_line
msgid "Entry lines"
msgstr "Líneas de asiento"
msgstr "Apuntes"
#. module: account
#: wizard_view:account.automatic.reconcile,init:0
#: wizard_view:account.move.line.reconcile,init_full:0
#: wizard_view:account.move.line.reconcile,init_partial:0
#: wizard_view:account.move.line.reconcile.select,init:0
#: code:addons/account/wizard/wizard_reconcile_select.py:0
#: model:ir.ui.menu,name:account.next_id_20
#: model:process.node,name:account.process_node_reconciliation0
#: model:process.node,name:account.process_node_supplierreconciliation0
#, python-format
msgid "Reconciliation"
msgstr "Conciliación"
@@ -3077,7 +3087,6 @@ msgstr "Situación"
#. module: account
#: rml:account.invoice:0
#: xsl:account.transfer:0
msgid "Document"
msgstr "Documento"
@@ -3127,6 +3136,8 @@ msgstr "Diario analítico"
#. module: account
#: rml:account.general.ledger:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
msgid "Entry Label"
msgstr "Etiqueta asiento"
@@ -3319,6 +3330,7 @@ msgid "Generate Fiscal Year Opening Entries"
msgstr "Generar asientos apertura ejercicio fiscal"
#. module: account
#: view:account.move.reconcile:0
#: model:ir.actions.wizard,name:account.wizard_reconcile
msgid "Reconcile Entries"
msgstr "Conciliar los asientos"
@@ -3676,7 +3688,6 @@ msgstr ""
"empresa actual."
#. module: account
#: wizard_field:account.invoice.pay,addendum,comment:0
#: wizard_field:account.invoice.pay,init,name:0
msgid "Entry Name"
msgstr "Descripción"
@@ -4146,8 +4157,8 @@ msgid ""
"You can check this box to mark the entry line as a litigation with the "
"associated partner"
msgstr ""
"Marque esta opción para señalar la línea de asiento en desacuerdo con la "
"empresa asociada"
"Marque esta opción para señalar el apunte en desacuerdo con la empresa "
"asociada"
#. module: account
#: model:ir.actions.act_window,name:account.action_invoice_tree1
@@ -4285,7 +4296,7 @@ msgid ""
"date for the payment of this entry line."
msgstr ""
"Este campo es usado en asientos a pagar y a cobrar. Puede definir la fecha "
"límite de pago para esta línea de asiento."
"límite de pago para este apunte."
#. module: account
#: rml:account.tax.code.entries:0
@@ -5031,6 +5042,7 @@ msgid "Invoice Lines"
msgstr "Líneas de factura"
#. module: account
#: wizard_field:account.analytic.account.balance.report,init,date1:0
#: field:account.period,date_start:0
msgid "Start of Period"
msgstr "Inicio del periodo"
@@ -5391,7 +5403,7 @@ msgstr "PRO-FORMA"
#. module: account
#: field:account.move.reconcile,line_partial_ids:0
msgid "Partial Entry lines"
msgstr "Líneas de asiento parcial"
msgstr "Apuntes de conciliación parcial"
#. module: account
#: help:account.move.line,statement_id:0
@@ -5427,8 +5439,6 @@ msgstr "Proceso factura de proveedor"
#: rml:account.journal.period.print:0
#: rml:account.partner.balance:0
#: rml:account.tax.code.entries:0
#: rml:account.third_party_ledger:0
#: rml:account.third_party_ledger_other:0
#: rml:account.vat.declaration:0
msgid "Page"
msgstr "Página"
@@ -5514,7 +5524,6 @@ msgstr "Número de periodos"
#. module: account
#: wizard_field:account.analytic.account.analytic.check.report,init,date2:0
#: wizard_field:account.analytic.account.balance.report,init,date2:0
#: wizard_field:account.analytic.account.cost_ledger.report,init,date2:0
#: wizard_field:account.analytic.account.inverted.balance.report,init,date2:0
#: wizard_field:account.analytic.account.journal.report,init,date2:0
@@ -5708,7 +5717,6 @@ msgstr "Ejercicio fiscal a cerrar"
#. module: account
#: wizard_field:account.aged.trial.balance,init,date1:0
#: wizard_field:account.analytic.account.analytic.check.report,init,date1:0
#: wizard_field:account.analytic.account.balance.report,init,date1:0
#: wizard_field:account.analytic.account.cost_ledger.report,init,date1:0
#: wizard_field:account.analytic.account.inverted.balance.report,init,date1:0
#: wizard_field:account.analytic.account.journal.report,init,date1:0
@@ -6258,7 +6266,7 @@ msgid "Show Comparision in %"
msgstr "Mostrar comparación en %"
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
#: wizard_view:account.analytic.account.balance.report,init:0
msgid "Select Period"
msgstr "Seleccionar periodo"
@@ -6435,5 +6443,324 @@ msgstr "A cobrar anteriores"
msgid "Untaxed Amount"
msgstr "Base imponible"
#, python-format
#~ msgid "Integrity Error !"
#~ msgstr "¡Error de integridad!"
#, python-format
#~ msgid "You have to provide an account for the write off entry !"
#~ msgstr "¡Debe indicar una cuenta para el asiento de ajuste!"
#, python-format
#~ msgid "Warning !"
#~ msgstr "¡Atención!"
#, python-format
#~ msgid "You can not delete posted movement: \"%s\"!"
#~ msgstr "¡No puede eliminar el movimiento fijado: \"%s\"!"
#, python-format
#~ msgid "No analytic journal !"
#~ msgstr "¡No diario analítico!"
#, python-format
#~ msgid "Bank Journal "
#~ msgstr "Diario bancario "
#, python-format
#~ msgid "You can not use this general account in this journal !"
#~ msgstr "¡No puede usar esta cuenta general en este diario!"
#, python-format
#~ msgid "You can not add/modify entries in a closed journal."
#~ msgstr "No puede añadir/modificar asientos en un diario cerrado."
#, python-format
#~ msgid ""
#~ "You can not do this modification on a reconciled entry ! Please note that "
#~ "you can just change some non important fields !"
#~ msgstr ""
#~ "¡No puede hacer esta modificación en un asiento conciliado! ¡Observe que "
#~ "sólo puede cambiar algunos campos no importantes!"
#, python-format
#~ msgid "You must first select a partner !"
#~ msgstr "¡Primero debe seleccionar una empresa!"
#, python-format
#~ msgid "The opening journal must not have any entry in the new fiscal year !"
#~ msgstr ""
#~ "¡El diario de apertura no debe tener ningún asiento en el nuevo ejercicio "
#~ "fiscal!"
#~ msgid "account.config.wizard"
#~ msgstr "account.config.asistente"
#, python-format
#~ msgid ""
#~ "The expected balance (%.2f) is different than the computed one. (%.2f)"
#~ msgstr "El balance previsto (%.2f) es diferente del calculado. (%.2f)"
#, python-format
#~ msgid ""
#~ "You can not do this modification on a confirmed entry ! Please note that you "
#~ "can just change some non important fields !"
#~ msgstr ""
#~ "¡No puede hacer esta modificación en un asiento confirmado! ¡Observe que "
#~ "sólo puede cambiar algunos campos no importantes!"
#, python-format
#~ msgid "Purchase Journal"
#~ msgstr "Diario de compras"
#, python-format
#~ msgid "Free Reference"
#~ msgstr "Referencia libre"
#, python-format
#~ msgid "No Partner Defined !"
#~ msgstr "¡No se ha definido empresa!"
#, python-format
#~ msgid "Entries are not of the same account or already reconciled ! "
#~ msgstr "¡Asientos no son de la misma cuenta o ya están conciliados! "
#, python-format
#~ msgid "Invalid action !"
#~ msgstr "¡Acción no válida!"
#, python-format
#~ msgid "No sequence defined in the journal !"
#~ msgstr "¡No se ha definido una secuencia en el diario!"
#, python-format
#~ msgid "Your journal must have a default credit and debit account."
#~ msgstr "El diario debe tener una cuenta haber y debe por defecto."
#, python-format
#~ msgid "The journal must have default credit and debit account"
#~ msgstr "El diario debe tener una cuenta haber y debe por defecto."
#, python-format
#~ msgid "Some entries are already reconciled !"
#~ msgstr "¡Algunos asientos ya están conciliados!"
#, python-format
#~ msgid "No Analytic Journal !"
#~ msgstr "¡No diario analítico!"
#, python-format
#~ msgid "Already Reconciled"
#~ msgstr "Ya conciliado"
#, python-format
#~ msgid "The account entries lines are not in valid state."
#~ msgstr "Las líneas de los asientos contables no están en estado válido."
#, python-format
#~ msgid "Unable to reconcile entry \"%s\": %.2f"
#~ msgstr "No es posible conciliar el asiento \"%s\": %.2f"
#, python-format
#~ msgid "Please set an analytic journal on this financial journal !"
#~ msgstr "¡Por favor indique un diario analítico en este diario financiero!"
#, python-format
#~ msgid "EXJ"
#~ msgstr "GASTO"
#, python-format
#~ msgid "Sales Journal"
#~ msgstr "Diario de ventas"
#, python-format
#~ msgid "BNK"
#~ msgstr "BANCO"
#, python-format
#~ msgid "Entries: "
#~ msgstr "Asientos: "
#, python-format
#~ msgid "Couldn't create move between different companies"
#~ msgstr "No se ha podido crear movimiento entre diferentes compañías"
#, python-format
#~ msgid "Entry \"%s\" is not valid !"
#~ msgstr "¡El asiento \"%s\" no es válido!"
#, python-format
#~ msgid "Error !"
#~ msgstr "¡Error!"
#, python-format
#~ msgid "SAJ"
#~ msgstr "VENTA"
#, python-format
#~ msgid "The journal must have centralised counterpart"
#~ msgstr "El diario debe tener un homólogo centralizado"
#, python-format
#~ msgid "Bad total !"
#~ msgstr "¡Total erróneo!"
#, python-format
#~ msgid "End of Fiscal Year Entry"
#~ msgstr "Asiento fin de ejercicio fiscal"
#, python-format
#~ msgid "UserError"
#~ msgstr "Error de usuario"
#, python-format
#~ msgid "Warning"
#~ msgstr "Aviso"
#, python-format
#~ msgid "Please verify that an account is defined in the journal."
#~ msgstr "Compruebe que se ha definido una cuenta en el diario."
#, python-format
#~ msgid "You can not use an inactive account!"
#~ msgstr "¡No puede utilizar una cuenta inactiva!"
#, python-format
#~ msgid "Entry is already reconciled"
#~ msgstr "El asiento ya está conciliado"
#, python-format
#~ msgid ""
#~ "Selected Move lines does not have any account move enties in draft state"
#~ msgstr ""
#~ "Ha seleccionado apuntes que no tienen ningún asiento contable en estado "
#~ "borrador"
#, python-format
#~ msgid "Standard Encoding"
#~ msgstr "Codificación estándar"
#, python-format
#~ msgid "Bad account!"
#~ msgstr "¡Cuenta incorrecta!"
#, python-format
#~ msgid "Closing of fiscal year cancelled, please check the box !"
#~ msgstr "¡Cierre del ejercicio fiscal cancelado, por favor marque la caja!"
#, python-format
#~ msgid "Bad account !"
#~ msgstr "¡Cuenta incorrecta!"
#, python-format
#~ msgid "Error"
#~ msgstr "Error"
#, python-format
#~ msgid "Taxes missing !"
#~ msgstr "¡Faltan impuestos!"
#, python-format
#~ msgid "No piece number !"
#~ msgstr "¡Ningún trozo de número!"
#, python-format
#~ msgid "Closing of states cancelled, please check the box !"
#~ msgstr "¡Cierre de estados cancelado, por favor marque la caja!"
#, python-format
#~ msgid "You have to define an analytic journal on the '%s' journal!"
#~ msgstr "¡Debe definir un diario analítico en el diario '%s'!"
#, python-format
#~ msgid "No Data Available"
#~ msgstr "No hay datos disponibles"
#, python-format
#~ msgid "You must select accounts to reconcile"
#~ msgstr "Debe seleccionar las cuentas a conciliar"
#, python-format
#~ msgid "Cannot delete invoice(s) that are already opened or paid !"
#~ msgstr "¡No se puede eliminar factura(s) que ya estan abiertas o pagadas!"
#, python-format
#~ msgid "Unable to change tax !"
#~ msgstr "¡No ha sido posible cambiar el impuesto!"
#, python-format
#~ msgid "Invoice is already reconciled"
#~ msgstr "La factura ya está conciliada"
#, python-format
#~ msgid "Date to must be set between %s and %s"
#~ msgstr "La fecha debe estar entre %s y %s"
#, python-format
#~ msgid "No records found for your selection!"
#~ msgstr "¡No se han encontrado registros en su selección!"
#, python-format
#~ msgid "Data Insufficient !"
#~ msgstr "¡Datos insuficientes!"
#, python-format
#~ msgid "Date not in a defined fiscal year"
#~ msgstr "La fecha no está en un ejercicio fiscal definido"
#, python-format
#~ msgid "Can not pay draft/proforma/cancel invoice."
#~ msgstr "No se puede pagar una factura borrador/proforma/cancelada."
#, python-format
#~ msgid "You must define an analytic journal of type '%s' !"
#~ msgstr "¡Debe definir un diario analítico de tipo '%s'!"
#, python-format
#~ msgid "No journal for ending writing has been defined for the fiscal year"
#~ msgstr ""
#~ "No se ha definido un diario para el asiento de cierre para el ejercicio "
#~ "fiscal"
#, python-format
#~ msgid "Can not %s draft/proforma/cancel invoice."
#~ msgstr "No se puede %s factura borrador/proforma/cancelada."
#, python-format
#~ msgid "Cannot create invoice move on centralised journal"
#~ msgstr "No se puede crear asiento factura en el diario centralizado"
#, python-format
#~ msgid ""
#~ "The Payment Term of Supplier does not have Payment Term Lines(Computation) "
#~ "defined !"
#~ msgstr ""
#~ "¡El plazo de pago de los proveedores no tiene líneas de plazo de pago "
#~ "(Cálculo) definidas!"
#, python-format
#~ msgid "You can not change the tax, you should remove and recreate lines !"
#~ msgstr ""
#~ "¡No se puede cambiar el impuesto, debe eliminar y recrear las líneas!"
#, python-format
#~ msgid "Global taxes defined, but are not in invoice lines !"
#~ msgstr ""
#~ "¡Impuestos globales definidos, pero no están en líneas de la factura!"
#, python-format
#~ msgid "No Period found on Invoice!"
#~ msgstr "No se encontro un período en la factura"
#, python-format
#~ msgid "No period found !"
#~ msgstr "¡No se ha encontrado período!"
#, python-format
#~ msgid "Unable to find a valid period !"
#~ msgstr "¡No ha sido posible encontrar un período válido!"
#, python-format
#~ msgid "You must enter a period length that cannot be 0 or below !"
#~ msgstr ""
#~ "¡Debe introducir una duración del período que no puede ser 0 o inferior!"
@@ -7,7 +7,7 @@
<field name="inherit_id" ref="account.board_account_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="/form/vpaned/child1" position="inside">
<xpath expr="/form/hpaned/child2/action[@string='Aged receivables']" position="before">
<button colspan="4" icon="terp-purchase" name="%(account_report.action_account_report_tree_view_indicator)d" string="My indicators" type="action"/>
</xpath>
</field>
+270
View File
@@ -0,0 +1,270 @@
# Polish translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-06-18 10:59+0000\n"
"PO-Revision-Date: 2010-07-26 10:16+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\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: 2010-07-27 03:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr "Konta podrzędne"
#. module: analytic
#: help:account.analytic.line,amount_currency:0
msgid ""
"The amount expressed in the related account currency if not equal to the "
"company one."
msgstr ""
"Kwota wyrażona w walucie konta, jeśli waluta jest inna niż waluta firmy."
#. module: analytic
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Nazwa obiektu musi zaczynać się od x_ oraz nie może zawierać znaków "
"specjalnych !"
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
msgstr "Nazwa konta"
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
msgstr "Określa ilość do obliczeń."
#. module: analytic
#: help:account.analytic.line,currency_id:0
msgid "The related account currency if not equal to the company one."
msgstr "Waluta konta, jeśli waluta jest inna niż firmy."
#. module: analytic
#: model:ir.module.module,description:analytic.module_meta_information
msgid ""
"Module for defining analytic accounting object.\n"
" "
msgstr ""
"Moduł do definiowania obiektów księgowości analitycznej.\n"
" "
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
msgstr "Stan"
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
msgstr "Główna(y) księgowa(y)"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Draft"
msgstr "Projekt"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
msgstr "Zamknięte"
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
msgstr "Winien"
#. module: analytic
#: help:account.analytic.account,state:0
msgid ""
"* When an account is created its in 'Draft' state. "
" \n"
"* If any associated partner is there, it can be in 'Open' state. "
" \n"
"* If any pending balance is there it can be in 'Pending'. "
" \n"
"* And finally when all the transactions are over, it can be in 'Close' "
"state. \n"
"* The project can be in either if the states 'Template' and 'Running'.\n"
" If it is template then we can make projects based on the template projects. "
"If its in 'Running' state it is a normal project. "
" \n"
" If it is to be reviewed then the state is 'Pending'.\n"
" When the project is completed the state is set to 'Done'."
msgstr ""
#. module: analytic
#: field:account.analytic.account,type:0
msgid "Account Type"
msgstr "Typ Konta"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
msgstr "Szablon"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
msgstr "Oczekujące"
#. module: analytic
#: model:ir.model,name:analytic.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: analytic
#: field:account.analytic.account,description:0
#: field:account.analytic.line,name:0
msgid "Description"
msgstr "Opis"
#. module: analytic
#: help:account.analytic.line,amount:0
msgid ""
"Calculated by multiplying the quantity and the price given in the Product's "
"cost price."
msgstr ""
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
msgstr "Firma"
#. module: analytic
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Quantity"
msgstr "Ilość maksymalna"
#. module: analytic
#: field:account.analytic.line,user_id:0
msgid "User"
msgstr "Użytkownik"
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr "Nadrzędne konto analityczne"
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
msgstr "Data"
#. module: analytic
#: field:account.analytic.account,currency_id:0
#: field:account.analytic.line,currency_id:0
msgid "Account currency"
msgstr "Waluta konta"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
msgstr "Widok"
#. module: analytic
#: help:account.analytic.account,quantity_max:0
msgid "Sets the higher limit of quantity of hours."
msgstr ""
#. module: analytic
#: field:account.analytic.account,credit:0
msgid "Credit"
msgstr "Ma"
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
msgstr "Kwota"
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr "Kontakt"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
msgstr "Anulowano"
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
msgstr "Saldo"
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
msgstr "Data rozpoczęcia"
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
msgstr "Ilość"
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
msgstr "Data końcowa"
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Account Code"
msgstr "Kod konta"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
msgstr "Normalne"
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
msgstr "Pełna nazwa konta"
#. module: analytic
#: field:account.analytic.line,account_id:0
#: model:ir.model,name:analytic.model_account_analytic_account
#: model:ir.module.module,shortdesc:analytic.module_meta_information
msgid "Analytic Account"
msgstr "Konto analityczne"
#. module: analytic
#: field:account.analytic.account,company_currency_id:0
msgid "Currency"
msgstr "Waluta"
#. module: analytic
#: field:account.analytic.line,amount_currency:0
msgid "Amount currency"
msgstr "Waluta kwoty"
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
msgstr "Przypisany partner"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
msgstr "Otwarte"
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
msgstr "Zapisy analityczne"
+1 -1
View File
@@ -1540,7 +1540,7 @@ Object encoded
<field name="model">report.unclassified.objects</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state in ('draft','unsold');black:state in ('sold');gray:state in ('paid')"string="Unclassified objects">
<tree colors="blue:state in ('draft','unsold');black:state in ('sold');gray:state in ('paid')" string="Unclassified objects">
<field name="obj_num" string="Ref" select="1"/>
<field name="name" select="1"/>
<field name="ach_login"/>
+1 -1
View File
@@ -58,7 +58,7 @@
<field name="usage">menu</field>
<field name="view_id" ref="board_auction_manager_form"/>
</record>
<menuitem icon="terp-graph" name="Dashboard" id="menu_board_auction" parent="auction_report_menu" sequence="0"/>
<menuitem name="Dashboard" id="menu_board_auction" parent="auction_report_menu" sequence="0"/>
<menuitem
name="Auction Member"
action="open_board_auction"
+11 -9
View File
@@ -60,7 +60,8 @@ class base_action_rule(osv.osv):
return [('', '')]
_columns = {
'name': fields.many2one('ir.model', 'Object', required=True),
'name': fields.char('Rule Name', size=64, required=True),
'model_id': fields.many2one('ir.model', 'Object', required=True),
'create_date': fields.datetime('Create Date', readonly=1),
'active': fields.boolean('Active', help="If the active field is set to False,\
it will allow you to hide the rule without removing it."),
@@ -125,6 +126,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
_order = 'sequence'
def onchange_model_id(self, cr, uid, ids, name):
#This is not a good solution as it will affect the domain only on onchange
res = {'domain':{'filter_id':[]}}
if name:
model_name = self.pool.get('ir.model').read(cr, uid, [name], ['model'])
@@ -138,7 +140,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
def pre_action(self, cr, uid, ids, model, context=None):
# Searching for action rules
cr.execute("SELECT model.model, rule.id FROM base_action_rule rule \
LEFT JOIN ir_model model on (model.id = rule.name) \
LEFT JOIN ir_model model on (model.id = rule.model_id) \
where active")
res = cr.fetchall()
# Check if any rule matching with current object
@@ -175,7 +177,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
if not context:
context = {}
for action_rule in self.browse(cr, uid, ids, context=context):
model = action_rule.name.model
model = action_rule.model_id.model
obj_pool = self.pool.get(model)
obj_pool.__setattr__('create', self._create(obj_pool.create, model, context=context))
obj_pool.__setattr__('write', self._write(obj_pool.write, model, context=context))
@@ -257,7 +259,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
@param context: A standard dictionary for contextual values """
ok = True
if action.filter_id:
if action.name.model == action.filter_id.model_id:
if action.model_id.model == action.filter_id.model_id:
context.update(eval(action.filter_id.context))
obj_ids = obj._table.search(cr, uid, eval(action.filter_id.domain), context=context)
if not obj.id in obj_ids:
@@ -355,24 +357,24 @@ the rule to mark CC(mail to any other person defined in actions)."),
if not scrit:
scrit = []
for action in self.browse(cr, uid, ids):
model_obj = self.pool.get(action.name.model)
model_obj = self.pool.get(action.model_id.model)
for obj in objects:
ok = self.do_check(cr, uid, action, obj, context=context)
if not ok:
continue
base = False
if hasattr(obj, 'create_date') and action.trg_date_type=='create':
if action.trg_date_type=='create' and hasattr(obj, 'create_date'):
base = datetime.strptime(obj.create_date[:19], '%Y-%m-%d %H:%M:%S')
elif hasattr(obj, 'create_date') and action.trg_date_type=='action_last':
elif action.trg_date_type=='action_last' and hasattr(obj, 'create_date'):
if hasattr(obj, 'date_action_last') and obj.date_action_last:
base = datetime.strptime(obj.date_action_last, '%Y-%m-%d %H:%M:%S')
else:
base = datetime.strptime(obj.create_date[:19], '%Y-%m-%d %H:%M:%S')
elif hasattr(obj, 'date_deadline') and action.trg_date_type=='deadline' \
elif action.trg_date_type=='deadline' and hasattr(obj, 'date_deadline') \
and obj.date_deadline:
base = datetime.strptime(obj.date_deadline, '%Y-%m-%d %H:%M:%S')
elif hasattr(obj, 'date') and action.trg_date_type=='date' and obj.date:
elif action.trg_date_type=='date' and hasattr(obj, 'date') and obj.date:
base = datetime.strptime(obj.date, '%Y-%m-%d %H:%M:%S')
if base:
fnct = {
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="ir_cron_crm_action" model="ir.cron">
<record id="ir_cron_crm_action" model="ir.cron">
<field name="name">Check Action Rules</field>
<field name="interval_number">4</field>
<field name="interval_type">hours</field>
@@ -10,10 +11,7 @@
<field eval="'base.action.rule'" name="model"/>
<field eval="'_check'" name="function"/>
<field eval="'()'" name="args"/>
</record>
</record>
</data>
</openerp>
@@ -14,10 +14,11 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Action Rule">
<field name="name" select="1" on_change="onchange_model_id(name)"/>
<field name="active"/>
<field name="name"/>
<field name="model_id" select="1" on_change="onchange_model_id(model_id)"/>
<field name="filter_id" />
<field name="sequence"/>
<field name="filter_id"/>
<field name="active"/>
<notebook colspan="4">
<page string="Conditions">
<group col="2" colspan="2" name="model">
+1 -1
View File
@@ -3,7 +3,7 @@
<data>
<menuitem icon="terp-graph" id="base.reporting_menu"
name="Reporting" sequence="30" />
<menuitem icon="terp-graph" id="menu_dasboard"
<menuitem id="menu_dasboard"
name="Dashboard" sequence="30" />
<!--Board Note Search View -->
<record id="view_board_note_search" model="ir.ui.view">
+1 -1
View File
@@ -112,7 +112,7 @@
<field name="view_id" ref="board_crm_statistical_form"/>
</record>
<menuitem icon="terp-graph" id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
<menuitem id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
<menuitem
name="Statistics Dashboard" parent="board.menu_dasboard"
+1 -1
View File
@@ -152,7 +152,7 @@
<field name="usage">menu</field>
<field name="view_id" ref="board_crm_form"/>
</record>
<menuitem icon="terp-graph" id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
<menuitem id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
<menuitem
name="Connecting Dashboard" parent="board.menu_dasboard"
action="open_board_crm"
+1 -1
View File
@@ -429,7 +429,7 @@ class crm_case(object):
rule_obj = self.pool.get('base.action.rule')
model_obj = self.pool.get('ir.model')
model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
rule_ids = rule_obj.search(cr, uid, [('name','=',model_ids[0])])
rule_ids = rule_obj.search(cr, uid, [('model_id','=',model_ids[0])])
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
def format_body(self, body):
+1 -2
View File
@@ -56,8 +56,7 @@
id="menu_reports_document"
parent="menu_reporting"
sequence="0"
icon="terp-graph"
groups="base.group_system"/>
groups="document.group_document_manager"/>
<menuitem
+1 -1
View File
@@ -84,7 +84,7 @@
<field name="view_mode">form</field>
<field name="view_id" ref="board_associations_manager_form"/>
</record>
<menuitem id="board_associations" icon="terp-graph" name="Dashboard" parent="base.menu_report_association" sequence="0"/>
<menuitem id="board_associations" name="Dashboard" parent="base.menu_report_association" sequence="0"/>
<menuitem
name="Associations" parent="board_associations"
action="open_board_associations_manager"
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
<menuitem id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
<menuitem
id="menu_hr_deshboard"
name="Human Resources"
@@ -33,7 +33,7 @@
<field name="view_id" ref="board_hr_form"/>
</record>
<menuitem id="menu_hr_reporting" name="Reporting" parent="hr.menu_hr_root" sequence="10"/>
<menuitem icon="terp-graph" id="menu_hr_dasboard" name="Dashboard" parent="menu_hr_reporting" sequence="0"/>
<menuitem id="menu_hr_dasboard" name="Dashboard" parent="menu_hr_reporting" sequence="0"/>
<menuitem
action="open_board_hr"
icon="terp-graph"
+6
View File
@@ -34,6 +34,8 @@ class hr_employee_category(osv.osv):
}
def _check_recursion(self, cr, uid, ids, context=None):
if context is None:
context = {}
level = 100
while len(ids):
cr.execute('select distinct parent_id from hr_employee_category where id IN %s', (tuple(ids), ))
@@ -62,6 +64,8 @@ hr_employee_marital_status()
class hr_job(osv.osv):
def _no_of_employee(self, cr, uid, ids, name, args, context=None):
if context is None:
context = {}
res = {}
for emp in self.browse(cr, uid, ids):
res[emp.id] = len(emp.employee_ids or [])
@@ -133,6 +137,8 @@ class hr_employee(osv.osv):
}
def _get_photo(self, cr, uid, context=None):
if context is None:
context = {}
return open(os.path.join(
tools.config['addons_path'], 'hr/image', 'photo.png'),
'rb') .read().encode('base64')
+24 -11
View File
@@ -29,7 +29,7 @@ class hr_department(osv.osv):
context = {}
if not len(ids):
return []
reads = self.read(cr, uid, ids, ['name','parent_id'], context)
reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
res = []
for record in reads:
name = record['name']
@@ -39,6 +39,8 @@ class hr_department(osv.osv):
return res
def _dept_name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None):
if context is None:
context = {}
res = self.name_get(cr, uid, ids, context=context)
return dict(res)
@@ -59,7 +61,9 @@ class hr_department(osv.osv):
}
def _get_members(self,cr, uid, context=None):
mids = self.search(cr, uid, [('manager_id', '=', uid)])
if context is None:
context = {}
mids = self.search(cr, uid, [('manager_id', '=', uid)], context=context)
result = {uid: 1}
for m in self.browse(cr, uid, mids, context=context):
for user in m.member_ids:
@@ -67,6 +71,8 @@ class hr_department(osv.osv):
return result.keys()
def _check_recursion(self, cr, uid, ids, context=None):
if context is None:
context = {}
level = 100
while len(ids):
cr.execute('select distinct parent_id from hr_department where id IN %s',(tuple(ids),))
@@ -89,6 +95,7 @@ class ir_action_window(osv.osv):
def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
if context is None:
context = {}
obj_dept = self.pool.get('hr.department')
select = ids
if isinstance(ids, (int, long)):
select = [ids]
@@ -96,7 +103,7 @@ class ir_action_window(osv.osv):
for r in res:
mystring = 'department_users_get()'
if mystring in (r.get('domain', '[]') or ''):
r['domain'] = r['domain'].replace(mystring, str(self.pool.get('hr.department')._get_members(cr, uid)))
r['domain'] = r['domain'].replace(mystring, str(obj_dept._get_members(cr, uid)))
if isinstance(ids, (int, long)):
if res:
return res[0]
@@ -111,18 +118,22 @@ class res_users(osv.osv):
_description = 'User'
def _parent_compute(self, cr, uid, ids, name, args, context=None):
if context is None:
context = {}
result = {}
obj_dept = self.pool.get('hr.department')
for user_id in ids:
ids_dept = obj_dept.search(cr, uid, [('member_ids', 'in', [user_id])])
ids_dept = obj_dept.search(cr, uid, [('member_ids', 'in', [user_id])], context=context)
parent_ids = []
if ids_dept:
data_dept = obj_dept.read(cr, uid, ids_dept, ['manager_id'])
data_dept = obj_dept.read(cr, uid, ids_dept, ['manager_id'], context=context)
parent_ids = map(lambda x: x['manager_id'][0], data_dept)
result[user_id] = parent_ids
return result
def _parent_search(self, cr, uid, obj, name, args, context=None):
if context is None:
context = {}
parent = []
for arg in args:
if arg[0] == 'parent_id':
@@ -133,20 +144,20 @@ class res_users(osv.osv):
return [('id', 'in', child_ids.get(uid,[]))]
def _child_compute(self, cr, uid, ids, name, args, context=None):
if context is None:
context = {}
obj_dept = self.pool.get('hr.department')
obj_user = self.pool.get('res.users')
result = {}
if context is None:
context = {}
for manager_id in ids:
child_ids = []
mgnt_dept_ids = obj_dept.search(cr, uid, [('manager_id', '=', manager_id)])
ids_dept = obj_dept.search(cr, uid, [('id', 'child_of', mgnt_dept_ids)])
mgnt_dept_ids = obj_dept.search(cr, uid, [('manager_id', '=', manager_id)], context=context)
ids_dept = obj_dept.search(cr, uid, [('id', 'child_of', mgnt_dept_ids)], context=context)
if ids_dept:
data_dept = obj_dept.read(cr, uid, ids_dept, ['member_ids'])
data_dept = obj_dept.read(cr, uid, ids_dept, ['member_ids'], context=context)
childs = map(lambda x: x['member_ids'], data_dept)
childs = tools.flatten(childs)
childs = obj_user.search(cr, uid, [('id', 'in', childs),('active', '=', True)])
childs = obj_user.search(cr, uid, [('id', 'in', childs),('active', '=', True)], context=context)
if manager_id in childs:
childs.remove(manager_id)
child_ids.extend(tools.flatten(childs))
@@ -159,6 +170,8 @@ class res_users(osv.osv):
return result
def _child_search(self, cr, uid, obj, name, args, context=None):
if context is None:
context = {}
parent = []
for arg in args:
if arg[0] == 'child_ids':
+13 -2
View File
@@ -37,7 +37,9 @@ class hr_action_reason(osv.osv):
hr_action_reason()
def _employee_get(obj, cr, uid, context=None):
ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)])
if context is None:
context = {}
ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
if ids:
return ids[0]
return False
@@ -47,6 +49,8 @@ class hr_attendance(osv.osv):
_description = "Attendance"
def _day_compute(self, cr, uid, ids, fieldnames, args, context=None):
if context is None:
context = {}
res = dict.fromkeys(ids, '')
for obj in self.browse(cr, uid, ids, context=context):
res[obj.id] = time.strftime('%Y-%m-%d', time.strptime(obj.name, '%Y-%m-%d %H:%M:%S'))
@@ -89,6 +93,8 @@ class hr_employee(osv.osv):
_description = "Employee"
def _state(self, cr, uid, ids, name, args, context=None):
if context is None:
context = {}
result = {}
for id in ids:
result[id] = 'absent'
@@ -112,11 +118,16 @@ class hr_employee(osv.osv):
}
def _action_check(self, cr, uid, emp_id, dt=False, context=None):
if context is None:
context = {}
cr.execute('select max(name) from hr_attendance where employee_id=%s', (emp_id,))
res = cr.fetchone()
return not (res and (res[0]>=(dt or time.strftime('%Y-%m-%d %H:%M:%S'))))
def attendance_action_change(self, cr, uid, ids, type='action', context=None, dt=False, *args):
obj_attendance = self.pool.get('hr.attendance')
if context is None:
context = {}
id = False
warning_sign = 'sign'
res = {}
@@ -136,7 +147,7 @@ class hr_employee(osv.osv):
if dt:
res['name'] = dt
id = self.pool.get('hr.attendance').create(cr, uid, res, context=context)
id = obj_attendance.create(cr, uid, res, context=context)
if type != 'action':
return id
@@ -35,6 +35,8 @@ class hr_attendance_byweek(osv.osv_memory):
}
def print_report(self, cr, uid, ids, context=None):
if context is None:
context = {}
datas = {
'ids': [],
'model': 'hr.employee',
@@ -42,14 +42,14 @@ class hr_attendance_error(osv.osv_memory):
if context is None:
context = {}
emp_ids = []
data_error = self.read(cr, uid, ids)[0]
data_error = self.read(cr, uid, ids, context=context)[0]
date_from = data_error['init_date']
date_to = data_error['end_date']
cr.execute("select id from hr_attendance where employee_id IN %s and to_char(name,'YYYY-mm-dd')<=%s and to_char(name,'YYYY-mm-dd')>=%s and action IN %s order by name" ,(tuple(context['active_ids']), date_to, date_from, tuple(['sign_in','sign_out'])))
attendance_ids = [x[0] for x in cr.fetchall()]
if not attendance_ids:
raise osv.except_osv(_('No Data Available'), _('No records found for your selection!'))
attendance_records = self.pool.get('hr.attendance').browse(cr, uid, attendance_ids)
attendance_records = self.pool.get('hr.attendance').browse(cr, uid, attendance_ids, context=context)
for rec in attendance_records:
if rec.employee_id.id not in emp_ids:
@@ -53,11 +53,15 @@ class hr_si_so_ask(osv.osv_memory):
}
def sign_in(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, [])[0]
if context is None:
context = {}
data = self.read(cr, uid, ids, [], context=context)[0]
return self.pool.get('hr.sign.in.out').sign_in(cr, uid, data, context)
def sign_out(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, [])[0]
if context is None:
context = {}
data = self.read(cr, uid, ids, [], context=context)[0]
return self.pool.get('hr.sign.in.out').sign_out(cr, uid, data, context)
hr_si_so_ask()
@@ -74,6 +78,8 @@ class hr_sign_in_out(osv.osv_memory):
}
def _get_empid(self, cr, uid, context=None):
if context is None:
context = {}
emp_id = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
if emp_id:
employee = self.pool.get('hr.employee').browse(cr, uid, emp_id, context=context)[0]
@@ -81,6 +87,8 @@ class hr_sign_in_out(osv.osv_memory):
return {}
def default_get(self, cr, uid, fields_list, context=None):
if context is None:
context = {}
res = super(hr_sign_in_out, self).default_get(cr, uid, fields_list, context=context)
res_emp = self._get_empid(cr, uid, context=context)
res.update(res_emp)
@@ -89,10 +97,12 @@ class hr_sign_in_out(osv.osv_memory):
def si_check(self, cr, uid, ids, context=None):
obj_model = self.pool.get('ir.model.data')
att_obj = self.pool.get('hr.attendance')
data = self.read(cr, uid, ids, [])[0]
if context is None:
context = {}
data = self.read(cr, uid, ids, [], context=context)[0]
emp_id = data['emp_id']
att_id = att_obj.search(cr, uid, [('employee_id', '=', emp_id)], limit=1, order='name desc')
last_att = att_obj.browse(cr, uid, att_id)
last_att = att_obj.browse(cr, uid, att_id, context=context)
if last_att:
last_att = last_att[0]
cond = not last_att or last_att.action == 'sign_out'
@@ -113,8 +123,10 @@ class hr_sign_in_out(osv.osv_memory):
def so_check(self, cr, uid, ids, context=None):
obj_model = self.pool.get('ir.model.data')
data = self.read(cr, uid, ids, [])[0]
att_obj = self.pool.get('hr.attendance')
if context is None:
context = {}
data = self.read(cr, uid, ids, [], context=context)[0]
emp_id = data['emp_id']
att_id = att_obj.search(cr, uid, [('employee_id', '=', emp_id),('action', '!=', 'action')], limit=1, order='name desc')
last_att = att_obj.browse(cr, uid, att_id, context=context)
@@ -137,8 +149,8 @@ class hr_sign_in_out(osv.osv_memory):
if cond:
return self.sign_out(cr, uid, data, context)
else:
model_data_ids = self.pool.get('ir.model.data').search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_hr_attendance_si_ask')], context=context)
resource_id = self.pool.get('ir.model.data').read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
model_data_ids = att_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_hr_attendance_si_ask')], context=context)
resource_id = att_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
return {
'name': _('Sign in / Sign out'),
'view_type': 'form',
@@ -150,12 +162,14 @@ class hr_sign_in_out(osv.osv_memory):
}
def sign_in(self, cr, uid, data, context=None):
if context is None:
context = {}
emp_id = data['emp_id']
if 'last_time' in data:
if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'):
raise osv.except_osv(_('UserError'), _('The sign-out date must be in the past'))
self.pool.get('hr.attendance').create(cr, uid, {'name': data['last_time'], 'action': 'sign_out',
'employee_id': emp_id})
'employee_id': emp_id}, context=context)
try:
success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_in')
except:
@@ -163,11 +177,13 @@ class hr_sign_in_out(osv.osv_memory):
return {} # To do: Return Success message
def sign_out(self, cr, uid, data, context=None):
if context is None:
context = {}
emp_id = data['emp_id']
if 'last_time' in data:
if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'):
raise osv.except_osv(_('UserError'), _('The Sign-in date must be in the past'))
self.pool.get('hr.attendance').create(cr, uid, {'name':data['last_time'], 'action':'sign_in', 'employee_id':emp_id})
self.pool.get('hr.attendance').create(cr, uid, {'name':data['last_time'], 'action':'sign_in', 'employee_id':emp_id}, context=context)
try:
success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_out')
except:
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -36,6 +36,7 @@ system to store and search in your CV base.
'depends': ['hr','survey','crm'],
'update_xml': [
'wizard/hr_recruitment_phonecall_view.xml',
'wizard/hr_recruitment_create_partner_job_view.xml',
'hr_recruitment_view.xml',
'hr_recruitment_menu.xml',
# 'report_hr_recruitment_view.xml',
@@ -43,7 +44,6 @@ system to store and search in your CV base.
'security/ir.model.access.csv',
'board_hr_recruitment_statistical_view.xml',
'report/hr_recruitment_report_view.xml',
'wizard/hr_recruitment_create_partner_job_view.xml',
],
'init_xml': [
'hr_recruitment_data.xml'
+27 -12
View File
@@ -59,6 +59,19 @@ class hr_recruitment_stage(osv.osv):
}
hr_recruitment_stage()
class hr_recruitment_degree(osv.osv):
""" Degree of HR Recruitment """
_name = "hr.recruitment.degree"
_description = "Degree of Recruitment"
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of degrees."),
}
_defaults = {
'sequence': 1,
}
hr_recruitment_degree()
class hr_applicant(osv.osv, crm.crm_case):
_name = "hr.applicant"
_description = "Applicant"
@@ -88,6 +101,8 @@ class hr_applicant(osv.osv, crm.crm_case):
# Applicant Columns
'date_closed': fields.datetime('Closed', readonly=True),
'date': fields.datetime('Date'),
'date_action': fields.date('Next Action Date'),
'title_action': fields.char('Next Action', size=64),
'priority': fields.selection(AVAILABLE_PRIORITIES, 'Appreciation'),
'job_id': fields.many2one('hr.job', 'Applied Job'),
'salary_proposed': fields.float('Proposed Salary', help="Salary Proposed by the Organisation"),
@@ -96,7 +111,7 @@ class hr_applicant(osv.osv, crm.crm_case):
'partner_name': fields.char("Applicant's Name", size=64),
'partner_phone': fields.char('Phone', size=32),
'partner_mobile': fields.char('Mobile', size=32),
'type_id': fields.many2one('crm.case.resource.type', 'Degree', domain="[('object_id.model', '=', 'hr.applicant')]"),
'type_id': fields.many2one('hr.recruitment.degree', 'Degree'),
'department_id':fields.many2one('hr.department', 'Department'),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'survey' : fields.related('job_id', 'survey_id', type='many2one', relation='survey', string='Survey'),
@@ -237,7 +252,7 @@ class hr_applicant(osv.osv, crm.crm_case):
def message_new(self, cr, uid, msg, context):
"""
Automatically calls when new email message arrives
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks
@@ -249,7 +264,7 @@ class hr_applicant(osv.osv, crm.crm_case):
body = msg.get('body')
msg_from = msg.get('from')
priority = msg.get('priority')
vals = {
'name': subject,
'email_from': msg_from,
@@ -259,15 +274,15 @@ class hr_applicant(osv.osv, crm.crm_case):
}
if msg.get('priority', False):
vals['priority'] = priority
res = mailgate_pool.get_partner(cr, uid, msg.get('from'))
if res:
vals.update(res)
res = self.create(cr, uid, vals, context)
message = _('A Job Request created') + " '" + subject + "' " + _("from Mailgate.")
self.log(cr, uid, res, message)
attachents = msg.get('attachments', [])
for attactment in attachents or []:
data_attach = {
@@ -283,16 +298,16 @@ class hr_applicant(osv.osv, crm.crm_case):
return res
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}):
"""
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of update mail’s IDs
@param ids: List of update mail’s IDs
"""
if isinstance(ids, (str, int, long)):
ids = [ids]
msg_from = msg['from']
vals.update({
'description': msg['body']
@@ -312,7 +327,7 @@ class hr_applicant(osv.osv, crm.crm_case):
if res and maps.get(res.group(1).lower(), False):
key = maps.get(res.group(1).lower())
vls[key] = res.group(2).lower()
vals.update(vls)
res = self.write(cr, uid, ids, vals)
return res
@@ -328,7 +343,7 @@ class hr_applicant(osv.osv, crm.crm_case):
@param **args: Return Dictionary of Keyword Value
"""
return True
def case_open(self, cr, uid, ids, *args):
"""
@param self: The object pointer
@@ -17,17 +17,17 @@
<!-- Resource(type_id) -->
<record model="crm.case.resource.type" id="type_job1">
<record model="hr.recruitment.degree" id="degree_graduate">
<field name="name">Graduate</field>
<field name="object_id" search="[('model','=','hr.applicant')]" model="ir.model"/>
<field name="sequence">1</field>
</record>
<record model="crm.case.resource.type" id="type_job2">
<record model="hr.recruitment.degree" id="degree_licenced">
<field name="name">Licenced</field>
<field name="object_id" search="[('model','=','hr.applicant')]" model="ir.model"/>
<field name="sequence">2</field>
</record>
<record model="crm.case.resource.type" id="type_job3">
<record model="hr.recruitment.degree" id="degree_bac5">
<field name="name"> > Bac +5</field>
<field name="object_id" search="[('model','=','hr.applicant')]" model="ir.model"/>
<field name="sequence">3</field>
</record>
<record model="hr.recruitment.stage" id="stage_job1">
@@ -9,7 +9,7 @@
<record id="hr_case_salesman0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-01 10:35:50')" name="date"/>
<field eval="time.strftime('%Y-%m-03')" name="date_deadline"/>
<field name="type_id" ref="type_job1"/>
<field name="type_id" ref="degree_graduate"/>
<field name="partner_id" ref="base.res_partner_asus"/>
<field eval="'2'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -29,7 +29,7 @@
<field name="partner_address_id" ref="base.res_partner_address_14"/>
<field name="som" ref="base.som_fury"/>
<field eval="time.strftime('%Y-%m-10 18:15:00')" name="date"/>
<field name="type_id" ref="type_job3"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_15"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -50,7 +50,7 @@
<field name="som" ref="base.som_happy"/>
<field eval="time.strftime('%Y-%m-15 16:10:00')" name="date"/>
<field eval="time.strftime('%Y-%m-18')" name="date_deadline"/>
<field name="type_id" ref="type_job2"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="'1'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -68,7 +68,7 @@
<field eval="time.strftime('%Y-%m-25 16:25:52')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="categ_id" ref="categ_job2"/>
<field name="type_id" ref="type_job3"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_10"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -83,7 +83,7 @@
<record id="hr_case_marketingjob0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-26 17:15:32')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="type_id" ref="type_job2"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="'4'" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
@@ -101,7 +101,7 @@
<record id="hr_case_financejob0" model="hr.applicant">
<field eval="time.strftime('%Y-%m-26 17:39:42')" name="date"/>
<field eval="time.strftime('%Y-%m-28')" name="date_deadline"/>
<field name="type_id" ref="type_job2"/>
<field name="type_id" ref="degree_licenced"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="'4'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -121,7 +121,7 @@
<field name="partner_address_id" ref="base.res_partner_address_14"/>
<field name="som" ref="base.som_fury"/>
<field eval="time.strftime('%Y-%m-12 17:49:19')" name="date"/>
<field name="type_id" ref="type_job3"/>
<field name="type_id" ref="degree_bac5"/>
<field name="partner_id" ref="base.res_partner_15"/>
<field eval="'3'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
@@ -7,9 +7,9 @@
<record model="ir.actions.act_window" id="crm_case_categ0_act_job">
<field name="name">Applicants</field>
<field name="res_model">hr.applicant</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="view_id" ref="crm_case_tree_view_job"/>
<field name="context">{"search_default_user_id":uid}</field>
<field name="context">{"search_default_user_id":uid, 'search_default_current': 1}</field>
<field name="search_view_id" ref="view_crm_case_jobs_filter"/>
</record>
+86 -13
View File
@@ -55,6 +55,8 @@
<field name="stage_id"/>
<button name="stage_previous" string="Previous" states="open,pending" type="object" icon="gtk-go-back"/>
<button name="stage_next" string="Next" states="open,pending" type="object" icon="gtk-go-forward"/>
<field name="title_action" invisible="context.get('invisible_next_action', True)"/>
<field name="date_action" invisible="context.get('invisible_next_date', True)"/>
<field name="survey" invisible="1"/>
<field name="response" invisible="1"/>
<field name="priority"/>
@@ -67,7 +69,6 @@
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_close" string="Hired" states="open,draft,pending" type="object" icon="terp-partner"/>
<button name="case_cancel" string="Refused" states="draft,open,pending" type="object" icon="gtk-cancel"/>
</tree>
</field>
</record>
@@ -94,16 +95,23 @@
<field name="user_id"/>
<button name="action_print_survey" string="Print Interview" type="object" icon="gtk-print" attrs="{'readonly':[('survey','=',False)]}"/>
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant', 'cur_id' :active_id}" attrs="{'readonly':[('survey','=',False)]}" groups="base.group_extended"/>
<newline/>
<field name="date_action"/>
<field name="title_action"/>
</group>
<notebook colspan="4">
<page string="Job Info">
<group col="2" colspan="2">
<separator colspan="2" string="Contact"/>
<group col="3" colspan="2">
<separator colspan="3" string="Contact"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" />
<field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)"/>
<field name="email_from"/>
<field name="partner_phone"/>
<field name="partner_mobile"/>
<button string="Create Partner"
name="%(action_hr_recruitment_partner_create)d"
icon="terp-mail-replied" type="action"/>
<newline/>
<field name="partner_address_id" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="3"/>
<field name="email_from" colspan="3"/>
<field name="partner_phone" colspan="3"/>
<field name="partner_mobile" colspan="3"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Contract Data"/>
@@ -113,7 +121,8 @@
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Qualification"/>
<field name="type_id" domain="[('object_id.model', '=', 'hr.applicant')]"/>
<!-- <field name="type_id" domain="[('object_id.model', '=', 'hr.applicant')]"/>-->
<field name="type_id"/>
<field name="priority" string="Appreciation"/>
<field name="reference"/>
</group>
@@ -133,13 +142,13 @@
<button name="case_reset" string="Reset to New" states="done,cancel" type="object" icon="gtk-convert"/>
</group>
</page>
<page string="Internal Notes">
<page string="Notes">
<field name="description" nolabel="1" colspan="4"/>
</page>
<page string="History" groups="base.group_extended">
<!-- <page string="History" groups="base.group_extended">
<field name="id"/>
<field name="active"/>
</page>
</page> -->
<page string="Emails" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="Global CC" widget="char"/>
@@ -176,10 +185,13 @@
icon="terp-mail-replied" type="action" />
</form>
</field>
<button colspan="4" string="Send New Email"
<button colspan="2" string="Send New Email"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'new', 'model': 'hr.applicant'}"
icon="terp-mail-message-new" type="action" />
<button colspan="2" string="Forward"
name="%(crm.crm_lead_forward_to_partner_act)d"
icon="terp-mail-forward" type="action" />
</page>
</notebook>
</form>
@@ -210,6 +222,7 @@
domain="[('state','in',('draft','open'))]"
help="All new and in progress jobs"
default="1"
name="current"
/>
<filter icon="terp-document-new" string="New"
domain="[('state','=','draft')]"
@@ -224,10 +237,15 @@
help="Pending Jobs"
/>
<separator orientation="vertical"/>
<filter icon="terp-check" string="Next Actions"
context="{'invisible_next_action':False, 'invisible_next_date':False}"
domain="[]"
help="View Next Action and Date"/>
<separator orientation="vertical"/>
<field name="partner_name"/>
<field name="email_from"/>
<field name="job_id" widget="selection"/>
<field name="user_id" widget="selection">
<field name="user_id">
<filter domain="[('user_id','=',False)]" help="Unassigned Recruitements" icon="terp-personal-" separator="1"/>
</field>
<field name="department_id" widget="selection" string="Department" context="{'invisible_department': False}">
@@ -254,6 +272,24 @@
</field>
</record>
<!-- CRM Lead Calendar View -->
<record model="ir.ui.view" id="hr_applicant_calendar_view">
<field name="name">Hr Applicants Calendar</field>
<field name="model">hr.applicant</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Applicants"
date_start="date_action" color="user_id">
<field name="name" />
<field name="partner_name" />
<field name="stage_id" />
</calendar>
</field>
</record>
# ------------------------------------------------------
# HR Job
# ------------------------------------------------------
@@ -321,5 +357,42 @@
action="hr_recruitment_stage_act"
sequence="1"/>
<!-- Degree Tree View -->
<record model="ir.ui.view" id="hr_recruitment_degree_tree">
<field name="name">hr.recruitment.degree.tree</field>
<field name="model">hr.recruitment.degree</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Degree">
<field name="sequence" invisible="1"/>
<field name="name"/>
</tree>
</field>
</record>
<!-- Degree Form View -->
<record model="ir.ui.view" id="hr_recruitment_degree_form">
<field name="name">hr.recruitment.degree.form</field>
<field name="model">hr.recruitment.degree</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Degree">
<field name="name" select="1"/>
<field name="sequence"/>
</form>
</field>
</record>
<!-- Degree Action -->
<record id="hr_recruitment_degree_action" model="ir.actions.act_window">
<field name="name">Degree</field>
<field name="res_model">hr.recruitment.degree</field>
<field name="view_type">form</field>
<field name="view_id" ref="hr_recruitment_degree_tree"/>
</record>
</data>
</openerp>
@@ -60,7 +60,7 @@
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Recruitment during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Draft"
<filter string="New"
icon="terp-document-new"
domain="[('state','=','draft')]"
help = "Draft recruitment"/>
@@ -73,9 +73,9 @@
domain="[('state','=','pending')]"
help = "Pending recruitment"/>
<separator orientation="vertical"/>
<field name="partner_id"/>
<field name="job_id"/>
<field name="department_id" widget="selection"/>
<field name="user_id" widget="selection">
<field name="user_id">
<filter icon="terp-hr"
string="My Recruitment"
help="My Recruitment"
@@ -31,7 +31,7 @@
<field name="target">new</field>
</record>
<record model="ir.values" id="hr_recruitment_partner_create_values">
<!-- <record model="ir.values" id="hr_recruitment_partner_create_values">
<field name="model_id" ref="model_hr_applicant" />
<field name="object" eval="1" />
<field name="name">Create Partner</field>
@@ -39,7 +39,7 @@
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_recruitment_partner_create'))" />
<field name="key">action</field>
<field name="model">hr.applicant</field>
</record>
</record> -->
</data>
</openerp>
+16 -8
View File
@@ -47,7 +47,9 @@ class hr_analytic_timesheet(osv.osv):
'partner_id': fields.related('account_id', 'partner_id', type='many2one', string='Partner Id', relation='account.analytic.account', store=True),
}
def unlink(self, cr, uid, ids, context={}):
def unlink(self, cr, uid, ids, context=None):
if context is None:
context = {}
toremove = {}
for obj in self.browse(cr, uid, ids, context=context):
toremove[obj.line_id.id] = True
@@ -55,7 +57,9 @@ class hr_analytic_timesheet(osv.osv):
return super(hr_analytic_timesheet, self).unlink(cr, uid, ids, context=context)
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, unit, context={}):
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, unit, context=None):
if context is None:
context = {}
res = {}
if prod_id and unit_amount:
# find company
@@ -63,9 +67,11 @@ class hr_analytic_timesheet(osv.osv):
res = self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount, company_id, unit, context=context)
return res
def _getEmployeeProduct(self, cr, uid, context={}):
def _getEmployeeProduct(self, cr, uid, context=None):
if context is None:
context = {}
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))])
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
if emp_id:
emp=emp_obj.browse(cr, uid, emp_id[0], context=context)
if emp.product_id:
@@ -76,7 +82,7 @@ class hr_analytic_timesheet(osv.osv):
emp_obj = self.pool.get('hr.employee')
if context is None:
context = {}
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))])
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
if emp_id:
emp=emp_obj.browse(cr, uid, emp_id[0], context=context)
if emp.product_id:
@@ -87,7 +93,7 @@ class hr_analytic_timesheet(osv.osv):
emp_obj = self.pool.get('hr.employee')
if context is None:
context = {}
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))])
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
if emp_id:
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
if bool(emp.product_id):
@@ -102,7 +108,7 @@ class hr_analytic_timesheet(osv.osv):
emp_obj = self.pool.get('hr.employee')
if context is None:
context = {}
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))])
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
if emp_id:
emp = emp_obj.browse(cr, uid, emp_id[0], context=context)
if emp.journal_id:
@@ -129,7 +135,9 @@ class hr_analytic_timesheet(osv.osv):
return {'value':{},'warning':warning}
return {'value':{}}
def create(self, cr, uid, vals, context={}):
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', context.get('user_id', uid))], context=context)
ename = ''
@@ -33,6 +33,8 @@ class analytical_timesheet_employee(osv.osv_memory):
}
def _get_user(self, cr, uid, context=None):
if context is None:
context = {}
return uid
_defaults = {
@@ -42,6 +44,8 @@ class analytical_timesheet_employee(osv.osv_memory):
}
def print_report(self, cr, uid, ids, context=None):
if context is None:
context = {}
data = self.read(cr, uid, ids, context=context)[0]
datas = {
'ids': [],
@@ -54,4 +58,5 @@ class analytical_timesheet_employee(osv.osv_memory):
'datas': datas,
}
analytical_timesheet_employee()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -39,6 +39,8 @@ class analytical_timesheet_employees(osv.osv_memory):
}
def print_report(self, cr, uid, ids, context=None):
if context is None:
context = {}
data = self.read(cr, uid, ids, context=context)[0]
datas = {
'ids': [],
@@ -33,31 +33,37 @@ class hr_so_project(osv.osv_memory):
'date': fields.datetime('Closing Date'),
'analytic_amount': fields.float('Minimum Analytic Amount'),
'name': fields.char('Employees name', size=32, required=True, readonly=True),
'state': fields.char('Current state', size=32, required=True, readonly=True),
# 'state': fields.char('Current state', size=32, required=True, readonly=True),
'state': fields.related('emp_id', 'state', string='Current state', type='char', required=True, readonly=True),
'server_date': fields.datetime('Current Date', required=True, readonly=True),
'emp_id': fields.many2one('hr.employee', 'Employee ID')
}
def _get_empid(self, cr, uid, context=None):
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
if emp_id:
for employee in emp_obj.browse(cr, uid, emp_id):
return {'name': employee.name, 'state': employee.state, 'emp_id': emp_id[0], 'server_date':time.strftime('%Y-%m-%d %H:%M:%S')}
if context is None:
context = {}
emp_ids = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
if emp_ids:
for employee in emp_obj.browse(cr, uid, emp_ids, context=context):
return {'name': employee.name, 'state': employee.state, 'emp_id': emp_ids[0], 'server_date':time.strftime('%Y-%m-%d %H:%M:%S')}
def _get_empid2(self, cr, uid, context):
res = self._get_empid(cr, uid, context)
def _get_empid2(self, cr, uid, context=None):
if context is None:
context = {}
res = self._get_empid(cr, uid, context=context)
cr.execute('select name,action from hr_attendance where employee_id=%s order by name desc limit 1', (res['emp_id'],))
res['server_date'] = time.strftime('%Y-%m-%d %H:%M:%S')
date_start = cr.fetchone()
if date_start:
res['date_start'] = date_start[0]
return res
def default_get(self, cr, uid, fields_list, context=None):
if context is None:
context = {}
res = super(hr_so_project, self).default_get(cr, uid, fields_list, context=context)
res.update(self._get_empid2(cr, uid, context=context))
return res
@@ -65,41 +71,44 @@ class hr_so_project(osv.osv_memory):
def _write(self, cr, uid, data, emp_id, context=None):
timesheet_obj = self.pool.get('hr.analytic.timesheet')
emp_obj = self.pool.get('hr.employee')
if context is None:
context = {}
hour = (time.mktime(time.strptime(data['date'] or time.strftime('%Y-%m-%d %H:%M:%S'), '%Y-%m-%d %H:%M:%S')) -
time.mktime(time.strptime(data['date_start'], '%Y-%m-%d %H:%M:%S'))) / 3600.0
minimum = data['analytic_amount']
if minimum:
hour = round(round((hour + minimum / 2) / minimum) * minimum, 2)
res = timesheet_obj.default_get(cr, uid, ['product_id','product_uom_id'])
res = timesheet_obj.default_get(cr, uid, ['product_id','product_uom_id'], context=context)
if not res['product_uom_id']:
raise osv.except_osv(_('UserError'), _('No cost unit defined for this employee !'))
up = timesheet_obj.on_change_unit_amount(cr, uid, False, res['product_id'], hour, res['product_uom_id'])['value']
res['name'] = data['info']
res['account_id'] = data['account_id'].id
res['unit_amount'] = hour
emp_journal = emp_obj.browse(cr, uid, emp_id, context).journal_id
emp_journal = emp_obj.browse(cr, uid, emp_id, context=context).journal_id
res['journal_id'] = emp_journal and emp_journal.id or False
res.update(up)
up = timesheet_obj.on_change_account_id(cr, uid, [], res['account_id']).get('value', {})
res.update(up)
return timesheet_obj.create(cr, uid, res, context=context)
def sign_out_result_end(self, cr, uid, ids, context=None):
if context is None:
context = {}
emp_obj = self.pool.get('hr.employee')
for data in self.browse(cr, uid, ids):
for data in self.browse(cr, uid, ids, context=context):
emp_id = data.emp_id.id
emp_obj.attendance_action_change(cr, uid, [emp_id], type='sign_out',dt=data.date)
emp_obj.attendance_action_change(cr, uid, [emp_id], type='sign_out', dt=data.date)
self._write(cr, uid, data, emp_id, context=context)
return {}
def sign_out_result(self, cr, uid, ids, context=None):
if context is None:
context = {}
emp_obj = self.pool.get('hr.employee')
for data in self.browse(cr, uid, ids):
for data in self.browse(cr, uid, ids, context=context):
emp_id = data.emp_id.id
emp_obj.attendance_action_change(cr, uid, [emp_id], type='action', dt=data.date)
self._write(cr, uid, data, emp_id, context=context)
@@ -108,7 +117,7 @@ class hr_so_project(osv.osv_memory):
hr_so_project()
class hr_si_project(osv.osv_memory):
_name = 'hr.sign.in.project'
_description = 'Sign In By Project'
_columns = {
@@ -117,9 +126,9 @@ class hr_si_project(osv.osv_memory):
'date': fields.datetime('Starting Date'),
'server_date': fields.datetime('Current Date', readonly=True),
# 'emp_id': fields.char('Employee ID', size=512, required=False),
'emp_id': fields.many2one('hr.employee', 'Employee ID')
'emp_id': fields.many2one('hr.employee', 'Employee ID')
}
def view_init(self, cr, uid, fields, context=None):
"""
This function checks for precondition before wizard executes
@@ -130,22 +139,25 @@ class hr_si_project(osv.osv_memory):
@param context: A standard dictionary for contextual values
"""
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
if context is None:
context = {}
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
if not emp_id:
raise osv.except_osv(_('UserError'), _('No employee defined for your user !'))
return False
return False
def check_state(self, cr, uid, ids, context=None):
obj_model = self.pool.get('ir.model.data')
if context is None:
context = {}
emp_id = self.default_get(cr, uid, context)['emp_id']
# get the latest action (sign_in or out) for this employee
cr.execute('select action from hr_attendance where employee_id=%s and action in (\'sign_in\',\'sign_out\') order by name desc limit 1', (emp_id,))
res = (cr.fetchone() or ('sign_out',))[0]
in_out = res == 'sign_out' and 'out' or 'in'
#TODO: invert sign_in et sign_out
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_hr_timesheet_sign_%s' % in_out)])
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_hr_timesheet_sign_%s' % in_out)], context=context)
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
return {
'name': 'Sign in / Sign out',
'view_type': 'form',
@@ -156,20 +168,24 @@ class hr_si_project(osv.osv_memory):
'target': 'new'
}
def sign_in_result(self, cr, uid, ids, context):
def sign_in_result(self, cr, uid, ids, context=None):
emp_obj = self.pool.get('hr.employee')
for data in self.browse(cr, uid, ids, context):
if context is None:
context = {}
for data in self.browse(cr, uid, ids, context=context):
emp_id = data.emp_id.id
success = emp_obj.attendance_action_change(cr, uid, [emp_id], type = 'sign_in' ,dt=data.date or False)
return {}
def default_get(self, cr, uid, fields_list, context=None):
res = super(hr_si_project, self).default_get(cr, uid, fields_list, context=context)
if context is None:
context = {}
emp_obj = self.pool.get('hr.employee')
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
if emp_id:
for employee in emp_obj.browse(cr, uid, emp_id):
res.update({'emp_id': employee.name, 'state': employee.state, 'emp_id': emp_id[0], 'server_date':time.strftime('%Y-%m-%d %H:%M:%S')})
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)], context=context)
if emp_id:
for employee in emp_obj.browse(cr, uid, emp_id, context=context):
res.update({'name': employee.name, 'state': employee.state, 'emp_id': emp_id[0], 'server_date':time.strftime('%Y-%m-%d %H:%M:%S')})
return res
hr_si_project()
@@ -70,11 +70,13 @@
<field name="date_start"/>
<field name="server_date"/>
<separator string="Work done in the last period" colspan="4" />
<field name="account_id" colspan="3"/>
<field name="info" colspan="3"/>
<field name="account_id" colspan="2"/>
<field name="info" colspan="2"/>
<field name="date"/>
<label string="(Keep empty for current_time)" colspan="2"/>
<field name="analytic_amount"/> </group>
<field name="analytic_amount"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Change Work" name="sign_out_result" type="object"/>
@@ -14,26 +14,26 @@
<record id="board_hr_timesheet_invoice_form" model="ir.ui.view">
<field name="name">board.hr.timesheet.invoice</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.board_account_form"/>
<field name="type">form</field>
<field name="inherit_id" ref="account.board_account_form"/>
<field name="arch" type="xml">
<xpath expr="/form/hpaned/child1/action[@string='Draft Customer Invoices']" position="before">
<xpath expr="/form/hpaned/child1/action[@string='Draft Customer Invoices']" position="before">
<action colspan="4" height="160" name="%(hr_timesheet_invoice.action_analytic_account_tree)d" string="Analytic accounts to close" width="510"/>
<action colspan="4" height="160" name="%(act_my_account)d" string="Accounts to invoice" width="510"/>
</xpath>
</field>
</record>
<!-- Need to merge in above view -->
<record id="board_hr_timesheet_invoice_report_form1" model="ir.ui.view">
<field name="name">board.hr.timesheet.invoice</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.board_account_form"/>
<field name="type">form</field>
<field name="inherit_id" ref="account.board_account_form"/>
<field name="arch" type="xml">
<xpath expr="/form/hpaned/child2/action[@string='Aged receivables']" position="before">
<xpath expr="/form/hpaned/child2/action[@string='Aged income']" position="after">
<action colspan="4" height="220" name="%(action_account_analytic_line_to_invoice)d" string="Costs to invoice"/>
</xpath>
</xpath>
</field>
</record>
</data>
@@ -27,8 +27,8 @@
<separator string="Status" colspan="4" />
<group col="10" colspan="4">
<field name="state" readonly="1" select="2" nolabel="1"/>
<button name="state_running_set" string="Run" states="draft" icon="gtk-apply"/>
<button name="state_done_set" string="Done" states="running" icon="gtk-ok"/>
<button name="state_running_set" string="Run" states="draft,done,cancelled" icon="gtk-apply"/>
<button name="state_done_set" string="Close" states="running" icon="gtk-ok"/>
<button name="state_cancel_set" string="Cancelled" states="running" icon="gtk-cancel"/>
</group>
</form>
@@ -142,7 +142,7 @@
<separator string="Status" colspan="4"/>
<group col="10" colspan="4">
<field name="state" readonly="1" select="2" nolabel="1"/>
<button name="state_running_set" string="Run" states="draft" icon="gtk-apply"/>
<button name="state_running_set" string="Run" states="draft,done,cancelled" icon="gtk-apply"/>
<button name="state_done_set" string="Close" states="running" icon="gtk-ok"/>
<button name="state_cancel_set" string="Cancel" states="running" icon="gtk-cancel"/>
</group>
+1 -1
View File
@@ -35,7 +35,7 @@
<field name="view_id" ref="board_mrp_manager_form"/>
</record>
<menuitem icon="terp-graph" id="menus_dash_mrp" name="Dashboard"
<menuitem id="menus_dash_mrp" name="Dashboard"
parent="next_id_77" sequence="0"/>
<menuitem
action="open_board_manufacturing"
+2 -1
View File
@@ -738,7 +738,8 @@ class mrp_production(osv.osv):
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.production', production_id, 'button_produce_done', cr)
message = str(production_qty) + " '[" + production.product_id.code + '] ' + production.product_id.name + _("' have been manufactured for ") + production.name
for (id, name) in self.pool.get('product.product').name_get(cr, uid, [production.product_id.id]):
message = str(production_qty) + ' ' + production.product_uom.name +" '" + name + _("' have been manufactured for ") + production.name
self.log(cr, uid, production_id, message)
return True
+208 -186
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -32,6 +32,7 @@ based on geolocalization.
'depends': ['crm'],
'data': [
'res_partner_view.xml',
'crm_lead_view.xml',
],
'installable': True,
'active': False,
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="view_crm_opportunity_geo_assign_form" model="ir.ui.view">
<field name="name">crm.lead.geo_assign.inherit</field>
<field name="model">crm.lead</field>
<field name="type">form</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<data>
<xpath expr="//notebook[last()]/page[@string='Assignation']/group[@name='partner_assign_group']" position="after">
<group name="geo_assign_group" col="5" colspan="4">
<separator string="Geo Assignation" colspan="5"/>
<field name="partner_latitude"/>
<field name="partner_longitude"/>
<group colspan="1" col="1">
<button string="Geo Assign" name="assign_partner" type="object" colspan="1"
icon="gtk-apply"/>
</group>
</group>
</xpath>
<xpath expr="//notebook[last()]/page[@string='Assignation']/group[@name='partner_assign_group']/field[@name='partner_assigned_id']" position="attributes">
<attribute name="domain">[('partner_weight','&gt;',0)]</attribute>
</xpath>
</data>
</field>
</record>
</data>
</openerp>
@@ -58,7 +58,7 @@ class res_partner(osv.osv):
if not partner.address:
continue
part = partner.address[0]
addr = ', '.join(filter(None, [part.street, part.street2, (part.zip or '')+' '+(part.city or ''), part.state_id and part.state_id.name, part.country_id and part.country_id.name]))
addr = ', '.join(filter(None, [part.street, (part.zip or '')+' '+(part.city or ''), part.state_id and part.state_id.name, part.country_id and part.country_id.name]))
result = geo_find(addr.encode('utf8'))
if result:
self.write(cr, uid, [partner.id], {
@@ -81,29 +81,73 @@ class crm_lead(osv.osv):
for part in self.browse(cr, uid, ids, context=context):
if not part.country_id:
continue
addr = ', '.join(filter(None, [part.street, part.street2, (part.zip or '')+' '+(part.city or ''), part.state_id and part.state_id.name, part.country_id and part.country_id.name]))
addr = ', '.join(filter(None, [part.street, (part.zip or '')+' '+(part.city or ''), part.state_id and part.state_id.name, part.country_id and part.country_id.name]))
result = geo_find(addr.encode('utf8'))
if result:
self.write(cr, uid, [part.id], {
'partner_latitude': result[0],
'partner_longitude': result[1]
}, context=context)
# 1. first way: in the same country, small area
part_ids = self.pool.get('res.partner').search(cr, uid, [
('partner_weight','>',0),
('partner_latitude','>',result[0]-2), ('partner_latitude','<',result[0]+2),
('partner_longitude','>',result[1]-1.5), ('partner_longitude','<',result[1]+1.5)
('partner_longitude','>',result[1]-1.5), ('partner_longitude','<',result[1]+1.5),
('country', '=', part.country_id.id),
], context=context)
# 2. second way: in the same country, big area
if not part_ids:
part_ids = self.pool.get('res.partner').search(cr, uid, [
('partner_weight','>',0),
('partner_latitude','>',result[0]-4), ('partner_latitude','<',result[0]+4),
('partner_longitude','>',result[1]-3), ('partner_longitude','<',result[1]+3),
('country', '=', part.country_id.id),
], context=context)
# 3. third way: other countries, small area
if not part_ids:
part_ids = self.pool.get('res.partner').search(cr, uid, [
('partner_weight','>',0),
('partner_latitude','>',result[0]-2), ('partner_latitude','<',result[0]+2),
('partner_longitude','>',result[1]-1.5), ('partner_longitude','<',result[1]+1.5)
], context=context)
# 4. fourth way: other countries, big area
if not part_ids:
part_ids = self.pool.get('res.partner').search(cr, uid, [
('partner_weight','>',0),
('partner_latitude','>',result[0]-4), ('partner_latitude','<',result[0]+4),
('partner_longitude','>',result[1]-3), ('partner_longitude','<',result[1]+3)
], context=context)
# 5. fifth way: anywhere in same country
if not part_ids:
# still haven't found any, let's take all partners in the country!
part_ids = self.pool.get('res.partner').search(cr, uid, [
('partner_weight','>',0),
('country', '=', part.country_id.id),
], context=context)
# 6. sixth way: closest partner whatsoever, just to have at least one result
if not part_ids:
# warning: point() type takes (longitude, latitude) as parameters in this order!
cr.execute("""SELECT id, distance
FROM (select id, (point(partner_longitude, partner_latitude) <-> point(%s,%s)) AS distance FROM res_partner
WHERE partner_longitude is not null
AND partner_latitude is not null
AND partner_weight > 0) AS d
ORDER BY distance LIMIT 1""", (result[1],result[0]))
res = cr.dictfetchone()
part_ids.append(res['id'])
total = 0
toassign = []
for part2 in self.pool.get('res.partner').browse(cr, uid, part_ids, context=context):
total += part2.partner_weight
toassign.append( (part2.id, total) )
random.shuffle(toassign) # avoid always giving the leads to the first ones in db natural order!
mypartner = random.randint(0,total)
for t in toassign:
if mypartner<=t[1]:
@@ -0,0 +1,59 @@
# Polish translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-03-25 12:11+0000\n"
"PO-Revision-Date: 2010-07-26 14:58+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\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: 2010-07-27 03:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product_visible_discount
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Niewłaściwy XML dla architektury widoku!"
#. module: product_visible_discount
#: model:ir.module.module,description:product_visible_discount.module_name_translation
msgid ""
"\n"
" This module lets you calculate discounts on Sale Order lines and Invoice "
"lines base on the partner's pricelist.\n"
" To this end, a new check box named \"Visible Discount\" is added to the "
"pricelist form.\n"
" Example:\n"
" For the product PC1 and the partner \"Asustek\": if listprice=450, "
"and the price calculated using Asustek's pricelist is 225\n"
" If the check box is checked, we will have on the sale order line: "
"Unit price=450, Discount=50,00, Net price=225\n"
" If the check box is unchecked, we will have on Sale Order and "
"Invoice lines: Unit price=225, Discount=0,00, Net price=225\n"
" "
msgstr ""
"\n"
" Ten moduł pozwala obliczać upusty przy pozycjach zamówień sprzedaży i "
"pozycjach faktur bazując na cenniku partnera.\n"
" Nowa opcja \"Widoczny upust\" jest dodana do formularza cennika.\n"
" Przykład:\n"
" Dla produktu PC1 i partnera \"Asustek\": jeśli cena cennikowa=450 i "
"cena wg cennika dla Asustek jest 225\n"
" Jeśli opcja jest włączona, to w pozycji zamówienia będzie: Cena "
"jedn.=450, Upust=50,00, Cena netto=225\n"
" Jeśli opcja jest wyłączona, to w pozycji zamówienia będzie: Unit "
"jedn.=225, Upust=0,00, Cena netto=225\n"
" "
#. module: product_visible_discount
#: model:ir.module.module,shortdesc:product_visible_discount.module_name_translation
#: field:product.pricelist,visible_discount:0
msgid "Visible Discount"
msgstr "Widoczny upust"
-1
View File
@@ -136,7 +136,6 @@
<menuitem
id="next_id_86"
name="Dashboard"
icon="terp-graph"
sequence="0"
parent="base.menu_project_report"/>
+1 -10
View File
@@ -134,7 +134,6 @@ class project(osv.osv):
'warn_header': fields.text('Mail Header', help="Header added at the beginning of the email for the warning message sent to the customer when a task is closed."),
'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed."),
'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages'),
'project_escalation_id': fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.'),
}
_order = "sequence"
@@ -153,16 +152,8 @@ class project(osv.osv):
return False
return True
def _check_escalation(self, cr, uid, ids):
project_obj = self.browse(cr, uid, ids[0])
if project_obj.project_escalation_id:
if project_obj.project_escalation_id.id == project_obj.id:
return False
return True
_constraints = [
(_check_dates, 'Error! project start-date must be lower then project end-date.', ['date_start', 'date']),
(_check_escalation, 'Error! You cannot assign escalation to the same project!', ['project_escalation_id'])
(_check_dates, 'Error! project start-date must be lower then project end-date.', ['date_start', 'date'])
]
def set_template(self, cr, uid, ids, context=None):
+1 -2
View File
@@ -40,7 +40,6 @@
<group col="2" colspan="2" name="misc">
<separator colspan="2" string="Miscelleanous"/>
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
<field name="project_escalation_id"/>
<field name="warn_manager"/>
</group>
<newline/>
@@ -166,7 +165,7 @@
<field name="view_id" ref="view_project"/>
<field name="search_view_id" ref="view_project_project_filter"/>
<field name="context">{'search_default_Current':1}</field>
<field name="help"> Consult and define yours projects here. A project content a set of related activities that will be performed by your company. Any project can be put into a hierarchy, as a child of a Parent Project. This allows you to design large project structure very useful for work organization.</field>
<field name="help">Consult and define your projects here. A project contains a set of related activities that will be performed by your company. Any project can be put into a hierarchy, as a child of a Parent Project. This allows you to design large project structure very useful for work organization.</field>
</record>
<menuitem action="open_view_project_all" id="menu_open_view_project_all" parent="menu_project_management" sequence="1"/>
@@ -86,6 +86,6 @@
<field name="view_id" ref="board_project_issue_form"/>
</record>
<menuitem id="menu_deshboard_project_issue" name="Project Issue Dashboard" parent="project.next_id_86"
icon="terp-graph" action="open_board_project_issue"/>
action="open_board_project_issue"/>
</data>
</openerp>
+15 -2
View File
@@ -181,7 +181,7 @@ class project_issue(osv.osv, crm.crm_case):
method=True, multi='day_open', type="float", store=True),
'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="float", store=True),
'assigned_to': fields.related('task_id', 'user_id', type='many2one', relation='res.users', string='Assigned to', help='This is the current user to whom the related task have been assigned', readonly=True),
'assigned_to': fields.many2one('res.users', 'Assigned to', help='This is the current user to whom the related task have been assigned'),
'working_hours_open': fields.function(_compute_day, string='Working Hours to Open the Issue', \
method=True, multi='working_days_open', type="float", store=True),
'working_hours_close': fields.function(_compute_day, string='Working Hours to Close the Issue', \
@@ -406,8 +406,21 @@ project_issue()
class project(osv.osv):
_inherit = "project.project"
_columns = {
'resource_calendar_id': fields.many2one('resource.calendar', 'Working Time', help="Timetable working hours to adjust the gantt diagram report"),
'resource_calendar_id' : fields.many2one('resource.calendar', 'Working Time', help="Timetable working hours to adjust the gantt diagram report"),
'project_escalation_id' : fields.many2one('project.project','Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.'),
'reply_to' : fields.char('Reply-To Email Address', size=256)
}
def _check_escalation(self, cr, uid, ids):
project_obj = self.browse(cr, uid, ids[0])
if project_obj.project_escalation_id:
if project_obj.project_escalation_id.id == project_obj.id:
return False
return True
_constraints = [
(_check_escalation, 'Error! You cannot assign escalation to the same project!', ['project_escalation_id'])
]
project()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -286,5 +286,23 @@
</field>
</record>
# ------------------------------------------------------
# Project
# ------------------------------------------------------
<record id="view_project_form_inherited" model="ir.ui.view">
<field name="name">project.project.form.inherited</field>
<field name="model">project.project</field>
<field name="type">form</field>
<field name="inherit_id" ref="project.edit_project"/>
<field name="arch" type="xml">
<field name="priority" position="before">
<field name="resource_calendar_id"/>
<field name="project_escalation_id"/>
<field name="reply_to"/>
</field>
</field>
</record>
</data>
</openerp>
@@ -58,6 +58,6 @@
<menuitem
id="menu_deshboard_scurm"
name="Scrum Dashboard" parent="project.next_id_86"
icon="terp-graph" action="open_board_project_scrum"/>
action="open_board_project_scrum"/>
</data>
</openerp>
-1
View File
@@ -5,7 +5,6 @@
<menuitem
id="menu_purchase_deshboard"
name="Dashboard"
icon="terp-graph"
parent="base.next_id_73" sequence="0"/>
<record id="purchase_draft" model="ir.actions.act_window">
+1 -1
View File
@@ -50,7 +50,7 @@
<field name="view_mode">form</field>
<field name="view_id" ref="board_sales_manager_form"/>
</record>
<menuitem icon="terp-graph" id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
<menuitem id="board.menu_dasboard" name="Dashboard" sequence="0" parent="base.next_id_64"/>
<menuitem action="open_board_sales_manager" icon="terp-graph" id="menu_board_sales_manager" parent="board.menu_dasboard" sequence="0"/>
</data>
+371
View File
@@ -0,0 +1,371 @@
# Polish translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-25 14:28+0000\n"
"PO-Revision-Date: 2010-07-26 15:12+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\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: 2010-07-27 03:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_margin
#: selection:report.account.invoice,type:0
#: selection:report.account.invoice.category,type:0
#: selection:report.account.invoice.partner,type:0
#: selection:report.account.invoice.partner.product,type:0
#: selection:report.account.invoice.product,type:0
msgid "Customer Refund"
msgstr "Korekta dla klienta"
#. module: sale_margin
#: model:ir.model,name:sale_margin.model_report_account_invoice_product
msgid "report.account.invoice.product"
msgstr ""
#. module: sale_margin
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Nazwa obiektu musi zaczynać się od x_ oraz nie może zawierać znaków "
"specjalnych !"
#. module: sale_margin
#: model:ir.ui.menu,name:sale_margin.menu_report_account_all_invoice_by_product
#: model:ir.ui.menu,name:sale_margin.menu_report_account_invoice_by_product
msgid "Invoices by Product"
msgstr "Faktury wg produktów"
#. module: sale_margin
#: selection:report.account.invoice,type:0
#: selection:report.account.invoice.category,type:0
#: selection:report.account.invoice.partner,type:0
#: selection:report.account.invoice.partner.product,type:0
#: selection:report.account.invoice.product,type:0
msgid "Customer Invoice"
msgstr "Faktura dla klienta"
#. module: sale_margin
#: wizard_view:stock.invoice_onshipping,init:0
msgid "Create invoices"
msgstr "Utwórz faktury"
#. module: sale_margin
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Niewłaściwy XML dla architektury widoku!"
#. module: sale_margin
#: model:ir.model,name:sale_margin.model_report_account_invoice_partner_product
msgid "report.account.invoice.partner.product"
msgstr ""
#. module: sale_margin
#: selection:report.account.invoice,type:0
#: selection:report.account.invoice.category,type:0
#: selection:report.account.invoice.partner,type:0
#: selection:report.account.invoice.partner.product,type:0
#: selection:report.account.invoice.product,type:0
msgid "Supplier Invoice"
msgstr "Faktura Dostawcy"
#. module: sale_margin
#: field:report.account.invoice,state:0
#: field:report.account.invoice.category,state:0
#: field:report.account.invoice.partner,state:0
#: field:report.account.invoice.partner.product,state:0
#: field:report.account.invoice.product,state:0
msgid "State"
msgstr "Stan"
#. module: sale_margin
#: view:stock.picking:0
msgid "Create Invoice"
msgstr "Utwórz fakturę"
#. module: sale_margin
#: selection:report.account.invoice,state:0
#: selection:report.account.invoice.category,state:0
#: selection:report.account.invoice.partner,state:0
#: selection:report.account.invoice.partner.product,state:0
#: selection:report.account.invoice.product,state:0
msgid "Draft"
msgstr "Projekt"
#. module: sale_margin
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: sale_margin
#: model:ir.ui.menu,name:sale_margin.menu_report_account_all_month_product
msgid "All Months"
msgstr "Wszystkie miesiące"
#. module: sale_margin
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_partner_product_tree
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_partner_product_tree_all
msgid "report.account.invoice.partner.product.tree"
msgstr ""
#. module: sale_margin
#: field:report.account.invoice,type:0
#: field:report.account.invoice.category,type:0
#: field:report.account.invoice.partner,type:0
#: field:report.account.invoice.partner.product,type:0
#: field:report.account.invoice.product,type:0
#: wizard_field:stock.invoice_onshipping,init,type:0
msgid "Type"
msgstr "Typ"
#. module: sale_margin
#: wizard_field:stock.invoice_onshipping,init,journal_id:0
msgid "Destination Journal"
msgstr "Dziennik docelowy"
#. module: sale_margin
#: view:stock.picking:0
msgid "Supplier Invoices"
msgstr "Faktury od dostawców"
#. module: sale_margin
#: field:report.account.invoice.partner.product,product_id:0
#: field:report.account.invoice.product,product_id:0
msgid "Product"
msgstr "Produkt"
#. module: sale_margin
#: view:report.account.invoice.partner:0
msgid "Invoices by partner"
msgstr "Faktury wg partnerów"
#. module: sale_margin
#: view:report.account.invoice.category:0
msgid "Invoices by category"
msgstr "Faktury wg kategorii"
#. module: sale_margin
#: selection:report.account.invoice,state:0
#: selection:report.account.invoice.category,state:0
#: selection:report.account.invoice.partner,state:0
#: selection:report.account.invoice.partner.product,state:0
#: selection:report.account.invoice.product,state:0
msgid "Paid"
msgstr "Zapłacono"
#. module: sale_margin
#: model:ir.actions.wizard,name:sale_margin.wizard_picking_invoice_create
#: wizard_button:stock.invoice_onshipping,init,create_invoice:0
msgid "Create invoice"
msgstr "Utwórz fakturę"
#. module: sale_margin
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_category_tree
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_category_tree_all
msgid "report.account.invoice.category.tree"
msgstr ""
#. module: sale_margin
#: model:ir.ui.menu,name:sale_margin.menu_report_account_all_invoice_by_partner_product
#: model:ir.ui.menu,name:sale_margin.menu_report_account_invoice_by_partner_product
msgid "Invoices by Partner and Product"
msgstr "Faktury wg partnerów i produktów"
#. module: sale_margin
#: model:ir.model,name:sale_margin.model_report_account_invoice_category
msgid "report.account.invoice.category"
msgstr ""
#. module: sale_margin
#: model:ir.ui.menu,name:sale_margin.menu_report_account_this_month_product
msgid "This Month"
msgstr "Bieżący miesiąc"
#. module: sale_margin
#: field:report.account.invoice.category,categ_id:0
msgid "Categories"
msgstr "Kategorie"
#. module: sale_margin
#: field:account.invoice.line,cost_price:0
#: field:report.account.invoice,cost_price:0
#: field:report.account.invoice.category,cost_price:0
#: field:report.account.invoice.partner,cost_price:0
#: field:report.account.invoice.partner.product,cost_price:0
#: field:report.account.invoice.product,cost_price:0
#: field:sale.order.line,purchase_price:0
msgid "Cost Price"
msgstr "Cena (koszt)"
#. module: sale_margin
#: wizard_field:stock.invoice_onshipping,init,group:0
msgid "Group by partner"
msgstr "Grupuj wg partnera"
#. module: sale_margin
#: model:ir.model,name:sale_margin.model_report_account_invoice_partner
msgid "report.account.invoice.partner"
msgstr ""
#. module: sale_margin
#: model:ir.ui.menu,name:sale_margin.menu_report_account_all_invoice_by_partner
#: model:ir.ui.menu,name:sale_margin.menu_report_account_invoice_by_partner
msgid "Invoices by Partner"
msgstr "Faktury wg partnerów"
#. module: sale_margin
#: model:ir.ui.menu,name:sale_margin.menu_report_account_all_invoice_by_category
#: model:ir.ui.menu,name:sale_margin.menu_report_account_invoice_by_category
msgid "Invoices by Category"
msgstr "Faktury wg kategorii"
#. module: sale_margin
#: view:report.account.invoice.partner.product:0
msgid "Invoices by partner and product"
msgstr "Faktury wg partnerów i produktów"
#. module: sale_margin
#: field:report.account.invoice,amount:0
#: field:report.account.invoice.category,amount:0
#: field:report.account.invoice.partner,amount:0
#: field:report.account.invoice.partner.product,amount:0
#: field:report.account.invoice.product,amount:0
msgid "Amount"
msgstr "Kwota"
#. module: sale_margin
#: wizard_field:stock.invoice_onshipping,init,invoice_date:0
msgid "Invoiced date"
msgstr "Data fakturowania"
#. module: sale_margin
#: selection:report.account.invoice,type:0
#: selection:report.account.invoice.category,type:0
#: selection:report.account.invoice.partner,type:0
#: selection:report.account.invoice.partner.product,type:0
#: selection:report.account.invoice.product,type:0
msgid "Supplier Refund"
msgstr "Korekta od dostawcy"
#. module: sale_margin
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_partner_tree
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_partner_tree_all
msgid "report.account.invoice.partner.tree"
msgstr ""
#. module: sale_margin
#: field:report.account.invoice,margin:0
#: field:report.account.invoice.category,margin:0
#: field:report.account.invoice.partner,margin:0
#: field:report.account.invoice.partner.product,margin:0
#: field:report.account.invoice.product,margin:0
#: field:sale.order,margin:0
#: field:sale.order.line,margin:0
msgid "Margin"
msgstr "Marża"
#. module: sale_margin
#: field:report.account.invoice,quantity:0
#: field:report.account.invoice.category,quantity:0
#: field:report.account.invoice.partner,quantity:0
#: field:report.account.invoice.partner.product,quantity:0
#: field:report.account.invoice.product,quantity:0
msgid "Quantity"
msgstr "Ilość"
#. module: sale_margin
#: view:report.account.invoice.product:0
msgid "Invoices by product"
msgstr "Faktury wg produktów"
#. module: sale_margin
#: model:ir.module.module,shortdesc:sale_margin.module_meta_information
msgid "Margins in Sale Orders"
msgstr "Marże w zamówieniach sprzedaży"
#. module: sale_margin
#: model:ir.model,name:sale_margin.model_report_account_invoice
msgid "report.account.invoice"
msgstr ""
#. module: sale_margin
#: model:ir.ui.menu,name:sale_margin.menu_report_account_all_invoice_by_invoices
#: model:ir.ui.menu,name:sale_margin.menu_report_account_invoice_by_invoices
#: view:report.account.invoice:0
#: view:stock.picking:0
#: field:stock.picking,invoice_ids:0
msgid "Invoices"
msgstr "Faktury"
#. module: sale_margin
#: selection:report.account.invoice,state:0
#: selection:report.account.invoice.category,state:0
#: selection:report.account.invoice.partner,state:0
#: selection:report.account.invoice.partner.product,state:0
#: selection:report.account.invoice.product,state:0
msgid "Pro-forma"
msgstr ""
#. module: sale_margin
#: field:report.account.invoice,name:0
#: field:report.account.invoice.category,name:0
#: field:report.account.invoice.partner,name:0
#: field:report.account.invoice.partner.product,name:0
#: field:report.account.invoice.product,name:0
msgid "Month"
msgstr "Miesiąc"
#. module: sale_margin
#: selection:report.account.invoice,state:0
#: selection:report.account.invoice.category,state:0
#: selection:report.account.invoice.partner,state:0
#: selection:report.account.invoice.partner.product,state:0
#: selection:report.account.invoice.product,state:0
msgid "Canceled"
msgstr "Anulowano"
#. module: sale_margin
#: model:ir.ui.menu,name:sale_margin.menu_report_account_invoice_product
msgid "Invoice"
msgstr "Faktura"
#. module: sale_margin
#: wizard_button:stock.invoice_onshipping,init,end:0
msgid "Cancel"
msgstr "Anuluj"
#. module: sale_margin
#: field:report.account.invoice.partner,partner_id:0
#: field:report.account.invoice.partner.product,partner_id:0
msgid "Partner"
msgstr "Partner"
#. module: sale_margin
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_tree
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_tree_all
msgid "report.account.invoice.tree"
msgstr ""
#. module: sale_margin
#: selection:report.account.invoice,state:0
#: selection:report.account.invoice.category,state:0
#: selection:report.account.invoice.partner,state:0
#: selection:report.account.invoice.partner.product,state:0
#: selection:report.account.invoice.product,state:0
msgid "Open"
msgstr "Otwarte"
#. module: sale_margin
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_product_tree
#: model:ir.actions.act_window,name:sale_margin.action_report_account_invoice_product_tree_all
msgid "report.account.invoice.product.tree"
msgstr ""
+81
View File
@@ -0,0 +1,81 @@
# Polish translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-06-28 09:21+0000\n"
"PO-Revision-Date: 2010-07-26 15:04+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\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: 2010-07-27 03:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_mrp
#: help:mrp.production,sale_ref:0
msgid "Indicate the Customer Reference from sale order."
msgstr "Określ odnośnik klienta z zamówienia sprzedaży"
#. module: sale_mrp
#: help:mrp.production,sale_name:0
msgid "Indicate the name of sale order."
msgstr "Określ nazwę zamówienia sprzedaży"
#. module: sale_mrp
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Niewłaściwy XML dla architektury widoku!"
#. module: sale_mrp
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Nazwa obiektu musi zaczynać się od x_ oraz nie może zawierać znaków "
"specjalnych !"
#. module: sale_mrp
#: field:mrp.production,sale_name:0
msgid "Sale Name"
msgstr "Nazwa sprzedaży"
#. module: sale_mrp
#: model:ir.model,name:sale_mrp.model_mrp_production
msgid "Manufacturing Order"
msgstr "Zamówienie produkcji"
#. module: sale_mrp
#: model:ir.module.module,description:sale_mrp.module_meta_information
msgid ""
"\n"
" This module provides facility to the user to install mrp and sale "
"modules\n"
" at a time. It is basically used when we want to keep track of "
"production\n"
" orders generated from sale orders.\n"
" It adds sale name and sale Reference on production order\n"
" "
msgstr ""
"\n"
" Ten moduł zwiększający funkcjonalność modułów mrp i sale. \n"
" Jest on stosowany głównie kiedy chcemy losy zamówień \n"
" produkcji tworzonych z zamówień sprzedaży.\n"
" Moduł dodaje nazwę sprzedaży i odnośnik sprzedaży do \n"
" zamówienia produkcji.\n"
" "
#. module: sale_mrp
#: field:mrp.production,sale_ref:0
msgid "Sale Reference"
msgstr "Odnośnik sprzedaży"
#. module: sale_mrp
#: model:ir.module.module,shortdesc:sale_mrp.module_meta_information
msgid "Sales and MRP Management"
msgstr "Zarządzanie sprzedażą i MRP"
+4 -2
View File
@@ -21,7 +21,9 @@
from osv import fields, osv
import time
from mx import DateTime
from datetime import datetime
from dateutil.relativedelta import relativedelta
class sale_order_dates(osv.osv):
_inherit = 'sale.order'
_name = 'sale.order'
@@ -45,7 +47,7 @@ class sale_order_dates(osv.osv):
for order in self.browse(cr, uid, ids):
dates_list = []
for line in order.order_line:
dt=DateTime.strptime(order.date_order, '%Y-%m-%d') + DateTime.RelativeDateTime(days=line.delay or 0.0)
dt = datetime.strptime(order.date_order, '%Y-%m-%d') + relativedelta(days=line.delay or 0.0)
dt_s = dt.strftime('%Y-%m-%d')
dates_list.append(dt_s)
if dates_list:
+2 -2
View File
@@ -43,8 +43,8 @@
<field name="view_id" ref="board_warehouse_form"/>
</record>
<menuitem icon="terp-graph" id="menu_dashboard_stock" name="Dashboard" sequence="0" parent="stock.next_id_61"/>
<menuitem id="menu_dashboard_stock" name="Dashboard" sequence="0" parent="stock.next_id_61"/>
<menuitem action="open_board_warehouse" icon="terp-graph" id="menu_board_warehouse" parent="menu_dashboard_stock" sequence="1"/>
</data>
</openerp>
</openerp>
+1 -1
View File
@@ -202,7 +202,7 @@
<para style="terp_default_Centre_8">[[ picking.origin ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para>
<para style="terp_default_Centre_8">[[ (picking.address_id and picking.address_id.title) or '' ]] [[ (picking.address_id and and picking.address_id.name) or '' ]] </para>
</td>
<td>
<para style="terp_default_Centre_8">[[ formatLang(picking.min_date,date_time = True) ]]</para>
+47 -47
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 12:13+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-07-26 19:55+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-22 04:17+0000\n"
"X-Launchpad-Export-Date: 2010-07-27 03:58+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: wiki
@@ -37,12 +37,12 @@ msgstr ""
#. module: wiki
#: field:wiki.wiki,create_uid:0
msgid "Author"
msgstr ""
msgstr "Autor"
#. module: wiki
#: model:ir.actions.wizard,name:wiki.wizard_open_page
msgid "Open Page"
msgstr ""
msgstr "Otwórz stronę"
#. module: wiki
#: field:wiki.groups.link,action_id:0
@@ -52,66 +52,66 @@ msgstr ""
#. module: wiki
#: field:wiki.groups,child_ids:0
msgid "Child Groups"
msgstr ""
msgstr "Grupy podrzędne"
#. module: wiki
#: model:ir.actions.act_window,name:wiki.act_wiki_group_open
#: model:ir.actions.act_window,name:wiki.action_wiki
#: model:ir.ui.menu,name:wiki.menu_action_wiki_wiki
msgid "Wiki Pages"
msgstr ""
msgstr "Strony Wiki"
#. module: wiki
#: field:wiki.groups,section:0
msgid "Make Section ?"
msgstr ""
msgstr "Utworzyć sekcję ?"
#. module: wiki
#: model:ir.model,name:wiki.model_wiki_wiki_history
#: view:wiki.wiki.history:0
msgid "Wiki History"
msgstr ""
msgstr "Historia wiki"
#. module: wiki
#: field:wiki.wiki,minor_edit:0
msgid "Minor edit"
msgstr ""
msgstr "Drobna edycja"
#. module: wiki
#: field:wiki.wiki,text_area:0
msgid "Content"
msgstr ""
msgstr "Zawartość"
#. module: wiki
#: model:ir.ui.menu,name:wiki.menu_document_configuration
msgid "Wiki Configuration"
msgstr ""
msgstr "Konfiguracja wiki"
#. module: wiki
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: wiki
#: field:wiki.groups,name:0
#: field:wiki.wiki,group_id:0
msgid "Wiki Group"
msgstr ""
msgstr "Grupa wiki"
#. module: wiki
#: field:wiki.wiki,name:0
msgid "Title"
msgstr ""
msgstr "Tytuł"
#. module: wiki
#: field:wiki.wiki,history_id:0
msgid "History Lines"
msgstr ""
msgstr "Pozycje historii"
#. module: wiki
#: field:wiki.groups,template:0
msgid "Wiki Template"
msgstr ""
msgstr "Szablon wiki"
#. module: wiki
#: model:ir.module.module,shortdesc:wiki.module_meta_information
@@ -121,17 +121,17 @@ msgstr ""
#. module: wiki
#: view:wiki.groups:0
msgid "Create a Menu"
msgstr ""
msgstr "Utwórz menu"
#. module: wiki
#: field:wiki.groups,notes:0
msgid "Description"
msgstr ""
msgstr "Opis"
#. module: wiki
#: field:wiki.wiki,section:0
msgid "Section"
msgstr ""
msgstr "Sekcja"
#. module: wiki
#: view:wizard.wiki.history.show_diff:0
@@ -146,12 +146,12 @@ msgstr ""
#. module: wiki
#: field:wiki.wiki,write_uid:0
msgid "Last Author"
msgstr ""
msgstr "Ostatni autor"
#. module: wiki
#: model:ir.actions.act_window,name:wiki.act_view_diff
msgid "Differences"
msgstr ""
msgstr "Różnice"
#. module: wiki
#: help:wiki.wiki,section:0
@@ -161,17 +161,17 @@ msgstr ""
#. module: wiki
#: view:wiki.groups:0
msgid "Page Template"
msgstr ""
msgstr "Szablon strony"
#. module: wiki
#: model:ir.ui.menu,name:wiki.menu_document2
msgid "Document Management"
msgstr ""
msgstr "Zarządzanie dokumentami"
#. module: wiki
#: field:wiki.wiki.history,create_date:0
msgid "Date"
msgstr ""
msgstr "Data"
#. module: wiki
#: wizard_view:wiki.make.index,init:0
@@ -181,13 +181,13 @@ msgstr ""
#. module: wiki
#: view:wiki.groups:0
msgid "Configuration"
msgstr ""
msgstr "Konfiguracja"
#. module: wiki
#: field:wiki.groups,home:0
#: field:wiki.groups,page_ids:0
msgid "Pages"
msgstr ""
msgstr "Strony"
#. module: wiki
#: constraint:ir.ui.view:0
@@ -197,22 +197,22 @@ msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
#. module: wiki
#: field:wiki.wiki.history,text_area:0
msgid "Text area"
msgstr ""
msgstr "Obszar tekstu"
#. module: wiki
#: wizard_field:wiki.create.menu,init,menu_parent_id:0
msgid "Parent Menu"
msgstr ""
msgstr "Menu nadrzędne"
#. module: wiki
#: field:wiki.wiki,create_date:0
msgid "Created on"
msgstr ""
msgstr "Utworzono"
#. module: wiki
#: view:wiki.groups:0
msgid "Notes"
msgstr ""
msgstr "Uwagi"
#. module: wiki
#: wizard_view:wiki.create.menu,init:0
@@ -224,18 +224,18 @@ msgstr ""
#: field:wiki.groups,parent_id:0
#: field:wiki.groups.link,group_id:0
msgid "Parent Group"
msgstr ""
msgstr "Grupa nadrzędna"
#. module: wiki
#: field:wiki.wiki,summary:0
#: field:wiki.wiki.history,summary:0
msgid "Summary"
msgstr ""
msgstr "Podsumowanie"
#. module: wiki
#: field:wiki.groups,create_date:0
msgid "Created Date"
msgstr ""
msgstr "Data utworzenia"
#. module: wiki
#: model:ir.actions.act_window,name:wiki.action_history
@@ -261,17 +261,17 @@ msgstr ""
#. module: wiki
#: wizard_field:wiki.create.menu,init,menu_name:0
msgid "Menu Name"
msgstr ""
msgstr "Nazwa menu"
#. module: wiki
#: view:wiki.wiki:0
msgid "Modifications"
msgstr ""
msgstr "Modyfikacje"
#. module: wiki
#: model:ir.actions.act_window,name:wiki.act_wiki_wiki_history
msgid "History"
msgstr ""
msgstr "Historia"
#. module: wiki
#: model:ir.ui.menu,name:wiki.menu_document
@@ -282,18 +282,18 @@ msgstr ""
#. module: wiki
#: field:wiki.wiki,write_date:0
msgid "Modification Date"
msgstr ""
msgstr "Data modyfikacji"
#. module: wiki
#: model:ir.actions.wizard,name:wiki.wizard_make_index
#: wizard_button:wiki.make.index,init,yes:0
msgid "Create Index"
msgstr ""
msgstr "Utwórz indeks"
#. module: wiki
#: field:wiki.wiki.history,minor_edit:0
msgid "This is a major edit ?"
msgstr ""
msgstr "Czy jest to większa edycja ?"
#. module: wiki
#: model:ir.actions.wizard,name:wiki.wizard_group_menu_create
@@ -301,12 +301,12 @@ msgstr ""
#: wizard_button:wiki.create.menu,init,create_menu:0
#: wizard_view:wiki.make.index,init:0
msgid "Create Menu"
msgstr ""
msgstr "Utwórz menu"
#. module: wiki
#: field:wiki.wiki,tags:0
msgid "Tags"
msgstr ""
msgstr "Znaczniki"
#. module: wiki
#: model:ir.actions.act_window,name:wiki.action_wiki_groups
@@ -316,7 +316,7 @@ msgstr ""
#: model:ir.ui.menu,name:wiki.menu_action_wiki_groups_browse
#: view:wiki.groups:0
msgid "Wiki Groups"
msgstr ""
msgstr "Grupy wiki"
#. module: wiki
#: field:wiki.wiki.history,write_uid:0
@@ -326,20 +326,20 @@ msgstr ""
#. module: wiki
#: field:wiki.wiki,toc:0
msgid "Table of Contents"
msgstr ""
msgstr "Spis treści"
#. module: wiki
#: wizard_button:wiki.create.menu,init,end:0
#: wizard_button:wiki.make.index,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Anuluj"
#. module: wiki
#: field:wizard.wiki.history.show_diff,diff:0
msgid "Diff"
msgstr ""
msgstr "Różnice"
#. module: wiki
#: field:wiki.wiki,review:0
msgid "Need Review"
msgstr ""
msgstr "Wymaga przejrzenia"