[Merge] : branch merged with lp:openobject-addons

bzr revid: mso@mso-20100421045914-5b4c1fr3myd9jeku
This commit is contained in:
mso 2010-04-21 10:29:14 +05:30
commit 65b956a7bf
67 changed files with 624 additions and 388 deletions

View File

@ -68,6 +68,8 @@ module named account_voucherss
'wizard/account_validate_move_view.xml',
'wizard/account_statement_from_invoice_view.xml',
'wizard/account_pay_invoice_view.xml',
'wizard/account_unreconcile_view.xml',
'wizard/account_invoice_state_view.xml',
'project/wizard/project_account_analytic_line_view.xml',
'account_view.xml',
'account_end_fy.xml',

View File

@ -49,7 +49,7 @@
<!-- manual reconcile -->
<wizard id="wizard_reconcile" model="account.move.line" name="account.move.line.reconcile" string="Reconcile Entries"/>
<wizard id="wizard_reconcile_unreconcile" model="account.move.reconcile" name="account.reconcile.unreconcile" string="Unreconcile Entries"/>
<!-- <wizard id="wizard_reconcile_unreconcile" model="account.move.reconcile" name="account.reconcile.unreconcile" string="Unreconcile Entries"/>-->
<!-- <wizard id="wizard_reconcile_select" menu="False" model="account.move.line" name="account.move.line.reconcile.select" string="Reconcile entries"/>
@ -57,7 +57,7 @@
-->
<!-- unreconcile -->
<wizard id="wizard_unreconcile" model="account.move.line" name="account.move.line.unreconcile" string="Unreconcile Entries"/>
<!-- <wizard id="wizard_unreconcile" model="account.move.line" name="account.move.line.unreconcile" string="Unreconcile Entries"/>-->
<!-- unreconcile
@ -85,9 +85,9 @@
<wizard id="wizard_balance_report" keyword="client_print_multi" model="account.account" name="account.account.balance.report" string="Account Balance"/>
<wizard id="wizard_general_ledger_report" keyword="client_print_multi" model="account.account" name="account.general.ledger.report" string="General Ledger"/>
<wizard id="wizard_invoice_state_confirm" keyword="client_action_multi" model="account.invoice" multi="True" name="account.invoice.state.confirm" string="Confirm draft invoices" groups="base.group_user"/>
<wizard id="wizard_invoice_state_cancel" keyword="client_action_multi" model="account.invoice" multi="True" name="account.invoice.state.cancel" string="Cancel selected invoices" groups="base.group_user"/>
<!-- <wizard id="wizard_invoice_state_confirm" keyword="client_action_multi" model="account.invoice" multi="True" name="account.invoice.state.confirm" string="Confirm draft invoices" groups="base.group_user"/>-->
<!-- <wizard id="wizard_invoice_state_cancel" keyword="client_action_multi" model="account.invoice" multi="True" name="account.invoice.state.cancel" string="Cancel selected invoices" groups="base.group_user"/>-->
<!---->
<!-- account.move validate -->
<!-- <wizard id="wizard_validate_account_moves" menu="False" model="account.move" name="account.move.validate" string="Validate Ledger Postings"/>

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

View File

@ -324,6 +324,17 @@ class account_invoice(osv.osv):
'user_id': lambda s,cr,u,c: u,
}
def create(self, cr, uid, vals, context={}):
try:
res = super(account_invoice, self).create(cr, uid, vals, context)
return res
except Exception,e:
if '"journal_id" viol' in e.args[0]:
raise except_orm(_('Configuration Error!'),
_('There is no Accounting Journal of type Sale/Purchase defined!'))
else:
raise except_orm(_('UnknownError'), str(e))
def unlink(self, cr, uid, ids, context=None):
invoices = self.read(cr, uid, ids, ['state'])
unlink_ids = []

View File

@ -23,7 +23,7 @@ import wizard_automatic_reconcile
import account_move_line_reconcile_select
import account_move_line_unreconcile_select
import wizard_reconcile
import wizard_unreconcile
import account_unreconcile
import account_invoice_refund
import account_pay_invoice
import account_move_journal
@ -42,7 +42,7 @@ import account_vat
import account_open_closed_fiscalyear
import wizard_compare_account_balance_report
import wizard_invoice_state
import account_invoice_state
import wizard_account_duplicate
import account_chart
import wizard_move_line_select

