[IMP] improvement and Bug fix according to piratpad topics

bzr revid: psi@tinyerp.co.in-20100618133957-1qumx8x585dlouwc
This commit is contained in:
psi (Open ERP) 2010-06-18 19:09:57 +05:30
parent bd3226b73f
commit 65fbde0dbb
21 changed files with 192 additions and 154 deletions

View File

@ -6,7 +6,7 @@
<field name="model">account.analytic.default</field> <field name="model">account.analytic.default</field>
<field name="type">tree</field> <field name="type">tree</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Analytic Defaults" editable="bottom"> <tree string="Analytic Defaults">
<field name="sequence"/> <field name="sequence"/>
<field name="analytic_id" required="1"/> <field name="analytic_id" required="1"/>
<field name="product_id"/> <field name="product_id"/>
@ -18,17 +18,18 @@
</tree> </tree>
</field> </field>
</record> </record>
<record id="view_account_analytic_default_form" model="ir.ui.view"> <record id="view_account_analytic_default_form" model="ir.ui.view">
<field name="name">account.analytic.default.form</field> <field name="name">account.analytic.default.form</field>
<field name="model">account.analytic.default</field> <field name="model">account.analytic.default</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Analytic Defaults"> <form string="Analytic Defaults">
<field name="analytic_id" select="1" required="1"/> <field name="analytic_id" required="1"/>
<field name="sequence"/> <field name="sequence"/>
<separator string="Conditions" colspan="4"/> <separator string="Conditions" colspan="4"/>
<field name="product_id" select="1"/> <field name="product_id"/>
<field name="partner_id" select="1"/> <field name="partner_id"/>
<field name="user_id"/> <field name="user_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/> <field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="date_start"/> <field name="date_start"/>
@ -36,11 +37,27 @@
</form> </form>
</field> </field>
</record> </record>
<record id="view_account_analytic_default_form_search" model="ir.ui.view">
<field name="name">account.analytic.default.search</field>
<field name="model">account.analytic.default</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Accounts">
<field name="analytic_id"/>
<field name="product_id"/>
<field name="partner_id"/>
<field name="user_id"/>
<field name="company_id"/>
</search>
</field>
</record>
<record id="action_analytic_default_form" model="ir.actions.act_window"> <record id="action_analytic_default_form" model="ir.actions.act_window">
<field name="name">Analytic Defaults</field> <field name="name">Analytic Defaults</field>
<field name="res_model">account.analytic.default</field> <field name="res_model">account.analytic.default</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_account_analytic_default_form_search"/>
</record> </record>
<!-- <menuitem--> <!-- <menuitem-->
<!-- action="action_analytic_default_form"--> <!-- action="action_analytic_default_form"-->
@ -48,7 +65,12 @@
<!-- parent="account.menu_analytic_accounting"/>--> <!-- parent="account.menu_analytic_accounting"/>-->
<act_window <act_window
domain="[('account_id', '=', active_id)]" id="act_account_acount_move_line_open" name="Entries" res_model="account.move.line" src_model="account.account"/> name="Entries"
id="act_account_acount_move_line_open"
res_model="account.move.line"
src_model="account.account"
domain="[('account_id', '=', active_id)]"/>
<act_window <act_window
name="Analytic Rules" name="Analytic Rules"
id="analytic_rule_action_partner" id="analytic_rule_action_partner"
@ -56,12 +78,14 @@
src_model="res.partner" src_model="res.partner"
domain="[('partner_id','=',active_id)]" domain="[('partner_id','=',active_id)]"
groups="base.group_extended"/> groups="base.group_extended"/>
<act_window <act_window
name="Analytic Rules" name="Analytic Rules"
id="analytic_rule_action_user" id="analytic_rule_action_user"
res_model="account.analytic.default" res_model="account.analytic.default"
src_model="res.users" src_model="res.users"
domain="[('user_id','=',active_id)]"/> domain="[('user_id','=',active_id)]"/>
<act_window <act_window
name="Analytic Rules" name="Analytic Rules"
res_model="account.analytic.default" res_model="account.analytic.default"

View File

