[MERGE] Merge with dev-addons3 branch

bzr revid: psi@tinyerp.co.in-20100622050021-i2kjbdw4mdg61hwb
This commit is contained in:
psi (Open ERP) 2010-06-22 10:30:21 +05:30
commit 1ea0412ce9
20 changed files with 1036 additions and 178 deletions

View File

@ -81,7 +81,7 @@ class account_payment_term(osv.osv):
if amt:
next_date = datetime.strptime(date_ref, '%Y-%m-%d') + relativedelta(days=line.days)
if line.days2 < 0:
next_date += relativedelta(day=line.days2)
next_date += relativedelta(day=31)
if line.days2 > 0:
next_date += relativedelta(day=line.days2, months=1)
result.append( (next_date.strftime('%Y-%m-%d'), amt) )
@ -2121,7 +2121,7 @@ class account_tax_code_template(osv.osv):
'info': fields.text('Description'),
'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True),
'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Child Codes'),
'sign': fields.float('Sign for parent', required=True),
'sign': fields.float('Sign for parent', required=True, help="Choose 1.00 to add the total to the parent account or -1.00 to subtract it"),
'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any VAT related to this Tax Code to appear on invoices"),
}
@ -2153,7 +2153,7 @@ class account_chart_template(osv.osv):
_columns={
'name': fields.char('Name', size=64, required=True),
'account_root_id': fields.many2one('account.account.template','Root Account',required=True,domain=[('parent_id','=',False)]),
'account_root_id': fields.many2one('account.account.template','Root Account',required=True,domain=[('parent_id','=',False)], help=""),
'tax_code_root_id': fields.many2one('account.tax.code.template','Root Tax Code',required=True,domain=[('parent_id','=',False)]),
'tax_template_ids': fields.one2many('account.tax.template', 'chart_template_id', 'Tax Template List', help='List of all the taxes that have to be installed by the wizard'),
'bank_account_view_id': fields.many2one('account.account.template','Bank Account',required=True),

View File

@ -12,12 +12,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Fiscalyear">
<field name="name" select="1"/>
<field name="code" select="1"/>
<group>
<field name="name"/>
<field name="code"/>
<field name="date_start"/>
<field name="date_stop"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="end_journal_period_id" groups="base.group_extended"/>
</group>
<separator colspan="4" string="Periods"/>
<field colspan="4" name="period_ids" nolabel="1" widget="one2many_list">
<form string="Period">
@ -49,11 +51,32 @@
</tree>
</field>
</record>
<record id="view_account_fiscalyear_search" model="ir.ui.view">
<field name="name">account.fiscalyear.search</field>
<field name="model">account.fiscalyear</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Fiscalyear">
<group>
<filter string="Done" domain="[('state','=','done')]" icon="terp-dolar_ok!"/>
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<separator orientation="vertical"/>
<field name="code"/>
<field name="name"/>
<field name="state"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
</group>
</search>
</field>
</record>
<record id="action_account_fiscalyear_form" model="ir.actions.act_window">
<field name="name">Fiscal Years</field>
<field name="res_model">account.fiscalyear</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem id="next_id_23" name="Periods" parent="account.menu_finance_accounting"/>
<menuitem action="action_account_fiscalyear_form" id="menu_action_account_fiscalyear_form" parent="next_id_23"/>
@ -71,15 +94,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Period">
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="name"/>
<field name="code"/>
<field name="date_start"/>
<field name="date_stop"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="fiscalyear_id"/>
<field name="special"/>
<separator colspan="4" string="States"/>
<field name="state" select="1"/>
<field name="state"/>
<button name="action_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert"/>
</form>
</field>
@ -99,11 +122,32 @@
</tree>
</field>
</record>
<record id="view_account_period_search" model="ir.ui.view">
<field name="name">account.period.search</field>
<field name="model">account.period</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Periods">
<group>
<filter string="Done" domain="[('state','=','done')]" icon="terp-dolar_ok!"/>
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<separator orientation="vertical"/>
<field name="code"/>
<field name="name"/>
<field name="state"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
</group>
</search>
</field>
</record>
<record id="action_account_period_form" model="ir.actions.act_window">
<field name="name">Periods</field>
<field name="res_model">account.period</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem action="action_account_period_form" id="menu_action_account_period_form" parent="account.next_id_23"/>
@ -154,10 +198,21 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Accounts">
<field name="code" select="1"/>
<field name="name" select="1"/>
<field name="user_type" select="1"/>
<field name="type" select="1"/>
<group col="10" colspan="4">
<filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
<filter icon="terp-purchase" string="Purchase Accounts" domain="[('type','=','purchase')]"/>
<separator orientation="vertical"/>
<field name="code" select="1"/>
<field name="name" select="1"/>
<field name="user_type" select="1"/>
<field name="type" select="1"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
<filter string="User Type" icon="terp-folder-blue" domain="" context="{'group_by':'user_type'}"/>
<filter string="Internal Type" icon="terp-folder-yellow" domain="" context="{'group_by':'type'}"/>
</group>
</search>
</field>
</record>
@ -262,7 +317,28 @@
</tree>
</field>
</record>
<record id="view_account_journal_search" model="ir.ui.view">
<field name="name">account.journal.search</field>
<field name="model">account.journal</field>
<field name="type">search</field>
<field name="arch" type="xml">
<tree string="Search Account Journal">
<group>
<filter domain="[('type', '=', 'sale')]" string="Sale Journals" icon="terp-sale"/>
<filter domain="[('type', '=', 'purchase')]" string="Purchase Journals" icon="terp-purchase"/>
<filter domain="[('centralisation', '=', 'True')]" string="Centralized Journals" icon="terp-stock"/>
<separator orientation="vertical"/>
<field name="code"/>
<field name="name"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Type" context="{'group_by':'type'}" icon="terp-stock_effects-object-colorize"/>
<filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
</group>
</tree>
</field>
</record>
<record id="view_account_journal_form" model="ir.ui.view">
<field name="name">account.journal.form</field>
<field name="model">account.journal</field>
@ -351,16 +427,38 @@
</tree>
</field>
</record>
<record id="view_bank_statement_search" model="ir.ui.view">
<field name="name">account.bank.statement.search</field>
<field name="model">account.bank.statement</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Bank Statements">
<group>
<filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
<filter string="Confirm" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
<separator orientation="vertical"/>
<field name="date"/>
<field name="name"/>
<field name="journal_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
<filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
<filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
</group>
</search>
</field>
</record>
<record id="view_bank_statement_form" model="ir.ui.view">
<field name="name">account.bank.statement.form</field>
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Statement">
<field name="name" select="1"/>
<field name="date" select="1"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1"/>
<field name="name"/>
<field name="date"/>
<field name="journal_id" on_change="onchange_journal_id(journal_id)"/>
<field name="currency"/>
<field name="period_id"/>
<group colspan="2" col="3">
@ -427,7 +525,7 @@
<field name="name">Draft statements</field>
<field name="res_model">account.bank.statement</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
<field name="domain">[('state','=','draft')]</field>
<field name="filter" eval="True"/>
</record>
@ -629,6 +727,26 @@
</tree>
</field>
</record>
<record id="view_account_tax_search" model="ir.ui.view">
<field name="name">account.tax.search</field>
<field name="model">account.tax</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Taxes">
<group col="10" colspan="4">
<filter icon="terp-folder-blue" string="Vat Taxes" domain="[('tax_group','=','vat')]" help="Vat Taxes"/>
<filter icon="terp-folder-yellow" string="Other Taxes" domain="[('tax_group','=','other')]" help="Other Taxes"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="description"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Tax Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
</group>
</search>
</field>
</record>
<record id="view_tax_form" model="ir.ui.view">
<field name="name">account.tax.form</field>
<field name="model">account.tax</field>
@ -847,6 +965,13 @@
</field>
<field name="balance" string="Debit/Credit" select='1'/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Account" context="{'group_by':'account_id'}" icon="terp-folder-blue"/>
<filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-orange"/>
<filter string="Partner" context="{'group_by':'partner_id'}" icon="terp-personal"/>
<filter string="state" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
@ -1041,7 +1166,7 @@
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
<field name="domain">[('journal_id.type', '=', 'sale')]</field>
<field name="domain">[('journal_id.type', 'in', ['sale', 'sale_refund'])]</field>
</record>
<menuitem action="action_account_moves_sale" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables"/>
@ -1053,7 +1178,7 @@
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
<field name="domain">[('journal_id.type', '=', 'purchase')]</field>
<field name="domain">[('journal_id.type', 'in', ['purchase', 'purchase_refund'])]</field>
</record>
<menuitem action="action_account_moves_purchase" id="menu_eaction_account_moves_purchase" parent="menu_finance_payables"/>
@ -1296,7 +1421,7 @@
<field name="name" select="1"/>
<field name="ref" select="1"/>
<field name="journal_id" select="1"/>
<field colspan="4" name="lines_id" widget="one2many_list"/>
<field colspan="4" name="lines_id" widget="one2many_list" nolabel="1"/>
<separator string="Legend" colspan="4"/>
<field name="legend" colspan="4" nolabel="1"/>
<group col="1" colspan="4">
@ -1373,12 +1498,32 @@
<field name="name" select="1"/>
<field name="active" select="1"/>
<separator colspan="4" string="Description on invoices"/>
<field colspan="4" name="note"/>
<field colspan="4" name="note" nolabel="1"/>
<separator colspan="4" string="Computation"/>
<field colspan="4" name="line_ids"/>
<field colspan="4" name="line_ids" nolabel="1"/>
</form>
</field>
</record>
<!-- <record id="view_account_move_line_filter" model="ir.ui.view">-->
<!-- <field name="name">Payment Terms</field>-->
<!-- <field name="model">account.payment.term</field>-->
<!-- <field name="type">search</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <search string="Search Payment Terms">-->
<!-- <group col='10' colspan='4'>-->
<!-- <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Entry Lines"/>-->
<!-- <filter icon="terp-camera_test" string="Posted" domain="[('state','=','valid')]" help="Posted Entry Lines"/>-->
<!-- <separator orientation="vertical"/>-->
<!-- <field name="date" select='1'/>-->
<!-- <field name="account_id" select='1'/>-->
<!-- <field name="partner_id" select='1'>-->
<!-- <filter help="Next Partner Entries to reconcile" name="next_partner" string="Next Partner to reconcile" context="{'next_partner_only': 1}" icon="terp-partner" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>-->
<!-- </field>-->
<!-- <field name="balance" string="Debit/Credit" select='1'/>-->
<!-- </group>-->
<!-- </search>-->
<!-- </field>-->
<!-- </record>-->
<record id="action_payment_term_form" model="ir.actions.act_window">
<field name="name">Payment Terms</field>
<field name="res_model">account.payment.term</field>
@ -1572,13 +1717,14 @@
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="All Account Entries" res_model="account.move.line" src_model="res.partner"/>
<record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
<field name="name">Account Add wizard</field>
<field name="name">Create Account</field>
<field name="model">account.addtmpl.wizard</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Add">
<separator col="4" colspan="4" string="Select the common parent for the accounts"/>
<form string="Create Account">
<separator col="4" colspan="4" string="Create an Account based on this template"/>
<field name="cparent_id"/>
<newline/>
<group col="2" colspan="2">
<button icon="gtk-cancel" special="cancel" string="Cancel" name="action_cancel" type="object"/>
<button icon="gtk-ok" name="action_create" string="Add" type="object"/>
@ -1588,7 +1734,8 @@
</record>
<act_window domain="[]" id="action_account_addtmpl_wizard_form"
name="Add account Wizard"
name="Create Account"
target="new"
res_model="account.addtmpl.wizard"
context="{'tmpl_ids': active_id}"
src_model="account.account.template"
@ -1621,16 +1768,17 @@
<notebook>
<page string="General Information">
<field name="name"/>
<field name="code" select="1"/>
<field name="code"/>
<newline/>
<field name="parent_id" select="1"/>
<field name="parent_id"/>
<field name="shortcut"/>
<field name="type" select="1"/>
<field name="user_type" select="1"/>
<field name="type"/>
<field name="user_type"/>
<field name="currency_id"/>
<field name="reconcile"/>
<field name="tax_ids" colspan="4"/>
<separator string="Default taxes" colspan="4"/>
<field name="tax_ids" colspan="4" nolabel="1"/>
</page>
<page string="Notes">
<field colspan="4" name="note" nolabel="1"/>
@ -1651,12 +1799,36 @@
</tree>
</field>
</record>
<record id="view_account_template_search" model="ir.ui.view">
<field name="name">account.account.template.search</field>
<field name="model">account.account.template</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Account Templates">
<group>
<filter icon="terp-sale" string="Receivale Accounts" domain="[('type','=','receivable')]"/>
<filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
<separator orientation="vertical"/>
<field name="code"/>
<field name="parent_id"/>
<field name="type"/>
<field name="user_type"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Internal Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
<filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
</group>
</search>
</field>
</record>
<record id="action_account_template_form" model="ir.actions.act_window">
<field name="name">Account Templates</field>
<field name="res_model">account.account.template</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
@ -1670,21 +1842,50 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Chart of Accounts Template">
<field name="name" select="1"/>
<field name="account_root_id" select="1"/>
<field name="bank_account_view_id" select="1"/>
<group>
<field name="name"/>
<field name="account_root_id"/>
<field name="bank_account_view_id"/>
<field name="tax_code_root_id"/>
<field name="tax_template_ids" colspan="4" readonly="1" />
</group>
<field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/>
<separator string="Properties" colspan="4"/>
<group>
<field name="property_account_receivable"/>
<field name="property_account_payable"/>
<field name="property_account_expense_categ" />
<field name="property_account_income_categ"/>
<field name="property_account_expense"/>
<field name="property_account_income"/>
</group>
</form>
</field>
</record>
<record id="view_account_chart_template_seacrh" model="ir.ui.view">
<field name="name">account.chart.template.search</field>
<field name="model">account.chart.template</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Chart of Account Templates">
<group>
<field name="name"/>
<field name="account_root_id"/>
<field name="bank_account_view_id"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
<filter string="Bank Account" icon="terp-folder-blue" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
<separator orientation="vertical"/>
<filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
<filter string="Payable Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_payable'}"/>
<separator orientation="vertical"/>
<filter string="Income Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_income_categ'}"/>
<filter string="Expense Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_expense_categ'}"/>
</group>
</search>
</field>
</record>
<record id="view_account_chart_template_tree" model="ir.ui.view">
<field name="name">account.chart.template.tree</field>
<field name="model">account.chart.template</field>
@ -1702,7 +1903,7 @@
<field name="name">Chart of Accounts Templates</field>
<field name="res_model">account.chart.template</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_accounts"/>
@ -1716,11 +1917,11 @@
<field name="arch" type="xml">
<form string="Account Tax Template">
<group colspan="4">
<field name="name" select="1"/>
<field name="description" select="1"/>
<field name="name"/>
<field name="description"/>
<newline/>
<field name="chart_template_id" select="1"/>
<field name="tax_group" select="1"/>
<field name="chart_template_id"/>
<field name="tax_group"/>
<field name="type"/>
<field name="type_tax_use"/>
</group>
@ -1774,6 +1975,27 @@
</tree>
</field>
</record>
<record id="view_account_tax_template_search" model="ir.ui.view">
<field name="name">account.tax.template.search</field>
<field name="model">account.tax.template</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Tax Templates">
<group col="10" colspan="4">
<filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
<filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
<separator orientation="vertical"/>
<filter icon="terp-folder-blue" string="Vat Taxes" domain="[('tax_group','=','vat')]" help="Vat Taxes"/>
<filter icon="terp-folder-yellow" string="Other Taxes" domain="[('tax_group','=','other')]" help="Other Taxes"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="description"/>
<field name="chart_template_id"/>
</group>
</search>
</field>
</record>
<record id="action_account_tax_template_form" model="ir.actions.act_window">
<field name="name">Tax Templates</field>
<field name="res_model">account.tax.template</field>
@ -1796,7 +2018,26 @@
</tree>
</field>
</record>
<record id="view_tax_code_template_search" model="ir.ui.view">
<field name="name">account.tax.code.template.search</field>
<field name="model">account.tax.code.template</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search tax template">
<group>
<field name="name" select="1"/>
<field name="code" select="1"/>
<field name="parent_id" select="1"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
</group>
</search>
</field>
</record>
<record id="view_tax_code_template_form" model="ir.ui.view">
<field name="name">account.tax.code.template.form</field>
<field name="model">account.tax.code.template</field>
@ -1808,7 +2049,8 @@
<field name="parent_id" select="1"/>
<field name="sign"/>
<newline/>
<field colspan="4" name="info"/>
<separator string="Description" colspan="4"/>
<field colspan="4" name="info" nolabel="1"/>
</form>
</field>
</record>
@ -1817,7 +2059,7 @@
<field name="name">Tax Code Templates</field>
<field name="res_model">account.tax.code.template</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
@ -1905,7 +2147,7 @@
<field name="name" select="1"/>
<field name="chart_template_id"/>
<newline/>
<field name="tax_ids" colspan="4">
<field name="tax_ids" colspan="4" nolabel="1">
<tree string="Taxes Mapping" editable="bottom">
<field name="tax_src_id" domain="[('parent_id','=',False)]"/>
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
@ -1915,7 +2157,7 @@
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
</form>
</field>
<field name="account_ids" colspan="4">
<field name="account_ids" colspan="4" nolabel="1">
<tree string="Accounts Mapping" editable="bottom">
<field name="account_src_id"/>
<field name="account_dest_id"/>

View File

@ -169,7 +169,7 @@ your own chart of account.
<record id="refund_sales_journal" model="account.journal">
<field name="name">x Sales Credit Note Journal</field>
<field name="code">SCNJ</field>
<field name="type">sale</field>
<field name="type">sale_refund</field>
<field name="refund_journal">True</field>
<field name="view_id" ref="account_journal_view"/>
<field name="sequence_id" ref="sequence_sale_journal"/>
@ -191,7 +191,7 @@ your own chart of account.
<record id="refund_expenses_journal" model="account.journal">
<field name="name">x Expenses Credit Notes Journal</field>
<field name="code">ECNJ</field>
<field name="type">purchase</field>
<field name="type">purchase_refund</field>
<field name="refund_journal">True</field>
<field name="view_id" ref="account_journal_view"/>
<field name="sequence_id" ref="sequence_purchase_journal"/>

View File

@ -51,11 +51,12 @@ class account_invoice(osv.osv):
type_inv = context.get('type', 'out_invoice')
user = self.pool.get('res.users').browse(cr, uid, uid)
company_id = context.get('company_id', user.company_id.id)
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale', 'in_refund': 'purchase'}
type2journal = {'out_invoice': 'sale', 'in_invoice': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'}
refund_journal = {'out_invoice': False, 'in_invoice': False, 'out_refund': True, 'in_refund': True}
journal_obj = self.pool.get('account.journal')
res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'sale')),
('company_id', '=', company_id),('refund_journal', '=', refund_journal.get(type_inv, False))],
('company_id', '=', company_id),
('refund_journal', '=', refund_journal.get(type_inv, False))],
limit=1)
if res:
return res[0]
@ -753,6 +754,8 @@ class account_invoice(osv.osv):
cur_obj = self.pool.get('res.currency')
context = {}
for inv in self.browse(cr, uid, ids):
if not inv.invoice_line:
raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
if inv.move_id:
continue
@ -774,7 +777,8 @@ class account_invoice(osv.osv):
# one move line per tax line
iml += ait_obj.move_line_get(cr, uid, inv.id)
entry_type=''
if inv.type in ('in_invoice', 'in_refund'):
ref = inv.reference
entry_type = 'journal_pur_voucher'
@ -1011,7 +1015,7 @@ class account_invoice(osv.osv):
def refund(self, cr, uid, ids, date=None, period_id=None, description=None):
invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id'])
new_ids = []
for invoice in invoices:
del invoice['id']
@ -1030,6 +1034,10 @@ class account_invoice(osv.osv):
tax_lines = self.pool.get('account.invoice.tax').read(cr, uid, invoice['tax_line'])
tax_lines = filter(lambda l: l['manual'], tax_lines)
tax_lines = self._refund_cleanup_lines(cr, uid, tax_lines)
if invoice['type'] == 'in_invoice':
refund_journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','purchase_refund')])
else:
refund_journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','sale_refund')])
if not date :
date = time.strftime('%Y-%m-%d')
invoice.update({
@ -1038,7 +1046,8 @@ class account_invoice(osv.osv):
'state': 'draft',
'number': False,
'invoice_line': invoice_lines,
'tax_line': tax_lines
'tax_line': tax_lines,
'journal_id': refund_journal_ids
})
if period_id :
invoice.update({
@ -1092,7 +1101,6 @@ class account_invoice(osv.osv):
ref = invoice.reference
else:
ref = self._convert_ref(cr, uid, invoice.number)
# Pay attention to the sign for both debit/credit AND amount_currency
l1 = {
'debit': direction * pay_amount>0 and direction * pay_amount,

View File

@ -10,9 +10,9 @@
<form string="Fiscal Position">
<field name="name" select="1"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<separator string="Mapping" colspan="4"/>
<newline/>
<field name="note" colspan="4"/>
<field name="tax_ids" colspan="4" widget="one2many_list">
<field name="tax_ids" colspan="2" widget="one2many_list" nolabel="1">
<tree string="Tax Mapping" editable="bottom">
<field name="tax_src_id" domain="[('parent_id','=',False)]"/>
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
@ -22,7 +22,7 @@
<field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
</form>
</field>
<field name="account_ids" colspan="4" widget="one2many_list">
<field name="account_ids" colspan="2" widget="one2many_list" nolabel="1">
<tree string="Account Mapping" editable="bottom">
<field name="account_src_id"/>
<field name="account_dest_id"/>
@ -32,6 +32,8 @@
<field name="account_dest_id"/>
</form>
</field>
<separator string="Notes" colspan="4"/>
<field name="note" colspan="4" nolabel="1"/>
</form>
</field>
</record>

View File

@ -24,7 +24,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Account">
<group col="8" colspan="4">
<group col="8" colspan="4">
<filter icon="terp-check" string="Current" domain="[('state','=','open')]" help="Current Accounts"/>
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
<separator orientation="vertical"/>
@ -32,7 +32,15 @@
<field name="code" select="1"/>
<field name="partner_id" select="1"/>
<field name="user_id" widget="selection"/>
</group>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Parent" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="Associated Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
</group>
</search>
</field>
</record>
@ -195,6 +203,14 @@
<field name="date" select="1"/>
<field name="user_id" widget="selection"/>
</group>
<separator orientation="vertical"/>
<newline/>
<group string="Group By..." expand="0">
<filter string="General Account" context="{'group_by':'general_account_id'}"/>
<filter string="Analytic Account" context="{'group_by':'account_id'}"/>
<filter string="Analytic Journal" context="{'group_by':'journal_id'}"/>
<filter string="Product" context="{'group_by':'product_id'}"/>
</group>
</search>
</field>
</record>
@ -277,7 +293,20 @@
</tree>
</field>
</record>
<record id="view_analytic_journal_search" model="ir.ui.view">
<field name="name">account.analytic.journal.search</field>
<field name="model">account.analytic.journal</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="analytic Journals">
<group expand="0" string="Group By...">
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
</group>
</search>
</field>
</record>
<record id="view_account_analytic_journal_form" model="ir.ui.view">
<field name="name">account.analytic.journal.form</field>
<field name="model">account.analytic.journal</field>
@ -296,7 +325,7 @@
<field name="name">Analytic Journals</field>
<field name="res_model">account.analytic.journal</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">tree,form,search</field>
</record>
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic"/>

View File

@ -241,7 +241,6 @@ class account_automatic_reconcile(osv.osv_memory):
'type': 'ir.actions.act_window',
'target': 'new',
'context': context,
'nodestroy':True,
}
account_automatic_reconcile()

View File

@ -7,16 +7,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Close states of Fiscal year and periods">
<group colspan="4" >
<field name="fy_id" domain = "[('state','=','draft')]"/>
<separator string="Are you sure you want to close the fiscal year ?" colspan="4"/>
<field name="sure"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-close" string="Close states" name="data_save" type="object"/>
<group width="380" height="180">
<group colspan="4">
<field name="fy_id" domain = "[('state','=','draft')]"/>
<separator string="Are you sure you want to close the fiscal year ?" colspan="4"/>
<field name="sure"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-close" string="Close states" name="data_save" type="object"/>
</group>
</group>
</form>
</field>

View File

@ -23,19 +23,19 @@ import time
from osv import fields, osv
from tools.translate import _
class account_move_line_reconcile_prompt(osv.osv_memory):
"""
Asks user he wants to reconcile entries or not.
"""
_name = 'account.move.line.reconcile.prompt'
_description = 'Account move line reconcile'
_columns = {
}
def ask_reconcilation(self, cr, uid, ids, context):
return self.pool.get('account.move.line.reconcile').partial_check(cr, uid, ids, context)
account_move_line_reconcile_prompt()
#class account_move_line_reconcile_prompt(osv.osv_memory):
# """
# Asks user he wants to reconcile entries or not.
# """
# _name = 'account.move.line.reconcile.prompt'
# _description = 'Account move line reconcile'
# _columns = {
# }
#
# def ask_reconcilation(self, cr, uid, ids, context):
# return self.pool.get('account.move.line.reconcile').partial_check(cr, uid, ids, context)
#
#account_move_line_reconcile_prompt()
class account_move_line_reconcile(osv.osv_memory):
"""

View File

@ -2,86 +2,130 @@
<openerp>
<data>
<record id="view_account_move_line_reconcile_prompt" model="ir.ui.view">
<field name="name">account.move.line.reconcile.prompt.form</field>
<field name="model">account.move.line.reconcile.prompt</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Reconciliation">
<separator string="Are you sure you want to reconcile entries?" colspan="4"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<!-- <record id="view_account_move_line_reconcile_prompt" model="ir.ui.view">-->
<!-- <field name="name">account.move.line.reconcile.prompt.form</field>-->
<!-- <field name="model">account.move.line.reconcile.prompt</field>-->
<!-- <field name="type">form</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <form string="Reconciliation">-->
<!-- <separator string="Are you sure you want to reconcile entries?" colspan="4"/>-->
<!-- <group colspan="4" col="6">-->
<!-- <label string ="" colspan="2"/>-->
<!---->
<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
<!-- <button icon="gtk-ok" string="Ok" name="ask_reconcilation" type="object" default_focus="1"/>-->
<!-- </group>-->
<!-- </form>-->
<!-- </field>-->
<!-- </record>-->
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Ok" name="ask_reconcilation" type="object" default_focus="1"/>
</group>
</form>
</field>
</record>
<!-- <record id="action_view_account_move_line_reconcile_prompt" model="ir.actions.act_window">-->
<!-- <field name="name">Reconcile Entries</field>-->
<!-- <field name="res_model">account.move.line.reconcile.prompt</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" ref="view_account_move_line_reconcile_prompt"/>-->
<!-- <field name="target">new</field>-->
<!-- </record>-->
<record id="action_view_account_move_line_reconcile_prompt" model="ir.actions.act_window">
<field name="name">Reconcile Entries</field>
<field name="res_model">account.move.line.reconcile.prompt</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_move_line_reconcile_prompt"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="action_account_move_line_reconcile_prompt_values">
<field name="model_id" ref="account.model_account_move_line" />
<field name="object" eval="1" />
<field name="name">Reconcile Entries</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_move_line_reconcile_prompt'))" />
<field name="key">action</field>
<field name="model">account.move.line</field>
</record>
<record id="view_account_move_line_reconcile_full" model="ir.ui.view">
<!-- <record model="ir.values" id="action_account_move_line_reconcile_prompt_values">-->
<!-- <field name="model_id" ref="account.model_account_move_line" />-->
<!-- <field name="object" eval="1" />-->
<!-- <field name="name">Reconcile Entries</field>-->
<!-- <field name="key2">client_action_multi</field>-->
<!-- <field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_move_line_reconcile_prompt'))" />-->
<!-- <field name="key">action</field>-->
<!-- <field name="model">account.move.line</field>-->
<!-- </record>-->
<record id="view_account_move_line_reconcile_full" model="ir.ui.view">
<field name="name">account.move.line.reconcile.full.form</field>
<field name="model">account.move.line.reconcile</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Reconciliation">
<separator string="Reconciliation transactions" colspan="4"/>
<field name="trans_nbr"/>
<newline/>
<field name="credit"/>
<field name="debit"/>
<separator string="Write-Off" colspan="4"/>
<field name="writeoff"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1"/>
</group>
<group height="210" width="550">
<separator string="Reconciliation transactions" colspan="4"/>
<field name="trans_nbr"/>
<newline/>
<field name="credit"/>
<field name="debit"/>
<separator string="Write-Off" colspan="4"/>
<field name="writeoff"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1" attrs="{'invisible':[('writeoff','!=',0)]}"/>
<button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" attrs="{'invisible':[('writeoff','==',0)]}"/>
<button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object" attrs="{'invisible':[('writeoff','==',0)]}"/>
</group>
</group>
</form>
</field>
</record>
<record id="view_account_move_line_reconcile_partial" model="ir.ui.view">
<field name="name">account.move.line.reconcile.partial.form</field>
<field name="model">account.move.line.reconcile</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Reconciliation">
<separator string="Reconciliation transactions" colspan="4"/>
<field name="trans_nbr"/>
<newline/>
<field name="credit"/>
<field name="debit"/>
<separator string="Write-Off" colspan="4"/>
<field name="writeoff"/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" default_focus="1"/>
<button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object"/>
</group>
</form>
</field>
<record id="action_view_account_move_line_reconcile" model="ir.actions.act_window">
<field name="name">Reconcile Entries</field>
<field name="res_model">account.move.line.reconcile</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_move_line_reconcile_full"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="action_account_move_line_reconcile_prompt_values">
<field name="model_id" ref="account.model_account_move_line" />
<field name="object" eval="1" />
<field name="name">Reconcile Entries</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_move_line_reconcile'))" />
<field name="key">action</field>
<field name="model">account.move.line</field>
</record>
<!-- <record id="view_account_move_line_reconcile_full" model="ir.ui.view">-->
<!-- <field name="name">account.move.line.reconcile.full.form</field>-->
<!-- <field name="model">account.move.line.reconcile</field>-->
<!-- <field name="type">form</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <form string="Reconciliation">-->
<!-- <separator string="Reconciliation transactions" colspan="4"/>-->
<!-- <field name="trans_nbr"/>-->
<!-- <newline/>-->
<!-- <field name="credit"/>-->
<!-- <field name="debit"/>-->
<!-- <separator string="Write-Off" colspan="4"/>-->
<!-- <field name="writeoff"/>-->
<!-- <group colspan="4" col="6">-->
<!-- <label string ="" colspan="2"/>-->
<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
<!-- <button icon="terp-stock_effects-object-colorize" string="Reconcile" name="trans_rec_reconcile_full" type="object" default_focus="1"/>-->
<!-- </group>-->
<!-- </form>-->
<!-- </field>-->
<!-- </record>-->
<!---->
<!-- <record id="view_account_move_line_reconcile_partial" model="ir.ui.view">-->
<!-- <field name="name">account.move.line.reconcile.partial.form</field>-->
<!-- <field name="model">account.move.line.reconcile</field>-->
<!-- <field name="type">form</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <form string="Reconciliation">-->
<!-- <separator string="Reconciliation transactions" colspan="4"/>-->
<!-- <field name="trans_nbr"/>-->
<!-- <newline/>-->
<!-- <field name="credit"/>-->
<!-- <field name="debit"/>-->
<!-- <separator string="Write-Off" colspan="4"/>-->
<!-- <field name="writeoff"/>-->
<!-- <group colspan="4" col="6">-->
<!-- <label string ="" colspan="2"/>-->
<!-- <button icon="gtk-cancel" special="cancel" string="Cancel"/>-->
<!-- <button icon="gtk-ok" string="Reconcile With Write-Off" name="trans_rec_addendum_writeoff" type="object" default_focus="1"/>-->
<!-- <button icon="gtk-ok" string="Partial Reconcile" name="trans_rec_reconcile_partial_reconcile" type="object"/>-->
<!-- </group>-->
<!-- </form>-->
<!-- </field>-->
<!-- </record>-->
<record id="account_move_line_reconcile_writeoff" model="ir.ui.view">
<field name="name">account.move.line.reconcile.writeoff.form</field>

View File

@ -8,9 +8,10 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Entries From Models">
<group height="240" width="510">
<group height="250" width="470">
<separator string="This wizard will create entries from Models" colspan="4"/>
<field name="model"/>
<separator string="Account Models" colspan="4"/>
<field name="model" nolabel="1"/>
<separator colspan="4"/>
<group colspan="4" col="2">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>

View File

@ -19,7 +19,7 @@
#
##############################################################################
import project
import analytic
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,251 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * analytic
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-06-18 10:59:19+0000\n"
"PO-Revision-Date: 2010-06-18 10:59:19+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr ""
#. module: analytic
#: help:account.analytic.line,amount_currency:0
msgid "The amount expressed in the related account currency if not equal to the company one."
msgstr ""
#. module: analytic
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
msgstr ""
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
msgstr ""
#. module: analytic
#: help:account.analytic.line,currency_id:0
msgid "The related account currency if not equal to the company one."
msgstr ""
#. module: analytic
#: model:ir.module.module,description:analytic.module_meta_information
msgid "Module for defining analytic accounting object.\n"
" "
msgstr ""
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
msgstr ""
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Draft"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
msgstr ""
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
msgstr ""
#. module: analytic
#: help:account.analytic.account,state:0
msgid "* When an account is created its in 'Draft' state. \n"
"* If any associated partner is there, it can be in 'Open' state. \n"
"* If any pending balance is there it can be in 'Pending'. \n"
"* And finally when all the transactions are over, it can be in 'Close' state. \n"
"* The project can be in either if the states 'Template' and 'Running'.\n"
" If it is template then we can make projects based on the template projects. If its in 'Running' state it is a normal project. \n"
" If it is to be reviewed then the state is 'Pending'.\n"
" When the project is completed the state is set to 'Done'."
msgstr ""
#. module: analytic
#: field:account.analytic.account,type:0
msgid "Account Type"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
msgstr ""
#. module: analytic
#: model:ir.model,name:analytic.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: analytic
#: field:account.analytic.account,description:0
#: field:account.analytic.line,name:0
msgid "Description"
msgstr ""
#. module: analytic
#: help:account.analytic.line,amount:0
msgid "Calculated by multiplying the quantity and the price given in the Product's cost price."
msgstr ""
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
msgstr ""
#. module: analytic
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Quantity"
msgstr ""
#. module: analytic
#: field:account.analytic.line,user_id:0
msgid "User"
msgstr ""
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr ""
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
msgstr ""
#. module: analytic
#: field:account.analytic.account,currency_id:0
#: field:account.analytic.line,currency_id:0
msgid "Account currency"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
msgstr ""
#. module: analytic
#: help:account.analytic.account,quantity_max:0
msgid "Sets the higher limit of quantity of hours."
msgstr ""
#. module: analytic
#: field:account.analytic.account,credit:0
msgid "Credit"
msgstr ""
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
msgstr ""
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
msgstr ""
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
msgstr ""
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
msgstr ""
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
msgstr ""
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
msgstr ""
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Account Code"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
msgstr ""
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
msgstr ""
#. module: analytic
#: field:account.analytic.line,account_id:0
#: model:ir.model,name:analytic.model_account_analytic_account
#: model:ir.module.module,shortdesc:analytic.module_meta_information
msgid "Analytic Account"
msgstr ""
#. module: analytic
#: field:account.analytic.account,company_currency_id:0
msgid "Currency"
msgstr ""
#. module: analytic
#: field:account.analytic.line,amount_currency:0
msgid "Amount currency"
msgstr ""
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
msgstr ""
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
msgstr ""

View File

@ -0,0 +1,251 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * analytic
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-06-18 11:01:12+0000\n"
"PO-Revision-Date: 2010-06-18 11:01:12+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr ""
#. module: analytic
#: help:account.analytic.line,amount_currency:0
msgid "The amount expressed in the related account currency if not equal to the company one."
msgstr ""
#. module: analytic
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
msgstr ""
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
msgstr ""
#. module: analytic
#: help:account.analytic.line,currency_id:0
msgid "The related account currency if not equal to the company one."
msgstr ""
#. module: analytic
#: model:ir.module.module,description:analytic.module_meta_information
msgid "Module for defining analytic accounting object.\n"
" "
msgstr ""
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
msgstr ""
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Draft"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
msgstr ""
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
msgstr ""
#. module: analytic
#: help:account.analytic.account,state:0
msgid "* When an account is created its in 'Draft' state. \n"
"* If any associated partner is there, it can be in 'Open' state. \n"
"* If any pending balance is there it can be in 'Pending'. \n"
"* And finally when all the transactions are over, it can be in 'Close' state. \n"
"* The project can be in either if the states 'Template' and 'Running'.\n"
" If it is template then we can make projects based on the template projects. If its in 'Running' state it is a normal project. \n"
" If it is to be reviewed then the state is 'Pending'.\n"
" When the project is completed the state is set to 'Done'."
msgstr ""
#. module: analytic
#: field:account.analytic.account,type:0
msgid "Account Type"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
msgstr ""
#. module: analytic
#: model:ir.model,name:analytic.model_account_analytic_line
msgid "Analytic Line"
msgstr ""
#. module: analytic
#: field:account.analytic.account,description:0
#: field:account.analytic.line,name:0
msgid "Description"
msgstr ""
#. module: analytic
#: help:account.analytic.line,amount:0
msgid "Calculated by multiplying the quantity and the price given in the Product's cost price."
msgstr ""
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
msgstr ""
#. module: analytic
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Quantity"
msgstr ""
#. module: analytic
#: field:account.analytic.line,user_id:0
msgid "User"
msgstr ""
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr ""
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
msgstr ""
#. module: analytic
#: field:account.analytic.account,currency_id:0
#: field:account.analytic.line,currency_id:0
msgid "Account currency"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
msgstr ""
#. module: analytic
#: help:account.analytic.account,quantity_max:0
msgid "Sets the higher limit of quantity of hours."
msgstr ""
#. module: analytic
#: field:account.analytic.account,credit:0
msgid "Credit"
msgstr ""
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
msgstr ""
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
msgstr ""
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
msgstr ""
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
msgstr ""
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
msgstr ""
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
msgstr ""
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Account Code"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
msgstr ""
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
msgstr ""
#. module: analytic
#: field:account.analytic.line,account_id:0
#: model:ir.model,name:analytic.model_account_analytic_account
#: model:ir.module.module,shortdesc:analytic.module_meta_information
msgid "Analytic Account"
msgstr ""
#. module: analytic
#: field:account.analytic.account,company_currency_id:0
msgid "Currency"
msgstr ""
#. module: analytic
#: field:account.analytic.line,amount_currency:0
msgid "Amount currency"
msgstr ""
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Associated Partner"
msgstr ""
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
msgstr ""
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
msgstr ""

View File

@ -177,7 +177,7 @@ class crm_send_new_email(osv.osv_memory):
"%s <%s>" % (case.user_id.name, case.user_id.address_id.email)) or \
tools.config.get('email_from',False)})
if 'subject' in fields:
res.update({'subject': '[%s] %s' %(str(case.id), case.name or '')})
res.update({'subject': '[%s] %s' % (str(case.id), context.get('subject', case.name) or '')})
if 'email_cc' in fields:
res.update({'email_cc': case.email_cc or ''})
if 'text' in fields:

View File

@ -62,6 +62,7 @@ class partner_vat(osv.osv_memory):
obj_vat_lclient = self.pool.get('vat.listing.clients')
obj_model_data = self.pool.get('ir.model.data')
data = self.read(cursor, user, ids)[0]
context['test_xml'] = data['test_xml']
period = obj_period.search(cursor, user, [('fiscalyear_id', '=', data['fyear'])], context=context)
p_id_list = obj_partner.search(cursor, user, [('vat_subjected', '!=', False)], context=context)
if not p_id_list:
@ -196,7 +197,7 @@ class partner_vat_list(osv.osv_memory):
data_file = '<?xml version="1.0"?>\n<VatList xmlns="http://www.minfin.fgov.be/VatList" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.minfin.fgov.be/VatList VatList.xml" RecipientId="VAT-ADMIN" SenderId="'+ str(company_vat) + '"'
data_file +=' ControlRef="'+ cref + '" MandataireId="'+ tools.ustr(context['mand_id']) + '" SenderDate="'+ str(sender_date)+ '"'
if ['test_xml']:
if context['test_xml']:
data_file += ' Test="0"'
data_file += ' VersionTech="1.2">'
data_file += '\n<AgentRepr DecNumber="1">\n\t<CompanyInfo>\n\t\t<VATNum>'+str(company_vat)+'</VATNum>\n\t\t<Name>'+tools.ustr(obj_cmpny.name)+'</Name>\n\t\t<Street>'+ tools.ustr(street) +'</Street>\n\t\t<CityAndZipCode>'+ tools.ustr(zip_city) +'</CityAndZipCode>'
@ -225,7 +226,7 @@ class partner_vat_list(osv.osv_memory):
seq +=1
sum_tax +=line['amount']
sum_turnover +=line['turnover']
data_clientinfo +='\n<ClientList SequenceNum="'+str(seq)+'">\n\t<CompanyInfo>\n\t\t<VATNum>'+line['vat'] +'</VATNum>\n\t\t<Country>'+tools.ustr(line['country']) +'</Country>\n\t</CompanyInfo>\n\t<Amount>'+str(int(line['amount'] * 100)) +'</Amount>\n\t<TurnOver>'+str(int(line['turnover'] * 100)) +'</TurnOver>\n</ClientList>'
data_clientinfo +='\n<ClientList SequenceNum="'+str(seq)+'">\n\t<CompanyInfo>\n\t\t<VATNum>'+str(line['vat']) +'</VATNum>\n\t\t<Country>'+tools.ustr(line['country']) +'</Country>\n\t</CompanyInfo>\n\t<Amount>'+str(int(line['amount'] * 100)) +'</Amount>\n\t<TurnOver>'+str(int(line['turnover'] * 100)) +'</TurnOver>\n</ClientList>'
data_decl ='\n<DeclarantList SequenceNum="1" DeclarantNum="'+ dnum + '" ClientNbr="'+ str(seq) +'" TurnOverSum="'+ str(int(sum_turnover * 100)) +'" TaxSum="'+ str(int(sum_tax * 100)) +'" />'
data_file += tools.ustr(data_decl) + tools.ustr(data_comp) + tools.ustr(data_period) + tools.ustr(data_clientinfo) + '\n</VatList>'

View File

@ -195,7 +195,7 @@ class pos_order(osv.osv):
line.price_unit * \
(1-(line.discount or 0.0)/100.0), line.qty),
res[order.id]['amount_tax'])
else:
elif line.qty != 0.0:
for c in tax_obj.compute_all(cr, uid, line.product_id.taxes_id, line.price_unit * (1-(line.discount or 0.0)/100.0), line.qty, line.product_id, line.order_id.partner_id)['taxes']:
val += c['amount']
res[order.id]['amount_tax'] = cur_obj.round(cr, uid, cur, val)
@ -1056,11 +1056,13 @@ class pos_order_line(osv.osv):
return res
def _amount_line_ttc(self, cr, uid, ids, field_name, arg, context):
res = {}
res = dict.fromkeys(ids, 0.0)
account_tax_obj = self.pool.get('account.tax')
for line in self.browse(cr, uid, ids):
tax_amount = 0.0
taxes = [t for t in line.product_id.taxes_id]
if line.qty == 0.0:
continue
computed_taxes = account_tax_obj.compute_all(cr, uid, taxes, line.price_unit, line.qty)['taxes']
for tax in computed_taxes:
tax_amount += tax['amount']

View File

@ -3,7 +3,7 @@
<data>
<menuitem icon="STOCK_PREFERENCES" id="base.menu_tools" name="Tools" sequence="28"/>
<menuitem name="Surveys" id="menu_surveys" parent="base.menu_tools"
<menuitem name="Surveys" id="menu_surveys" parent="base.menu_tools"
groups="group_survey_manager,group_survey_user" sequence="2"/>
<menuitem name="Define Surveys" id="menu_define_survey"
groups="group_survey_manager"
@ -40,8 +40,9 @@
<field name="title" select="1"/>
<field name="sequence" groups="base.group_extended"/>
<field name="note" colspan="4" nolabel="1"/>
<field name="question_ids" colspan="4" nolabel="1" context="{'line_order': question_ids}">
<form string="Survey Question">
<field name="question_ids" height="200" width="200" colspan="4" nolabel="1" context="{'line_order': question_ids}">
<form string="Survey Question" >
<group col="6" colspan="6" height="600" width="200">
<field name="question" colspan="4" select="1"/>
<field name="sequence"/>
<field name="tot_resp"/>
@ -170,6 +171,7 @@
</group>
</page>
</notebook>
</group>
</form>
<tree string="Survey Question">
<field name="sequence" string="Seq"/>
@ -230,11 +232,11 @@
<field name="model">survey</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Survey">
<tree colors="gray:state in ('close')" string="Survey">
<field name="title" select="1"/>
<field name="type" select="1"/>
<field name="date_open" select="1" string="Open Date"/>
<field name="responsible_id"/>
<field name="date_open" select="1" string="Open Date"/>
<field name="tot_start_survey" string="Started"/>
<field name="tot_comp_survey" string="Completed"/>
<field name="state" select="1"/>
@ -267,6 +269,12 @@
<filter string="MY" icon="terp-partner" domain="[('responsible_id','=',uid)]"/>
</field>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="20">
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'responsible_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
@ -457,6 +465,22 @@
</field>
</record>
<record id="view_survey_page_filter" model="ir.ui.view">
<field name="name">survey.page.list.select</field>
<field name="model">survey.page</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Survey Page">
<field name="title"/>
<field name="survey_id"/>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="20">
<filter string="Survey" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'survey_id'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_survey_page_form">
<field name="name">Survey Pages</field>
<field name="res_model">survey.page</field>
@ -668,9 +692,9 @@
<field name="search_view_id" ref="survey_question_search"/>
</record>
<!--menuitem name="Survey Question" id="menu_survey_question_form1"
action="action_survey_question_form" parent='menu_defination'
groups="group_survey_manager"/-->
<!-- <menuitem name="Survey Question" id="menu_survey_question_form1"-->
<!-- action="action_survey_question_form" parent='menu_define_survey'-->
<!-- groups="group_survey_manager"/>-->
<record model="ir.ui.view" id="survey_question_wizard_test">
<field name="name">survey_question_wizard_test</field>

View File

@ -62,15 +62,17 @@ class survey_name_wiz(osv.osv_memory):
for sur in surv_obj.browse(cr, uid, [context.get('survey_id',False)]):
result.append((sur.id, sur.title))
return result
group_id = self.pool.get('res.groups').search(cr, uid, [('name', '=', 'Survey / Manager')])
group_id = self.pool.get('res.groups').search(cr, uid, [('name', 'in', ('Survey / Manager','Survey / User'))])
user_obj = self.pool.get('res.users')
user_rec = user_obj.read(cr, uid, uid)
for sur in surv_obj.browse(cr, uid, surv_obj.search(cr, uid, [])):
if sur.state == 'open':
if group_id[0] in user_rec['groups_id']:
result.append((sur.id, sur.title))
elif sur.id in user_rec['survey_id']:
result.append((sur.id, sur.title))
# if group_id[0] in user_rec['groups_id']:
for i in group_id:
if i in user_rec['groups_id']:
result.append((sur.id, sur.title))
elif sur.id in user_rec['survey_id']:
result.append((sur.id, sur.title))
return result
_columns = {