View File

@ -0,0 +1,62 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import netsvc
class account_invoice_confirm(osv.osv_memory):
"""
This wizard will confirm the all the selected draft invoices
"""
_name = "account.invoice.confirm"
_description = "Confirm the selected invoices"
def invoice_confirm(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService('workflow')
if context is None:
context = {}
for id in context['active_ids']:
wf_service.trg_validate(uid, 'account.invoice', id, 'invoice_open', cr)
return {}
account_invoice_confirm()
class account_invoice_cancel(osv.osv_memory):
"""
This wizard will cancel the all the selected invoices.
If in the journal, the option allow cancelling entry is not selected then it will give warning message.
"""
_name = "account.invoice.cancel"
_description = "Cancel the selected invoices"
def invoice_cancel(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService('workflow')
if context is None:
context = {}
for id in context['active_ids']:
wf_service.trg_validate(uid, 'account.invoice', id, 'invoice_cancel', cr)
return {}
account_invoice_cancel()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,73 @@
<openerp>
<data>
<record id="account_invoice_confirm_view" model="ir.ui.view">
<field name="name">account.invoice.confirm.form</field>
<field name="model">account.invoice.confirm</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Confirm draft invoices">
<separator string="Confirm draft invoices" colspan="4"/>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-execute" string="Confirm Invoices" name="invoice_confirm" type="object" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_invoice_confirm" model="ir.actions.act_window">
<field name="name">Confirm draft invoices</field>
<field name="res_model">account.invoice.confirm</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_invoice_confirm_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="action_account_invoice_confirm_values">
<field name="model_id" ref="account.model_account_invoice" />
<field name="object" eval="1" />
<field name="name">Confirm draft invoices</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_confirm'))" />
<field name="key">action</field>
<field name="model">account.invoice</field>
</record>
<record id="account_invoice_cancel_view" model="ir.ui.view">
<field name="name">account.invoice.cancel.form</field>
<field name="model">account.invoice.cancel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cancel selected invoices">
<separator string="Cancel selected invoices" colspan="4"/>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-execute" string="Cancel selected invoices" name="invoice_cancel" type="object" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_invoice_cancel" model="ir.actions.act_window">
<field name="name">Cancel selected invoices</field>
<field name="res_model">account.invoice.cancel</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_invoice_cancel_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="action_account_invoice_cancel_values">
<field name="model_id" ref="account.model_account_invoice" />
<field name="object" eval="1" />
<field name="name">Cancel selected invoices</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_invoice_cancel'))" />
<field name="key">action</field>
<field name="model">account.invoice</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
class account_unreconcile(osv.osv_memory):
_name = "account.unreconcile"
_description = "Account Unreconcile"
def trans_unrec(self, cr, uid, ids, context=None):
obj_move_line = self.pool.get('account.move.line')
obj_move_reconcile = self.pool.get('account.move.reconcile')
if context is None:
context = {}
recs = obj_move_line.read(cr, uid, context['active_ids'], ['reconcile_id',])
recs = filter(lambda x: x['reconcile_id'], recs)
rec_ids = [rec['reconcile_id'][0] for rec in recs]
if len(rec_ids):
obj_move_reconcile.unlink(cr, uid, rec_ids)
return {}
account_unreconcile()
class account_unreconcile_reconcile(osv.osv_memory):
_name = "account.unreconcile.reconcile"
_description = "Account Unreconcile Reconcile"
def trans_unrec_reconcile(self, cr, uid, ids, context=None):
obj_move_reconcile = self.pool.get('account.move.reconcile')
if context is None:
context = {}
if len(rec_ids):
obj_move_reconcile.unlink(cr, uid, context['active_ids'])
return {}
account_unreconcile_reconcile()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_unreconcile_view" model="ir.ui.view">
<field name="name">Unreconcile Entries</field>
<field name="model">account.unreconcile</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Unreconciliation">
<separator string="Unreconciliation transactions" colspan="4"/>
<image name="gtk-dialog-info"/>
<label string="If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable" colspan="2"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Unreconcile" name="trans_unrec" type="object" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_unreconcile" model="ir.actions.act_window">
<field name="name">Unreconcile Entries</field>
<field name="res_model">account.unreconcile</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_unreconcile_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="account_unreconcile_values">
<field name="model_id" ref="account.model_account_move_line" />
<field name="object" eval="1" />
<field name="name">Unreconcile Entries</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_unreconcile'))" />
<field name="key">action</field>
<field name="model">account.move.line</field>
</record>
<record id="account_unreconcile_reconcile_view" model="ir.ui.view">
<field name="name">Unreconcile Entries</field>
<field name="model">account.unreconcile.reconcile</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Unreconciliation">
<separator string="Unreconciliation transactions" colspan="4"/>
<image name="gtk-dialog-info"/>
<label string="If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable" colspan="2"/>
<separator colspan="4"/>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Unreconcile" name="trans_unrec_reconcile" type="object" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_unreconcile_reconcile" model="ir.actions.act_window">
<field name="name">Unreconcile Entries</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.unreconcile.reconcile</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_unreconcile_reconcile_view"/>
<field name="context">{'record_id' : active_id}</field>
<field name="target">new</field>
</record>
<record model="ir.values" id="account_unreconcile_reconcile_values">
<field name="model_id" ref="account.model_account_move_reconcile" />
<field name="object" eval="1" />
<field name="name">Unreconcile Entries</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_unreconcile_reconcile'))" />
<field name="key">action</field>
<field name="model">account.move.reconcile</field>
</record>
</data>
</openerp>

View File

@ -64,7 +64,7 @@
<field name="target">new</field>
</record>
<record model="ir.values" id="event_registration_values">
<record model="ir.values" id="validate_account_move_line_values">
<field name="model_id" ref="account.model_account_move_line" />
<field name="object" eval="1" />
<field name="name">Validate Ledger Postings</field>

View File

@ -1,59 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
def _invoice_confirm(self, cr, uid, data, context):
wf_service = netsvc.LocalService('workflow')
for id in data['ids']:
wf_service.trg_validate(uid, 'account.invoice', id, 'invoice_open', cr)
return {}
class wizard_invoice_confirm(wizard.interface):
states = {
'init': {
'actions': [_invoice_confirm],
'result': {'type':'state', 'state':'end'}
}
}
wizard_invoice_confirm('account.invoice.state.confirm')
def _invoice_cancel(self, cr, uid, data, context):
wf_service = netsvc.LocalService('workflow')
for id in data['ids']:
wf_service.trg_validate(uid, 'account.invoice', id, 'invoice_cancel', cr)
return {}
class wizard_invoice_cancel(wizard.interface):
states = {
'init': {
'actions': [_invoice_cancel],
'result': {'type':'state', 'state':'end'}
}
}
wizard_invoice_cancel('account.invoice.state.cancel')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,76 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
_info_form = '''<?xml version="1.0"?>
<form string="Unreconciliation">
<separator string="Unreconciliation transactions" colspan="4"/>
<image name="gtk-dialog-info" colspan="2"/>
<label string="If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable" colspan="2"/>
</form>'''
def _trans_unrec(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
recs = pool.get('account.move.line').read(cr, uid, data['ids'], ['reconcile_id',])
recs = filter(lambda x: x['reconcile_id'], recs)
rec_ids = [rec['reconcile_id'][0] for rec in recs]
if len(rec_ids):
pooler.get_pool(cr.dbname).get('account.move.reconcile').unlink(cr, uid, rec_ids)
return {}
class wiz_unreconcile(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch': _info_form, 'fields': {}, 'state':[('end', 'Cancel', 'gtk-cancel'), ('unrec', 'Unreconcile', 'gtk-ok')]}
},
'unrec': {
'actions': [_trans_unrec],
'result': {'type': 'state', 'state':'end'}
}
}
wiz_unreconcile('account.move.line.unreconcile')
def _trans_unrec_reconcile(self, cr, uid, data, context):
rec_ids = data['ids']
if len(rec_ids):
pooler.get_pool(cr.dbname).get('account.move.reconcile').unlink(cr, uid, rec_ids)
return {}
class wiz_unreconcile_reconcile(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch': _info_form, 'fields': {}, 'state':[('end', 'Cancel', 'gtk-cancel'), ('unrec', 'Unreconcile', 'gtk-ok')]}
},
'unrec': {
'actions': [_trans_unrec_reconcile],
'result': {'type': 'state', 'state':'end'}
}
}
wiz_unreconcile_reconcile('account.reconcile.unreconcile')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -234,6 +234,9 @@ class account_analytic_plan_instance_line(osv.osv):
'analytic_account_id':fields.many2one('account.analytic.account','Analytic Account', required=True),
'rate':fields.float('Rate (%)', required=True),
}
_defaults = {
'rate': lambda *args: 100.0
}
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_plans

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_anglo_saxon

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_balance

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_followup

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_invoice_layout

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_tax_include

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic_user_function

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: analytic_user_function

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_merge

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_publish

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_record

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_manufacturing

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_sale

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm_profiling

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: event