@ -75,11 +75,6 @@
<page string="Accounts"> <page string="Accounts">
<field name="account_ids" colspan="4" nolabel="1"/> <field name="account_ids" colspan="4" nolabel="1"/>
</page> </page>
<page string="Dotations">
<button string="Spread" name="%(action_account_budget_spread)d" type="action" icon="gtk-fullscreen"/>
<field name="dotation_ids" colspan="4" nolabel="1"/>
</page>
<page string="Budget Lines"> <page string="Budget Lines">
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="graph,tree"> <field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="graph,tree">
<graph type="bar" string="Lines"> <graph type="bar" string="Lines">

View File

@ -8,12 +8,15 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Select Dates Period"> <form string="Select Dates Period">
<field name="date_from"/> <group width="450">
<field name="date_to"/> <separator string="This wizard is used to print budget" colspan="4"/>
<group colspan="4" col="6"> <field name="date_from"/>
<label string ="" colspan="2"/> <field name="date_to"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <separator colspan="4"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/> <group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group> </group>
</form> </form>
</field> </field>

View File

@ -8,12 +8,15 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Select Dates Period"> <form string="Select Dates Period">
<field name="date_from"/> <group width="450">
<field name="date_to"/> <separator string="This wizard is used to print budget" colspan="4"/>
<group colspan="4" col="6"> <field name="date_from"/>
<label string ="" colspan="2"/> <field name="date_to"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <separator colspan="4"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/> <group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group> </group>
</form> </form>
</field> </field>

View File

@ -8,13 +8,16 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Select Dates Period"> <form string="Select Dates Period">
<field name="date_from"/> <group width="450">
<field name="date_to"/> <separator string="This wizard is used to print summary of budgets" colspan="4"/>
<group colspan="4" col="6"> <field name="date_from"/>
<label string ="" colspan="2"/> <field name="date_to"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <separator colspan="4"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/> <group colspan="4" col="6">
</group> <button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -8,13 +8,16 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Select Dates Period"> <form string="Select Dates Period">
<field name="date1"/> <group width="450">
<field name="date2"/> <separator string="Print Budgets" colspan="4"/>
<group colspan="4" col="6"> <field name="date1"/>
<label string ="" colspan="2"/> <field name="date2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <separator colspan="4"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/> <group colspan="4" col="6">
</group> <button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -7,14 +7,16 @@
<field name="model">account.budget.spread</field> <field name="model">account.budget.spread</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Select Dates Period"> <form string="Select Fiscalyear">
<field name="fiscalyear"/> <group width="480">
<field name="amount"/> <separator string="" colspan="4"/>
<separator colspan="4"/> <field name="fiscalyear"/>
<group colspan="4" col="6"> <field name="amount"/>
<label string ="" colspan="2"/> <separator colspan="4"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <group colspan="4" col="6">
<button name="check_spread" string="Ok" type="object" icon="gtk-ok" default_focus="1"/> <button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_spread" string="Ok" type="object" icon="gtk-ok"/>
</group>
</group> </group>
</form> </form>
</field> </field>

View File

