[Merge]: Merge with lp:openobject-addons

bzr revid: rpa@tinyerp.com-20100730095120-ivsp30dbe79x77y5
bzr revid: rpa@tinyerp.com-20100730104910-vt3payt7357vhysl
This commit is contained in:
rpa (Open ERP)
2010-07-30 16:19:10 +05:30
62 changed files with 654 additions and 456 deletions
+9 -9
View File
@@ -629,8 +629,8 @@ class account_journal(osv.osv):
'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'),
'entry_posted': fields.boolean('Skip \'Draft\' State for Created Entries', help='Check this box if you don\'t want new account moves to pass through the \'draft\' state and instead goes directly to the \'posted state\' without any manual validation.'),
'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"),
# 'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \
# help="The sequence used for invoice numbers in this journal."),
'invoice_sequence_id': fields.many2one('ir.sequence', 'Invoice Sequence', \
help="The sequence used for invoice numbers in this journal."),
'allow_date':fields.boolean('Check Date not in the Period', help= 'If set to True then do not accept the entry if the entry date is not into the period dates'),
}
@@ -695,13 +695,13 @@ class account_journal(osv.osv):
'sequence_id':seq_id
})
# if journal.type in journal_type and not journal.invoice_sequence_id:
# res_ids = date_pool.search(cr, uid, [('model','=','ir.sequence'), ('name','=',journal_seq.get(journal.type, 'sale'))])
# inv_seq_id = date_pool.browse(cr, uid, res_ids[0]).res_id
# inv_seq_id
# res.update({
# 'invoice_sequence_id':inv_seq_id
# })
if journal.type in journal_type and not journal.invoice_sequence_id:
res_ids = date_pool.search(cr, uid, [('model','=','ir.sequence'), ('name','=',journal_seq.get(journal.type, 'sale'))])
inv_seq_id = date_pool.browse(cr, uid, res_ids[0]).res_id
inv_seq_id
res.update({
'invoice_sequence_id':inv_seq_id
})
result = self.write(cr, uid, [journal.id], res)
+2 -2
View File
@@ -138,7 +138,7 @@
<button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="terp-gtk-stop"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='open,paid' icon="gtk-execute"/>
</tree>
@@ -216,7 +216,7 @@
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='open,paid' icon="gtk-execute"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="terp-gtk-stop"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
</group>
</group>
+16 -11
View File
@@ -388,14 +388,15 @@
<field name="centralisation" groups="base.group_extended"/>
<field name="entry_posted"/>
</group>
<group colspan="2" col="2">
<separator string="Invoicing Data" colspan="4"/>
<field name="invoice_sequence_id"/>
<field name="group_invoice_lines"/>
</group>
<group colspan="2" col="2" groups="base.group_extended">
<separator string="Sequence" colspan="4"/>
<field name="sequence_id"/>
</group>
<group colspan="2" col="2">
<separator string="Invoicing Data" colspan="4"/>
<field name="group_invoice_lines"/>
</group>
</page>
<page string="Entry Controls" groups="base.group_extended">
<separator colspan="4" string="Accounts Type Allowed (empty for no control)"/>
@@ -455,7 +456,7 @@
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
<button type="object" string="Confirm" name="button_confirm_bank" states="open" icon="terp-gtk-go-back-rtl"/>
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="gtk-cancel"/>
</tree>
</field>
</record>
@@ -530,12 +531,16 @@
<field colspan="4" name="move_line_ids" nolabel="1"/>
</page>
</notebook>
<group col="7" colspan="4">
<group col="8" colspan="4">
<field name="state"/>
<field name="balance_end"/>
<button name="%(action_view_account_statement_from_invoice_lines)d"
string="Import Invoice" type="action" attrs="{'invisible':[('state','=','confirm')]}"/>
<button name="button_dummy" states="draft" string="Compute" icon="terp-stock_format-scientific"/>
<button name="button_confirm_bank" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="terp-gtk-stop"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
</form>
</field>
@@ -1261,7 +1266,7 @@
<group col="4" colspan="4">
<field name="state" select="1"/>
<button name="button_validate" states="draft" string="Approve" type="object" icon="terp-camera_test"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="terp-gtk-stop"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
</page>
</notebook>
@@ -1481,7 +1486,7 @@
<field name="balance_end"/>
<button name="button_dummy" states="draft" string="Compute" icon="terp-stock_format-scientific"/>
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="terp-gtk-stop"/>
<button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
</form>
</field>
@@ -2433,7 +2438,7 @@
<field name="state"/>
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
<button type="object" string="Confirm" name="button_confirm_bank" states="open" icon="terp-gtk-go-back-rtl"/>
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="gtk-cancel"/>
</tree>
</field>
</record>
@@ -2537,7 +2542,7 @@
<field name="state" colspan="4"/>
<button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-check" type="object"/>
<button name="button_open" states="draft" string="Open CashBox" icon="terp-document-new" type="object"/>
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
<button name="button_cancel" states="confirm,open" string="Cancel" icon="gtk-cancel" type="object" groups="base.group_extended"/>
</group>
</form>
</field>
+4 -4
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: 2010-07-22 20:15+0000\n"
"PO-Revision-Date: 2010-07-29 06:54+0000\n"
"Last-Translator: lyyser <logard.1961@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-07-23 04:07+0000\n"
"X-Launchpad-Export-Date: 2010-07-30 03:36+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -6042,12 +6042,12 @@ msgstr ""
#. module: account
#: wizard_view:account.balance.account.balance.report,init:0
msgid "Select Fiscal Year(s)(Maximum Three Years)"
msgstr ""
msgstr "Vali finantsaasta(d) (maksimum kolm aastat)"
#. module: account
#: wizard_field:account.balance.account.balance.report,init,select_account:0
msgid "Select Reference Account(for % comparision)"
msgstr ""
msgstr "Valige võrdluskonto (% võrdluseks)"
#. module: account
#: model:ir.actions.wizard,name:account.wizard_account_balance_report
+37 -27
View File
@@ -231,8 +231,8 @@ class account_invoice(osv.osv):
('in_refund','Supplier Refund'),
],'Type', readonly=True, select=True, change_default=True),
'number': fields.related('move_id','name', type='char', readonly=True, size=64, relation='account.move', store=True, string='Number'),
#'number': fields.char('Invoice Number', size=32, readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
# 'number': fields.related('move_id','name', type='char', readonly=True, size=64, relation='account.move', store=True, string='Number'),
'number': fields.char('Invoice Number', size=32, readonly=True, help="Unique number of the invoice, computed automatically when the invoice is created."),
'reference': fields.char('Invoice Reference', size=64, help="The partner reference of this invoice."),
'reference_type': fields.selection(_get_reference_type, 'Reference Type',
required=True, readonly=True, states={'draft':[('readonly',False)]}),
@@ -769,7 +769,7 @@ class account_invoice(osv.osv):
cur_obj = self.pool.get('res.currency')
context = {}
for inv in self.browse(cr, uid, ids):
if not inv.journal_id.sequence_id:
if not inv.journal_id.invoice_sequence_id:
raise osv.except_osv(_('Error !'), _('Please define sequence on invoice journal'))
if not inv.invoice_line:
raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
@@ -927,35 +927,45 @@ class account_invoice(osv.osv):
}
def action_number(self, cr, uid, ids, *args):
#TODO: not correct fix but required a frech values before reading it.
self.write(cr, uid, ids, {})
# #TODO: not correct fix but required a frech values before reading it.
# self.write(cr, uid, ids, {})
#
cr.execute('SELECT id, type, number, move_id, reference ' \
'FROM account_invoice ' \
'WHERE id IN ('+','.join(map(str,ids))+')')
obj_inv = self.browse(cr, uid, ids)[0]
for obj_inv in self.browse(cr, uid, ids):
id = obj_inv.id
invtype = obj_inv.type
number = obj_inv.number
move_id = obj_inv.move_id and obj_inv.move_id.id or False
reference = obj_inv.reference or ''
if invtype in ('in_invoice', 'in_refund'):
ref = reference
else:
ref = self._convert_ref(cr, uid, number)
cr.execute('UPDATE account_move SET ref=%s ' \
'WHERE id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_move_line SET ref=%s ' \
'WHERE move_id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_analytic_line SET ref=%s ' \
'FROM account_move_line ' \
'WHERE account_move_line.move_id = %s ' \
'AND account_analytic_line.move_id = account_move_line.id',
for (id, invtype, number, move_id, reference) in cr.fetchall():
if not number:
if obj_inv.journal_id.invoice_sequence_id:
sid = obj_inv.journal_id.invoice_sequence_id.id
number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})
else:
number = self.pool.get('ir.sequence').get(cr, uid, 'account.invoice.' + invtype)
if invtype in ('in_invoice', 'in_refund'):
ref = reference
else:
ref = self._convert_ref(cr, uid, number)
cr.execute('UPDATE account_invoice SET number=%s ' \
'WHERE id=%s', (number, id))
cr.execute('UPDATE account_move SET ref=%s ' \
'WHERE id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_move_line SET ref=%s ' \
'WHERE move_id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_analytic_line SET ref=%s ' \
'FROM account_move_line ' \
'WHERE account_move_line.move_id = %s ' \
'AND account_analytic_line.move_id = account_move_line.id',
(ref, move_id))
for inv_id, name in self.name_get(cr, uid, [id]):
message = _('Invoice ') + " '" + name + "' "+ _("is validated.")
self.log(cr, uid, inv_id, message)
return True
def action_cancel(self, cr, uid, ids, *args):
@@ -109,7 +109,6 @@ class account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance',
'datas': data,
'nodestroy':True,
}
def _check_date(self, cr, uid, data, context=None):
@@ -128,7 +127,6 @@ class account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
@@ -139,14 +139,12 @@ class account_bs_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet.horizontal',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
@@ -52,7 +52,6 @@ class account_central_journal(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.central.journal',
'datas': datas,
'nodestroy':True,
}
account_central_journal()
@@ -74,14 +74,12 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance',
'datas': data,
'nodestroy':True,
}
if data['form']['format_perc']==1:
if len(data['form']['fiscalyear'])<=2:
@@ -90,14 +88,12 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance',
'datas': data,
'nodestroy':True,
}
else:
if len(data['form']['fiscalyear'])==3:
@@ -106,7 +102,6 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.'))
@@ -119,7 +114,6 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.'))
@@ -129,14 +123,12 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance',
'datas': data,
'nodestroy':True,
}
account_compare_account_balance_report()
@@ -52,7 +52,6 @@ class account_general_journal(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.general.journal',
'datas': datas,
'nodestroy':True,
}
account_general_journal()
@@ -107,14 +107,12 @@ class account_general_ledger_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger_landscape',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
@@ -141,14 +139,12 @@ class account_general_ledger_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger_landscape',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger',
'datas': data,
'nodestroy':True,
}
account_general_ledger_report()
@@ -44,7 +44,7 @@
<separator string="Cancel Selected Invoices" colspan="4"/>
<group colspan="4" col="6">
<button icon="terp-dialog-close" special="cancel" string="Close"/>
<button icon="terp-gtk-stop" string="Cancel Invoices" name="invoice_cancel" type="object" default_focus="1"/>
<button icon="gtk-cancel" string="Cancel Invoices" name="invoice_cancel" type="object" default_focus="1"/>
</group>
</form>
</field>
@@ -11,7 +11,7 @@
<label string="Are you sure you want to open Journal Entries?" colspan="4"/>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="action_open_window" type="object"/>
</group>
</form>
@@ -13,7 +13,7 @@
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open for bank reconciliation" name="action_open_window" type="object"/>
</group>
</form>
@@ -16,7 +16,7 @@
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Journal" name="action_open_window" type="object"/>
</group>
</form>
@@ -13,7 +13,7 @@
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="terp-gtk-stop" special="cancel" string="Cancel" />
<button icon="gtk-cancel" special="cancel" string="Cancel" />
<button icon="terp-gtk-go-back-rtl"
string="Open for Reconciliation" name="action_open_window"
type="object" />
@@ -11,7 +11,7 @@
<label string="Are you sure you want to open Account move line entries!" colspan="4"/>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open Entries" name="open_window" type="object" default_focus="1"/>
</group>
</form>
@@ -13,7 +13,7 @@
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="terp-gtk-stop" special="cancel" string="Cancel" />
<button icon="gtk-cancel" special="cancel" string="Cancel" />
<button icon="terp-gtk-go-back-rtl"
string="Open For Unreconciliation" name="action_open_window"
type="object" />
@@ -13,7 +13,7 @@
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-gtk-go-back-rtl" string="Open" name="remove_entries" type="object"/>
</group>
</form>
@@ -82,7 +82,6 @@ class account_partner_balance(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.partner.balance',
'datas': data,
'nodestroy':True,
}
def _check_date(self, cr, uid, data, context):
@@ -98,7 +97,6 @@ class account_partner_balance(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.partner.balance',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
@@ -33,7 +33,7 @@
<group colspan="4" col="6">
<separator colspan="4"/>
<newline/>
<button special="cancel" string="Cancel" icon="terp-gtk-stop"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_state" string="Print" type="object" icon="gtk-print"/>
</group>
</group>
@@ -136,14 +136,12 @@ class account_pl_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'pl.account.horizontal',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'pl.account',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
@@ -59,7 +59,6 @@ class account_print_journal(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.journal.period.print',
'datas': datas,
'nodestroy':True,
}
account_print_journal()
@@ -2,30 +2,30 @@
<openerp>
<data>
<!-- <record id="view_account_move_line_reconcile_prompt" model="ir.ui.view">-->
<!-- <record id="view_account_move_line_reconcile_prompt" model="ir.ui.view">-->
<!-- <field name="name">account.move.line.reconcile.prompt.form</field>-->
<!-- <field name="model">account.move.line.reconcile.prompt</field>-->
<!-- <field name="type">form</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <form string="Reconciliation">-->
<!-- <separator string="Are you sure you want to reconcile entries?" colspan="4"/>-->
<!-- <group colspan="4" col="6">-->
<!-- <label string ="" colspan="2"/>-->
<!-- <separator string="Are you sure you want to reconcile entries?" colspan="4"/>-->
<!-- <group colspan="4" col="6">-->
<!-- <label string ="" colspan="2"/>-->
<!---->
<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
<!-- <button icon="gtk-ok" string="Ok" name="ask_reconcilation" type="object" default_focus="1"/>-->
<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
<!-- <button icon="gtk-ok" string="Ok" name="ask_reconcilation" type="object" default_focus="1"/>-->
<!-- </group>-->
<!-- </form>-->
<!-- </field>-->
<!-- </record>-->
<!-- <record id="action_view_account_move_line_reconcile_prompt" model="ir.actions.act_window">-->
<!-- <field name="name">Reconcile Entries</field>-->
<!-- <record id="action_view_account_move_line_reconcile_prompt" model="ir.actions.act_window">-->
<!-- <field name="name">Reconcile Entries</field>-->
<!-- <field name="res_model">account.move.line.reconcile.prompt</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" ref="view_account_move_line_reconcile_prompt"/>-->
<!-- <field name="target">new</field>-->
<!-- <field name="view_id" ref="view_account_move_line_reconcile_prompt"/>-->
<!-- <field name="target">new</field>-->
<!-- </record>-->
<!-- <record model="ir.values" id="action_account_move_line_reconcile_prompt_values">-->
@@ -36,41 +36,41 @@
<!-- <field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_move_line_reconcile_prompt'))" />-->
<!-- <field name="key">action</field>-->
<!-- <field name="model">account.move.line</field>-->
<!-- </record>-->
<record id="view_account_move_line_reconcile_full" model="ir.ui.view">
<!-- </record>-->
<record id="view_account_move_line_reconcile_full" model="ir.ui.view">
<field name="name">account.move.line.reconcile.full.form</field>
<field name="model">account.move.line.reconcile</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Reconciliation">
<group height="210" width="550">
<separator string="Reconciliation transactions" colspan="4"/>
<field name="trans_nbr"/>
<newline/>
<field name="credit"/>
<field name="debit"/>
<separator string="Write-Off" colspan="4"/>
<field name="writeoff"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1" attrs="{'invisible':[('writeoff','!=',0)]}"/>
<button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" attrs="{'invisible':[('writeoff','==',0)]}"/>
<button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object" attrs="{'invisible':[('writeoff','==',0)]}"/>
</group>
</group>
<group height="210" width="550">
<separator string="Reconciliation transactions" colspan="4"/>
<field name="trans_nbr"/>
<newline/>
<field name="credit"/>
<field name="debit"/>
<separator string="Write-Off" colspan="4"/>
<field name="writeoff"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1" attrs="{'invisible':[('writeoff','!=',0)]}"/>
<button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" attrs="{'invisible':[('writeoff','==',0)]}"/>
<button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object" attrs="{'invisible':[('writeoff','==',0)]}"/>
</group>
</group>
</form>
</field>
</record>
<record id="action_view_account_move_line_reconcile" model="ir.actions.act_window">
<field name="name">Reconcile Entries</field>
<record id="action_view_account_move_line_reconcile" model="ir.actions.act_window">
<field name="name">Reconcile Entries</field>
<field name="res_model">account.move.line.reconcile</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_move_line_reconcile_full"/>
<field name="target">new</field>
<field name="view_id" ref="view_account_move_line_reconcile_full"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="action_account_move_line_reconcile_prompt_values">
@@ -81,72 +81,72 @@
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_move_line_reconcile'))" />
<field name="key">action</field>
<field name="model">account.move.line</field>
</record>
<!-- <record id="view_account_move_line_reconcile_full" model="ir.ui.view">-->
</record>
<!-- <record id="view_account_move_line_reconcile_full" model="ir.ui.view">-->
<!-- <field name="name">account.move.line.reconcile.full.form</field>-->
<!-- <field name="model">account.move.line.reconcile</field>-->
<!-- <field name="type">form</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <form string="Reconciliation">-->
<!-- <separator string="Reconciliation transactions" colspan="4"/>-->
<!-- <field name="trans_nbr"/>-->
<!-- <newline/>-->
<!-- <field name="credit"/>-->
<!-- <field name="debit"/>-->
<!-- <separator string="Write-Off" colspan="4"/>-->
<!-- <field name="writeoff"/>-->
<!-- <group colspan="4" col="6">-->
<!-- <label string ="" colspan="2"/>-->
<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
<!-- <button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1"/>-->
<!-- <separator string="Reconciliation transactions" colspan="4"/>-->
<!-- <field name="trans_nbr"/>-->
<!-- <newline/>-->
<!-- <field name="credit"/>-->
<!-- <field name="debit"/>-->
<!-- <separator string="Write-Off" colspan="4"/>-->
<!-- <field name="writeoff"/>-->
<!-- <group colspan="4" col="6">-->
<!-- <label string ="" colspan="2"/>-->
<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
<!-- <button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1"/>-->
<!-- </group>-->
<!-- </form>-->
<!-- </field>-->
<!-- </record>-->
<!---->
<!-- <record id="view_account_move_line_reconcile_partial" model="ir.ui.view">-->
<!-- <record id="view_account_move_line_reconcile_partial" model="ir.ui.view">-->
<!-- <field name="name">account.move.line.reconcile.partial.form</field>-->
<!-- <field name="model">account.move.line.reconcile</field>-->
<!-- <field name="type">form</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <form string="Reconciliation">-->
<!-- <separator string="Reconciliation transactions" colspan="4"/>-->
<!-- <field name="trans_nbr"/>-->
<!-- <newline/>-->
<!-- <field name="credit"/>-->
<!-- <field name="debit"/>-->
<!-- <separator string="Write-Off" colspan="4"/>-->
<!-- <field name="writeoff"/>-->
<!-- <group colspan="4" col="6">-->
<!-- <label string ="" colspan="2"/>-->
<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
<!-- <button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" default_focus="1"/>-->
<!-- <button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object"/>-->
<!-- <separator string="Reconciliation transactions" colspan="4"/>-->
<!-- <field name="trans_nbr"/>-->
<!-- <newline/>-->
<!-- <field name="credit"/>-->
<!-- <field name="debit"/>-->
<!-- <separator string="Write-Off" colspan="4"/>-->
<!-- <field name="writeoff"/>-->
<!-- <group colspan="4" col="6">-->
<!-- <label string ="" colspan="2"/>-->
<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
<!-- <button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" default_focus="1"/>-->
<!-- <button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object"/>-->
<!-- </group>-->
<!-- </form>-->
<!-- </field>-->
<!-- </record>-->
<record id="account_move_line_reconcile_writeoff" model="ir.ui.view">
<record id="account_move_line_reconcile_writeoff" model="ir.ui.view">
<field name="name">account.move.line.reconcile.writeoff.form</field>
<field name="model">account.move.line.reconcile.writeoff</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Information addendum">
<separator string="Write-Off Move" colspan="4"/>
<field name="journal_id"/>
<field name="writeoff_acc_id" domain="[('type', '&lt;&gt;', 'view')]"/>
<field name="date_p"/>
<field name="comment"/>
<separator string="Analytic" colspan="4"/>
<field name="analytic_id"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile" type="object" default_focus="1"/>
<separator string="Write-Off Move" colspan="4"/>
<field name="journal_id"/>
<field name="writeoff_acc_id" domain="[('type', '&lt;&gt;', 'view')]"/>
<field name="date_p"/>
<field name="comment"/>
<separator string="Analytic" colspan="4"/>
<field name="analytic_id"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile" type="object" default_focus="1"/>
</group>
</form>
</field>
</record>
</data>
</data>
</openerp>
@@ -97,14 +97,12 @@ class account_partner_ledger(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger_other',
'datas': data,
'nodestroy':True,
}
def _check_date(self, cr, uid, data, context=None):
@@ -122,7 +120,6 @@ class account_partner_ledger(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
@@ -70,7 +70,7 @@
<group colspan="4" col="6" width="300" height="70">
<label string = "Are you sure you want to create entries?" colspan="2"/>
<newline/>
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-execute" string="Ok" name="create_entries" type="object" default_focus='1'/>
</group>
</form>
+30 -31
View File
@@ -22,43 +22,42 @@
from osv import osv, fields
class account_vat_declaration(osv.osv_memory):
_name = 'account.vat.declaration'
_description = 'Account Vat Declaration'
_name = 'account.vat.declaration'
_description = 'Account Vat Declaration'
_columns = {
_columns = {
'based_on': fields.selection([('invoices','Invoices'),
('payments','Payments'),],
'Based On', required=True),
('payments','Payments'),],
'Based On', required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"),
}
'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"),
}
def _get_company(self, cr, uid, context={}):
user_obj = self.pool.get('res.users')
company_obj = self.pool.get('res.company')
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
else:
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
def _get_company(self, cr, uid, context={}):
user_obj = self.pool.get('res.users')
company_obj = self.pool.get('res.company')
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
else:
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
'based_on': 'invoices',
'company_id': _get_company
}
_defaults = {
'based_on': 'invoices',
'company_id': _get_company
}
def create_vat(self, cr, uid, ids, context={}):
if context is None:
context = {}
datas = {'ids': context.get('active_ids', [])}
datas['model'] = 'account.tax.code'
datas['form'] = self.read(cr, uid, ids)[0]
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.vat.declaration',
'datas': datas,
'nodestroy':True,
}
def create_vat(self, cr, uid, ids, context={}):
if context is None:
context = {}
datas = {'ids': context.get('active_ids', [])}
datas['model'] = 'account.tax.code'
datas['form'] = self.read(cr, uid, ids)[0]
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.vat.declaration',
'datas': datas,
}
account_vat_declaration()
@@ -67,7 +67,6 @@ class account_crossovered_analytic(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.analytic.account.crossovered.analytic',
'datas': datas,
'nodestroy': True
}
account_crossovered_analytic()
@@ -304,7 +304,6 @@ class account_followup_print_all(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account_followup.followup.print',
'datas': datas,
'nodestroy': True
}
account_followup_print_all()
+1 -1
View File
@@ -203,7 +203,7 @@ class account_voucher(osv.osv):
}
self.write(cr, uid, ids, res)
else:
raise osv.except_osv('Invalid action !', 'You cannot post to Pro-Forma a voucher with Total amount = 0 !')
raise osv.except_osv(_('Invalid action !'), _('You can not post to Pro-Forma a voucher with Total amount = 0 !'))
return True
def proforma_voucher(self, cr, uid, ids, context={}):
+2 -2
View File
@@ -89,7 +89,7 @@
<filter icon="terp-check" string="Proforma" domain="[('state','=','proforma')]" help="Proforma Vouchers"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
<filter icon="terp-stock_effects-object-colorize" string="Reviewed" domain="[('state','=','audit')]" groups="base.group_extended" help="To Review"/>
<filter icon="terp-gtk-stop" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Vouchers" groups="base.group_extended"/>
<filter icon="gtk-cancel" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Vouchers" groups="base.group_extended"/>
<separator orientation="vertical"/>
<field name="reference" select="1"/>
<field name="number" select='1'/>
@@ -126,7 +126,7 @@
<filter icon="terp-check" string="Proforma" domain="[('state','=','proforma')]" help="Proforma Vouchers"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','audit')]" help="Posted Vouchers"/>
<filter icon="terp-stock_effects-object-colorize" string="To Review" domain="[('state','=','posted')]" groups="base.group_extended" help="To Review"/>
<filter icon="terp-gtk-stop" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Vouchers" groups="base.group_extended"/>
<filter icon="gtk-cancel" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Vouchers" groups="base.group_extended"/>
<separator orientation="vertical"/>
<field name="reference" select="1"/>
<field name="number" select='1'/>
@@ -22,6 +22,38 @@
from osv import fields, osv
from tools.translate import _
class account_invoice(osv.osv):
_inherit = 'account.invoice'
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
"""
Returns a list of ids based on search domain {args}
@param cr: A database cursor
@param user: ID of the user currently logged in
@param args: list of conditions to be applied in search opertion
@param offset: default from first record, you can start from nth record
@param limit: number of records to be obtained as a result of search opertion
@param order: ordering on any field(s)
@param context: context arguments, like lang, time zone
@param count:
@return: Returns a list of ids based on search domain
"""
ttype = context.get('ttype', False)
if ttype and ttype in ('rec_voucher', 'bank_rec_voucher'):
args += [('type','in', ['out_invoice', 'in_refund'])]
elif ttype and ttype in ('pay_voucher', 'bank_pay_voucher'):
args += [('type','in', ['in_invoice', 'out_refund'])]
elif ttype and ttype in('journal_sale_vou', 'journal_pur_voucher', 'journal_voucher'):
raise osv.except_osv(_('Invalid action !'), _('You can not reconcile sales, purchase, or journal entry with invoice !'))
args += [('type','=', 'do_not_allow_search')]
res = super(account_invoice, self).search(cr, user, args, offset, limit, order, context, count)
return res
account_invoice()
class account_move_line(osv.osv):
_inherit = "account.move.line"
_columns = {
@@ -158,11 +190,12 @@ class account_voucher(osv.osv):
move_line_id = move_line_pool.create(cr, uid, move_line)
line_ids += [move_line_id]
if line.invoice_id:
if line.invoice_id and inv.type in ('pay_voucher', 'bank_pay_voucher', 'rec_voucher', 'bank_rec_voucher'):
rec_ids += [move_line_id]
for move_line in line.invoice_id.move_id.line_id:
if line.account_id.id == move_line.account_id.id:
rec_ids += [move_line.id]
rec_ids += [move_line.id]
if rec_ids:
move_line_pool.reconcile_partial(cr, uid, rec_ids)
@@ -196,7 +229,7 @@ class account_voucher_line(osv.osv):
res = super(account_voucher_line, self).move_line_get_item(cr, uid, line, context)
res['invoice'] = line.invoice_id or False
return res
def onchange_invoice_id(self, cr, uid, ids, invoice_id, currency_id):
currency_pool = self.pool.get('res.currency')
invoice_pool = self.pool.get('account.invoice')
@@ -10,10 +10,10 @@
<field name="payment_ids" position="replace">
<field name="voucher_line_ids" default_get="{'lines': voucher_line_ids}" colspan="4" nolabel="1" height="275">
<tree string="Voucher Lines" editable="top">
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type, parent.currency_id)"/>
<field name="partner_id" on_change="onchange_partner(partner_id, type, parent.type, parent.currency_id)"/>
<field name="account_id" on_change="onchange_line_account(account_id, type, parent.type)"/>
<field name="name"/>
<field name="invoice_id" on_change="onchange_invoice_id(invoice_id, parent.currency_id)" domain="[('partner_id','=',partner_id),('state','=','open'),('residual','&gt;',0.0)]"/>
<field name="invoice_id" context="{'ttype':parent.type}" on_change="onchange_invoice_id(invoice_id, parent.currency_id)" domain="[('partner_id','=',partner_id),('state','=','open'),('residual','&gt;',0.0)]"/>
<field name="type"/>
<field name="amount"/>
<field name="account_analytic_id"/>
+185
View File
@@ -0,0 +1,185 @@
# Indonesian 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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-07-29 09:25+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Indonesian <id@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-30 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_quality
#: field:module.quality.check,final_score:0
msgid "Final Score (%)"
msgstr ""
#. module: base_module_quality
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: base_module_quality
#: model:ir.module.module,shortdesc:base_module_quality.module_meta_information
msgid "Base module quality"
msgstr ""
#. module: base_module_quality
#: field:module.quality.check,name:0
msgid "Rated Module"
msgstr ""
#. module: base_module_quality
#: view:module.quality.detail:0
msgid "Detail"
msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,note:0
msgid "Note"
msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,state:0
msgid "State"
msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,detail:0
msgid "Details"
msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,ponderation:0
msgid "Ponderation"
msgstr ""
#. module: base_module_quality
#: help:module.quality.detail,ponderation:0
msgid ""
"Some tests are more critical than others, so they have a bigger weight in "
"the computation of final rating"
msgstr ""
#. module: base_module_quality
#: view:module.quality.check:0
#: field:module.quality.check,check_detail_ids:0
msgid "Tests"
msgstr ""
#. module: base_module_quality
#: selection:module.quality.detail,state:0
msgid "Skipped"
msgstr ""
#. module: base_module_quality
#: help:module.quality.detail,state:0
msgid ""
"The test will be completed only if the module is installed or if the test "
"may be processed on uninstalled module."
msgstr ""
#. module: base_module_quality
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: base_module_quality
#: model:ir.model,name:base_module_quality.model_module_quality_check
msgid "module.quality.check"
msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,name:0
msgid "Name"
msgstr ""
#. module: base_module_quality
#: wizard_field:quality_detail_save,init,module_file:0
msgid "Save report"
msgstr ""
#. module: base_module_quality
#: wizard_field:quality_detail_save,init,name:0
msgid "File name"
msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,score:0
msgid "Score (%)"
msgstr ""
#. module: base_module_quality
#: help:quality_detail_save,init,name:0
msgid "Save report as .html format"
msgstr ""
#. module: base_module_quality
#: view:module.quality.detail:0
#: field:module.quality.detail,summary:0
msgid "Summary"
msgstr ""
#. module: base_module_quality
#: model:ir.actions.wizard,name:base_module_quality.quality_detail_save
msgid "Report Save"
msgstr ""
#. module: base_module_quality
#: wizard_view:quality_detail_save,init:0
msgid "Standard entries"
msgstr ""
#. module: base_module_quality
#: view:module.quality.detail:0
msgid "Save Report"
msgstr ""
#. module: base_module_quality
#: code:addons/base_module_quality/wizard/module_quality_check.py:0
#: model:ir.actions.wizard,name:base_module_quality.create_quality_check_id
#, python-format
msgid "Quality Check"
msgstr ""
#. module: base_module_quality
#: model:ir.model,name:base_module_quality.model_module_quality_detail
msgid "module.quality.detail"
msgstr ""
#. module: base_module_quality
#: selection:module.quality.detail,state:0
msgid "Done"
msgstr ""
#. module: base_module_quality
#: code:addons/base_module_quality/speed_test/speed_test.py:0
#: view:module.quality.check:0
#: view:module.quality.detail:0
#, python-format
msgid "Result"
msgstr ""
#. module: base_module_quality
#: wizard_button:quality_detail_save,init,end:0
msgid "Cancel"
msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,message:0
msgid "Message"
msgstr ""
#. module: base_module_quality
#: field:module.quality.detail,quality_check_id:0
msgid "Quality"
msgstr ""
+1 -1
View File
@@ -124,7 +124,7 @@ Create dashboard for CRM that includes:
],
'test': [
'test/test_crm_lead.yml',
#'test/test_crm_meeting.yml',
'test/test_crm_meeting.yml',
'test/test_crm_opportunity.yml',
'test/test_crm_phonecall.yml',
],
+3 -2
View File
@@ -164,8 +164,9 @@ class crm_lead(osv.osv, crm_case):
}
def create(self, cr, uid, vals, context=None):
if not vals.get('stage_id',False):
raise osv.except_osv('Error', _('There is no stage defined for this Sales Team'))
# FIXME: Do we really need this? if yes, this is not a correct way to check for stage
# if not vals.get('stage_id',False):
# raise osv.except_osv('Error', _('There is no stage defined for this Sales Team'))
return super(crm_lead, self).create(cr, uid, vals, context=context)
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
+2 -7
View File
@@ -55,8 +55,8 @@
I will search for one of the recurrent event and count the number of meeting.
-
!python {model: crm.meeting}: |
ids = self.search(cr, uid, [('date', '>=', '2010-05-21 00:00:00'), ('date', '<=', '2010-04-21 00:00:00')] )
assert len(ids) == 9
ids = self.search(cr, uid, [('date', '>=', '2010-04-21 00:00:00'), ('date', '<=', '2010-05-21 00:00:00')] )
assert len(ids) == 10
- |
Now If I want to edit meetings information for all occurence I click on "Edit All" button.
@@ -81,11 +81,6 @@
partner_id: base.res_partner_9
user_ids:
- base.user_demo
- |
If I set Send mail boolean as True I can see that an email is send to
specified email address with proper meeting information.
-
#This is not working for send mail boolean as True.
-
I click on "Invite" button of "Invite attendee" wizard.
-
-1
View File
@@ -72,7 +72,6 @@
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
phonecall_id: 'crm_phonecall_interviewcall0'
rrule_type: weekly
state: open
- |
@@ -167,7 +167,7 @@
string="Done"
domain="[('state','=','done')]"/>
<filter icon="terp-gtk-stop"
<filter icon="gtk-cancel"
string="Cancel"
domain="[('state','=','cancel')]"/>
@@ -158,7 +158,7 @@
string="Done"
domain="[('state','=','done')]"/>
<filter icon="terp-gtk-stop"
<filter icon="gtk-cancel"
string="Cancel"
domain="[('state','=','cancel')]"/>
+15 -11
View File
@@ -1,10 +1,10 @@
-
In order to test the document management
-
I make sure the default installation has some storage and root directory.
In order to test the document management I make sure the default installation has some storage.
-
!assert {model: document.storage, id: storage_default }:
- id != False
-
I make sure the default installation has some root directory.
-
!assert {model: document.directory, id: dir_root}:
- storage_id != False
@@ -19,11 +19,12 @@
defaults work)
-
!record {model: ir.attachment, id: file_test1 }:
name: Test file
name: Test file.txt
-
I delete the attachment from the root folder
-
!delete {model: ir.attachment, id: file_test1, search: }
!python {model: ir.attachment}: |
self.unlink(cr, uid, [ref('file_test1')])
-
I create an attachment into the Testing folder.
-
@@ -34,13 +35,13 @@
I update the attachment with data, namely "abcd"
-
!record {model: ir.attachment, id: file_test2 }:
datas: "abcd"
datas: "YWJjZA==\n"
-
I test that the datas of the attachment are correct
-
!assert {model: ir.attachment, id: file_test2 }:
- datas == "abcd\n"
- file_size == 5
- datas == "YWJjZA==\n"
- file_size == 4
- file_type == 'text/plain'
-
I rename the attachment.
@@ -57,9 +58,9 @@
I create an attachment to a 3rd resource, eg. a res.country
-
!record {model: ir.attachment, id: attach_3rd }:
name: 'Res country attachment.txt'
name: 'Country attachment.txt'
parent_id: dir_tests
datas: 'defg'
datas: "Q291bnRyeSBhdHRhY2htZW50IGNvbnRlbnQ=\n"
res_model: res.country
res_id: !eval ref("base.za")
-
@@ -69,4 +70,7 @@
ids = self.search(cr, uid, [('res_model', '=', 'res.country'), ('res_id', '=', ref("base.za"))])
assert ids == [ ref("attach_3rd")], ids
-
!delete {model: ir.attachment, id: attach_3rd, search: }
I delete the attachment
-
!python {model: ir.attachment}: |
self.unlink(cr, uid, [ref('attach_3rd')])
@@ -1,16 +1,14 @@
- |
-
In order to test hr_evaluation module for OpenERP, I will create plan then create evaluation under that plan.
-
|
Given that I have "R & D" Department for employee.
-
I create new Department.
-
!record {model: hr.department, id: hr_department_rd0}:
manager_id: base.user_root
name: 'R & D '
-
|
Given that I have Employee “Mark Johnson” which take Interview.
select "R & D" Department.
name: 'R & D'
-
I create a new employee.
-
!record {model: hr.employee, id: hr_employee_employee0}:
address_home_id: base.res_partner_address_1
@@ -20,32 +18,31 @@
name: Mark Johnson
user_id: base.user_root
department_id: 'hr_department_rd0'
- |
I create new employee “Phil Graves ” and select "Mark Johnson" as
Manager.
-
-
I create another new employee and assign first one as it's Manager.
-
!record {model: hr.employee, id: hr_employee_employee1}:
address_home_id: base.res_partner_address_3000
company_id: base.main_company
gender: male
name: Phil Graves
name: Phil Graves
user_id: base.user_demo
parent_id: 'hr_employee_employee0'
- |
I Create "Employee Evaluation" survey for Manager's Evaluation Plan.
-
I Create an "Employee Evaluation" survey for Manager's Evaluation Plan.
-
!record {model: 'survey', id: survey_0}:
title: 'Employee Evaluation'
max_response_limit: 20
response_user: 2
- |
I Create "Employee Evaluation" page in "Employee Evaluation" survey.
-
I Create an "Employee Evaluation" page in "Employee Evaluation" survey.
-
!record {model: 'survey.page', id: survey_employee_page_0}:
title: 'Employee Evaluation'
survey_id: survey_0
- |
-
I Create "What is your Name" question in "Employee Evaluation" survey page.
-
!record {model: 'survey.question', id: survey_p_question_0}:
@@ -53,7 +50,7 @@
type: 'single_textbox'
sequence: 1
page_id: survey_employee_page_0
- |
-
I Create "What is your gender" Question in "Employee Evaluation" survey page.
-
!record {model: 'survey.question', id: survey_p_question_1}:
@@ -62,30 +59,30 @@
sequence: 2
is_require_answer: true
page_id: survey_employee_page_0
- |
-
I Create "Male" answer in question "What is your gender?"
-
!record {model: 'survey.answer', id: survey_p_1_1}:
answer: 'Male'
sequence: 1
question_id : survey_p_question_1
- |
-
I Create "Female" answer in question "What is your gender?"
-
!record {model: 'survey.answer', id: survey_p_1_2}:
answer: 'Female'
sequence: 2
question_id : survey_p_question_1
- |
Now Survey set in open state.
-
I set the survey in open state.
-
!python {model: survey}: |
self.survey_open(cr, uid, [ref("survey_0")], context)
- |
I creating a Evaluation plan and select "Employee Evaluation" survey for "Send to Subordinates" and "Final interview with Manager" Phase.
-
-
I create an Evaluation plan and select "Employee Evaluation" survey for "Send to Subordinates" and "Final interview with Manager" Phase.
-
!record {model: hr_evaluation.plan, id: hr_evaluation_plan_managersplan0}:
company_id: base.main_company
month_first: 3
@@ -99,54 +96,52 @@
name: Final Interview with manager
sequence: 2
survey_id: 'survey_0'
- |
Now I create Evaluation for "Phil Graves" Employee under "Manager Evaluation Plan".
-
-
I create an Evaluation for employee under "Manager Evaluation Plan".
-
!record {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
date: '2010-06-28'
employee_id: 'hr_employee_employee1'
plan_id: 'hr_evaluation_plan_managersplan0'
progress: 0.0
state: draft
- |
I check that Evaluation is in "Draft" state.
-
I check that evaluation is in "Draft" state.
-
!assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
- state == 'draft'
- |
I start Evaluation process by click on "Start Evaluation" button.
- state == 'draft'
-
I start the evaluation process by click on "Start Evaluation" button.
-
!python {model: hr_evaluation.evaluation}: |
self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
- |
After that Manager Evaluation plan is In Progress.
I close this servey request by giving answer of survey question.
-
I close this servey request by giving answer of survey question.
-
!python {model: hr.evaluation.interview}: |
self.survey_req_done(cr, uid, [ref('hr_evaluation_evaluation_0')])
- |
I click on "Final Validation" button to finalize Evaluation.
-
-
I click on "Final Validation" button to finalise evaluation.
-
!python {model: hr_evaluation.evaluation}: |
self.button_final_validation(cr, uid, [ref("hr_evaluation.hr_evaluation_evaluation_0")],
{"active_ids": [ref("hr_evaluation.menu_open_view_hr_evaluation_tree")]})
- |
-
I check that state is "Final Validation".
-
!assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
- state == 'progress'
- |
!assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
- state == 'progress'
-
Give Rating "Meet expectations" by selecting overall Rating.
-
-
!record {model: hr_evaluation.evaluation, id: hr_evaluation.hr_evaluation_evaluation_0}:
rating: '2'
- |
-
I close this Evaluation by click on "Done" button of this wizard.
-
-
!python {model: hr_evaluation.evaluation}: |
self.button_done(cr, uid, [ref("hr_evaluation.hr_evaluation_evaluation_0")], {"active_ids": [ref("hr_evaluation.menu_open_view_hr_evaluation_tree")]})
+21 -21
View File
@@ -1,27 +1,27 @@
- |
In order to test hr_expenses for OpenERP, I create expense for employee and manage employee's expenses.
- |
Creating unit of measure category "Working Time".
-
In order to test hr_expenses for OpenERP, I create expenses for employee and manage employee's expenses.
-
I create an unit of measure category "Working Time".
-
!record {model: product.uom.categ, id: product_uom_categ_workingtime0}:
name: Working Time.
- |
Given that I have employee "Marc John" and his address.
-
I create a new employee.
-
!record {model: hr.employee, id: hr.employee1}:
address_home_id: base.res_partner_address_1
address_id: base.main_address
- |
I create product unit of measure "Hour".
-
I create product unit of measure "Hour".
-
!record {model: product.uom, id: product_uom_hour0}:
category_id: 'product_uom_categ_workingtime0'
factor: 8.0
name: Hour
rounding: 0.01
- |
Creating a product "travel" and select uom "Hour" and category "Working Time".
-
I Create a product "travel".
-
!record {model: product.product, id: product_product_travel0}:
categ_id: product.product_category_services
@@ -41,8 +41,8 @@
weight: 0.0
weight_net: 0.0
- |
Now I create Expense "September Expenses" for Marc John.And select product "travel".
-
I create an expense.
-
!record {model: hr.expense.expense, id: hr_expense_expense_september0}:
company_id: base.main_company
@@ -58,38 +58,38 @@
uom_id: product.product_uom_unit
unit_amount: 700.0
user_id: base.user_root
- |
I check that expenses on "draft" state.
-
I check that expense is in "Draft" state.
-
!assert {model: hr.expense.expense, id: hr_expense_expense_september0}:
- state == 'draft'
- |
-
I confirm this expenses by click on "Confirm" button.
-
!workflow {model: hr.expense.expense, action: confirm, ref: hr_expense_expense_september0}
- |
-
I check that state is "Waiting Confirmation".
-
!assert {model: hr.expense.expense, id: hr_expense_expense_september0}:
- state == 'confirm'
- |
-
I accept this expense by click on "Accept" button.
-
!workflow {model: hr.expense.expense, action: validate, ref: hr_expense_expense_september0}
- |
-
I invoiced this expenses by click on "Invoice" button.
-
!workflow {model: hr.expense.expense, action: invoice, ref: hr_expense_expense_september0}
- |
-
I check that state is "Invoiced"
-
!assert {model: hr.expense.expense, id: hr_expense_expense_september0}:
- state == 'invoiced'
- |
Now I check that Invoice is created for that expenses.
-
I check that Invoice is created for the expense.
-
!python {model: hr.expense.expense}: |
exp = self.browse(cr, uid, [ref('hr_expense_expense_september0')])[0]
@@ -56,7 +56,7 @@
help = "Draft and Confirmed leaves"/>
<filter string="Validated" icon="terp-camera_test" domain="[('state','=','validate')]"
help = "Pending Leaves"/>
<filter icon="terp-gtk-stop" string="Cancelled" domain="[('state','=','cancel')]"/>
<filter icon="gtk-cancel" string="Cancelled" domain="[('state','=','cancel')]"/>
<separator orientation="vertical"/>
<field name="department_id"/>
<field name="employee_id"/>
+8 -4
View File
@@ -8,6 +8,7 @@
<field name="name">Marketing Executive</field>
<field name="company_id" ref="base.main_company"/>
</record>
<record id="hr_payslip_line_houserantallowance1" model="hr.payslip.line">
<field name="amount_type">per</field>
<field name="account_id" ref="account.a_expense"/>
@@ -19,6 +20,7 @@
<field name="function_id" ref="hr_payroll.structure_001"/>
<field name="name">House Rant Allowance</field>
</record>
<record id="hr_payslip_line_convanceallowance1" model="hr.payslip.line">
<field name="amount_type">fix</field>
<field name="account_id" ref="account.a_expense"/>
@@ -30,6 +32,7 @@
<field name="function_id" ref="hr_payroll.structure_001"/>
<field name="name">Convance Allowance</field>
</record>
<record id="hr_payslip_line_professionaltax1" model="hr.payslip.line">
<field name="amount_type">fix</field>
<field name="account_id" ref="account.a_pay"/>
@@ -41,6 +44,7 @@
<field name="function_id" ref="hr_payroll.structure_001"/>
<field name="name">Professional Tax</field>
</record>
<record id="hr_payslip_line_providentfund1" model="hr.payslip.line">
<field name="amount_type">per</field>
<field name="account_id" ref="account.a_pay"/>
@@ -52,7 +56,7 @@
<field name="function_id" ref="hr_payroll.structure_001"/>
<field name="name">Provident Fund</field>
</record>
<!-- Employee -->
<record id="hr_employee_bonamy0" model="hr.employee">
<field eval="0" name="manager"/>
@@ -62,7 +66,7 @@
<field name="name">Bonamy</field>
<field name="resource_type">user</field>
</record>
<!-- Employee Contract -->
<record id="hr_contract_firstcontract1" model="hr.contract">
<field name="wage_type_id" ref="hr_contract.hr_contract_monthly_gross"/>
@@ -74,7 +78,7 @@
<field eval="4000.0" name="wage"/>
<field eval="5" name="working_days_per_week"/>
</record>
<!-- Payslip -->
<record id="hr_payslip_salaryslipofbonamyforjune0" model="hr.payslip">
<field name="number">SLIP/001</field>
@@ -87,6 +91,6 @@
<field name="bank_journal_id" ref="account.bank_journal"/>
<field name="name">Salary Slip of Bonamy for June-2010</field>
</record>
</data>
</openerp>
+7 -7
View File
@@ -2,7 +2,7 @@
I test the 'Payment Advice' in order to check the hr_payroll in OpenERP
-
I create a new employee “Richie”
-
-
!record {model: hr.employee, id: hr_employee_richie0}:
address_home_id: base.res_partner_address_1
address_id: base.res_partner_address_9
@@ -27,8 +27,8 @@
salary_account: account.a_recv
vehicle_distance: 0.0
-
Then I create a new payment advice record
-
I create a new payment advice record
-
!record {model: hr.payroll.advice, id: hr_payroll_advice_advice0}:
account_id: account.cash
line_ids:
@@ -38,15 +38,15 @@
flag: C
name: Axis Bank
name: advice1
-
In order to confirm a sheet I click on "Confirm Sheet" button
-
-
I confirmed the sheet by click on "Confirm Sheet" button.
-
!python {model: hr.payroll.advice}: |
self.confirm_sheet(cr, uid, [ref("hr_payroll_advice_advice0")], {"lang": "en_US",
"active_model": "ir.ui.menu", "active_ids": [ref("hr_payroll.hr_menu_payment_advice")],
"tz": False, "active_id": ref("hr_payroll.hr_menu_payment_advice")})
-
I check that a state has transferred from draft to confirm
I check that a state is "Confirm"
-
!python {model: hr.payroll.advice}: |
from tools.translate import _
+6 -6
View File
@@ -2,7 +2,7 @@
I test the 'Payroll Register' in order to check the hr_payroll in OpenERP
-
I create a new employee “Keith”
-
-
!record {model: hr.employee, id: hr_employee_keith0}:
address_home_id: base.res_partner_address_3
address_id: base.res_partner_address_9
@@ -27,7 +27,7 @@
salary_account: account.a_recv
vehicle_distance: 0.0
-
I create a payroll register record
I create a payroll register record.
-
!record {model: hr.payroll.register, id: hr_payroll_register_payroll0}:
bank_journal_id: account.bank_journal
@@ -38,8 +38,8 @@
bank_journal_id: account.bank_journal
journal_id: account.expenses_journal
name: payroll1
-
I click on Compute button
-
I click on Compute button.
-
!python {model: hr.payroll.register}: |
self.compute_sheet(cr, uid, [ref("hr_payroll_register_payroll0")], {"lang": "en_US",
@@ -47,7 +47,7 @@
[ref("hr_payroll.hr_menu_payroll_register")], "section_id": False, "active_id":
ref("hr_payroll.hr_menu_payroll_register"), })
-
Then I click on Verify Sheet button
Then I click on Verify Sheet button.
-
!python {model: hr.payroll.register}: |
self.verify_sheet(cr, uid, [ref("hr_payroll_register_payroll0")], {"lang": "en_US",
@@ -60,4 +60,4 @@
!python {model: hr.payroll.register}: |
from tools.translate import _
reg_brw=self.browse(cr, uid, ref("hr_payroll_register_payroll0"))
assert(reg_brw.state == 'hr_check'), _('State not changed!')
assert(reg_brw.state == 'hr_check'), _('State not changed!')
+31 -20
View File
@@ -1,8 +1,16 @@
-
I test the 'Payment Advice' in order to check the hr_payroll in OpenERP
-
I Create a bank record
-
!record {model: res.partner.bank, id: res_partner_bank_0}:
acc_number: '987654321'
partner_id: base.res_partner_desertic_hispafuentes
sequence: 0.0
state: bank
-
I create a new employee “Richard”
-
-
!record {model: hr.employee, id: hr_employee_richard0}:
address_home_id: base.res_partner_address_2
address_id: base.res_partner_address_9
@@ -24,10 +32,11 @@
name: Richard
pg_joining: '2009-12-01'
property_bank_account: account.cash
bank_account_id: res_partner_bank_0
salary_account: account.a_recv
vehicle_distance: 0.0
-
I create a new payroll structure for software developer
I create a new payroll structure for software developer
-
!record {model: hr.payroll.structure, id: hr_payroll_structure_softwaredeveloper0}:
code: SD
@@ -75,58 +84,60 @@
name: Software Developer
-
I create a employee payslip record
-
-
!record {model: hr.payslip, id: hr_payslip_0}:
bank_journal_id: account.bank_journal
employee_id: hr_payroll.hr_employee_richard0
journal_id: account.expenses_journal
-
-
I click on 'Compute Sheet' button
-
-
!workflow {model: hr.payslip, action: compute_sheet, ref: hr_payslip_0}
-
-
just to test
-
!python {model: hr.payslip}: |
self.compute_sheet(cr, uid, [ref("hr_payslip_0")], {"lang": "en_US", "tz": False,
"active_model": "ir.ui.menu", "department_id": False, "active_ids": [ref("hr_payroll.menu_department_tree")],
"section_id": False, "active_id": ref("hr_payroll.menu_department_tree"),
})
-
I check that an order which was in the "New Slip" state has transit to "Wating for Verification" state
I check that the order is now in "Waiting for Verification" state
-
!python {model: hr.payslip}: |
from tools.translate import _
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
assert(payslip_brw.state == 'draft'), _('State not changed!')
assert(payslip_brw.state == 'draft'), _('State not changed!')
-
I click on Verify Sheet button.
-
Then I click on Verify Sheet button
-
!workflow {model: hr.payslip, action: verify_sheet, ref: hr_payslip_0}
-
I check that an order which was in the "Wating for Verification" state has transit to "Wating for HR Verification" state
I check that the order is in the "Waiting for HR Verification" state
-
!python {model: hr.payslip}: |
from tools.translate import _
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
assert(payslip_brw.state == 'hr_check'), _('State not changed!')
assert(payslip_brw.state == 'hr_check'), _('State not changed!')
-
Then I click on Complete HR Checking button
I click on Complete HR Checking button.
-
!workflow {model: hr.payslip, action: final_verify_sheet, ref: hr_payslip_0}
-
I check that an order which was in the "'Wating for HR Verification'" state has transit to "Confirm Sheet" state
I check that the order is in "Confirm Sheet" state.
-
!python {model: hr.payslip}: |
from tools.translate import _
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
assert(payslip_brw.state == 'confirm'), _('State not changed!')
-
Then I click on Pay Salary button
-
assert(payslip_brw.state == 'confirm'), _('State not changed!')
-
I click on Pay Salary button
-
!workflow {model: hr.payslip, action: process_sheet, ref: hr_payslip_0}
-
I check that an order which was in the "Confirm Sheet" state has transit to "Paid Salary" state
I check that the order is in "Paid Salary" state.
-
!python {model: hr.payslip}: |
from tools.translate import _
payslip_brw=self.browse(cr, uid, ref("hr_payslip_0"))
assert(payslip_brw.state == 'done'), _('State not changed!')
assert(payslip_brw.state == 'done'), _('State not changed!')
@@ -63,7 +63,6 @@ class hr_payroll_employees_detail(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'employees.salary',
'datas': datas,
'nodestroy':True,
}
hr_payroll_employees_detail()
@@ -65,7 +65,6 @@ class hr_payroll_year_salary(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'year.salary',
'datas': datas,
'nodestroy':True,
}
hr_payroll_year_salary()
@@ -1,91 +1,86 @@
- |
In order to test hr_recruitment module for OpenERP, I will create applicants form, Manages job positions and the recruitement process.
- |
I create job position for employee to manage job position.
-
|
For that First I create Department "R & D" in Department form for which I make recruitment.
-
In order to test hr_recruitment module for OpenERP, I will create applicants form, Manages job positions and the recruitment process.
-
I create a department.
-
!record {model: hr.department, id: hr_department_rd0}:
manager_id: base.user_root
name: 'R & D '
- |
Now I will create new Job Position. I will check successfull creation of new Job Position by adding the information.
-
-
I create new Job Position.
-
!record {model: hr.job, id: hr_job_jea0}:
department_id: 'hr_department_rd0'
description: 'Position of Junier Application Engineer '
description: 'Position of Jr. Application Engineer'
expected_employees: 5
name: 'JEA '
- |
Given that I have stage "Initial Jobs Demand".
-
name: 'JAE '
-
I create a recruitment stage "Initial Jobs Demand".
-
!record {model: hr.recruitment.stage, id: hr_recrutiment_stage_first0}:
name: 'Initial Jobs Demand'
sequence: 1
- |
I create applicants for "Fresher" and specify job information for that applicant.
-
sequence: 1
-
I create an applicant.
-
!record {model: hr.applicant, id: hr_applicant_fresher0}:
availability: 0.0
department_id: hr.dep_it
name: Fresher
partner_address_id: base.res_partner_address_tang
partner_id: base.res_partner_asus
partner_name: Jose
partner_phone: '999666735'
partner_name: Marion Jones
partner_phone: '1111112223'
response: 0.0
salary_expected: 0.0
salary_proposed: 0.0
stage_id: crm.stage_lead3
type_id: hr_recruitment.type_job2
stage_id: hr_recrutiment_stage_first0
- |
I check that applicant is on "draft" state.
stage_id: hr_recrutiment_stage_first0
type_id: hr_recruitment.degree_licenced
-
I check that applicant is on "draft" state.
-
!assert {model: hr.applicant, id: hr_applicant_fresher0}:
- state == 'draft'
- |
I start progress by click on "In Progress" button.
-
- state == 'draft'
-
I change the state by click on "In Progress" button.
-
!python {model: hr.applicant}: |
self.case_open(cr, uid, [ref("hr_applicant_fresher0")], {"active_ids": [ref("hr_recruitment.menu_crm_case_categ0_act_job")],
})
})
- |
Given that I have case category "Employee".
-
I create a new case category.
-
!record {model: crm.case.categ, id: crm_case_categ_employee0}:
name: 'Employee'
- |
I make phonecall for this applicant by click on "Schedule a Phone Call" button.
-
!record {model: hr.recruitment.job2phonecall, id: hr_recruitment_forinterview0}:
I schedule a phonecall for this applicant by click on "Schedule a Phone Call" button.
-
!record {model: hr.recruitment.job2phonecall, id: hr_recruitment_forinterview0}:
user_id: base.user_root
deadline: '05/28/2010 11:51:00'
note: 'For interview.'
category_id: 'crm_case_categ_employee0'
- |
-
I click on "Schedule phonecall" button of this wizard.
-
!python {model: hr.recruitment.job2phonecall}: |
self.make_phonecall(cr, uid, [ref('hr_recruitment_forinterview0')], {'active_ids': [ref('hr_applicant_fresher0')]})
- |
I schedule meeting for interview of this applicant by click on "Schdule Meeting" button.
-
self.make_phonecall(cr, uid, [ref('hr_recruitment_forinterview0')], {'active_ids': [ref('hr_applicant_fresher0')]})
-
I schedule meeting for interview of this applicant by click on "Schedule Meeting" button.
-
!python {model: hr.applicant}: |
self.action_makeMeeting(cr, uid, [ref('hr_recruitment_forinterview0')])
- |
I can see that Meeting's calendar view is shown.
then I click on the date on which I want schedule meeting.
I fill proper data for that meeting and save it.
-
-
I create an entry for the meeting with the applicant.
-
!record {model: crm.meeting, id: crm_meeting_fresher0}:
alarm_id: base_calendar.alarm1
count: 0.0
@@ -101,15 +96,14 @@
rrule_type: none
state: open
user_id: base.user_root
- |
After Meeting of this applicant , I hired employee by click on "Hired" button of this form.
-
-
On a successful meeting with the applicant, I hired employee by click on "Hired" button.
-
!python {model: hr.applicant}: |
self.case_close(cr, uid, [ref('hr_applicant_fresher0')])
- |
I check that applicant state is "done".
-
I check that applicant state is "Hired".
-
!assert {model: hr.applicant, id: hr_applicant_fresher0}:
- state == 'done'
@@ -154,9 +154,10 @@ class account_invoice(osv.osv):
inv = self.browse(cr, uid, [id])[0]
if inv.type == 'in_invoice':
obj_analytic_account = self.pool.get('account.analytic.account')
for il in iml:
if il['account_analytic_id']:
to_invoice = self.pool.get('account.analytic.account').read(cr, uid, [il['account_analytic_id']], ['to_invoice'])[0]['to_invoice']
to_invoice = obj_analytic_account.read(cr, uid, [il['account_analytic_id']], ['to_invoice'])[0]['to_invoice']
if to_invoice:
il['analytic_lines'][0][2]['to_invoice'] = to_invoice[0]
return iml
@@ -1,8 +1,8 @@
- |
-
In order to test hr_timesheet_invoice in OpenERP, I create account line to manage invoice based on costs.
- |
In order to test flow, I create analytic line for sednacom analytic account.
-
-
I create an account analytic line.
-
!record {model: account.analytic.line, id: account_analytic_line_developyamlforhrmodule0}:
account_id: account.analytic_sednacom
amount: -1.0
@@ -17,17 +17,16 @@
unit_amount: 5.00
user_id: base.user_root
- |
Give partner name and price list in analytic account.
-
-
Assign partner name and price list in analytic account.
-
!record {model: account.analytic.account, id: account.analytic_sednacom}:
partner_id: base.res_partner_9
pricelist_id: product.list0
- |
-
I create invoice on analytic Line using "Invoice analytic Line" wizard.
Give date , detail of each work , time spend on that work on this wizard.
-
-
!record {model: hr.timesheet.invoice.create, id: hr_timesheet_invoice_create_0}:
accounts:
- account.analytic_sednacom
@@ -36,54 +35,50 @@
price: 1
product: hr_timesheet.product_consultant
time: 1
- |
-
I click on "Create Invoice" button of "Invoice analytic Line" wizard to create invoice.
-
-
!python {model: hr.timesheet.invoice.create}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_0")], {"active_ids": [ref("hr_timesheet_invoice.account_analytic_line_developyamlforhrmodule0")]})
- |
I check that Invoice is create for this timesheet.
-
I check that Invoice is created for this timesheet.
-
!python {model: account.analytic.line}: |
exp = self.browse(cr, uid, [ref('account_analytic_line_developyamlforhrmodule0')])[0]
analytic_account_obj = self.pool.get('account.analytic.account')
data = self.pool.get('hr.timesheet.invoice.create').read(cr, uid, [ref("hr_timesheet_invoice_create_0")], [], context)[0]
account_ids = data['accounts']
for account in analytic_account_obj.browse(cr, uid, account_ids, context):
partner = account.partner_id.id
invoice_obj = self.pool.get('account.invoice')
invoice_ids = invoice_obj.search(cr, uid, [('partner_id', '=', partner)])
invoice_id = invoice_obj.browse(cr, uid, invoice_ids)[0]
for invoice in invoice_id.invoice_line:
product = invoice.product_id.id
product_exp = data['product']
assert product == product_exp
- |
I creating a final invoice for "Sednacom" analytic account.
-
-
I create final invoice for this analytic account.
-
!record {model: hr.timesheet.invoice.create.final, id: hr_timesheet_invoice_create_final_0}:
balance_product: hr_timesheet.product_consultant
date: 1
name: 1
price: 1
time: 1
- |
I click on "Create Invoice" button to create Invoice.
-
-
I click on "Create Invoice" button to create Invoice.
-
!python {model: hr.timesheet.invoice.create.final}: |
self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_final_0")], {"active_ids": [ref("account.analytic_sednacom")]})
- |
I can also make some theoretical revenue reports.
- |
I can also see timesheet profit using Timesheet profit report.
-
I can also make some theoretical revenue reports.
-
I can also see timesheet profit using Timesheet profit report.
@@ -166,7 +166,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
#
# Compute for lines
#
cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id IN %s AND product_id=%s and to_invoice=%s ORDER BY account_analytic_line.date", (account.id, tuple(data['ids']), product_id, factor_id))
cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id IN %s AND product_id=%s and to_invoice=%s ORDER BY account_analytic_line.date", (account.id, tuple(context['active_ids']), product_id, factor_id))
line_ids = cr.dictfetchall()
note = []
@@ -188,7 +188,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
curr_line['note'] = "\n".join(map(lambda x: unicode(x) or '',note))
invoice_line_obj.create(cr, uid, curr_line, context=context)
cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s" ,(last_invoice, account.id,tuple(data['ids'])))
cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s" ,(last_invoice, account.id, tuple(context['active_ids'])))
invoice_obj.button_reset_taxes(cr, uid, [last_invoice], context)
@@ -180,7 +180,7 @@
<group col="4" colspan="2">
<button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-gtk-jump-to-rtl"/>
<button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
<button name="cancel" states="confirm" string="Refuse" type="workflow" icon="terp-gtk-stop"/>
<button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel"/>
<button name="done" states="confirm" string="Accept" type="workflow" icon="terp-camera_test"/>
</group>
</form>
@@ -99,6 +99,7 @@
-
!python {model: hr_timesheet_sheet.sheet}: |
uid = ref('base.user_root')
import netsvc
for sheet in self.browse(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')]):
di = sheet.user_id.company_id.timesheet_max_difference
if (abs(sheet.total_difference) < di) or not di:
+1 -1
View File
@@ -62,7 +62,7 @@
name="%(action_lunch_order_cancel)d"
string="Cancel Order"
type="action" states="confirmed"
icon="terp-gtk-stop" />
icon="gtk-cancel" />
</tree>
</field>
</record>
@@ -674,7 +674,6 @@ class marketing_campaign_workitem(osv.osv):
'type' : 'ir.actions.report.xml',
'report_name': wi_obj.activity_id.report_id.report_name,
'datas' : datas,
'nodestroy': True,
}
else:
raise osv.except_osv(_('No preview'),_('The current step for this item has no email or report to preview.'))
+1 -1
View File
@@ -81,7 +81,7 @@ class purchase_order(osv.osv):
res={}
purchase_obj=self.browse(cr, uid, ids, context=context)
for purchase in purchase_obj:
res[purchase.id] = False
res[purchase.id] = time.strftime('%Y-%m-%d %H:%M:%S')
if purchase.order_line:
min_date=purchase.order_line[0].date_planned
for line in purchase.order_line:
+1 -1
View File
@@ -37,7 +37,7 @@
<filter icon="terp-personal+"
domain="[('section_id.user_id','=',uid)]"
groups="base.group_extended"
help="My Sales Team"/>
help="My Sales Team(s)"/>
</field>
</field>
</field>
+10 -11
View File
@@ -1,21 +1,20 @@
# translation of fr_FR.po to Français
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * sale_layout
# French 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.
#
# Numerigraphe <informatique@numerigraphe.com>, 2009.
msgid ""
msgstr ""
"Project-Id-Version: fr_FR\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-26 08:45+0000\n"
"PO-Revision-Date: 2010-01-19 05:23+0000\n"
"Last-Translator: Numérigraphe <Unknown>\n"
"Language-Team: Français\n"
"PO-Revision-Date: 2010-07-29 08:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: French <fr@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-05-21 03:45+0000\n"
"X-Launchpad-Export-Date: 2010-07-30 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_layout
-2
View File
@@ -124,7 +124,6 @@ class survey(osv.osv):
'type': 'ir.actions.report.xml',
'report_name': 'survey.browse.response',
'datas': datas,
'nodestroy': True,
'context' : context
}
else:
@@ -135,7 +134,6 @@ class survey(osv.osv):
'type': 'ir.actions.report.xml',
'report_name': 'survey.form',
'datas': datas,
'nodestroy':True,
'context' : context
}
return report