diff options
| author | apa-tiny <apa@tinyerp.com> | 2010-10-08 10:11:58 +0530 |
|---|---|---|
| committer | apa-tiny <apa@tinyerp.com> | 2010-10-08 10:11:58 +0530 |
| commit | 8d24223f3c19cf1958d16cc222f541ce1107ea5a (patch) | |
| tree | ec32994008fcfccd0f61d7889c621c3497f3c6ca | |
| parent | fe3f925902d25cd27a0bfde67dbfc4c0a0ca61ed (diff) | |
| parent | 5987cb0a8d2fdb56a2eba874db54f2211c75ec55 (diff) | |
merge
bzr revid: apa@tinyerp.com-20101008044158-t2gqtv7kcal3zchc
45 files changed, 354 insertions, 384 deletions
diff --git a/addons/account/account.py b/addons/account/account.py index 208bf1d6f68..3dc5c36c889 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1162,32 +1162,36 @@ class account_move(osv.osv): ] def post(self, cr, uid, ids, context=None): + if context is None: + context = {} invoice = context.get('invoice', False) valid_moves = self.validate(cr, uid, ids, context) - if valid_moves: - for move in self.browse(cr, uid, valid_moves): - if move.name =='/': - new_name = False - journal = move.journal_id - - if invoice and invoice.internal_number: - new_name = invoice.internal_number + + if not valid_moves: + raise osv.except_osv(_('Integrity Error !'), _('You cannot validate a non-balanced entry !\nMake sure you have configured Payment Term properly !\nIt should contain atleast one Payment Term Line with type "Balance" !')) + + for move in self.browse(cr, uid, valid_moves): + if move.name =='/': + new_name = False + journal = move.journal_id + + if invoice and invoice.internal_number: + new_name = invoice.internal_number + else: + if journal.sequence_id: + c = {'fiscalyear_id': move.period_id.fiscalyear_id.id} + new_name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id, context=c) else: - if journal.sequence_id: - c = {'fiscalyear_id': move.period_id.fiscalyear_id.id} - new_name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id, context=c) - else: - raise osv.except_osv(_('Error'), _('No sequence defined in the journal !')) + raise osv.except_osv(_('Error'), _('No sequence defined on the journal !')) - if new_name: - self.write(cr, uid, [move.id], {'name':new_name}) + if new_name: + self.write(cr, uid, [move.id], {'name':new_name}) - cr.execute('UPDATE account_move '\ - 'SET state=%s '\ - 'WHERE id IN %s', - ('posted', tuple(valid_moves),)) - else: - raise osv.except_osv(_('Integrity Error !'), _('You can not validate a non-balanced entry !\nMake sure you have configured Payment Term properly !\nIt should contain atleast one Payment Term Line with type "Balance" !')) + cr.execute('UPDATE account_move '\ + 'SET state=%s '\ + 'WHERE id IN %s', + ('posted', tuple(valid_moves),)) + return True def button_validate(self, cursor, user, ids, context=None): diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 1aa4e30d95d..2e81c7b054f 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -650,18 +650,19 @@ class account_invoice(osv.osv): return ok def button_reset_taxes(self, cr, uid, ids, context=None): - if not context: + if context is None: context = {} + ctx = context.copy() ait_obj = self.pool.get('account.invoice.tax') for id in ids: cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s", (id,)) - partner = self.browse(cr, uid, id, context=context).partner_id + partner = self.browse(cr, uid, id, context=ctx).partner_id if partner.lang: - context.update({'lang': partner.lang}) - for taxe in ait_obj.compute(cr, uid, id, context=context).values(): + ctx.update({'lang': partner.lang}) + for taxe in ait_obj.compute(cr, uid, id, context=ctx).values(): ait_obj.create(cr, uid, taxe) # Update the stored value (fields.function), so we write to trigger recompute - self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context) + self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=ctx) return True def button_compute(self, cr, uid, ids, context=None, set_total=False): @@ -1621,6 +1622,7 @@ class account_invoice_tax(osv.osv): tax_grouped[key]['tax_amount'] += val['tax_amount'] for t in tax_grouped.values(): + t['base'] = cur_obj.round(cr, uid, cur, t['base']) t['amount'] = cur_obj.round(cr, uid, cur, t['amount']) t['base_amount'] = cur_obj.round(cr, uid, cur, t['base_amount']) t['tax_amount'] = cur_obj.round(cr, uid, cur, t['tax_amount']) diff --git a/addons/account/report/account_central_journal.rml b/addons/account/report/account_central_journal.rml index 4bf23b3d4b6..d6e53c4f3c7 100644 --- a/addons/account/report/account_central_journal.rml +++ b/addons/account/report/account_central_journal.rml @@ -295,7 +295,7 @@ </blockTable> <blockTable colWidths="50.0,300.0,70.0,70.0,70.0" style="Table_Final_Total">[[ display_currency(data) == False or removeParentNode('blockTable') ]] <tr> - <td><para style="terp_default_Bold_9">Total<font size="8.0">([[ company.currency_id.code]])</font>:</para></td> + <td><para style="terp_default_Bold_9">Total:</para></td> <td><para style="terp_default_Bold_9"><font color="white"> </font></para></td> <td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]] </para></td> <td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]] </para></td> diff --git a/addons/account/report/account_general_journal.rml b/addons/account/report/account_general_journal.rml index 84a9ee6a780..61113212c2d 100644 --- a/addons/account/report/account_general_journal.rml +++ b/addons/account/report/account_general_journal.rml @@ -270,7 +270,7 @@ <td><para style="terp_tblheader_Details_Right">Balance</para></td> </tr> <tr> - <td><para style="terp_default_Bold_9">Total:([[ company.currency_id.code]])</para></td> + <td><para style="terp_default_Bold_9">Total:</para></td> <td><para style="terp_default_Bold_9"><font color="white"> </font></para></td> <td><para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit()) ]] </para></td> <td><para style="terp_default_Bold_9_Right">[[ formatLang( sum_credit()) ]]</para></td> diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml index 1321bdea750..9d23454fcbb 100644 --- a/addons/account/report/account_general_ledger_landscape.rml +++ b/addons/account/report/account_general_ledger_landscape.rml @@ -263,13 +263,13 @@ <tr> <td> <blockTable colWidths="404.0,335.0,79,73.5,72.5,79.00" style="Table5"> - <tr> + <tr> <td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para></td> <td><para style="Standard"></para></td> - <td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</u></para></td> - <td alignment="right"><para style="P9b"><u>[[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]]</u></para></td> - <td><para style="P9b"><u>[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</u></para></td> - <td><para style="P9b"><u>[[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account')) + o.currency_id.code or '' ]]</u></para></td> + <td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o), dp='Account') ]]</u></para></td> + <td alignment="right"><para style="P9b"><u>[[ formatLang(sum_credit_account(o), dp='Account') ]]</u></para></td> + <td><para style="P9b"><u>[[ formatLang(sum_balance_account(o), dp='Account') ]] [[ company.currency_id.symbol ]]</u></para></td> + <td><para style="P9b"><u>[[ o.currency_id and formatLang(sum_currency_amount_account(o), dp='Account') + o.currency_id.code or '' ]]</u></para></td> </tr> </blockTable> </td> @@ -292,9 +292,9 @@ <td><para style="P2_content">[[ line['move'] ]]</para></td> <td><para style="P3_content">[[ line['lname'] ]]</para></td> <td><para style="P3_content_center">[[ strip_name(line['line_corresp'].replace(', ',','),40) ]]</para></td> - <td><para style="P4_content">[[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]]</para></td> - <td><para style="P4_content">[[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]]</para></td> - <td><para style="P4_content">[[ formatLang(line['progress'], digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</para></td> + <td><para style="P4_content">[[ formatLang(line['debit'], dp='Account') ]]</para></td> + <td><para style="P4_content">[[ formatLang(line['credit'], dp='Account') ]]</para></td> + <td><para style="P4_content">[[ formatLang(line['progress'], dp='Account') ]] [[ company.currency_id.symbol ]]</para></td> <td><para style="P4_content">[[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]]</para></td> </tr> </blockTable> @@ -327,9 +327,9 @@ <tr> <td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code ]] [[ o.name ]]</para></td> <td><para style="Standard"></para></td> - <td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]]</u></para></td> - <td alignment="right"><para style="P9b"><u>[[ formatLang(sum_credit_account(o), digits=get_digits(dp=Account)) ]]</u></para></td> - <td><para style="P9b"><u>[[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account')) ]] [[ company.currency_id.symbol ]]</u></para></td> + <td alignment="right"><para style="P9b"><u>[[ formatLang(sum_debit_account(o), dp='Account') ]]</u></para></td> + <td alignment="right"><para style="P9b"><u>[[ formatLang(sum_credit_account(o), dp='Account') ]]</u></para></td> + <td><para style="P9b"><u>[[ formatLang(sum_balance_account(o), dp='Account') ]] [[ company.currency_id.symbol ]]</u></para></td> </tr> </blockTable> </td> diff --git a/addons/account/report/overdue.rml b/addons/account/report/overdue.rml index a0748e281ac..d3d2c77e47a 100644 --- a/addons/account/report/overdue.rml +++ b/addons/account/report/overdue.rml @@ -46,11 +46,13 @@ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/> <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,1" stop="1,1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,1" stop="2,1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="3,1" stop="3,1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="4,1" stop="4,1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="5,1" stop="5,1"/> + </blockTableStyle> + <blockTableStyle id="Table4"> + <blockAlignment value="LEFT"/> + <blockValign value="TOP"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> </blockTableStyle> <initialize> <paraStyle name="all" alignment="justify"/> @@ -116,7 +118,7 @@ </para> <para style="terp_default_9">Document: Customer account statement</para> <para style="terp_default_9">Date: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para> - <para style="terp_default_9">Customer Ref: [[ o.ref or '' ]]</para> + <para style="terp_default_9">Customer Ref: [[ o.ref or ' ']]</para> <para style="terp_default_9"> <font color="white"> </font> </para> @@ -181,10 +183,10 @@ <para style="terp_default_Centre_9">[[ line['date_maturity'] and formatLang(line['date_maturity'],date=True) or '' ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]]</para> + <para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]] </para> </td> <td> - <para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] </para> + <para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]</para> </td> <td> <para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] < time.strftime('%Y-%m-%d'))) and formatLang(line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]]</para> @@ -195,7 +197,7 @@ </tr> </blockTable> </section> - <blockTable colWidths="247.0,65.0,59.0,56.0,66.0,17.0" style="Table2"> + <blockTable colWidths="244.0,71.0,56.0,56.0,66.0,17.0" style="Table2"> <tr> <td> <para style="terp_default_8"> @@ -206,7 +208,7 @@ <para style="terp_default_Bold_9">Sub-Total : </para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]]</para> + <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]] </para> </td> <td> <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] </para> @@ -220,6 +222,8 @@ </para> </td> </tr> + </blockTable> + <blockTable colWidths="250.0,66.0,62.0,131.0" style="Table4"> <tr> <td> <para style="terp_default_8"> @@ -230,25 +234,21 @@ <para style="terp_default_Bold_9">Balance : </para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_9"> - <font color="white"> </font> - </para> - </td> - <td> - <para style="terp_default_9"> - <font color="white"> </font> - </para> - </td> - <td> - <para style="terp_default_9"> + <para style="terp_default_8"> <font color="white"> </font> </para> </td> </tr> </blockTable> + <para style="terp_default_9"> + <font color="white"> </font> + </para> + <para style="terp_default_9"> + <font color="white"> </font> + </para> <para style="terp_default_9">Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0))) ]] [[ company.currency_id.symbol ]].</para> <para style="terp_default_8"> <font color="white"> </font> diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py index efce4bc4da4..f94082445da 100644 --- a/addons/account/wizard/account_automatic_reconcile.py +++ b/addons/account/wizard/account_automatic_reconcile.py @@ -200,7 +200,8 @@ class account_automatic_reconcile(osv.osv_memory): "AND partner_id=%s " \ "AND reconcile_id IS NULL " \ "AND state <> 'draft' " \ - "AND debit > 0", + "AND debit > 0 " \ + "ORDER BY date_maturity", (account_id, partner_id)) debits = cr.fetchall() @@ -212,7 +213,8 @@ class account_automatic_reconcile(osv.osv_memory): "AND partner_id=%s " \ "AND reconcile_id IS NULL " \ "AND state <> 'draft' " \ - "AND credit > 0", + "AND credit > 0 " \ + "ORDER BY date_maturity", (account_id, partner_id)) credits = cr.fetchall() diff --git a/addons/account_analytic_default/account_analytic_default.py b/addons/account_analytic_default/account_analytic_default.py index d0405e1ff52..dce86597a4c 100644 --- a/addons/account_analytic_default/account_analytic_default.py +++ b/addons/account_analytic_default/account_analytic_default.py @@ -111,8 +111,9 @@ class sale_order_line(osv.osv): sale_line = self.browse(cr, uid, ids[0], context) inv_line_obj = self.pool.get('account.invoice.line') anal_def_obj = self.pool.get('account.analytic.default') + for line in inv_line_obj.browse(cr, uid, create_ids, context): - rec = anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context) + rec = anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, sale_line.order_id.user_id.id, time.strftime('%Y-%m-%d'), context) if rec: inv_line_obj.write(cr, uid, [line.id], {'account_analytic_id':rec.analytic_id.id}, context=context) diff --git a/addons/account_analytic_default/account_analytic_default_view.xml b/addons/account_analytic_default/account_analytic_default_view.xml index 95a39eb11e6..939d8474250 100644 --- a/addons/account_analytic_default/account_analytic_default_view.xml +++ b/addons/account_analytic_default/account_analytic_default_view.xml @@ -53,14 +53,14 @@ </field> </record> - <record id="action_analytic_default_form" model="ir.actions.act_window"> + <record id="action_analytic_default_list" model="ir.actions.act_window"> <field name="name">Analytic Defaults</field> <field name="res_model">account.analytic.default</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> <field name="search_view_id" ref="view_account_analytic_default_form_search"/> </record> - + <act_window name="Entries" id="act_account_acount_move_line_open" @@ -68,7 +68,12 @@ src_model="account.account" context="{'search_default_account_id': [active_id]}" /> - + + <menuitem + action="action_analytic_default_list" + id="menu_analytic_default_list" + parent="account.menu_analytic_accounting"/> + <act_window name="Analytic Rules" diff --git a/addons/association/profile_association.xml b/addons/association/profile_association.xml index 8460cfa6cc9..d5a5baab946 100644 --- a/addons/association/profile_association.xml +++ b/addons/association/profile_association.xml @@ -48,8 +48,9 @@ <record model="ir.actions.todo" id="config_install_module"> - <field name="action_id" ref="action_config_install_module"/> - <field name="sequence">3</field> + <field name="action_id" ref="action_config_install_module"/> + <field name="sequence">3</field> + <field name="restart">always</field> </record> <menuitem name="Association" id="base.menu_association" icon="terp-calendar" sequence="9" groups="base.group_extended"/> diff --git a/addons/base_report_designer/base_report_designer_installer.xml b/addons/base_report_designer/base_report_designer_installer.xml index 4ea4970d19a..2c0cf191e4e 100644 --- a/addons/base_report_designer/base_report_designer_installer.xml +++ b/addons/base_report_designer/base_report_designer_installer.xml @@ -19,7 +19,7 @@ <xpath expr="//label[@string='description']" position="attributes"> <attribute name="string">This plug-in allows you to create/modify OpenERP Reports into OpenOffice Writer.</attribute> </xpath> - <xpath expr="//button[@string='Install Modules']" position="replace"> + <xpath expr="//button[@string='Install Modules']" position="replace"> <button colspan="1" icon="gtk-close" special="cancel" string="_Close" invisible="not context.get('menu',False)"/> <button name="action_next" icon="gtk-go-forward" type="object" string="Configure" colspan="1" invisible="context.get('menu',False)"/> @@ -29,10 +29,10 @@ type="object" string="Skip" colspan="1" invisible="context.get('menu',False)"/> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> - <attribute name='string'></attribute> - <attribute name='rowspan'>15</attribute> - </xpath> - <group colspan="8" position="replace"> + <attribute name='string'></attribute> + <attribute name='rowspan'>15</attribute> + </xpath> + <group colspan="8" position="replace"> <group colspan="8" height="450" width="750"> <field name="name" invisible="1"/> <field name="plugin_file" filename="name"/> @@ -55,12 +55,11 @@ </record> <record id="report_designer_installer_todo" model="ir.actions.todo"> - <field name="action_id" ref="action_report_designer_installer"/> - <field name="sequence">3</field> + <field name="action_id" ref="action_report_designer_installer"/> + <field name="sequence">3</field> + <field name="restart">always</field> </record> - - <record id="action_report_designer_wizard" model="ir.actions.act_window"> <field name="name">OpenERP Report Designer</field> <field name="type">ir.actions.act_window</field> diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml index 4245f3da206..041feb6d05c 100644 --- a/addons/base_setup/base_setup_installer.xml +++ b/addons/base_setup/base_setup_installer.xml @@ -54,6 +54,7 @@ <record id="base_setup_installer_todo" model="ir.actions.todo"> <field name="action_id" ref="action_base_setup_installer"/> <field name="sequence">2</field> + <field name="restart">always</field> </record> </data> </openerp> diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml index 8151442855b..56c205b16c9 100644 --- a/addons/base_setup/base_setup_todo.xml +++ b/addons/base_setup/base_setup_todo.xml @@ -67,7 +67,7 @@ <record id="base_setup_company_todo" model="ir.actions.todo"> <field name="action_id" ref="action_base_setup_company"/> <field name="sequence">3</field> - <field name="restart">onskip</field> + <field name="restart">always</field> </record> </data> </openerp> diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml index ece3bae31ec..35ff5a0a7cc 100644 --- a/addons/crm/crm_installer_view.xml +++ b/addons/crm/crm_installer_view.xml @@ -25,24 +25,24 @@ <xpath expr="//button[@string='Install Modules']" position="attributes"> <attribute name="string">Configure</attribute> </xpath> - <group colspan="8"> - <group colspan="4" col="4" groups="base.group_extended" name="other"> - <field name="crm_claim" /> - <field name="crm_helpdesk" /> - <field name="crm_fundraising" /> - <field name="wiki_sale_faq"/> - <field name="sale_crm" invisible="1"/> - </group> - <group colspan="2" col="2"> - <separator string="Synchronization" colspan="4" /> - <field name="crm_caldav" /> - <field name="fetchmail" /> - </group> - <group colspan="2" col="2"> - <separator string="Plug-In" colspan="4" /> - <field name="thunderbird" /> - <field name="outlook" /> - </group> + <group colspan="8"> + <group colspan="4" col="4" groups="base.group_extended" name="other"> + <field name="crm_claim" /> + <field name="crm_helpdesk" /> + <field name="crm_fundraising" /> + <field name="wiki_sale_faq"/> + <field name="sale_crm" invisible="1"/> + </group> + <group colspan="2" col="2"> + <separator string="Synchronization" colspan="4" /> + <field name="crm_caldav" /> + <field name="fetchmail" /> + </group> + <group colspan="2" col="2"> + <separator string="Plug-In" colspan="4" /> + <field name="thunderbird" /> + <field name="outlook" /> + </group> </group> </data> </field> @@ -59,9 +59,10 @@ </record> <record id="crm_installer_todo" model="ir.actions.todo"> - <field name="action_id" ref="action_crm_installer"/> - <field name="sequence">3</field> - <field eval="[(6,0,[ref('base.group_extended')])]" name="groups_id"/> + <field name="action_id" ref="action_crm_installer"/> + <field name="sequence">3</field> + <field name="restart">always</field> + <field eval="[(6,0,[ref('base.group_extended')])]" name="groups_id"/> </record> </data> </openerp> diff --git a/addons/document_ics/document_ics_config_wizard.xml b/addons/document_ics/document_ics_config_wizard.xml index d19951deb38..e58f48cad4c 100644 --- a/addons/document_ics/document_ics_config_wizard.xml +++ b/addons/document_ics/document_ics_config_wizard.xml @@ -54,6 +54,7 @@ register configuration wizard <record id="config_wizard_step_case_section_menu" model="ir.actions.todo"> <field name="action_id" ref="action_view_document_ics_config_directories"/> + <field name="restart">always</field> </record> </data> </openerp> diff --git a/addons/hr/hr_installer.xml b/addons/hr/hr_installer.xml index 0f396e65a8b..5ccbaefa3f5 100644 --- a/addons/hr/hr_installer.xml +++ b/addons/hr/hr_installer.xml @@ -52,6 +52,7 @@ <record id="hr_installer_todo" model="ir.actions.todo"> <field name="action_id" ref="action_hr_installer"/> <field name="sequence">3</field> + <field name="restart">always</field> </record> </data> diff --git a/addons/hr_attendance/report/timesheet.py b/addons/hr_attendance/report/timesheet.py index 1465be81bc8..b0845422655 100644 --- a/addons/hr_attendance/report/timesheet.py +++ b/addons/hr_attendance/report/timesheet.py @@ -41,8 +41,8 @@ class report_custom(report_rml): start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d') end_date = datetime.strptime(datas['form']['end_date'], '%Y-%m-%d') - first_monday = start_date - relativedelta(days=start_date.day_of_week) - last_monday = end_date + relativedelta(days=7 - end_date.day_of_week) + first_monday = start_date - relativedelta(days=start_date.date().weekday()) + last_monday = end_date + relativedelta(days=7 - end_date.date().weekday()) if last_monday < first_monday: first_monday, last_monday = last_monday, first_monday @@ -82,7 +82,7 @@ class report_custom(report_rml): for att in attendances: dt = datetime.strptime(att['name'], '%Y-%m-%d %H:%M:%S') if att['action'] == 'sign_out': - week_wh[ldt.day_of_week] = week_wh.get(ldt.day_of_week, 0) + (dt - ldt).hours + week_wh[ldt.date().weekday()] = week_wh.get(ldt.date().weekday(), 0) + ((dt - ldt).seconds/3600) ldt = dt # Week xml representation diff --git a/addons/hr_payroll/report/report_employees_detail.py b/addons/hr_payroll/report/report_employees_detail.py index d36df160ad2..c3d90c4eac7 100644 --- a/addons/hr_payroll/report/report_employees_detail.py +++ b/addons/hr_payroll/report/report_employees_detail.py @@ -227,7 +227,7 @@ class employees_salary_report(rml_parse.rml_parse): def get_monthly_total(self): return self.month_total_list -report_sxw.report_sxw('report.employees.salary', 'hr.payslip', 'hr_payroll/report/report_employees_detail.rml', parser=employees_salary_report,header=3) +report_sxw.report_sxw('report.employees.salary', 'hr.payslip', 'hr_payroll/report/report_employees_detail.rml', parser=employees_salary_report,header='internal landscape') # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr_payroll/report/report_employees_detail.rml b/addons/hr_payroll/report/report_employees_detail.rml index 1988d932ce2..28ebe20d007 100644 --- a/addons/hr_payroll/report/report_employees_detail.rml +++ b/addons/hr_payroll/report/report_employees_detail.rml @@ -86,33 +86,19 @@ <blockTableStyle id="Table4"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="11,-1" stop="11,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="12,-1" stop="12,-1"/> - <lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/> <lineStyle kind="LINEBELOW" colorName="#000000" start="13,-1" stop="13,-1"/> </blockTableStyle> <blockTableStyle id="Table7"> @@ -122,20 +108,20 @@ <blockTableStyle id="Table6"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="10,-1" stop="10,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="11,-1" stop="11,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="12,-1" stop="12,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="13,-1" stop="13,-1"/> </blockTableStyle> <blockTableStyle id="Table10"> <blockAlignment value="LEFT"/> @@ -144,20 +130,20 @@ <blockTableStyle id="Table8"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="10,-1" stop="10,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="11,-1" stop="11,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="12,-1" stop="12,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="13,-1" stop="13,-1"/> </blockTableStyle> <blockTableStyle id="Table11"> <blockAlignment value="LEFT"/> @@ -166,24 +152,38 @@ <blockTableStyle id="Table9"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="6,-1" stop="6,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="7,-1" stop="7,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="8,-1" stop="8,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="9,-1" stop="9,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="10,-1" stop="10,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="11,-1" stop="11,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="12,-1" stop="12,-1"/> - <lineStyle kind="LINEBELOW" colorName="#cccccc" start="13,-1" stop="13,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="8,-1" stop="8,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="9,-1" stop="9,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="10,-1" stop="10,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="11,-1" stop="11,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="12,-1" stop="12,-1"/> + <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="13,-1" stop="13,-1"/> </blockTableStyle> <blockTableStyle id="Table1"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/> </blockTableStyle> <initialize> <paraStyle name="all" alignment="justify"/> @@ -292,10 +292,10 @@ <para style="terp_default_9">[[ o.name ]]</para> </td> <td> - <para style="terp_tblheader_Details">Other Id</para> + <para style="terp_tblheader_Details">PAN No.</para> </td> <td> - <para style="terp_default_9">[[ o.otherid or '' ]]</para> + <para style="terp_default_9">[[ o.pan_no or ' ']]</para> </td> <td> <para style="terp_tblheader_Details">Address</para> @@ -332,7 +332,7 @@ </para> <section> <para style="terp_default_8">[[ repeatIn(get_periods(data['form']),'m') ]]</para> - <blockTable colWidths="100.0,73.0,69.0,74.0,71.0,73.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table4"> + <blockTable colWidths="99.0,73.0,69.0,74.0,71.0,73.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table4"> <tr> <td> <para style="terp_tblheader_Details">Title</para> @@ -378,13 +378,7 @@ </td> </tr> </blockTable> - <para style="terp_default_1"> - <font color="white"> </font> - </para> <section> - <para style="terp_default_9"> - <font color="white"> </font> - </para> <blockTable colWidths="1063.0" style="Table7"> <tr> <td> @@ -393,56 +387,53 @@ </tr> </blockTable> <section> - <para style="terp_default_9">[[ repeatIn(get_allow(),'e1') ]]</para> - <blockTable colWidths="100.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table6"> + <para style="terp_default_1">[[ repeatIn(get_allow(),'e1') ]]</para> + <blockTable colWidths="99.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table6"> <tr> <td> <para style="terp_default_9">[[ e1[0] ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[1]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[1]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[2]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[2]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[3]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[3]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[4]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[4]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[5]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[5]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[6]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[6]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[7]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[7]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[8]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[8]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[9]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[9]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[10]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[10]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[11]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[11]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e1[12]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e1[12]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9_Bold">[[ formatLang(e1[13]) ]]</para> + <para style="terp_default_Right_9_Bold">[[ formatLang(e1[13]) ]] [[ company.currency_id.symbol ]]</para> </td> </tr> </blockTable> - <para style="terp_default_1"> - <font color="white"> </font> - </para> </section> <blockTable colWidths="1063.0" style="Table10"> <tr> @@ -452,56 +443,53 @@ </tr> </blockTable> <section> - <para style="terp_default_9">[[ repeatIn(get_deduct(),'e2') ]]</para> - <blockTable colWidths="100.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table8"> + <para style="terp_default_1">[[ repeatIn(get_deduct(),'e2') ]]</para> + <blockTable colWidths="99.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table8"> <tr> <td> <para style="terp_default_9">[[ e2[0] ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[1]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[1]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[2]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[2]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[3]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[3]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[4]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[4]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[5]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[5]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[6]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[6]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[7]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[7]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[8]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[8]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[9]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[9]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[10]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[10]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[11]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[11]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e2[12]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e2[12]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9_Bold">[[ formatLang(e2[13]) ]]</para> + <para style="terp_default_Right_9_Bold">[[ formatLang(e2[13]) ]] [[ company.currency_id.symbol ]]</para> </td> </tr> </blockTable> - <para style="terp_default_1"> - <font color="white"> </font> - </para> </section> <blockTable colWidths="1063.0" style="Table11"> <tr> @@ -511,107 +499,98 @@ </tr> </blockTable> <section> - <para style="terp_default_9">[[ repeatIn(get_other(),'e3') ]]</para> - <blockTable colWidths="100.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table9"> + <para style="terp_default_1">[[ repeatIn(get_other(),'e3') ]]</para> + <blockTable colWidths="99.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table9"> <tr> <td> <para style="terp_default_9">[[ e3[0] ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[1]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[1]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[2]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[2]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[3]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[3]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[4]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[4]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[5]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[5]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[6]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[6]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[7]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[7]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[8]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[8]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[9]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[9]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[10]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[10]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[11]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[11]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9">[[ formatLang(e3[12]) ]]</para> + <para style="terp_default_Right_9">[[ formatLang(e3[12]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_default_Right_9_Bold">[[ formatLang(e3[13]) ]]</para> + <para style="terp_default_Right_9_Bold">[[ formatLang(e3[13]) ]] [[ company.currency_id.symbol ]]</para> </td> </tr> </blockTable> - <para style="terp_default_1"> - <font color="white"> </font> - </para> </section> - <para style="terp_default_1"> - <font color="white"> </font> - </para> </section> - <para style="terp_default_1"> - <font color="white"> </font> - </para> <blockTable colWidths="101.0,73.0,68.0,74.0,70.0,74.0,74.0,73.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table1"> <tr> <td> <para style="terp_tblheader_Details">[[ get_monthly_total()[0] ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[1]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[1]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[2]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[2]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[3]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[3]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[4]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[4]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[5]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[5]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[6]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[6]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[7]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[7]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[8]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[8]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[9]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[9]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[10]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[10]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[11]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[11]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[12]) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_Details_Right">[[ formatLang(get_monthly_total()[12]) ]] [[ company.currency_id.symbol ]]</para> </td> <td> - <para style="terp_tblheader_General_Right">[[ formatLang(get_total()) ]][[ company.currency_id.symbol ]]</para> + <para style="terp_tblheader_General_Right">[[ formatLang(get_total()) ]] [[ company.currency_id.symbol ]]</para> </td> </tr> </blockTable> @@ -619,11 +598,8 @@ <font color="white"> </font> </para> </section> - <para style="terp_default_1"> - <font color="white"> </font> - </para> <para style="terp_default_9"> <font color="white"> </font> </para> </story> -</document> +</document>
\ No newline at end of file diff --git a/addons/hr_payroll/report/report_year_report.rml b/addons/hr_payroll/report/report_year_report.rml index 4c32436955a..d103d35185f 100755 --- a/addons/hr_payroll/report/report_year_report.rml +++ b/addons/hr_payroll/report/report_year_report.rml @@ -63,11 +63,24 @@ <blockTableStyle id="Table6"> <blockAlignment value="LEFT"/> <blockValign value="TOP"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="7,0" stop="7,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="8,0" stop="8,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="9,0" stop="9,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/> + <lineStyle kind="LINEABOVE" colorName="#000000" start="13,0" stop="13,0"/> </blockTableStyle> <initialize> <paraStyle name="all" alignment="justify"/> </initialize> - <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> <paraStyle name="Standard" fontName="Helvetica"/> <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/> <paraStyle name="Text body" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="6.0"/> @@ -134,7 +147,7 @@ </para> <section> <para style="terp_default_8">[[ repeatIn(get_periods(data['form']),'m') ]]</para> - <blockTable colWidths="100.0,73.0,69.0,74.0,71.0,73.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table4"> + <blockTable colWidths="99.0,73.0,69.0,74.0,71.0,73.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table4"> <tr> <td> <para style="terp_tblheader_Details">Name</para> @@ -176,7 +189,7 @@ <para style="terp_tblheader_Details_Right">[[ m[11] ]]</para> </td> <td> - <para style="terp_tblheader_Details_Right">Total([[company.currency_id.code]])</para> + <para style="terp_tblheader_Details_Right">Total</para> </td> </tr> </blockTable> @@ -185,7 +198,7 @@ </para> <section> <para style="terp_default_9">[[ repeatIn(get_employee(data['form']),'e') ]]</para> - <blockTable colWidths="100.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table1"> + <blockTable colWidths="99.0,73.0,69.0,74.0,70.0,74.0,75.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table1"> <tr> <td> <para style="terp_default_9">[[ e[0] ]]</para> @@ -231,23 +244,14 @@ </td> </tr> </blockTable> - <para style="terp_default_1"> - <font color="white"> </font> - </para> </section> - <para style="terp_default_1"> - <font color="white"> </font> - </para> </section> - <para style="terp_default_1"> - <font color="white"> </font> - </para> <section> - <para style="P1">[[ repeatIn(get_months_tol(),'t') ]]</para> - <blockTable colWidths="100.0,73.0,69.0,74.0,70.0,75.0,74.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table6"> + <para style="terp_default_1">[[ repeatIn(get_months_tol(),'t') ]]</para> + <blockTable colWidths="99.0,73.0,69.0,74.0,70.0,75.0,74.0,72.0,76.0,76.0,76.0,76.0,76.0,76.0" style="Table6"> <tr> <td> - <para style="terp_tblheader_Details">Total([[company.currency_id.code]])</para> + <para style="terp_tblheader_Details">Total</para> </td> <td> <para style="terp_tblheader_General_Right">[[ formatLang(t[1]) ]] [[company.currency_id.symbol]]</para> @@ -298,4 +302,4 @@ <font color="white"> </font> </para> </story> -</document> +</document>
\ No newline at end of file diff --git a/addons/hr_payroll/report/report_year_salary.py b/addons/hr_payroll/report/report_year_salary.py index a85d7328973..5e03e4710a6 100755 --- a/addons/hr_payroll/report/report_year_salary.py +++ b/addons/hr_payroll/report/report_year_salary.py @@ -105,7 +105,7 @@ class year_salary_report(rml_parse.rml_parse): self.total += item[count] return self.total -report_sxw.report_sxw('report.year.salary', 'hr.payslip', 'hr_payroll/report/report_year_report.rml', parser=year_salary_report,header=3) +report_sxw.report_sxw('report.year.salary', 'hr.payslip', 'hr_payroll/report/report_year_report.rml', parser=year_salary_report,header='internal landscape') diff --git a/addons/hr_payroll/report/rml_parse.py b/addons/hr_payroll/report/rml_parse.py index 2e3ca9dc019..7abb29711b6 100755 --- a/addons/hr_payroll/report/rml_parse.py +++ b/addons/hr_payroll/report/rml_parse.py @@ -151,10 +151,10 @@ class rml_parse(report_sxw.rml_parse): print Stringer return Stringer - def _add_header(self, node, header=1): - if header==2: + def _add_header(self, node, header='external'): + if header=='internal': rml_head = self.rml_header2 - elif header==3: + elif header=='internal landscape': rml_head = self.rml_header3 else: rml_head = self.rml_header diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 55e25e4001c..ce074715888 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -178,6 +178,21 @@ class hr_timesheet_sheet(osv.osv): def copy(self, cr, uid, ids, *args, **argv): raise osv.except_osv(_('Error !'), _('You cannot duplicate a timesheet !')) + def create(self, cr, uid, vals, *args, **argv): + if 'employee_id' in vals: + if not self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id: + raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any user defined !')) + return super(hr_timesheet_sheet, self).create(cr, uid, vals, *args, **argv) + + def write(self, cr, uid, ids, vals, *args, **argv): + if 'employee_id' in vals: + new_user_id = self.pool.get('hr.employee').browse(cr, uid, vals['employee_id']).user_id.id or False + if not new_user_id: + raise osv.except_osv(_('Error !'), _('You cannot create a timesheet for an employee that does not have any user defined !')) + if not self._sheet_date(cr, uid, ids, forced_user_id=new_user_id): + raise osv.except_osv(_('Error !'), _('You can not have 2 timesheets that overlaps !\nPlease use the menu \'My Current Timesheet\' to avoid this problem.')) + return super(hr_timesheet_sheet, self).write(cr, uid, ids, vals, *args, **argv) + def button_confirm(self, cr, uid, ids, context=None): if context is None: context = {} @@ -262,8 +277,8 @@ class hr_timesheet_sheet(osv.osv): _columns = { 'name': fields.char('Description', size=64, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}), - 'user_id': fields.many2one('res.users', 'User', required=True, select=1, - states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}), + 'employee_id': fields.many2one('hr.employee', 'Employee', required=True), + 'user_id': fields.related('employee_id', 'user_id', type="many2one", relation="res.users", store=True, string="User", required=False, readonly=True),#fields.many2one('res.users', 'User', required=True, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}), 'date_from': fields.date('Date from', required=True, select=1, readonly=True, states={'new':[('readonly', False)]}), 'date_to': fields.date('Date to', required=True, select=1, readonly=True, states={'new':[('readonly', False)]}), 'date_current': fields.date('Current date', required=True), @@ -320,24 +335,24 @@ class hr_timesheet_sheet(osv.osv): return time.strftime('%Y-%m-%d') _defaults = { - 'user_id': lambda self,cr,uid,c: uid, 'date_from' : _default_date_from, 'date_current' : lambda *a: time.strftime('%Y-%m-%d'), 'date_to' : _default_date_to, 'state': 'new', - 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr_timesheet_sheet.sheet', context=c) + 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'hr_timesheet_sheet.sheet', context=c) } - def _sheet_date(self, cr, uid, ids): + def _sheet_date(self, cr, uid, ids, forced_user_id=False): for sheet in self.browse(cr, uid, ids): - cr.execute('SELECT id \ + new_user_id = forced_user_id or sheet.user_id and sheet.user_id.id + if new_user_id: + cr.execute('SELECT id \ FROM hr_timesheet_sheet_sheet \ WHERE (date_from < %s and %s < date_to) \ AND user_id=%s \ - AND id <> %s', (sheet.date_to, sheet.date_from, - sheet.user_id.id, sheet.id)) - if cr.fetchall(): - return False + AND id <> %s',(sheet.date_to, sheet.date_from, new_user_id, sheet.id)) + if cr.fetchall(): + return False return True def _date_current_check(self, cr, uid, ids): diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml index b22a88c5036..dedac8377a7 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_demo.xml @@ -4,6 +4,7 @@ <record id="sheet0" model="hr_timesheet_sheet.sheet"> <field name="name">Sheet 0</field> <field name="user_id" ref="base.user_root"/> + <field name="employee_id" ref="hr.employee1" /> <field eval="time.strftime('%Y-%m-01', time.localtime(time.mktime(time.localtime()[0:2] + (0,)*7)-1))" name="date_from"/> <field eval="time.strftime('%Y-%m-15', time.localtime(time.mktime(time.localtime()[0:2] + (0,)*7)-1))" name="date_current"/> <field eval="time.strftime('%Y-%m-%d', time.localtime(time.mktime(time.localtime()[0:2] + (0,)*7)-1))" name="date_to"/> diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index decf3b16b6b..231aba040e7 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -1,25 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data> - <record id="hr_timesheet_sheet_tree" model="ir.ui.view"> - <field name="name">hr.timesheet.sheet.tree</field> - <field name="model">hr_timesheet_sheet.sheet</field> - <field name="type">tree</field> - <field name="arch" type="xml"> - <tree string="Timesheets" - colors="blue:state == 'draft';gray:state == 'done'"> - <field name="user_id"/> - <field name="date_from"/> - <field name="date_to"/> - <field name="name"/> - <field name="department_id"/> - <field name="total_attendance" groups="base.group_hr_attendance"/> - <field name="total_timesheet"/> - <field name="total_difference" groups="base.group_hr_attendance"/> - <field name="state"/> - </tree> - </field> - </record> <record id="hr_timesheet_sheet_graph" model="ir.ui.view"> <field name="name">hr.timesheet.sheet.graph</field> <field name="model">hr_timesheet_sheet.sheet</field> @@ -71,7 +52,7 @@ <field name="company_id" select="1" groups="base.group_multi_company"/> <field name="department_id" groups="base.group_extended"/> <newline/> - <field name="user_id"/> + <field name="employee_id"/> <field name="date_from"/> <field name="date_to"/> </group> @@ -167,7 +148,7 @@ <filter icon="terp-document-new" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/> <filter icon="terp-camera_test" string="To Approve" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/> <separator orientation="vertical"/> - <field name="user_id" select="1"/> + <field name="employee_id" select="1"/> <field name="date_from"/> <field name="department_id" widget="selection"> <filter icon="terp-personal+" @@ -177,7 +158,7 @@ </group> <newline/> <group expand="0" string="Group By..."> - <filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/> + <filter string="Employees" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/> <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/> </group> </search> @@ -190,7 +171,7 @@ <field name="res_model">hr_timesheet_sheet.sheet</field> <field name="view_type">form</field> <field name="view_id" eval="False"/> - <field name="context">{'search_default_my_timesheet':1, 'search_default_user_id':uid }</field> + <field name="context">{'search_default_my_timesheet':1, }</field> <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/> <field name="help">Employees can encode their time spent on the different projects. A project is an analytic account and the time spent on a project generate costs on the analytic account.</field> </record> @@ -312,18 +293,19 @@ src_model="hr_timesheet_sheet.sheet"/> <record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view"> - <field name="name">hr.timesheet.sheet.tree.simplified</field> + <field name="name">hr.timesheet.sheet.tree</field> <field name="model">hr_timesheet_sheet.sheet</field> <field name="type">tree</field> - <field eval="20" name="priority"/> + <field eval="10" name="priority"/> <field name="arch" type="xml"> <tree colors="blue:state in ('draft');black:state in ('confirm','new');gray:state in('done')" string="Timesheets"> + <field name="employee_id"/> <field name="date_from"/> - <field name="user_id"/> - <field name="department_id" invisible="1"/> - <field name="name"/> - <field name="total_attendance"/> + <field name="date_to"/> + <field name="department_id"/> + <field name="total_attendance" groups="base.group_hr_attendance"/> <field name="total_timesheet"/> + <field name="total_difference" groups="base.group_hr_attendance"/> <field name="state"/> </tree> </field> diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml index 08abc6db63b..a015ff933d2 100644 --- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml +++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml @@ -34,11 +34,11 @@ <field name="year" invisible="1"/> <field name="day" invisible="1"/> <field name="month" invisible="1"/> + <field name="total_attendance" sum="#Total Attendance"/> + <field name="total_timesheet" sum="#Total Timesheet"/> + <field name="total_diff" sum="#Total Diff"/> <field name="quantity" sum="#Quantity"/> <field name="cost" sum="#Cost"/> - <field name="total_diff" sum="#Total Diff"/> - <field name="total_timesheet" sum="#Total Timesheet"/> - <field name="total_attendance" sum="#Total Attendance"/> </tree> </field> </record> diff --git a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml index bb5752d6c9e..808045eb677 100644 --- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml +++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml @@ -70,6 +70,7 @@ name: Week-22(2010) state: new user_id: base.user_root + employee_id: 'hr_employee_employee0' - Now , at the time of login, I create Attendances and perform "Sign In" action. - diff --git a/addons/knowledge/knowledge_installer.xml b/addons/knowledge/knowledge_installer.xml index 681bf2253d5..1fa6cab9865 100644 --- a/addons/knowledge/knowledge_installer.xml +++ b/addons/knowledge/knowledge_installer.xml @@ -53,6 +53,7 @@ <field name="action_id" ref="action_knowledge_installer"/> <field name="sequence">3</field> <field name="groups_id" eval="[(6,0,[ref('base.group_extended')])]"/> + <field name="restart">always</field> </record> </data> diff --git a/addons/marketing/marketing_view.xml b/addons/marketing/marketing_view.xml index 6cd35f3a533..9edd7689484 100644 --- a/addons/marketing/marketing_view.xml +++ b/addons/marketing/marketing_view.xml @@ -50,6 +50,7 @@ <record id="marketing_installer_todo" model="ir.actions.todo"> <field name="action_id" ref="action_marketing_installer"/> <field name="sequence">3</field> + <field name="restart">always</field> </record> </data> diff --git a/addons/mrp/mrp_installer.xml b/addons/mrp/mrp_installer.xml index d317cf6face..ff0c01f8e18 100644 --- a/addons/mrp/mrp_installer.xml +++ b/addons/mrp/mrp_installer.xml @@ -48,6 +48,7 @@ <record id="mrp_installer_todo" model="ir.actions.todo"> <field name="action_id" ref="action_mrp_installer"/> <field name="sequence">3</field> + <field name="restart">always</field> <field name="groups_id" eval="[(6,0,[ref('base.group_extended')])]"/> </record> diff --git a/addons/profile_tools/misc_tools_installer.xml b/addons/profile_tools/misc_tools_installer.xml index bc445e7818f..b59f95ab908 100644 --- a/addons/profile_tools/misc_tools_installer.xml +++ b/addons/profile_tools/misc_tools_installer.xml @@ -46,6 +46,7 @@ <record id="misc_tools_installer_todo" model="ir.actions.todo"> <field name="action_id" ref="action_misc_tools_installer"/> + <field name="restart">always</field> <field name="sequence">3</field> </record> </data> diff --git a/addons/project/board_project_manager_view.xml b/addons/project/board_project_manager_view.xml index 12559b0629b..d92592a9f38 100644 --- a/addons/project/board_project_manager_view.xml +++ b/addons/project/board_project_manager_view.xml @@ -10,43 +10,12 @@ Board for project managers --> <act_window - domain="[('manager', '=', uid)]" - id="act_my_project" name="My projects" - res_model="project.project" view_mode="tree,form" - view_type="form"/> + domain="[('manager', '=', uid)]" + id="act_my_project" name="My projects" + res_model="project.project" view_mode="tree,form" + view_type="form"/> <act_window domain="[('user_id','=',uid),('state','<>','close')]" id="act_my_account" name="My accounts to invoice" res_model="account.analytic.account" view_id="view_account_analytic_simplified" view_mode="tree,form" view_type="form"/> - <record id="board_project_manager_form" model="ir.ui.view"> - <field name="name">board.project.manager.form</field> - <field name="model">board.board</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Project manager board"> - <hpaned> - <child1> - <!-- <action colspan="4" height="220" name="%(act_my_project)d" string="My projects" width="510"/>--> - - <action colspan="4" height="150" name="%(act_my_account)d" string="My accounts to invoice" width="510"/> - </child1> - <child2> - <button colspan="4" icon="terp-partner" name="%(open_board_project)d" string="My tasks board" type="action"/> - </child2> - </hpaned> - </form> - </field> - </record> - - <record id="open_board_project_manager" model="ir.actions.act_window"> - <field name="name">Project Manager Dashboard</field> - <field name="res_model">board.board</field> - <field name="view_type">form</field> - <field name="view_mode">form</field> - <field name="usage">menu</field> - <field name="view_id" ref="board_project_manager_form"/> - </record> - - <menuitem action="open_board_project_manager" icon="terp-graph" id="menu_board_project_manager" parent="project.next_id_86" sequence="1" groups="project.group_project_user"/> - </data> </openerp> diff --git a/addons/project/project_installer.xml b/addons/project/project_installer.xml index 2b46cc0ab5f..32b235e4691 100644 --- a/addons/project/project_installer.xml +++ b/addons/project/project_installer.xml @@ -49,8 +49,9 @@ </record> <record id="project_installer_todo" model="ir.actions.todo"> - <field name="action_id" ref="action_project_installer"/> - <field name="sequence">3</field> + <field name="action_id" ref="action_project_installer"/> + <field name="restart">always</field> + <field name="sequence">3</field> </record> </data> diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 2caf36766b0..0c31c485753 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -92,7 +92,7 @@ class project_phase(osv.osv): model_data_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour') return model_data_obj.read(cr, uid, [model_data_id], ['res_id'])[0]['res_id'] - def _compute(self, cr, uid, ids, context=None): + def _compute(self, cr, uid, ids,field_name, arg, context=None): res = {} if not ids: return res @@ -100,9 +100,7 @@ class project_phase(osv.osv): tot = 0.0 for task in phase.task_ids: tot += task.planned_hours - res[phase.id] = { - 'total_hours' : tot - } + res[phase.id] = tot return res _columns = { diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml index 3412ba7ca08..fa645af4127 100644 --- a/addons/project_long_term/project_long_term_view.xml +++ b/addons/project_long_term/project_long_term_view.xml @@ -110,22 +110,23 @@ <field name="type">form</field> <field name="arch" type="xml"> <form string="Project Phase"> - <group colspan="6" col="6"> - <group colspan="2" col="2"> + <group colspan="8" col="7"> + <group colspan="8"> <field name="name" select="1"/> - <field name="date_start"/> + <field name="total_hours"/> + <field name="project_id" on_change="onchange_project(project_id)" colspan="2"/> + <field name="responsible_id" colspan="2"/> </group> - <group colspan="2" col="4"> - <field name="project_id" on_change="onchange_project(project_id)" colspan="4"/> - <newline/> - <field name="duration" colspan="1" on_change="onchange_days(project_id)" /> + <newline/> + <group colspan="2"> + <field name="date_start"/> + <field name="date_end"/> + </group> + <group colspan="2"> + <field name="duration" on_change="onchange_days(project_id)"/> <field name="product_uom" nolabel="1" domain="[('category_id.name', '=', 'Working Time')]"/> - </group> - <group colspan="2" col="2"> - <field name="responsible_id"/> - <field name="date_end"/> </group> - </group> + </group> <notebook colspan="4"> <page string="Resource Allocation"> <field colspan="4" name="resource_ids" nolabel="1"> diff --git a/addons/report_designer/report_designer_installer.xml b/addons/report_designer/report_designer_installer.xml index 907cdaad06d..b377331a208 100644 --- a/addons/report_designer/report_designer_installer.xml +++ b/addons/report_designer/report_designer_installer.xml @@ -46,6 +46,7 @@ <record id="report_designer_installer_todo" model="ir.actions.todo"> <field name="action_id" ref="action_report_designer_installer"/> + <field name="restart">always</field> <field name="sequence">3</field> </record> </data> diff --git a/addons/sale/sale_installer.py b/addons/sale/sale_installer.py index 98cd63c6ecb..4197c0a370b 100644 --- a/addons/sale/sale_installer.py +++ b/addons/sale/sale_installer.py @@ -26,8 +26,8 @@ class sale_installer(osv.osv_memory): _inherit = 'res.config.installer' _columns = { - 'sale_analytic_plans': fields.boolean('Sales Analytic Distribution', - help="Helps you to manage analytic distribution and sales orders."), + 'delivery': fields.boolean('Delivery Costs', + help="Allows you to compute delivery costs on your quotations."), 'sale_journal': fields.boolean('Sales and deliveries by journal', help="Allows you to categorise your " "sales and deliveries (picking lists) between different journals. " @@ -40,8 +40,8 @@ class sale_installer(osv.osv_memory): "the difference between Unit Price and Cost Price."), 'sale_order_dates': fields.boolean('Sales Order Dates', help="Adds commitment, requested and effective dates on Sales Orders."), - } + } sale_installer() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/sale_installer.xml b/addons/sale/sale_installer.xml index 31da357f895..4149871ad36 100644 --- a/addons/sale/sale_installer.xml +++ b/addons/sale/sale_installer.xml @@ -25,7 +25,7 @@ <attribute name="string">Configure</attribute> </xpath> <group colspan="8"> - <field name="sale_analytic_plans"/> + <field name="delivery"/> <field name="sale_journal"/> <field name="sale_layout"/> <field name="sale_margin"/> @@ -47,6 +47,7 @@ <record id="sale_installer_todo" model="ir.actions.todo"> <field name="action_id" ref="action_sale_installer"/> + <field name="restart">always</field> <field name="sequence">3</field> <field name="groups_id" eval="[(6,0,[ref('base.group_extended')])]"/> </record> diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index be0d254debd..62bdd41f2ca 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -567,6 +567,7 @@ to your configuration: from the sales order, from the pickings, etc. <!-- register configuration wizard --> <record id="config_wizard_step_sale_picking_policy" model="ir.actions.todo"> <field name="action_id" ref="action_config_picking_policy"/> + <field name="restart">always</field> <field name="groups_id" eval="[(6,0,[ref('base.group_extended')])]"/> </record> diff --git a/addons/sale/wizard/sale_line_invoice.xml b/addons/sale/wizard/sale_line_invoice.xml index b48247f8e58..c1e9d9c3b89 100644 --- a/addons/sale/wizard/sale_line_invoice.xml +++ b/addons/sale/wizard/sale_line_invoice.xml @@ -1,20 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data> - <record id="view_sale_order_line_make_invoice" model="ir.ui.view"> + <record id="view_sale_order_line_make_invoice" model="ir.ui.view"> <field name="name">Sale OrderLine Make Invoice</field> <field name="model">sale.order.line.make.invoice</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="Create invoices"> - <separator colspan="4" string="Do you really want to create the invoice(s) ?" /> - <button special="cancel" string="Cancel" icon="gtk-cancel"/> - <button name="make_invoices" string="Create Invoices" type="object" icon="gtk-ok"/> - </form> + <separator colspan="4" string="Do you really want to create the invoice(s) ?" /> + <button special="cancel" string="Cancel" icon="gtk-cancel"/> + <button name="make_invoices" string="Create Invoices" type="object" icon="gtk-ok"/> + </form> </field> - </record> + </record> - <record id="action_view_sale_order_line_make_invoice" model="ir.actions.act_window"> + <record id="action_view_sale_order_line_make_invoice" model="ir.actions.act_window"> <field name="name">Make Invoices</field> <field name="type">ir.actions.act_window</field> <field name="res_model">sale.order.line.make.invoice</field> @@ -34,4 +34,4 @@ <field name="model">sale.order.line</field> </record> </data> -</openerp>
\ No newline at end of file +</openerp> diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py index 6907f4ed3d5..92fb4559345 100644 --- a/addons/stock/report/report_stock_move.py +++ b/addons/stock/report/report_stock_move.py @@ -43,8 +43,8 @@ class report_stock_move(osv.osv): 'location_id': fields.many2one('stock.location', 'Source Location', readonly=True, select=True, help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."), 'location_dest_id': fields.many2one('stock.location', 'Dest. Location', readonly=True, select=True, help="Location where the system will stock the finished products."), 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True), - 'product_qty_in':fields.integer('In Qty',readonly=True), - 'product_qty_out':fields.integer('Out Qty',readonly=True), + 'product_qty_in':fields.float('In Qty',readonly=True), + 'product_qty_out':fields.float('Out Qty',readonly=True), 'value' : fields.float('Total Value', required=True, digits_compute=dp.get_precision('Sale Price')), 'day_diff2':fields.float('Delay (Days)',readonly=True, digits=(16,2), group_operator="avg"), 'day_diff1':fields.float('Planned (Days)',readonly=True, digits=(16,2), group_operator="avg"), diff --git a/addons/survey/report/survey_analysis_report.py b/addons/survey/report/survey_analysis_report.py index 4aa4b099c57..0d866368bf2 100644 --- a/addons/survey/report/survey_analysis_report.py +++ b/addons/survey/report/survey_analysis_report.py @@ -29,7 +29,6 @@ from report import report_sxw class survey_analysis(report_rml): def create(self, cr, uid, ids, datas, context): - surv_obj = pooler.get_pool(cr.dbname).get('survey') user_obj = pooler.get_pool(cr.dbname).get('res.users') rml_obj=report_sxw.rml_parse(cr, uid, surv_obj._name,context) @@ -423,7 +422,7 @@ class survey_analysis(report_rml): rml += """</document>""" report_type = datas.get('report_type', 'pdf') create_doc = self.generators[report_type] - self.pageCount=True + self.internal_header=True pdf = create_doc(rml, title=self.title) return (pdf, report_type) diff --git a/addons/survey/report/survey_browse_response.py b/addons/survey/report/survey_browse_response.py index d024e410d0e..2cdb98622a9 100644 --- a/addons/survey/report/survey_browse_response.py +++ b/addons/survey/report/survey_browse_response.py @@ -520,9 +520,7 @@ class survey_browse_response(report_rml): rml += """</story></document>""" report_type = datas.get('report_type', 'pdf') create_doc = self.generators[report_type] - self.pageCount=False pdf = create_doc(rml, title=self.title) - return (pdf, report_type) survey_browse_response('report.survey.browse.response', 'survey','','') diff --git a/addons/survey/report/survey_form.py b/addons/survey/report/survey_form.py index 5836be2d399..1a623db4211 100644 --- a/addons/survey/report/survey_form.py +++ b/addons/survey/report/survey_form.py @@ -389,7 +389,6 @@ class survey_form(report_rml): rml += """</story></document>""" report_type = datas.get('report_type', 'pdf') create_doc = self.generators[report_type] - self.pageCount=False pdf = create_doc(rml, title=self.title) return (pdf, report_type) diff --git a/addons/thunderbird/thunderbird_installer.xml b/addons/thunderbird/thunderbird_installer.xml index 0c8b431a82f..0059cdfd8ab 100644 --- a/addons/thunderbird/thunderbird_installer.xml +++ b/addons/thunderbird/thunderbird_installer.xml @@ -60,8 +60,9 @@ </record> <record id="thunderbird_installer_todo" model="ir.actions.todo"> - <field name="action_id" ref="action_thunderbird_installer"/> - <field name="sequence">3</field> + <field name="action_id" ref="action_thunderbird_installer"/> + <field name="restart">always</field> + <field name="sequence">3</field> </record> |