@ -1,6 +1,6 @@
# -*- encoding: utf-8 -*- # -*- encoding: utf-8 -*-
############################################################################## ##############################################################################
# #
# OpenERP, Open Source Management Solution # OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# #
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details. # GNU Affero General Public License for more details.
# #
# You should have received a copy of the GNU Affero General Public License # 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/>.
# #
############################################################################## ##############################################################################
@ -27,7 +27,7 @@ class account_coda(osv.osv):
_description = "coda for an Account" _description = "coda for an Account"
_columns = { _columns = {
'name': fields.binary('Coda file', readonly=True), 'name': fields.binary('Coda file', readonly=True),
'statement_ids': fields.one2many('account.bank.statement','coda_id','Generated Bank Statement', readonly=True), 'statement_ids': fields.one2many('account.bank.statement','coda_id','Generated Bank Statements', readonly=True),
'note': fields.text('Import log', readonly=True), 'note': fields.text('Import log', readonly=True),
'journal_id': fields.many2one('account.journal','Bank Journal', readonly=True, select=True), 'journal_id': fields.many2one('account.journal','Bank Journal', readonly=True, select=True),
'date': fields.date('Import Date', readonly=True, select=True), 'date': fields.date('Import Date', readonly=True, select=True),

View File

@ -12,14 +12,14 @@
<field name="journal_id" /> <field name="journal_id" />
<field name="date" /> <field name="date" />
<field name="user_id" /> <field name="user_id" />
<notebook colspan="4"> <notebook colspan="4">
<page string="Log"> <page string="Log">
<field name="note" colspan="4"/> <field name="note" colspan="4" nolabel="1"/>
</page> </page>
<page string="Statements"> <page string="Statements">
<field name="statement_ids" colspan="4"/> <field name="statement_ids" colspan="4" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</form> </form>
</field> </field>
</record> </record>

View File

@ -124,7 +124,7 @@ def _coda_parsing(self, cr, uid, data, context):
bank_statement['date'] = str2date(line[5:11]) bank_statement['date'] = str2date(line[5:11])
bank_statement['journal_id']=data['form']['journal_id'] bank_statement['journal_id']=data['form']['journal_id']
period_id = pool.get('account.period').search(cr, uid, [('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))]) period_id = pool.get('account.period').search(cr, uid, [('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))])
bank_statement['period_id'] = period_id[0] bank_statement['period_id'] = period_id and period_id[0] or False
bank_statement['state']='draft' bank_statement['state']='draft'
elif line[0] == '1': elif line[0] == '1':
# old balance data # old balance data

View File

@ -28,11 +28,11 @@
Modules to automate letters for unpaid invoices, with multi-level recalls. Modules to automate letters for unpaid invoices, with multi-level recalls.
You can define your multiple levels of recall through the menu: You can define your multiple levels of recall through the menu:
Financial Management/Configuration/Payment Terms/Follow-Ups Financial Management/Configuration/Follow-Ups
Once it's defined, you can automatically print recalls every day Once it's defined, you can automatically print recalls every day
through simply clicking on the menu: through simply clicking on the menu:
Financial_Management/Periodical_Processing/Print_Follow-Ups Financial Management/Periodical Processing/Send followups
It will generate a PDF with all the letters according the the It will generate a PDF with all the letters according the the
different levels of recall defined. You can define different policies different levels of recall defined. You can define different policies
@ -40,7 +40,7 @@
Note that if you want to change the followup level for a given partner/account entry, you can do it in the menu: Note that if you want to change the followup level for a given partner/account entry, you can do it in the menu:
Financial_Management/Reporting/Follow-Ups/All Receivable Entries Financial Management/Reporting/Follow-Ups/All receivable entries
""", """,
'author': 'Tiny', 'author': 'Tiny',

View File

@ -171,14 +171,13 @@ class account_followup_print_all(osv.osv_memory):
data = self.read(cr, uid, ids, [])[0] data = self.read(cr, uid, ids, [])[0]
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all_msg')], context=context) model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all_msg')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
if data['email_conf']: if data['email_conf']:
mail_notsent = '' mail_notsent = ''
msg_sent = '' msg_sent = ''
msg_unsent = '' msg_unsent = ''
count = 0 count = 0
data_user = user_obj.browse(cr, uid, uid) data_user = user_obj.browse(cr, uid, uid)
move_lines = line_obj.browse(cr, uid, data['partner_ids'][0][2]) move_lines = line_obj.browse(cr, uid, data['partner_ids'])
partners = [] partners = []
dict_lines = {} dict_lines = {}
for line in move_lines: for line in move_lines:

View File

@ -45,11 +45,11 @@
<field name="model">payment.type</field> <field name="model">payment.type</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Payment Type"> <form string="Payment Type">
<field name="name" select="1"/> <field name="name"/>
<field name="code"/> <field name="code"/>
<newline/> <separator string="Suitable Bank Types" colspan="4"/>
<field colspan="4" name="suitable_bank_types" select="1"/> <field name="suitable_bank_types" nolabel="1" colspan="4"/>
</form> </form>
</field> </field>
</record> </record>

View File