View File

@ -253,7 +253,8 @@ class mail_server(osv.osv):
msg['body'] = body
msg['attachments'] = attachents
res_id = False
if msg.get('references', False):
id = False
ref = msg.get('references')
@ -274,12 +275,20 @@ class mail_server(osv.osv):
vals = {
}
model_pool.message_update(cr, uid, [history.res_id], vals, msg, context=context)
if hasattr(model_pool, 'message_update'):
model_pool.message_update(cr, uid, [history.res_id], vals, msg, context=context)
else:
logger.notifyChannel('imap', netsvc.LOG_WARNING, 'method def message_update is not define in model %s' % (model_pool._name))
return False
res_id = id
else:
model_pool = self.pool.get(server.object_id.model)
res_id = model_pool.message_new(cr, uid, msg, context)
if hasattr(model_pool, 'message_new'):
res_id = model_pool.message_new(cr, uid, msg, context)
else:
logger.notifyChannel('imap', netsvc.LOG_WARNING, 'method def message_new is not define in model %s' % (model_pool._name))
return False
for attactment in attachents or []:
data_attach = {
'name': attactment,
@ -333,10 +342,10 @@ class mail_server(osv.osv):
result, data = imap_server.search(None, '(UNSEEN)')
for num in data[0].split():
result, data = imap_server.fetch(num, '(RFC822)')
self._process_email(cr, uid, server, data[0][1], context)
imap_server.store(num, '+FLAGS', '\\Seen')
count += 1
logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail fetch %s email(s) from %s' % (count, server.name))
if self._process_email(cr, uid, server, data[0][1], context):
imap_server.store(num, '+FLAGS', '\\Seen')
count += 1
logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail fetch/process %s email(s) from %s' % (count, server.name))
imap_server.close()
imap_server.logout()

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr

View File

@ -44,7 +44,9 @@ to set up a management by affair.
'hr_timesheet_view.xml',
'hr_timesheet_report.xml',
'hr_timesheet_wizard.xml',
'process/hr_timesheet_process.xml'
'process/hr_timesheet_process.xml',
'wizard/hr_timesheet_print_employee_view.xml',
'wizard/hr_timesheet_print_users_view.xml'
],
'demo_xml': ['hr_timesheet_demo.xml'],
'installable': True,