@ -8,14 +8,14 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Indicators"> <form string="Indicators">
<label string="Select the criteria based on which Indicators will be printed."/> <group width="450">
<newline/> <separator string="Select the criteria based on which Indicators will be printed." colspan="4"/>
<field name="select_base"/> <field name="select_base"/>
<separator string="" colspan="4"/> <separator colspan="4"/>
<group colspan="4" col="6"> <group colspan="4" col="6">
<label string ="" colspan="2"/> <button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <button name="next" string="Next" type="object" icon="gtk-ok" default_focus="1"/>
<button name="next" string="Next" type="object" icon="gtk-ok" default_focus="1"/> </group>
</group> </group>
</form> </form>
</field> </field>
@ -31,9 +31,11 @@
<field name="target">new</field> <field name="target">new</field>
</record> </record>
<menuitem action="action_account_report_print_indicators" <menuitem
name="Print Indicators" action="action_account_report_print_indicators"
parent="account_report.menu_action_account_report_tree_view" id="menu_wizard_print_indicators"/> name="Print Indicators"
parent="account_report.menu_action_account_report_tree_view"
id="menu_wizard_print_indicators"/>
<record id="account_report_print_indicators_relation_view" model="ir.ui.view"> <record id="account_report_print_indicators_relation_view" model="ir.ui.view">
<field name="name">account.report.print.indicators.relation.form</field> <field name="name">account.report.print.indicators.relation.form</field>
@ -41,10 +43,10 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Indicators"> <form string="Indicators">
<newline/>
<separator string="" colspan="4"/> <separator string="" colspan="4"/>
<newline/>
<group colspan="4" col="6"> <group colspan="4" col="6">
<label string ="" colspan="2"/> <newline/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/> <button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group> </group>

View File

@ -8,16 +8,14 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Select period"> <form string="Select period">
<group width="660" height="480">
<field name="company_id"/> <field name="company_id"/>
<field name="display_account" required = "True"/> <field name="display_account" required = "True"/>
<newline/>
<field name="fiscalyear"/> <field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/> <label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<field name="display_type"/> <field name="display_type"/>
<newline/>
<separator string="Filters" colspan="4"/> <separator string="Filters" colspan="4"/>
<field name="state" required="True"/> <field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4"> <group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4"> <group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/> <separator string="Date Filter" colspan="4"/>
@ -29,12 +27,12 @@
<field name="periods" colspan="4" nolabel="1"/> <field name="periods" colspan="4" nolabel="1"/>
</group> </group>
</group> </group>
<newline/> <separator colspan="4"/>
<group colspan="4" col="6"> <group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/> <button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group> </group>
</group>
</form> </form>
</field> </field>
</record> </record>

View File

@ -8,32 +8,30 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Select period"> <form string="Select period">
<field name="company_id"/> <group width="660" height="480">
<field name="display_account" required = "True"/> <field name="company_id"/>
<newline/> <field name="display_account" required = "True"/>
<field name="fiscalyear"/> <field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/> <label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<field name="display_type"/> <field name="display_type"/>
<newline/> <separator string="Filters" colspan="4"/>
<separator string="Filters" colspan="4"/> <field name="state" required="True"/>
<field name="state" required="True"/> <group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<newline/> <group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<group attrs="{'invisible':[('state','=','none')]}" colspan="4"> <separator string="Date Filter" colspan="4"/>
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4"> <field name="date_from"/>
<separator string="Date Filter" colspan="4"/> <field name="date_to"/>
<field name="date_from"/> </group>
<field name="date_to"/> <group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
</group> <separator string="Filter on Periods" colspan="4"/>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4"> <field name="periods" colspan="4" nolabel="1"/>
<separator string="Filter on Periods" colspan="4"/> </group>
<field name="periods" colspan="4" nolabel="1"/> </group>
</group> <separator colspan="4"/>
</group> <group colspan="4" col="6">
<newline/> <button special="cancel" string="Cancel" icon="gtk-cancel"/>
<group colspan="4" col="6"> <button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
<label string ="" colspan="2"/> </group>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group> </group>
</form> </form>
</field> </field>
@ -73,9 +71,9 @@
<field name="context">{'record_id':active_id}</field> <field name="context">{'record_id':active_id}</field>
<field name="target">new</field> <field name="target">new</field>
</record> </record>
<menuitem <menuitem
parent="account.menu_finance_legal_statement" parent="account.menu_finance_legal_statement"
id="final_accounting_reports" id="final_accounting_reports"
name="Accounting Reports"/> name="Accounting Reports"/>

View File

@ -9,21 +9,22 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Account reporting"> <form string="Account reporting">
<notebook> <notebook>
<page string="General"> <page string="General">
<field name="name" select="1" colspan="3"/> <field name="name" colspan="2"/>
<field name="code" select="1"/> <field name="code"/>
<field name="parent_id" select="1" /> <field name="parent_id"/>
<field name="sequence"/> <field name="sequence"/>
<field name="color_font"/> <field name="color_font"/>
<field name="color_back"/> <field name="color_back"/>
<field name="font_style" /> <field name="font_style"/>
<field name="report_type" /> <field name="report_type"/>
<newline/> <newline/>
<separator string="Accounts" colspan="4"/> <separator string="Accounts" colspan="4"/>
<field name="account_id" colspan="4" nolabel="1"/> <field name="account_id" colspan="4" nolabel="1"/>
</page><page string="Notes"> </page>
<field name="note" nolabel="1" colspan="4"/> <page string="Notes">
</page> <field name="note" nolabel="1" colspan="4"/>
</page>
</notebook> </notebook>
</form> </form>
</field> </field>

View File

@ -8,13 +8,16 @@
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Select Dates Period"> <form string="Select Dates Period">
<field name="fiscalyear"/> <group height="350" width="390">
<newline/> <field name="fiscalyear" colspan="4"/>
<field name="periods"/> <newline/>
<group colspan="4" col="6"> <separator string="Periods" colspan="4"/>
<label string ="" colspan="2"/> <field name="periods" nolabel="1" colspan="4"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/> <separator colspan="4"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/> <group colspan="4" col="6">
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</group> </group>
</form> </form>
</field> </field>

View File