View File

@ -13,32 +13,32 @@
sequence="1" />
<report auto="False" id="report_user_timesheet" menu="False" model="hr.employee" name="hr.analytical.timesheet" string="Employee timesheet" xsl="hr_timesheet/report/user_timesheet.xsl"/>
<wizard id="wizard_hr_timesheet" menu="False" model="hr.employee" name="hr.analytical.timesheet" string="Employee Timesheet"/>
<!--<wizard id="wizard_hr_timesheet" menu="False" model="hr.employee" name="hr.analytical.timesheet" string="Employee Timesheet"/>
-->
<!--<menuitem id="next_id_48" name="Timesheet" parent="hr.menu_hr_reporting"/>-->
<!-- <menuitem action="wizard_hr_timesheet" id="menu_wizard_hr_timesheet" parent="next_id_48" type="wizard"
groups="hr.group_hr_manager"/>-->
<menuitem action="wizard_hr_timesheet" id="menu_wizard_hr_timesheet" parent="menu_hr_reporting_timesheet" type="wizard"
<!--<menuitem action="wizard_hr_timesheet" id="menu_wizard_hr_timesheet" parent="menu_hr_reporting_timesheet" type="wizard"
groups="hr.group_hr_manager"
/>
<wizard id="wizard_hr_timesheet_my" menu="False" model="hr.employee" name="hr.analytical.timesheet.my" string="Print My Timesheet"/>
/>-->
<!-- <wizard id="wizard_hr_timesheet_my" menu="False" model="hr.employee" name="hr.analytical.timesheet.my" string="Print My Timesheet"/>
<menuitem
action="wizard_hr_timesheet_my"
id="menu_wizard_hr_timesheet_my"
parent="menu_hr_reporting_timesheet"
type="wizard"
groups="hr.group_hr_user"
/>
/>-->
<report auto="False" id="report_users_timesheet" menu="False" model="hr.employee" name="hr.analytical.timesheet_users" string="Employees Timesheet" xsl="hr_timesheet/report/users_timesheet.xsl"/>
<wizard id="wizard_hr_timesheet_users" menu="False" model="hr.employee" name="hr.analytical.timesheet_users" string="Employees Timesheet"/>
<menuitem
<!--<menuitem
action="wizard_hr_timesheet_users"
id="menu_wizard_hr_timesheet_users"
groups="hr.group_hr_manager"
parent="menu_hr_reporting_timesheet" type="wizard"/>
-->
</data>
</openerp>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--<wizard id="si_so" model="hr.employee" name="hr_timesheet.si_so" string="Sign in / Sign out by project"/>-->
<!-- <menuitem action="si_so" id="menu_si_so" parent="hr_attendance.menu_hr_attendance" type="wizard"/>-->
<wizard id="si_so" name="hr_timesheet.si_so" string="Sign in / Sign out by project"/>
<menuitem action="si_so" id="menu_si_so" parent="hr_attendance.menu_hr_time_tracking" type="wizard"/>
</data>
</openerp>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -42,24 +42,24 @@ def emp_create_xml(cr, id, som, eom):
"and line.user_id=%s and line.date >= %s and line.date < %s "
"order by line.date",
(id, som.strftime('%Y-%m-%d'), eom.strftime('%Y-%m-%d')))
# Sum by day
month = {}
for presence in cr.dictfetchall():
day = int(presence['date'][-2:])
month[day] = month.get(day, 0.0) + presence['amount']
xml = '''
<time-element date="%s">
<amount>%.2f</amount>
</time-element>
'''
time_xml = ([xml % (day, amount) for day, amount in month.iteritems()])
# Computing the employee
cr.execute("select name from res_users where id=%s", (id,))
emp = cr.fetchone()[0]
# Computing the xml
xml = '''
<employee id="%d" name="%s">
@ -73,13 +73,13 @@ class report_custom(report_rml):
def get_month_name(self, cr, uid, month):
_months = {1:_("January"), 2:_("February"), 3:_("March"), 4:_("April"), 5:_("May"), 6:_("June"), 7:_("July"), 8:_("August"), 9:_("September"), 10:_("October"), 11:_("November"), 12:_("December")}
return _months[month]
def get_weekday_name(self, cr, uid, weekday):
_weekdays = {1:_('Mon'), 2:_('Tue'), 3:_('Wed'), 4:_('Thu'), 5:_('Fri'), 6:_('Sat'), 7:_('Sun')}
return _weekdays[weekday]
def create_xml(self, cr, uid, ids, data, context):
# Computing the dates (start of month: som, and end of month: eom)
som = datetime.date(data['form']['year'], data['form']['month'], 1)
eom = som + datetime.timedelta(lengthmonth(som.year, som.month))
@ -87,9 +87,9 @@ class report_custom(report_rml):
date_xml += ['<day number="%d" name="%s" weekday="%d" />' % (x, self.get_weekday_name(cr, uid, som.replace(day=x).weekday()+1), som.replace(day=x).weekday()+1) for x in range(1, lengthmonth(som.year, som.month)+1)]
date_xml.append('</days>')
date_xml.append('<cols>2.5cm%s,2cm</cols>\n' % (',0.7cm' * lengthmonth(som.year, som.month)))
emp_xml=''
for id in data['form']['user_ids'][0][2]:
for id in data['form']['user_ids']:
emp_xml += emp_create_xml(cr, id, som, eom)
# Computing the xml

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,13 +15,13 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import sign_in_out
import wizard_print_timesheet
import wizard_print_timesheet_users
import hr_timesheet_print_employee
import hr_timesheet_print_users
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import datetime
from osv import osv, fields
class analytical_timesheet_employee(osv.osv_memory):
_name = 'hr.analytical.timesheet.employee'
_description = 'Print Employee Timesheet & Print My Timesheet'
_columns = {
'month': fields.selection([(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)],
'Month', required=True),
'year': fields.integer('Year', required=True),
'user_id': fields.many2one('res.users', 'User', required=True)
}
def _get_user(self, cr, uid, context=None):
return uid
_defaults = {
'month': datetime.date.today().month,
'year': datetime.date.today().year,
'user_id': _get_user
}
def print_report(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, context=context)[0]
datas = {
'ids': [],
'model': 'hr.employee',
'form': data
}
return {
'type': 'ir.actions.report.xml',
'report_name': 'hr.analytical.timesheet',
'datas': datas,
}
analytical_timesheet_employee()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Print Employee Timesheet -->
<record id="view_hr_timesheet_employee" model="ir.ui.view">
<field name="name">hr.analytical.timesheet.employee.form</field>
<field name="model">hr.analytical.timesheet.employee</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Employee Timesheet">
<group colspan="4" >
<field name="month" />
<field name="year" />
<field name="user_id" colspan="3" />
</group>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-print" string="Print" name="print_report" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_hr_timesheet_employee" model="ir.actions.act_window">
<field name="name">Employee Timesheet</field>
<field name="res_model">hr.analytical.timesheet.employee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_hr_timesheet_employee"/>
<field name="target">new</field>
</record>
<menuitem action="action_hr_timesheet_employee"
id="menu_hr_timesheet_employee"
parent="menu_hr_reporting_timesheet"
groups="hr.group_hr_manager" />
<!-- Print My Timesheet -->
<record id="view_hr_timesheet_my" model="ir.ui.view">
<field name="name">hr.analytical.timesheet.my.form</field>
<field name="model">hr.analytical.timesheet.employee</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Print My Timesheet">
<group colspan="4" >
<field name="month" />
<field name="year" />
<field name="user_id" colspan="3" readonly="1" />
</group>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-print" string="Print" name="print_report" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_hr_timesheet_my" model="ir.actions.act_window">
<field name="name">Print My Timesheet</field>
<field name="res_model">hr.analytical.timesheet.employee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_hr_timesheet_my"/>
<field name="target">new</field>
</record>
<menuitem action="action_hr_timesheet_my"
id="menu_hr_timesheet_my"
parent="menu_hr_reporting_timesheet"
groups="hr.group_hr_user" />
</data>
</openerp>

View File

@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import datetime
from osv import osv, fields
class analytical_timesheet_employees(osv.osv_memory):
_name = 'hr.analytical.timesheet.users'
_description = 'Print Employees Timesheet'
_columns = {
'month': fields.selection([(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)],
'Month', required=True),
'year': fields.integer('Year', required=True),
'user_ids': fields.many2many('res.users', 'timesheet_users_rel', 'timesheet_id', 'user_id', 'Users', required=True)
}
_defaults = {
'month': datetime.date.today().month,
'year': datetime.date.today().year,
}
def print_report(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, context=context)[0]
datas = {
'ids': [],
'model': 'hr.employee',
'form': data
}
return {
'type': 'ir.actions.report.xml',
'report_name': 'hr.analytical.timesheet_users',
'datas': datas,
}
analytical_timesheet_employees()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Print Employees Timesheets -->
<record id="view_hr_timesheet_users" model="ir.ui.view">
<field name="name">hr.analytical.timesheet.users.form</field>
<field name="model">hr.analytical.timesheet.users</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Employees Timesheet">
<group colspan="4" >
<field name="month" />
<field name="year" />
<field name="user_ids" colspan="3" />
</group>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-print" string="Print" name="print_report" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_hr_timesheet_users" model="ir.actions.act_window">
<field name="name">Employees Timesheet</field>
<field name="res_model">hr.analytical.timesheet.users</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_hr_timesheet_users"/>
<field name="target">new</field>
</record>
<menuitem action="action_hr_timesheet_users"
id="menu_hr_timesheet_users"
parent="menu_hr_reporting_timesheet"
groups="hr.group_hr_manager" />
</data>
</openerp>

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@ -25,7 +25,7 @@ import time
import pooler
from tools.translate import _
si_form ='''<?xml version="1.0"?>
si_form ='''<?xml version="1.0"?>
<form string="Sign in / Sign out">
<separator string="Sign in" colspan="4"/>
<field name="name" readonly="True" />
@ -98,6 +98,7 @@ def _sign_in_result(self, cr, uid, data, context):
def _write(self, cr, uid, data, emp_id, context):
timesheet_obj = pooler.get_pool(cr.dbname).get('hr.analytic.timesheet')
emp_obj = pooler.get_pool(cr.dbname).get('hr.employee')
hour = (time.mktime(time.strptime(data['form']['date'] or time.strftime('%Y-%m-%d %H:%M:%S'), '%Y-%m-%d %H:%M:%S')) -
time.mktime(time.strptime(data['form']['date_start'], '%Y-%m-%d %H:%M:%S'))) / 3600.0
minimum = data['form']['analytic_amount']
@ -110,6 +111,8 @@ def _write(self, cr, uid, data, emp_id, context):
res['name'] = data['form']['info']
res['account_id'] = data['form']['account_id']
res['unit_amount'] = hour
emp_journal = emp_obj.browse(cr, uid, emp_id, 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)

View File

@ -1,80 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import datetime
import wizard
import netsvc
dates_form = '''<?xml version="1.0"?>
<form string="Choose your month">
<field name="month" />
<field name="year" />
<field name="user_id" colspan="3" />
</form>'''
dates_form_ro = '''<?xml version="1.0"?>
<form string="Choose your month">
<field name="month" />
<field name="year" />
<field name="user_id" colspan="3" readonly="1"/>
</form>'''
dates_fields = {
'month': dict(string=u'Month', type='selection', required=True, selection=[(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)]),
'year': dict(string=u'Year', type=u'integer', required=True),
'user_id' : dict(string=u'User', type='many2one', relation='res.users', required=True),
}
def _get_value(self, cr, uid, data, context):
today = datetime.date.today()
return dict(month=today.month, year=today.year, user_id=uid)
class wizard_report(wizard.interface):
states = {
'init': {
'actions': [_get_value],
'result': {'type':'form', 'arch':dates_form, 'fields':dates_fields, 'state':[ ('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
},
'report': {
'actions': [],
'result': {'type':'print', 'report':'hr.analytical.timesheet', 'state':'end'}
}
}
wizard_report('hr.analytical.timesheet')
class wizard_report_my(wizard.interface):
states = {
'init': {
'actions': [_get_value],
'result': {'type':'form', 'arch':dates_form_ro, 'fields':dates_fields, 'state':[ ('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
},
'report': {
'actions': [],
'result': {'type':'print', 'report':'hr.analytical.timesheet', 'state':'end'}
}
}
wizard_report_my('hr.analytical.timesheet.my')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,56 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import datetime
form='''<?xml version="1.0"?>
<form string="Choose Users">
<field name="month"/>
<field name="year"/>
<field name="user_ids" colspan="3"/>
</form>'''
fields = {
'month': dict(string=u'Month', type='selection', required=True, selection=[(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)]),
'year': dict(string=u'Year', type='integer', required=True),
'user_ids': dict(string=u'Users', type='many2many', relation='res.users', required=True),
}
def _get_value(self, cr, uid, data, context):
today=datetime.date.today()
return dict(month=today.month, year=today.year)
class wizard_report(wizard.interface):
states={
'init':{
'actions':[_get_value],
'result':{'type':'form', 'arch':form, 'fields':fields, 'state':[('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
},
'report':{
'actions':[],
'result':{'type':'print', 'report':'hr.analytical.timesheet_users', 'state':'end'}
}
}
wizard_report('hr.analytical.timesheet_users')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -154,7 +154,7 @@ class account_invoice(osv.osv):
## @param partner_bank_id the partner linked invoice bank
## @return the dict of values with the partner_bank value updated
def onchange_partner_id(self, cr, uid, ids, type, partner_id,
date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
date_invoice=False, payment_term=False, partner_bank=False, company_id=False):
""" Function that is call when the partner of the invoice is changed
it will retriev and set the good bank partner bank"""
res = super(account_invoice, self).onchange_partner_id(
@ -175,7 +175,7 @@ class account_invoice(osv.osv):
if type in ('in_invoice', 'in_refund'):
res['value']['partner_bank'] = bank_id
if partner_bank_id != bank_id:
if partner_bank != bank_id:
to_update = self.onchange_partner_bank(cr, uid, ids, bank_id)
res['value'].update(to_update['value'])
return res

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: l10n_chart_uk_minimal

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: olap_sale

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: olap_sale

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-10 13:51+0000\n"
"PO-Revision-Date: 2010-04-20 09:57+0000\n"
"Last-Translator: Carlo Vettore <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-04-17 04:10+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: product
@ -458,7 +458,7 @@ msgstr "Margine Minimo"
#. module: product
#: view:product.pricelist.item:0
msgid "* ( 1 + "
msgstr "* ( 1 + "
msgstr "( 1 - "
#. module: product
#: model:product.template,name:product.product_product_cpu1_product_template

View File

@ -106,8 +106,8 @@
<group colspan="2" col="2" name="uom">
<separator string="UOM" colspan="2"/>
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)"/>
<field name="uom_po_id"/>
<field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" widget="selection"/>
<field name="uom_po_id" widget="selection"/>
</group>
<group colspan="2" col="2" name="uos" groups="product.group_uos">

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: profile_manufacturing

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-04-16 16:06+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
"PO-Revision-Date: 2010-04-20 08:36+0000\n"
"Last-Translator: PROSID <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-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: project

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: report_document

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: report_mrp

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: report_project

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: report_purchase

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_analytic_plans

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_crm

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_crm

View File

@ -43,31 +43,6 @@
<field name="view_id" ref="view_server_statistics_graph" />
</record>
<record model="ir.ui.view" id="company_form">
<field name="name">smtp.company.form</field>
<field name="model">res.company</field>
<field name="inherit_id" ref="base.view_company_form" />
<field name="type">form</field>
<field name="arch" type="xml">
<notebook position="inside">
<page string="SMTP Settings">
<field name="addresses" colspan="4"
nolabel="1">
<tree string="Email Address">
<field name="name" />
<field name="email" />
</tree>
<form string="Email Address">
<field name="name" />
<field name="email"
domain="[('state','=','confirm')]" />
</form>
</field>
</page>
</notebook>
</field>
</record>
<record model="ir.ui.view" id="email_smtpclient_form_new">
<field name="name">email.smtpclient.form</field>
<field name="model">email.smtpclient</field>

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock

View File

@ -35,7 +35,7 @@
<field name="location_id" ref="stock_location_stock"/>
</record>
<record id="stock_location_14" model="stock.location">
<field name="name">Finished products</field>
<field name="name">Shelf 2</field>
<field name="location_id" ref="stock_location_13"/>
<field model="account.account" name="account_id" search="[('name','=','Merchandise Type B')]"/>
</record>
@ -48,7 +48,7 @@
<field name="location_id" ref="stock_location_stock"/>
</record>
<record id="stock_location_components" model="stock.location">
<field name="name">Components</field>
<field name="name">Shelf 1</field>
<field name="location_id" ref="stock_location_workshop"/>
</record>

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock_location

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:33+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:06+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock_no_autopicking

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-20 03:32+0000\n"
"X-Launchpad-Export-Date: 2010-04-21 04:05+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: subscription