@ -51,7 +51,7 @@ ir_sequence_type()
class account_journal(osv.osv): class account_journal(osv.osv):
_inherit = "account.journal" _inherit = "account.journal"
_columns = { _columns = {
'max_amount': fields.float('Verify Transection', digits=(16, int(config['price_accuracy'])), help="Validate voucher entry twice before posting it, if transection amount more then entered here"), 'max_amount': fields.float('Verify Transaction', digits=(16, int(config['price_accuracy'])), help="Validate voucher entry twice before posting it, if transection amount more then entered here"),
} }
account_journal() account_journal()
@ -60,7 +60,7 @@ class account_voucher(osv.osv):
def _get_period(self, cr, uid, context={}): def _get_period(self, cr, uid, context={}):
if context.get('period_id', False): if context.get('period_id', False):
return context.get('period_id') return context.get('period_id')
periods = self.pool.get('account.period').find(cr, uid) periods = self.pool.get('account.period').find(cr, uid)
if periods: if periods:
return periods[0] return periods[0]
@ -76,12 +76,12 @@ class account_voucher(osv.osv):
def _get_journal(self, cr, uid, context={}): def _get_journal(self, cr, uid, context={}):
journal_pool = self.pool.get('account.journal') journal_pool = self.pool.get('account.journal')
if context.get('journal_id', False): if context.get('journal_id', False):
return context.get('journal_id') return context.get('journal_id')
type_inv = context.get('type', 'rec_voucher') type_inv = context.get('type', 'rec_voucher')
ttype = type2journal.get(type_inv, type_inv) ttype = type2journal.get(type_inv, type_inv)
res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1) res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
@ -131,7 +131,7 @@ class account_voucher(osv.osv):
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \ help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \
\n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \ \n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \
\n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \ \n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \
\n* The \'Cancelled\' state is used when user cancel voucher.'), \n* The \'Cancelled\' state is used when user cancel voucher.'),
'amount':fields.float('Amount', readonly=True), 'amount':fields.float('Amount', readonly=True),
'number':fields.char('Number', size=32, readonly=True), 'number':fields.char('Number', size=32, readonly=True),
'reference': fields.char('Voucher Reference', size=64), 'reference': fields.char('Voucher Reference', size=64),
@ -147,7 +147,7 @@ class account_voucher(osv.osv):
'type': _get_type, 'type': _get_type,
'journal_id':_get_journal, 'journal_id':_get_journal,
'currency_id': _get_currency, 'currency_id': _get_currency,
'state': lambda *a: 'draft', 'state': lambda *a: 'draft',
'date' : lambda *a: time.strftime('%Y-%m-%d'), 'date' : lambda *a: time.strftime('%Y-%m-%d'),
'reference_type': lambda *a: "none", 'reference_type': lambda *a: "none",
@ -159,7 +159,7 @@ class account_voucher(osv.osv):
# cur_obj = self.pool.get('res.currency') # cur_obj = self.pool.get('res.currency')
def onchange_account(self, cr, uid, ids, account_id): def onchange_account(self, cr, uid, ids, account_id):
if not account_id: if not account_id:
return { return {
'value':{'amount':False} 'value':{'amount':False}
@ -176,9 +176,9 @@ class account_voucher(osv.osv):
return { return {
'value':{'account_id':False} 'value':{'account_id':False}
} }
journal = self.pool.get('account.journal') journal = self.pool.get('account.journal')
if journal_id and (type in ('rec_voucher','bank_rec_voucher','journal_pur_voucher','journal_voucher')): if journal_id and (type in ('rec_voucher','bank_rec_voucher','journal_pur_voucher','journal_voucher')):
account_id = journal.browse(cr, uid, journal_id).default_debit_account_id account_id = journal.browse(cr, uid, journal_id).default_debit_account_id
return { return {
@ -262,12 +262,12 @@ class account_voucher(osv.osv):
return iml return iml
def action_move_line_create(self, cr, uid, ids, *args): def action_move_line_create(self, cr, uid, ids, *args):
for inv in self.browse(cr, uid, ids): for inv in self.browse(cr, uid, ids):
if inv.move_id: if inv.move_id:
continue continue
company_currency = inv.company_id.currency_id.id company_currency = inv.company_id.currency_id.id
line_ids = self.read(cr, uid, [inv.id], ['payment_ids'])[0]['payment_ids'] line_ids = self.read(cr, uid, [inv.id], ['payment_ids'])[0]['payment_ids']
@ -386,7 +386,7 @@ class account_voucher(osv.osv):
elif line.type == 'cr': elif line.type == 'cr':
move_line['credit'] = line.amount or False move_line['credit'] = line.amount or False
amount=line.amount * (-1) amount=line.amount * (-1)
move_line['analytic_account_id'] = line.account_analytic_id.id or False move_line['analytic_account_id'] = line.account_analytic_id.id or False
ml_id=self.pool.get('account.move.line').create(cr, uid, move_line) ml_id=self.pool.get('account.move.line').create(cr, uid, move_line)
@ -433,7 +433,7 @@ class account_voucher(osv.osv):
'tax_amount': x.get('tax_amount', False), 'tax_amount': x.get('tax_amount', False),
'ref':x.get('ref',False) 'ref':x.get('ref',False)
} }
def _convert_ref(self, cr, uid, ref): def _convert_ref(self, cr, uid, ref):
return (ref or '').replace('/','') return (ref or '').replace('/','')

View File

@ -49,12 +49,16 @@
<separator string="Narration" colspan="4"/> <separator string="Narration" colspan="4"/>
<field name="narration" colspan="4" nolabel="1" height="50"/> <field name="narration" colspan="4" nolabel="1" height="50"/>
<group col="6" colspan="6"> <group col="6" colspan="6">
<group col="2" colspan="2">
<field name="state"/> <field name="state"/>
<button name="open_voucher" string="Pro-forma" states="draft"/> </group>
<button name="proforma_voucher" string="Create" states="proforma"/> <group col="4" colspan="4">
<button name="open_voucher" string="Pro-forma" states="draft" icon="terp-check"/>
<button name="proforma_voucher" string="Create" states="proforma" icon="terp-document-new"/>
<button name="recheck_voucher" string="Validate" states="recheck"/> <button name="recheck_voucher" string="Validate" states="recheck"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" type="object"/> <button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" type="object" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/> <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
</group>
</group> </group>
</page> </page>
<page string="Other Info"> <page string="Other Info">

View File

@ -30,7 +30,7 @@
<field name="target">new</field> <field name="target">new</field>
</record> </record>
<record model="ir.values" id="hr_timesheet_invoice_cost_ledger_values"> <!-- <record model="ir.values" id="hr_timesheet_invoice_cost_ledger_values">
<field name="model_id" ref="model_account_analytic_account" /> <field name="model_id" ref="model_account_analytic_account" />
<field name="object" eval="1" /> <field name="object" eval="1" />
<field name="name">Cost Ledger</field> <field name="name">Cost Ledger</field>
@ -38,7 +38,7 @@
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_timesheet_invoice_cost_ledger'))" /> <field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_timesheet_invoice_cost_ledger'))" />
<field name="key">action</field> <field name="key">action</field>
<field name="model">account.analytic.account</field> <field name="model">account.analytic.account</field>
</record> </record> -->
</data> </data>
</openerp> </openerp>