[MERGE] Merge with dev-addons3 branch

bzr revid: psi@tinyerp.co.in-20100527132305-ciz2mdw054khsc9j
This commit is contained in:
psi (Open ERP)
2010-05-27 18:53:05 +05:30
198 changed files with 4480 additions and 1921 deletions
+1
View File
@@ -32,5 +32,6 @@ import report
import product
import sequence
import company
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -917,7 +917,7 @@ class account_move(osv.osv):
'to_check': fields.boolean('To Be Verified'),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner"),
'amount': fields.function(_amount_compute, method=True, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),
'date': fields.date('Date', required=True),
'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}),
'type': fields.selection([
('pay_voucher','Cash Payment'),
('bank_pay_voucher','Bank Payment'),
+1 -1
View File
@@ -167,7 +167,7 @@ class res_partner(osv.osv):
_columns = {
'contract_ids': fields.one2many('account.analytic.account', \
'partner_id', 'Contracts'),
'partner_id', 'Contracts', readonly=True),
}
res_partner()
+1 -1
View File
@@ -356,7 +356,7 @@
<field name="amount_total"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="12" col="10">
<group expand="1" string="Group By...">
<filter string="Journal" icon="terp-account" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-account" domain="[]" context="{'group_by':'period_id'}"/>
<separator orientation="vertical"/>
+32 -23
View File
@@ -23,21 +23,30 @@
<report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>
<report id="account_move_line_list" model="account.tax.code" name="account.tax.code.entries" rml="account/report/account_tax_code.rml" string="All Entries"/>
<report
auto="False"
id="account_vat_declaration"
menu="False"
model="account.tax.code"
name="account.vat.declaration"
rml="account/report/tax_report.rml"
string="Taxes Report"/>
auto="False"
id="account_vat_declaration"
menu="False"
model="account.tax.code"
name="account.vat.declaration"
rml="account/report/tax_report.rml"
string="Taxes Report"/>
<report id="report_account_voucher_new"
string="Print Voucher"
model="account.move"
name="account.move.voucher"
rml="account/report/voucher_print.rml"
auto="False"
header = "False"
menu="True"/>
<menuitem
id="menu_tax_report"
name="Taxes"
parent="account.menu_finance_generic_reporting" sequence="3"/>
<!-- <wizard
id="wizard_vat_declaration"
menu="False"
@@ -68,20 +77,20 @@
<report id="account_account_balance_compare"
string="Account balance"
model="account.account"
name="account.balance.account.balance"
rml="account/report/compare_account_balance.rml"
auto="False"
menu="False"/>
string="Account balance"
model="account.account"
name="account.balance.account.balance"
rml="account/report/compare_account_balance.rml"
auto="False"
menu="False"/>
<report id="account_account_balance_landscape"
string="Account balance"
model="account.account"
name="account.account.balance.landscape"
rml="account/report/account_balance_landscape.rml"
auto="False"
menu="False"/>
<report id="account_account_balance_landscape"
string="Account balance"
model="account.account"
name="account.account.balance.landscape"
rml="account/report/account_balance_landscape.rml"
auto="False"
menu="False"/>
<!--
+96 -71
View File
@@ -239,7 +239,7 @@
<field name="arch" type="xml">
<form string="Journal View">
<field colspan="4" name="name" select="1"/>
<field colspan="4" name="columns_id" widget="one2many_list"/>
<field colspan="4" name="columns_id" nolabel="1" widget="one2many_list"/>
</form>
</field>
</record>
@@ -277,20 +277,41 @@
<notebook colspan="4">
<page string="General Information">
<field name="view_id"/>
<field name="currency"/>
<field name="sequence_id"/>
<field name="invoice_sequence_id"/>
<field name="default_debit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="user_id" groups="base.group_extended"/>
<field name="allow_date" groups="base.group_extended"/>
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
<field name="centralisation"/>
<field name="group_invoice_lines"/>
<field name="update_posted"/>
<field name="entry_posted"/>
<group colspan="2" col="2">
<separator string="Journal View" colspan="4"/>
<field name="view_id"/>
</group>
<group colspan="2" col="2">
<separator string="Sequence" colspan="4"/>
<field name="sequence_id"/>
<field name="invoice_sequence_id"/>
</group>
<group colspan="2" col="2">
<separator string="Accounts" colspan="4"/>
<field name="default_debit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
</group>
<group colspan="2" col="2">
<separator string="Validations" colspan="4"/>
<field name="allow_date" groups="base.group_extended"/>
</group>
<group colspan="2" col="2">
<separator string="Company" colspan="4"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="user_id" groups="base.group_extended"/>
<field name="currency"/>
</group>
<group colspan="2" col="2">
<separator string="Other Configuration" colspan="4"/>
<field name="centralisation"/>
<field name="group_invoice_lines"/>
<field name="update_posted"/>
<field name="entry_posted"/>
</group>
</page>
<page string="Entry Controls">
<separator colspan="4" string="Accounts Type Allowed (empty for no control)"/>
@@ -342,7 +363,7 @@
<group colspan="2" col="3">
<!-- <button name="%(action_view_account_statement_from_invoice)d"-->
<!-- string="Import Invoice" type="action" attrs="{'invisible':[('state','=','confirm')]}" icon="gtk-open"/>-->
<button name="button_import_invoice" string="Import Invoice" attrs="{'invisible':[('state','=','confirm')]}" type="object" icon="gtk-apply"/>
<button name="button_import_invoice" string="Import Invoice" attrs="{'invisible':[('state','=','confirm')]}" type="object" icon="gtk-apply"/>
</group>
<newline/>
<field name="balance_start"/>
@@ -880,65 +901,69 @@
<field name="period_id"/>
<field name="type"/>
<field name="ref" select="1"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="date" select="1" groups="base.group_extended"/>
<field name="to_check" groups="base.group_extended"/>
</group>
<field name="partner_id" invisible="1" select="1"/>
<field name="amount" invisible="1" select="1"/>
<notebook colspan="4">
<page string="Journal Entries Lines">
<field colspan="4" height="200" name="line_id" nolabel="1" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
<form string="Account Entry Line">
<separator colspan="4" string="General Information"/>
<field name="name" select="1"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field colspan="4" height="260" name="line_id" nolabel="1" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
<form string="Account Entry Line">
<separator colspan="4" string="General Information"/>
<field name="name" select="1"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field name="debit" select="1"/>
<field name="credit" select="1"/>
<field name="date" select="1"/>
<field name="debit" select="1"/>
<field name="credit" select="1"/>
<field name="date" select="1"/>
<separator colspan="4" string="Optional Information"/>
<field name="currency_id"/>
<field name="amount_currency"/>
<field name="quantity" select="1"/>
<newline/>
<field name="date_maturity"/>
<field name="date_created"/>
<separator colspan="4" string="Optional Information"/>
<field name="currency_id"/>
<field name="amount_currency"/>
<field name="quantity" select="1"/>
<newline/>
<field name="date_maturity"/>
<field name="date_created"/>
<separator colspan="4" string="State"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
<field name="statement_id"/>
<field name="state"/>
</form>
<tree editable="top" string="Account Entry Line">
<field name="ref"/>
<field name="invoice"/>
<field name="name"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="date_maturity"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="analytic_account_id"/>
<field name="amount_currency" groups="base.group_extended"/>
<field name="currency_id" groups="base.group_extended"/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="state"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id" groups="base.group_extended"/>
</tree>
</field>
<separator colspan="4" string="Narration"/>
<field name="narration" colspan="4" nolabel="1"/>
<separator colspan="4" string="State"/>
<field name="state" select="1"/>
<group col="2" colspan="2">
<button name="button_validate" states="draft" string="Validate" type="object" icon="gtk-execute"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
<separator colspan="4" string="State"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
<field name="statement_id"/>
<field name="state"/>
</form>
<tree editable="top" string="Account Entry Line">
<field name="ref"/>
<field name="invoice"/>
<field name="name"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="date_maturity"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="analytic_account_id"/>
<field name="amount_currency" groups="base.group_extended"/>
<field name="currency_id" groups="base.group_extended"/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="state"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id" groups="base.group_extended"/>
</tree>
</field>
<separator colspan="4" string="Narration"/>
<field name="narration" colspan="4" nolabel="1"/>
<field name="state" select="1"/>
<group col="2" colspan="2">
<button name="button_validate" states="draft" string="Validate" type="object" icon="gtk-execute"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
</page>
<page string="Other Information">
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="date" select="1" groups="base.group_extended"/>
<field name="to_check" groups="base.group_extended"/>
<field name="partner_id" invisible="1" select="1"/>
<field name="amount" invisible="1" select="1"/>
</page>
</notebook>
</form>
</field>
</record>
+1 -2
View File
@@ -23,7 +23,6 @@ import time
import decimal_precision as dp
import netsvc
from osv import fields, osv, orm
import pooler
from tools import config
@@ -1525,7 +1524,7 @@ class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices'),
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True),
}
res_partner()
+18 -1
View File
@@ -74,7 +74,7 @@
<page string="Accounting" position="inside">
<group col="2" colspan="2">
<separator string="Customer Accounting Properties" colspan="2"/>
<field name="property_account_receivable"/>
<field name="property_account_receivable" />
<field name="property_account_position" widget="selection"/>
<field name="property_payment_term" widget="selection"/>
</group>
@@ -118,10 +118,27 @@
<field name="acc_number"/>
</tree>
</field>
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
</page>
</notebook>
</field>
</record>
<!-- Partners info tab view-->
<record id="view_account_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.account.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Project">
<field name="contract_ids" colspan="4" nolabel="1" />
</page>
</notebook>
</field>
</record>
</data>
</openerp>
+4 -19
View File
@@ -67,7 +67,7 @@
<field name="name" select="1" colspan="4"/>
<field name="code" select="1"/>
<field name="parent_id" on_change="on_change_parent(parent_id)"/>
<field name="company_id" select="2" widget="selection"/>
<field name="company_id" select="2" widget="selection" groups="base.group_multi_company"/>
<field name="type" select="2"/>
<field name="company_currency_id" select="2"/>
</group>
@@ -153,7 +153,7 @@
<field name="ref" select="2"/>
<field name="currency_id" select="2"/>
<field name="amount_currency" select="2"/>
<field name="company_id" select="2"/>
<field name="company_id" select="2" groups="base.group_multi_company"/>
<newline/>
<field name="product_id" select="2"/>
<field name="product_uom_id" select="2"/>
@@ -178,7 +178,7 @@
<field name="ref"/>
<field name="currency_id" />
<field name="amount_currency" />
<field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" groups="base.group_multi_company"/>
</tree>
</field>
</record>
@@ -288,7 +288,7 @@
<field name="code" select="1"/>
<field name="type" select="2"/>
<field name="active" select="2"/>
<field name="company_id" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</form>
</field>
</record>
@@ -443,21 +443,6 @@
</graph>
</field>
</record>
<!-- Partners inherited form -->
<record id="view_contract_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.contract.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="invoice_ids" position="after">
<field name="contract_ids" colspan="4" nolabel="1" />
</field>
</field>
</record>
</data>
</openerp>
+1
View File
@@ -40,5 +40,6 @@ import account_analytic_report
import account_account_report
import account_entries_report
import account_analytic_entries_report
import voucher_print
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -57,22 +57,23 @@
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<field name="type" />
<field name="user_type" widget="selection"/>
<field name="parent_account_id" />
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Account" name="Account" icon="terp-account" context="{'group_by':'name'}"/>
<filter string="Code" icon="terp-account" context="{'group_by':'code'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Currencies Rate" icon="terp-account" context="{'group_by':'currency_mode'}"/>
<group expand="1" string="Group By...">
<filter string="Account" name="Account" icon="terp-account" context="{'group_by':'name'}"/>
<filter string="Code" icon="terp-account" context="{'group_by':'code'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Currencies Rate" icon="terp-account" context="{'group_by':'currency_mode'}"/>
<filter string="Internal Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="Account Type" icon="terp-account" context="{'group_by':'user_type'}"/>
<filter string="Parent Account" icon="terp-account" context="{'group_by':'parent_account_id'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="type" />
<field name="user_type" widget="selection"/>
<field name="parent_account_id" />
</group>
</search>
</field>
</record>
@@ -55,17 +55,7 @@
<field name="currency_id"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<field name="account_id" />
<field name="general_account_id" widget="selection"/>
<field name="journal_id" widget="selection"/>
<separator orientation="vertical"/>
<field name="product_id" />
<field name="product_uom_id" widget="selection"/>
<field name="company_id" widget="selection" groups="base.multi_company"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Currency" icon="terp-account" context="{'group_by':'currency_id'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.multi_company"/>
@@ -81,6 +71,17 @@
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="account_id" />
<field name="general_account_id" widget="selection"/>
<field name="journal_id" widget="selection"/>
<separator orientation="vertical"/>
<field name="product_id" />
<field name="product_uom_id" widget="selection"/>
<field name="company_id" widget="selection" groups="base.multi_company"/>
</group>
</search>
</field>
</record>
@@ -58,7 +58,7 @@
<filter icon="terp-account"
string="Pending"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
@@ -69,25 +69,6 @@
<field name="partner_id"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter icon="terp-account"
string="Close"
domain="[('state','=','close')]"/>
<filter icon="terp-account"
string="Template"
domain="[('state','=','template')]"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="parent_id"/>
<field name="journal_id" widget="selection"/>
<newline/>
<field name="product_id" />
<field name="type"/>
<separator orientation="vertical"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="User" name="User" icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Associated Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
@@ -104,7 +85,36 @@
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
</search>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12" groups="base.group_extended">
<filter icon="terp-account"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-account"
string="Open"
domain="[('state','=','open')]"/>
<filter icon="terp-account"
string="Pending"
domain="[('state','=','pending')]"/>
<filter icon="terp-account"
string="Close"
domain="[('state','=','close')]"/>
<filter icon="terp-account"
string="Template"
domain="[('state','=','template')]"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="parent_id"/>
<field name="journal_id" widget="selection"/>
<newline/>
<field name="product_id" />
<field name="type"/>
<separator orientation="vertical"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
</search>
</field>
</record>
<record id="view_account_analytic_report_search" model="ir.ui.view">
@@ -74,25 +74,6 @@
<field name="partner_id" />
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter string="Posted"
icon="terp-account"
domain="[('state','=','posted')]"
help = "Posted tasks"/>
<field name="state_2"/>
<separator orientation="vertical"/>
<field name="period_id" widget="selection"/>
<field name="period_id2" widget="selection"/>
<field name="type"/>
<field name="product_id" />
<field name="analytic_account_id"/>
<newline/>
<separator orientation="vertical"/>
<field name="date_created"/>
<field name="date"/>
<field name="date_maturity"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Journal" name="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Account" name="Account" icon="terp-account" context="{'group_by':'account_id'}"/>
@@ -111,6 +92,25 @@
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter string="Posted"
icon="terp-account"
domain="[('state','=','posted')]"
help = "Posted tasks"/>
<field name="state_2"/>
<separator orientation="vertical"/>
<field name="period_id" widget="selection"/>
<field name="period_id2" widget="selection"/>
<field name="type"/>
<field name="product_id" />
<field name="analytic_account_id"/>
<newline/>
<separator orientation="vertical"/>
<field name="date_created"/>
<field name="date"/>
<field name="date_maturity"/>
</group>
</search>
</field>
</record>
@@ -56,10 +56,10 @@
<field name="arch" type="xml">
<search string="Invoices">
<group col="10" colspan="12">
<filter icon="terp-account" string="Last 365 Days"
<filter icon="gtk-media-rewind" string="Last 365 Days"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of last 365 days"/>
<filter icon="terp-account" string="Last 30 Days"
<filter icon="gtk-media-rewind" string="Last 30 Days"
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of last 30 days"/>
@@ -94,29 +94,8 @@
domain="[('user_id','=',False)]"/>
</field>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<field name="type"/>
<field name="currency_id" widget="selection"/>
<field name="partner_bank" widget="selection"/>
<field name="fiscal_position" widget="selection"/>
<separator orientation="vertical"/>
<field name="address_contact_id"/>
<field name="account_id"/>
<newline/>
<field name="payment_term" widget="selection"/>
<field name="journal_id" widget="selection"/>
<field name="period_id" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<separator orientation="vertical"/>
<field name="address_invoice_id"/>
<field name="product_id"/>
<newline/>
<field name="date" string="Date Invoiced"/>
<field name="date_due"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<newline/>
<group expand="1" string="Group By...">
<filter string="Salesman" name='User' icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
@@ -138,6 +117,27 @@
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="type"/>
<field name="currency_id" widget="selection"/>
<field name="partner_bank" widget="selection"/>
<field name="fiscal_position" widget="selection"/>
<separator orientation="vertical"/>
<field name="address_contact_id"/>
<field name="account_id"/>
<newline/>
<field name="payment_term" widget="selection"/>
<field name="journal_id" widget="selection"/>
<field name="period_id" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<separator orientation="vertical"/>
<field name="address_invoice_id"/>
<field name="product_id"/>
<newline/>
<field name="date" string="Date Invoiced"/>
<field name="date_due"/>
</group>
</search>
</field>
</record>
+62
View File
@@ -0,0 +1,62 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from report import report_sxw
from tools import amount_to_text_en
class report_voucher_move(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(report_voucher_move, self).__init__(cr, uid, name, context)
self.localcontext.update({
'time': time,
'convert':self.convert,
'debit':self.debit,
'credit':self.credit,
#'get_ref' : self._get_ref
})
self.user=uid
def convert(self,amount):
user_id = self.pool.get('res.users').browse(self.cr, self.user,[self.user])[0]
cur = user_id.company_id.currency_id.name
amt_en = amount_to_text_en.amount_to_text(amount,'en',cur);
return amt_en
def debit(self, move_ids):
debit = 0.0
for move in move_ids:
debit +=move.debit
return debit
def credit(self, move_ids):
credit = 0.0
for move in move_ids:
credit +=move.credit
return credit
report_sxw.report_sxw(
'report.account.move.voucher',
'account.move',
'addons/account/report/voucher_print.rml',
parser=report_voucher_move,header=False
)
+436
View File
@@ -0,0 +1,436 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Heading1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="last_info">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,6" stop="0,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,6" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,6" stop="1,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,6" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,6" stop="2,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica"/>
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Helvetica" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" fontName="Helvetica-Bold" fontSize="22.0" leading="27" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Helvetica" fontSize="11.0" leading="14" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Helvetica" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="11.0" leading="14" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P14" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P15" fontName="Helvetica" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P16" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P18" fontName="Helvetica" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P19" fontName="Helvetica" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P20" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P21" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P22" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P23" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P24" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P25" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P26" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P27" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P28" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Footer" fontName="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Drawing" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Header" fontName="Helvetica"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13"/>
<paraStyle name="Addressee" fontName="Helvetica" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Helvetica"/>
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Helvetica"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_9_30" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
<para style="P5">[[ repeatIn(objects,'voucher') ]]</para>
<para style="P6">[[ company.name ]]</para>
<para style="P8">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
<para style="P8">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</para>
<para style="P8">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para>
<para style="P8">[[ company.partner_id.address and company.partner_id.address[0].email ]]</para>
<para style="P7">
<font color="white"> </font>
</para>
<para style="P21">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P21">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Contra Voucher [[ (voucher.type == 'cont_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Journal Sale Voucher [[ (voucher.type == 'journal_sale_vou' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Journal Purchase Voucher [[ (voucher.type == 'journal_pur_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Journal Voucher [[ (voucher.type == 'journal_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P20">
<font color="white"> </font>
</para>
<blockTable colWidths="49.0,143.0,116.0,69.0,106.0" style="Table1">
<tr>
<td>
<para style="P12">Name:</para>
</td>
<td>
<para style="P13">[[ voucher.name ]]</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P12">Dated :</para>
</td>
<td>
<para style="P13">[[ time.strftime('%d %B,%Y', time.strptime(voucher.date , '%Y-%m-%d')) or '' ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P12">State :</para>
</td>
<td>
<para style="P3">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
<para style="P3">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
<para style="P3">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
<para style="P3">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P12">Ref. :</para>
</td>
<td>
<para style="P13">[[ voucher.ref]]</para>
</td>
</tr>
</blockTable>
<para style="P15">
<font color="white"> </font>
</para>
<para style="P15">
<font color="white"> </font>
</para>
<blockTable colWidths="275.0,106.0,102.0" style="Heading1">
<tr>
<td>
<para style="terp_tblheader_Details">Particulars</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
</tr>
</blockTable>
<para style="terp_default_1">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_8">[[ repeatIn(voucher.line_id,'line_id') ]]</para>
<blockTable colWidths="274.0,106.0,102.0" style="Table2">
<tr>
<td>
<para style="terp_default_Bold_9">[[ (line_id.partner_id and line_id.partner_id.name) or 'Account']]</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(line_id.debit) ]]</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(line_id.credit) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9_30">[[ line_id.account_id.name ]] </para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9_30">[[ line_id.name ]]-[[voucher.ref]]</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="terp_default_1">
<font color="white"> </font>
</para>
</section>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="275.0,106.0,102.0" style="last_info">
<tr>
<td>
<para style="P16">Through : </para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P22">[[ voucher.narration or '']]</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P16">On Account of : </para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P25">[[ voucher.line_id and voucher.line_id.name and voucher.line_id.name[1] or removeParentNode('para') ]]</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P16">Amount (in words) : </para>
</td>
<td>
<para style="P16">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P16">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P26">[[ convert(voucher.amount) ]]</para>
</td>
<td>
<para style="P15">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P15">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P17">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(debit(voucher.line_id))]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(credit(voucher.line_id)) ]]</para>
</td>
</tr>
</blockTable>
<para style="P18">
<font color="white"> </font>
</para>
<blockTable colWidths="142.0,99.0,105.0,136.0" style="Table3">
<tr>
<td>
<para style="P9">
<font color="white"> </font>
</para>
<para style="P9">
<font color="white"> </font>
</para>
<para style="P9">
<font color="white"> </font>
</para>
<para style="P9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P10">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P11">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P20">Receiver's Signature</para>
</td>
<td>
<para style="P20">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P20">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P20">Authorised Signatory</para>
</td>
</tr>
</blockTable>
<para style="P1">
<font color="white"> </font>
</para>
</story>
</document>
+166
View File
@@ -0,0 +1,166 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from report import report_sxw
import xml.dom.minidom
import os, time
import osv
import re
import tools
import pooler
import re
import sys
class rml_parse(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(rml_parse, self).__init__(cr, uid, name, context=None)
self.localcontext.update({
'comma_me': self.comma_me,
'format_date': self._get_and_change_date_format_for_swiss,
'strip_name' : self._strip_name,
'explode_name' : self._explode_name,
})
def comma_me(self,amount):
#print "#" + str(amount) + "#"
if not amount:
amount = 0.0
if type(amount) is float :
amount = str('%.2f'%amount)
else :
amount = str(amount)
if (amount == '0'):
return ' '
orig = amount
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
if orig == new:
return new
else:
return self.comma_me(new)
def _ellipsis(self, string, maxlen=100, ellipsis = '...'):
ellipsis = ellipsis or ''
try:
return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen]
except Exception, e:
return False
def _strip_name(self, name, maxlen=50):
return self._ellipsis(name, maxlen, '...')
def _get_and_change_date_format_for_swiss (self,date_to_format):
date_formatted=''
if date_to_format:
date_formatted = strptime (date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
return date_formatted
def _explode_name(self,chaine,length):
# We will test if the size is less then account
full_string = ''
if (len(str(chaine)) <= length):
return chaine
#
else:
chaine = unicode(chaine,'utf8').encode('iso-8859-1')
rup = 0
for carac in chaine:
rup = rup + 1
if rup == length:
full_string = full_string + '\n'
full_string = full_string + carac
rup = 0
else:
full_string = full_string + carac
return full_string
def makeAscii(self,str):
try:
Stringer = str.encode("utf-8")
except UnicodeDecodeError:
try:
Stringer = str.encode("utf-16")
except UnicodeDecodeError:
print "UTF_16 Error"
Stringer = str
else:
return Stringer
else:
return Stringer
return Stringer
def explode_this(self,chaine,length):
#chaine = self.repair_string(chaine)
chaine = rstrip(chaine)
ast = list(chaine)
i = length
while i <= len(ast):
ast.insert(i,'\n')
i = i + length
chaine = str("".join(ast))
return chaine
def repair_string(self,chaine):
ast = list(chaine)
UnicodeAst = []
_previouslyfound = False
i = 0
#print str(ast)
while i < len(ast):
elem = ast[i]
try:
Stringer = elem.encode("utf-8")
except UnicodeDecodeError:
to_reencode = elem + ast[i+1]
print str(to_reencode)
Good_char = to_reencode.decode('utf-8')
UnicodeAst.append(Good_char)
i += i +2
else:
UnicodeAst.append(elem)
i += i + 1
return "".join(UnicodeAst)
def ReencodeAscii(self,str):
print sys.stdin.encoding
try:
Stringer = str.decode("ascii")
except UnicodeEncodeError:
print "REENCODING ERROR"
return str.encode("ascii")
except UnicodeDecodeError:
print "DECODING ERROR"
return str.encode("ascii")
else:
print Stringer
return Stringer
def _add_header(self, node, header=1):
if header==2:
rml_head = self.rml_header2
else:
rml_head = self.rml_header
rml_head = rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
return True
@@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Print Aged Trial Balance">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
<field name="date1"/>
<field name="period_length"/>
@@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select period">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="display_account" required = "True"/>
<newline/>
<field name="fiscalyear"/>
+1 -1
View File
@@ -24,7 +24,7 @@ from tools.translate import _
class account_chart(osv.osv_memory):
"""
For Chart of Accounrs
"""
"""
_name = "account.chart"
_description = "chart"
_columns = {
@@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Date-Period">
<field name="company_id" colspan="4"/>
<field name="company_id" colspan="4" groups="base.group_multi_company"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
+12 -13
View File
@@ -18,10 +18,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import fields, osv
from tools.translate import _
import netsvc
import time
class account_invoice_refund(osv.osv_memory):
@@ -30,16 +31,15 @@ class account_invoice_refund(osv.osv_memory):
_name = "account.invoice.refund"
_description = "Invoice Refund"
_columns = {
'date': fields.date('Operation date', required=False, help='This date will be used as the invoice date for Refund Invoice and Period will be chosen accordingly!'),
'period': fields.many2one('account.period', 'Force period', required=False),
'description': fields.char('Description', size=150, required=True),
'date': fields.date('Operation date', help='This date will be used as the invoice date for Refund Invoice and Period will be chosen accordingly!'),
'period': fields.many2one('account.period', 'Force period'),
'description': fields.char('Description', size=128, required=True),
}
_defaults = {
'date': time.strftime('%Y-%m-%d'),
}
}
def compute_refund(self, cr, uid, ids, mode, context=None):
def compute_refund(self, cr, uid, ids, mode='refund', context=None):
"""
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -78,21 +78,20 @@ class account_invoice_refund(osv.osv_memory):
result_query = cr.fetchone()
if result_query:
cr.execute("""SELECT id
from account_period where date('%s')
from account_period where date(%s)
between date_start AND date_stop \
and company_id = %s limit 1 """,
(form['date'], self.pool.get('res.users').browse(cr, uid, uid,context=context).company_id.id,))
(date, self.pool.get('res.users').browse(cr, uid, uid,context=context).company_id.id,))
else:
cr.execute("""SELECT id
from account_period where date('%s')
from account_period where date(%s)
between date_start AND date_stop \
limit 1 """, (form['date'],))
limit 1 """, (date,))
res = cr.fetchone()
if res:
period = res[0]
else:
date = inv.date_invoice
if form['description'] :
description = form['description']
else:
@@ -129,7 +128,7 @@ class account_invoice_refund(osv.osv_memory):
writeoff_journal_id=inv.journal_id.id,
writeoff_acc_id=inv.account_id.id
)
if mode == 'modify' :
if mode == 'modify':
invoice = inv_obj.read(cr, uid, [inv.id],
['name', 'type', 'number', 'reference',
'comment', 'date_due', 'partner_id',
@@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Date-Period">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="result_selection" required = "True"/>
<newline/>
<field name="fiscalyear"/>
@@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Date-Period">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="result_selection"/>
<newline/>
<field name="fiscalyear"/>
+1 -1
View File
@@ -29,7 +29,7 @@ class account_unreconcile(osv.osv_memory):
obj_move_reconcile = self.pool.get('account.move.reconcile')
if context is None:
context = {}
recs = obj_move_line.read(cr, uid, data['ids'], ['reconcile_id','reconcile_partial_id'])
recs = obj_move_line.read(cr, uid, context['active_ids'], ['reconcile_id','reconcile_partial_id'])
unlink_ids = []
full_recs = filter(lambda x: x['reconcile_id'], recs)
rec_ids = [rec['reconcile_id'][0] for rec in full_recs]
+1 -1
View File
@@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Period">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
<field name="based_on"/>
<newline/>
@@ -47,7 +47,7 @@ class account_analytic_default(osv.osv):
domain += ['|',('partner_id','=',partner_id)]
domain += [('partner_id','=',False)]
if user_id:
domain += ['|',('user_id','=',uid)]
domain += ['|',('user_id','=',user_id)]
domain += [('user_id','=',False)]
if date:
domain += ['|',('date_start','<=',date),('date_start','=',False)]
+1 -1
View File
@@ -30,7 +30,7 @@
You can define your multiple levels of recall through the menu:
Financial Management/Configuration/Payment Terms/Follow-Ups
Once it's defined, you can automatically prints recall every days
Once it's defined, you can automatically print recalls every day
through simply clicking on the menu:
Financial_Management/Periodical_Processing/Print_Follow-Ups
+1 -1
View File
@@ -32,7 +32,7 @@
* add titles, comment lines, sub total lines
* draw horizontal lines and put page breaks
Moreover, there is one option which allow you to print all the selected invoices with a given special message at the bottom of it. This feature can be very useful for printing your invoices with end-of-year wishes, special punctual conditions...
Moreover, there is one option which allows you to print all the selected invoices with a given special message at the bottom of it. This feature can be very useful for printing your invoices with end-of-year wishes, special punctual conditions...
""",
'author': 'Tiny',
+1 -1
View File
@@ -28,7 +28,7 @@
"depends": ["account"],
"init_xml": [],
"description": """
This module provide :
This module provides :
* a more efficient way to manage invoice payment.
* a basic mechanism to easily plug various automated payment.
""",
+8 -3
View File
@@ -24,8 +24,8 @@
"version" : "1.0",
"author" : 'Tiny & Axelor',
"description": """
India Accounting module includes all the basic requirenment of
Basic Accounting, plus new things which available are
Indian Accounting module includes all the basic requirenments of
Basic Accounting, plus new things which are available :
* Indian Account Chart
* New Invoice - (Local, Retail)
* Invoice Report
@@ -36,7 +36,10 @@
""",
"category" : "Generic Modules/Accounting",
"website" : "http://tinyerp.com",
"depends" : ["base", "account"],
"depends" : [
"base",
"account"
],
"init_xml" : [
],
@@ -46,10 +49,12 @@
"update_xml" : [
"security/ir.model.access.csv",
"voucher_sequence.xml",
"voucher_workflow.xml",
"voucher_report.xml",
"voucher_view.xml",
"voucher_wizard.xml",
"wizard/account_voucher_open_view.xml",
],
'certificate': '0037580727101',
"active": False,
+55 -47
View File
@@ -28,6 +28,17 @@ import mx.DateTime
from mx.DateTime import RelativeDateTime
from tools import config
type2journal = {
'rec_voucher': 'cash',
'bank_rec_voucher': 'cash',
'pay_voucher': 'cash',
'bank_pay_voucher': 'cash',
'cont_voucher': 'cash',
'journal_sale_vou': 'sale',
'journal_pur_voucher': 'purchase',
'journal_voucher':'expanse'
}
class ir_sequence_type(osv.osv):
_inherit = "ir.sequence.type"
_columns = {
@@ -36,7 +47,15 @@ class ir_sequence_type(osv.osv):
}
ir_sequence_type()
class account_journal(osv.osv):
_inherit = "account.journal"
_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"),
}
account_journal()
class account_voucher(osv.osv):
def _get_period(self, cr, uid, context):
periods = self.pool.get('account.period').find(cr, uid)
if periods:
@@ -45,34 +64,22 @@ class account_voucher(osv.osv):
return False
def _get_type(self, cr, uid, context={}):
type = context.get('type', 'rec_voucher')
type = context.get('type', 'bank_rec_voucher')
return type
def _get_reference_type(self, cursor, user, context=None):
return [('none', 'Free Reference')]
def _get_journal(self, cr, uid, context):
type_inv = 'rec_voucher'
if type(context) == type(''):
type_inv = context
elif type(context) == type({}):
type_inv = context.get('type', 'rec_voucher')
type2journal = {
'rec_voucher': 'cash',
'bank_rec_voucher': 'cash',
'pay_voucher': 'cash',
'bank_pay_voucher': 'cash',
'cont_voucher': 'cash',
'journal_sale_vou': 'sale',
'journal_pur_voucher': 'purchase',
'journal_voucher':'expanse'
}
journal_obj = self.pool.get('account.journal')
ttype = type2journal.get(type_inv, 'cash')
res = journal_obj.search(cr, uid, [('type', '=', ttype)], limit=1)
def _get_journal(self, cr, uid, context={}):
journal_pool = self.pool.get('account.journal')
if context.get('journal_id', False):
return context.get('journal_id')
type_inv = context.get('type', 'rec_voucher')
ttype = type2journal.get(type_inv, type_inv)
res = journal_pool.search(cr, uid, [('type', '=', ttype)], limit=1)
if res:
return res[0]
@@ -80,7 +87,7 @@ class account_voucher(osv.osv):
return False
def _get_currency(self, cr, uid, context):
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, [uid])[0]
user = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid)
if user.company_id:
return user.company_id.currency_id.id
else:
@@ -92,13 +99,13 @@ class account_voucher(osv.osv):
_columns = {
'name':fields.char('Name', size=256, required=True, readonly=True, states={'draft':[('readonly',False)]}),
'type': fields.selection([
('pay_voucher','Cash Payment Voucher'),
('bank_pay_voucher','Bank Payment Voucher'),
('rec_voucher','Cash Receipt Voucher'),
('bank_rec_voucher','Bank Receipt Voucher'),
('cont_voucher','Contra Voucher'),
('journal_sale_vou','Journal Sale Voucher'),
('journal_pur_voucher','Journal Purchase Voucher'),
('pay_voucher','Cash Payment'),
('bank_pay_voucher','Bank Payment'),
('rec_voucher','Cash Receipt'),
('bank_rec_voucher','Bank Receipt'),
('cont_voucher','Contra'),
('journal_sale_vou','Journal Sale'),
('journal_pur_voucher','Journal Purchase'),
('journal_voucher','Journal Voucher'),
],'Type', readonly=True, select=True , size=128),
'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}),
@@ -110,16 +117,17 @@ class account_voucher(osv.osv):
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True),
'state':fields.selection(
[('draft','Draft'),
('proforma','Pro-forma'),
('posted','Posted'),
('cancel','Cancel')
], 'State',
readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \
[('draft','Draft'),
('proforma','Pro-forma'),
('posted','Posted'),
('recheck','Waiting for Re-checking'),
('cancel','Cancel'),
('audit','Audit Complete')
], 'State', readonly=True, size=32,
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 \'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),
'number':fields.char('Number', size=32, readonly=True),
'reference': fields.char('Voucher Reference', size=64),
@@ -433,14 +441,14 @@ class account_voucher(osv.osv):
if not len(ids):
return []
types = {
'pay_voucher': 'CPV: ',
'rec_voucher': 'CRV: ',
'cont_voucher': 'CV: ',
'bank_pay_voucher': 'BPV: ',
'bank_rec_voucher': 'BRV: ',
'journal_sale_vou': 'JSV: ',
'journal_pur_voucher': 'JPV: ',
'journal_voucher':'JV'
'pay_voucher': 'CPV: ',
'rec_voucher': 'CRV: ',
'cont_voucher': 'CV: ',
'bank_pay_voucher': 'BPV: ',
'bank_rec_voucher': 'BRV: ',
'journal_sale_vou': 'JSV: ',
'journal_pur_voucher': 'JPV: ',
'journal_voucher':'JV'
}
return [(r['id'], types[r['type']]+(r['number'] or '')+' '+(r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
+53 -43
View File
@@ -6,7 +6,7 @@
<field name="model">account.voucher</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Vouchers">
<tree string="Accounting Vouchers">
<field name="date"/>
<field name="number"/>
<field name="name"/>
@@ -25,7 +25,7 @@
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Voucher">
<form string="Accounting Voucher">
<group col="6" colspan="4">
<field name="name" colspan="4"/>
<field name="journal_id" select="1" on_change="onchange_journal(journal_id,type)"/>
@@ -36,8 +36,8 @@
<!--field name="partner_id"/-->
</group>
<notebook colspan="4">
<page string="Entry Lines">
<field name="payment_ids" colspan="4" nolabel="1" height="275">
<page string="Journal Entries">
<field name="payment_ids" colspan="4" nolabel="1" height="260">
<tree string="Voucher Lines" editable="top">
<field name="account_analytic_id"/>
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type)"/>
@@ -49,13 +49,14 @@
</tree>
</field>
<separator string="Narration" colspan="4"/>
<field name="narration" colspan="4" nolabel="1"/>
<field name="narration" colspan="4" nolabel="1" height="50"/>
<group col="6" colspan="6">
<field name="state"/>
<button name="open_voucher" string="Pro-forma" states="draft" type="object" icon="gtk-open"/>
<button name="proforma_voucher" string="Create" states="proforma" type="object" icon="gtk-go-forward"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma,posted" type="object" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" type="object" string="Set to Draft" icon="gtk-convert"/>
<button name="open_voucher" string="Pro-forma" states="draft"/>
<button name="proforma_voucher" string="Create" states="proforma"/>
<button name="recheck_voucher" string="Validate" states="recheck"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" type="object"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
</group>
</page>
<page string="Other Info">
@@ -103,19 +104,9 @@
</field>
</record>
<record model="ir.actions.act_window" id="action_voucher_list">
<field name="name">Vouchers</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
</record>
<menuitem action="action_voucher_list" id="menu_action_voucher_list"
name="Voucher Entries" parent="account.menu_finance_entries" sequence="60"/>
<!-- Receipt Vouchers -->
<record model="ir.actions.act_window" id="action_receipt_vou_voucher_list">
<field name="name">Receipt Vouchers</field>
<field name="name">Receivable Entries</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -123,8 +114,8 @@
<field name="domain">[('type','like','rec_voucher')]</field>
<field name="context">{'type':'rec_voucher'}</field>
</record>
<menuitem name="Receipt Vouchers" id="menu_action_receipt_vou_voucher_list"
action="action_receipt_vou_voucher_list" parent="menu_action_voucher_list"/>
<menuitem id="menu_action_receipt_vou_voucher_list"
action="action_receipt_vou_voucher_list" parent="account.menu_finance_entries" sequence="8"/>
<record model="ir.actions.act_window" id="action_receipt_cashreceipt_voucher_list">
<field name="name">Cash Receipt</field>
@@ -135,7 +126,7 @@
<field name="domain">[('type','=','rec_voucher')]</field>
<field name="context">{'type':'rec_voucher'}</field>
</record>
<menuitem name="Cash Receipts" id="menu_action_receipt_cashreceipt_voucher_list"
<menuitem id="menu_action_receipt_cashreceipt_voucher_list"
action="action_receipt_cashreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>
<record model="ir.actions.act_window" id="action_receipt_bakreceipt_voucher_list">
@@ -147,7 +138,7 @@
<field name="domain">[('type','=','bank_rec_voucher')]</field>
<field name="context">{'type':'bank_rec_voucher'}</field>
</record>
<menuitem name="Bank Receipts" id="menu_action_receipt_bakreceipt_voucher_list"
<menuitem id="menu_action_receipt_bakreceipt_voucher_list"
action="action_receipt_bakreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>
<!-- End Receipt Vouchers -->
@@ -155,7 +146,7 @@
<!-- Payment Vouchers -->
<record model="ir.actions.act_window" id="action_payments_voucher_list">
<field name="name">Payment Vouchers</field>
<field name="name">Payable Entries</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -163,11 +154,11 @@
<field name="domain">[('type','like','pay_voucher')]</field>
<field name="context">{'type':'pay_voucher'}</field>
</record>
<menuitem name="Payment Vouchers" id="menu_action_payments_voucher_list"
action="action_payments_voucher_list" parent="menu_action_voucher_list"/>
<menuitem id="menu_action_payments_voucher_list"
action="action_payments_voucher_list" parent="account.menu_finance_entries" sequence="8"/>
<record model="ir.actions.act_window" id="action_payments_cashpay_voucher_list">
<field name="name">Payment Vouchers</field>
<field name="name">Cash Payment</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -175,11 +166,11 @@
<field name="domain">[('type','=','pay_voucher')]</field>
<field name="context">{'type':'pay_voucher'}</field>
</record>
<menuitem name="Cash Payments" id="menu_action_payments_cashpay_voucher_list"
<menuitem id="menu_action_payments_cashpay_voucher_list"
action="action_payments_cashpay_voucher_list" parent="menu_action_payments_voucher_list"/>
<record model="ir.actions.act_window" id="action_payments_bankpay_voucher_list">
<field name="name">Payment Vouchers</field>
<field name="name">Bank Payment</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -187,24 +178,24 @@
<field name="domain">[('type','=','bank_pay_voucher')]</field>
<field name="context">{'type':'bank_pay_voucher'}</field>
</record>
<menuitem name="Bank Payments" id="menu_action_payments_bankpay_voucher_list"
<menuitem id="menu_action_payments_bankpay_voucher_list"
action="action_payments_bankpay_voucher_list" parent="menu_action_payments_voucher_list"/>
<!-- End Payment Vouchers -->
<!-- Other Voucher Enries -->
<record model="ir.actions.act_window" id="action_other_voucher_list">
<field name="name">Other Vouchers</field>
<field name="name">Other Entries</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
</record>
<menuitem name="Other Vouchers" id="menu_action_other_voucher_list"
action="action_other_voucher_list" parent="menu_action_voucher_list"/>
<menuitem id="menu_action_other_voucher_list"
action="action_other_voucher_list" parent="account.menu_finance_entries" sequence="8"/>
<record model="ir.actions.act_window" id="action_view_cont_voucher_form">
<field name="name">Contra Voucher</field>
<field name="name">Contra Entries</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -212,11 +203,11 @@
<field name="domain">[('type','=','cont_voucher')]</field>
<field name="context">{'type':'cont_voucher'}</field>
</record>
<menuitem name="Contra Voucher" id="menu_action_view_cont_voucher_form"
<menuitem id="menu_action_view_cont_voucher_form"
action="action_view_cont_voucher_form" parent="menu_action_other_voucher_list"/>
<record model="ir.actions.act_window" id="action_view_jour_sale_voucher_form">
<field name="name">Journal Sale Voucher</field>
<field name="name">Journal Sale</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -224,11 +215,11 @@
<field name="domain">[('type','=','journal_sale_vou')]</field>
<field name="context">{'type':'journal_sale_vou'}</field>
</record>
<menuitem name="Journal Sale Voucher" id="menu_action_view_jour_sale_voucher_form"
<menuitem id="menu_action_view_jour_sale_voucher_form"
action="action_view_jour_sale_voucher_form" parent="menu_action_other_voucher_list"/>
<record model="ir.actions.act_window" id="action_view_jour_pur_voucher_form">
<field name="name">Journal Purchase Voucher</field>
<field name="name">Journal Purchase</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -236,7 +227,7 @@
<field name="domain">[('type','=','journal_pur_voucher')]</field>
<field name="context">{'type':'journal_pur_voucher'}</field>
</record>
<menuitem name="Journal Purchase Voucher" id="menu_action_view_jour_pur_voucher_form"
<menuitem id="menu_action_view_jour_pur_voucher_form"
action="action_view_jour_pur_voucher_form" parent="menu_action_other_voucher_list"/>
<record model="ir.actions.act_window" id="action_view_jour_voucher_form">
@@ -248,9 +239,28 @@
<field name="domain">[('type','=','journal_voucher')]</field>
<field name="context">{'type':'journal_voucher'}</field>
</record>
<menuitem
name="Journal Voucher" id="menu_action_view_jour_voucher_form"
<menuitem id="menu_action_view_jour_voucher_form"
action="action_view_jour_voucher_form" parent="menu_action_other_voucher_list"/>
<record model="ir.ui.view" id="view_account_journal_form_inherit">
<field name="name">account.journal.form.inherit</field>
<field name="model">account.journal</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="allow_date" position="after">
<field name="max_amount" select="1"/>
</field>
</field>
</record>
<act_window
domain="[('journal_id', '=', active_id)]"
id="act_journal_voucher_open"
name="Voucher Entries"
context="{'journal_id': active_id, 'type':type}"
res_model="account.voucher"
src_model="account.journal"/>
</data>
</openerp>
+15 -17
View File
@@ -1,20 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- <wizard
id="wizard_account_voucher_open"
model="account.voucher"
name="account.voucher.open"
menu="False"
string="Open a Voucher Entry"/>
<menuitem
action="wizard_account_voucher_open"
id="menu_wizard_account_voucher_open"
name="Open Vouchers"
sequence="0"
type="wizard"
parent="menu_action_voucher_list"/> -->
</data>
<data>
<!-- <wizard-->
<!-- id="wizard_account_voucher_open"-->
<!-- model="account.voucher"-->
<!-- name="account.voucher.open"-->
<!-- menu="False"-->
<!-- string="Open a Voucher Entry"/>-->
<!-- <menuitem-->
<!-- action="wizard_account_voucher_open"-->
<!-- id="menu_wizard_account_voucher_open"-->
<!-- name="Open Vouchers"-->
<!-- sequence="0"-->
<!-- type="wizard"-->
<!-- parent="menu_action_voucher_list"/>-->
</data>
</openerp>
+43 -38
View File
@@ -1,75 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="wkf_voucher" model="workflow">
<data>
<record id="wkf" model="workflow">
<field name="name">account.voucher.basic</field>
<field name="osv">account.voucher</field>
<field name="on_create">True</field>
</record>
<record id="act_draft" model="workflow.activity">
<field name="wkf_id" ref="wkf_voucher"/>
<field name="wkf_id" ref="wkf"/>
<field name="flow_start">True</field>
<field name="name">draft</field>
</record>
<record id="act_performa" model="workflow.activity">
<field name="wkf_id" ref="wkf_voucher"/>
<field name="name">performa</field>
<field name="action">open_voucher()</field>
<field name="action">write({'state':'draft'})</field>
<field name="kind">function</field>
</record>
<record id="act_posted" model="workflow.activity">
<field name="wkf_id" ref="wkf_voucher"/>
<field name="name">posted</field>
<field name="action">proforma_voucher()</field>
<record id="act_proforma" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">proforma</field>
<field name="action">write({'state':'proforma'})
open_voucher()</field>
<field name="kind">function</field>
</record>
<record id="act_done" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">done</field>
<field name="action">write({'state':'posted'})
proforma_voucher()</field>
<field name="flow_stop">True</field>
<field name="kind">function</field>
</record>
<record id="act_cancel" model="workflow.activity">
<field name="wkf_id" ref="wkf_voucher"/>
<field name="name">cancel</field>
<field name="action">cancel_voucher()</field>
<record id="act_recheck" model="workflow.activity">
<field name="wkf_id" ref="wkf"/>
<field name="name">recheck</field>
<field name="action">write({'state':'recheck'})</field>
<field name="kind">function</field>
</record>
<record id="t1" model="workflow.transition">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_performa"/>
<field name="act_to" ref="act_proforma"/>
<field name="signal">open_voucher</field>
</record>
<record id="t2" model="workflow.transition">
<field name="act_from" ref="act_performa"/>
<field name="act_to" ref="act_posted"/>
<field name="act_from" ref="act_proforma"/>
<field name="act_to" ref="act_done"/>
<field name="signal">proforma_voucher</field>
<field name="condition">amount &lt;= journal_id.max_amount</field>
</record>
<record id="t3" model="workflow.transition">
<field name="act_from" ref="act_performa"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">cancel_voucher</field>
<field name="act_from" ref="act_proforma"/>
<field name="act_to" ref="act_recheck"/>
<field name="signal">proforma_voucher</field>
<field name="condition">amount &gt; journal_id.max_amount</field>
</record>
<record id="t4" model="workflow.transition">
<field name="act_from" ref="act_recheck"/>
<field name="act_to" ref="act_done"/>
<field name="signal">recheck_voucher</field>
</record>
<record id="t5" model="workflow.transition">
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">cancel_voucher</field>
<field name="act_from" ref="act_recheck"/>
<field name="act_to" ref="act_draft"/>
<field name="signal">action_cancel_draft</field>
</record>
<record id="t6" model="workflow.transition">
<field name="act_from" ref="act_posted"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">cancel_voucher</field>
<field name="act_from" ref="act_proforma"/>
<field name="act_to" ref="act_draft"/>
<field name="signal">action_cancel_draft</field>
</record>
<record id="t7" model="workflow.transition">
<field name="act_from" ref="act_cancel"/>
<field name="act_to" ref="act_performa"/>
<field name="signal">open_voucher</field>
</record>
</data>
</data>
</openerp>
@@ -31,11 +31,11 @@ _types = {
'journal_pur_voucher':'Journal Purchase Voucher'
}
_states = {
'draft':'Draft',
'proforma':'Pro-forma',
'posted':'Posted',
'cancel':'Cancel'
}
'draft':'Draft',
'proforma':'Pro-forma',
'posted':'Posted',
'cancel':'Cancel'
}
class account_open_voucher(osv.osv_memory):
_name = "account.open.voucher"
@@ -43,18 +43,18 @@ class account_open_voucher(osv.osv_memory):
_columns = {
'type': fields.selection([('pay_voucher','Cash Payment Voucher'),
('bank_pay_voucher','Bank Payment Voucher'),
('rec_voucher','Cash Receipt Voucher'),
('bank_rec_voucher','Bank Receipt Voucher'),
('cont_voucher','Contra Voucher'),
('journal_sale_vou','Journal Sale Voucher'),
('journal_pur_voucher','Journal Purchase Voucher')],'Voucher Type', required=True),
('bank_pay_voucher','Bank Payment Voucher'),
('rec_voucher','Cash Receipt Voucher'),
('bank_rec_voucher','Bank Receipt Voucher'),
('cont_voucher','Contra Voucher'),
('journal_sale_vou','Journal Sale Voucher'),
('journal_pur_voucher','Journal Purchase Voucher')],'Voucher Type', required=True),
'state': fields.selection([('draft','Draft'),
('proforma','Pro-forma'),
('posted','Posted'),
('cancel','Cancel')], 'State', required=True),
('proforma','Pro-forma'),
('posted','Posted'),
('cancel','Cancel')], 'State', required=True),
'period_ids': fields.many2many('account.period', 'voucher_period_rel', 'voucher_id', 'period_id', 'Periods'),
}
}
def action_open_window(self, cr, uid, ids, context=None):
obj_period = self.pool.get('account.period')
@@ -83,4 +83,4 @@ class account_open_voucher(osv.osv_memory):
account_open_voucher()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -31,12 +31,12 @@
<field name="target">new</field>
</record>
<menuitem
icon="STOCK_EXECUTE"
name="Open Vouchers"
action="action_account_open_vouchers"
id="menu_account_voucher_open"
parent="menu_action_voucher_list"/>
<!-- <menuitem-->
<!-- icon="STOCK_EXECUTE"-->
<!-- name="Open Vouchers"-->
<!-- action="action_account_open_vouchers"-->
<!-- id="menu_account_voucher_open"-->
<!-- parent="menu_action_voucher_list"/>-->
</data>
</openerp>
+24
View File
@@ -0,0 +1,24 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import account_voucher_payment
import account_voucher_unreconcile
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+48
View File
@@ -0,0 +1,48 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name" : "Invoice Payment/Receipt by Vouchers.",
"version" : "1.0",
"author" : 'Tiny & Axelor',
"description": """This module includes :
* It reconcile the invoice (supplier, customer) while paying through
Accounting Vouchers
""",
"category" : "Generic Modules/Indian Accounting",
"website" : "http://tinyerpindia.com",
"depends" : [
"base",
"account",
"account_voucher",
],
"init_xml" : [
],
"demo_xml" : [],
"update_xml" : [
"account_voucher_payment_view.xml",
"account_voucher_payment_wizard.xml"
],
"active": False,
"installable": True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+290
View File
@@ -0,0 +1,290 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
class account_move_line(osv.osv):
_inherit = "account.move.line"
_columns = {
'voucher_invoice': fields.many2one('account.invoice', 'Invoice', readonly=True),
}
account_move_line()
class account_voucher(osv.osv):
_inherit = 'account.voucher'
_columns = {
'voucher_line_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'proforma':[('readonly',True)]}),
}
def action_move_line_create(self, cr, uid, ids, *args):
for inv in self.browse(cr, uid, ids):
if inv.move_id:
continue
company_currency = inv.company_id.currency_id.id
line_ids = self.read(cr, uid, [inv.id], ['payment_ids'])[0]['payment_ids']
ils = self.pool.get('account.voucher.line').read(cr, uid, line_ids)
iml = self._get_analytic_lines(cr, uid, inv.id)
diff_currency_p = inv.currency_id.id <> company_currency
total = 0
if inv.type in ('pay_voucher', 'journal_voucher', 'rec_voucher','cont_voucher','bank_pay_voucher','bank_rec_voucher','journal_sale_voucher','journal_pur_voucher'):
ref = inv.reference
else:
ref = self._convert_ref(cr, uid, inv.number)
date = inv.date
total_currency = 0
for i in iml:
partner_id=i['partner_id']
acc_id = i['account_id']
if inv.currency_id.id != company_currency:
i['currency_id'] = inv.currency_id.id
i['amount_currency'] = i['amount']
else:
i['amount_currency'] = False
i['currency_id'] = False
if inv.type in ('rec_voucher','bank_rec_voucher','journal_pur_voucher','journal_voucher'):
total += i['amount']
total_currency += i['amount_currency'] or i['amount']
i['amount'] = - i['amount']
else:
total -= i['amount']
total_currency -= i['amount_currency'] or i['amount']
name = inv['name'] or '/'
totlines = False
iml.append({
'type': 'dest',
'name': name,
'amount': total or False,
'account_id': acc_id,
'amount_currency': diff_currency_p \
and total_currency or False,
'currency_id': diff_currency_p \
and inv.currency_id.id or False,
'ref': ref,
'partner_id':partner_id or False,
})
date = inv.date
inv.amount=total
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x,date, context={})) ,iml)
an_journal_id=inv.journal_id.analytic_journal_id.id
journal_id = inv.journal_id.id
journal = self.pool.get('account.journal').browse(cr, uid, journal_id)
if journal.sequence_id:
name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id)
move = {
'name': name,
'journal_id': journal_id,
'voucher_type':inv.type,
'narration' : inv.narration,
'data':date
}
if inv.period_id:
move['period_id'] = inv.period_id.id
for i in line:
i[2]['period_id'] = inv.period_id.id
move_id = self.pool.get('account.move').create(cr, uid, move)
ref=move['name']
amount=0.0
#create the first line our self
move_line = {
'name': inv.name,
'voucher_invoice' : iml and iml[0]['invoice'] and iml[0]['invoice'].id or False,
'debit': False,
'credit':False,
'account_id': inv.account_id.id or False,
'move_id':move_id ,
'journal_id':journal_id ,
'period_id':inv.period_id.id,
'partner_id': False,
'ref': ref,
'date': date
}
if inv.type in ('rec_voucher', 'bank_rec_voucher', 'journal_pur_voucher', 'journal_voucher'):
move_line['debit'] = inv.amount
else:
move_line['credit'] = inv.amount * (-1)
self.pool.get('account.move.line').create(cr, uid, move_line)
id_mapping_dict = {}
mline_ids = []
for line in inv.voucher_line_ids:
move_line = {
'name':line.name,
'voucher_invoice' : iml and iml[0]['invoice'] and iml[0]['invoice'].id or False,
'debit':False,
'credit':False,
'move_id':move_id,
'account_id':line.account_id.id or False,
'journal_id':journal_id ,
'period_id':inv.period_id.id,
'partner_id':line.partner_id.id or False,
'ref':ref,
'date':date
}
if line.type == 'dr':
move_line['debit'] = line.amount or False
amount=line.amount
elif line.type == 'cr':
move_line['credit'] = line.amount or False
amount=line.amount * (-1)
ml_id=self.pool.get('account.move.line').create(cr, uid, move_line)
id_mapping_dict[line.id] = ml_id
total = 0.0
mline = self.pool.get('account.move.line')
if line.invoice_id.id:
invoice = self.pool.get('account.invoice').browse(cr, uid, line.invoice_id.id)
src_account_id = invoice.account_id.id
cr.execute('select id from account_move_line where move_id in ('+str(invoice.move_id.id)+')')
temp_ids = map(lambda x: x[0], cr.fetchall())
temp_ids.append(ml_id)
mlines = mline.browse(cr, uid, temp_ids)
for ml in mlines:
if ml.account_id.id==src_account_id:
mline_ids.append(ml.id)
total += (ml.debit or 0.0) - (ml.credit or 0.0)
#end if line.invoice_id.id:
if inv.narration:
line.name=inv.narration
else:
line.name=line.name
if line.account_analytic_id:
an_line = {
'name':line.name,
'date':date,
'amount':amount,
'account_id':line.account_analytic_id.id or False,
'move_id':ml_id,
'journal_id':an_journal_id ,
'general_account_id':line.account_id.id,
'ref':ref
}
self.pool.get('account.analytic.line').create(cr,uid,an_line)
if mline_ids:
self.pool.get('account.move.line').reconcile_partial(cr, uid, mline_ids, 'manual', context={})
self.write(cr, uid, [inv.id], {'move_id': move_id})
obj=self.pool.get('account.move').browse(cr, uid, move_id)
for line in obj.line_id :
cr.execute('insert into voucher_id (account_id,rel_account_move) values (%d, %d)',(int(ids[0]),int(line.id)))
return True
account_voucher()
class VoucherLine(osv.osv):
_inherit = 'account.voucher.line'
def default_get(self, cr, uid, fields, context={}):
data = super(VoucherLine, self).default_get(cr, uid, fields, context)
self.voucher_context = context
return data
_columns = {
'invoice_id' : fields.many2one('account.invoice','Invoice'),
}
def move_line_get_item(self, cr, uid, line, context={}):
res = super(VoucherLine, self).move_line_get_item(cr, uid, line, context)
res['invoice'] = line.invoice_id or False
return res
def onchange_invoice_id(self, cr, uid, ids, invoice_id, context={}):
lines = []
if 'lines' in self.voucher_context:
lines = [x[2] for x in self.voucher_context['lines']]
if not invoice_id:
return {'value':{}}
else:
invoice_obj = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context)
residual = invoice_obj.residual
same_invoice_amounts = [x['amount'] for x in lines if x['invoice_id']==invoice_id]
residual -= sum(same_invoice_amounts)
return {'value' : {'amount':residual}}
def onchange_line_account(self, cr, uid, ids, account_id, type, type1):
if not account_id:
return {'value' : {'account_id' : False, 'type' : False ,'amount':False}}
obj = self.pool.get('account.account')
acc_id = False
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
acc_id = obj.browse(cr, uid, account_id)
balance = acc_id.credit
type = 'cr'
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
acc_id = obj.browse(cr, uid, account_id)
balance = acc_id.debit
type = 'dr'
elif type1 in ('journal_sale_vou') :
acc_id = obj.browse(cr, uid, account_id)
balance = acc_id.credit
type = 'dr'
elif type1 in ('journal_pur_voucher') :
acc_id = obj.browse(cr, uid, account_id)
balance = acc_id.debit
type = 'cr'
return {
'value' : {'type' : type, 'amount':balance}
}
VoucherLine()
class account_invoice(osv.osv):
_inherit = "account.invoice"
def action_cancel(self, cr, uid, ids, *args):
res = super(account_invoice, self).action_cancel(cr, uid, ids, *args)
invoices = self.read(cr, uid, ids, ['move_id'])
voucher_db = self.pool.get('account.voucher')
voucher_ids = voucher_db.search(cr, uid, [])
voucher_obj = voucher_db.browse(cr, uid, voucher_ids)
move_db = self.pool.get('account.move')
move_ids = move_db.search(cr, uid, [])
move_obj = move_db.browse(cr, uid, move_ids)
return res
account_invoice()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--
Voucher line extension
-->
<record id="view_voucher_form" model="ir.ui.view">
<field name="name">account.voucher.line.form.inherit</field>
<field name="model">account.voucher.line</field>
<field name="type">form</field>
<field name="inherit_id" ref="account_voucher.view_voucher_form"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="invoice_id" on_change="onchange_invoice_id(invoice_id)" domain="[('partner_id','=',partner_id),('state','=','open')]"/>
</field>
</field>
</record>
<record id="view_voucher_form" model="ir.ui.view">
<field name="name">account.voucher.form.inherit</field>
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="inherit_id" ref="account_voucher.view_voucher_form"/>
<field name="arch" type="xml">
<field name="payment_ids" position="replace">
<field name="voucher_line_ids" default_get="{'lines': voucher_line_ids }" colspan="4" nolabel="1" height="275">
<tree string="Voucher Lines" editable="top">
<field name="account_analytic_id"/>
<field name="partner_id" on_change="onchange_partner(partner_id, type, parent.type)"/>
<field name="account_id" on_change="onchange_line_account(account_id, type, parent.type)"/>
<field name="name"/>
<field name="invoice_id" on_change="onchange_invoice_id(invoice_id)" domain="[('partner_id','=',partner_id),('state','=','open'),('residual','&gt;',0.0)]"/>
<field name="type"/>
<field name="amount"/>
<field name="ref"/>
</tree>
</field>
</field>
</field>
</record>
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account.move.line.form.inherit</field>
<field name="model">account.move.line</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_move_line_form"/>
<field name="arch" type="xml">
<field name="invoice" position="replace">
<field name="voucher_invoice"/>
</field>
</field>
</record>
<record id="view_move_line_tree" model="ir.ui.view">
<field name="name">account.move.line.form.inherit</field>
<field name="model">account.move.line</field>
<field name="type">tree</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="arch" type="xml">
<field name="invoice" position="replace">
<field name="voucher_invoice"/>
</field>
</field>
</record>
</data>
</openerp>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<wizard
id="wizard_unreconcile_voucher"
menu="True"
model="account.voucher"
name="account.voucher.unreconcile"
string="Unreconcile entries"/>
</data>
</openerp>
@@ -0,0 +1,56 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
_info_form = '''<?xml version="1.0"?>
<form string="Unreconciliation">
<separator string="Unreconciliation transactions" colspan="4"/>
<image name="gtk-dialog-info" colspan="2"/>
<label string="If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable" colspan="2"/>
</form>'''
def _trans_unrec(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
voucher = pool.get('account.voucher').browse(cr, uid, data.get('id'))
recs = None
for line in voucher.move_ids:
if line.reconcile_id:
recs = [line.reconcile_id.id]
for rec in recs:
pool.get('account.move.reconcile').unlink(cr, uid, rec)
return {}
class wiz_unreconcile(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch': _info_form, 'fields': {}, 'state':[('end', 'Cancel'), ('unrec', 'Unreconcile')]}
},
'unrec': {
'actions': [_trans_unrec],
'result': {'type': 'state', 'state':'end'}
}
}
wiz_unreconcile('account.voucher.unreconcile')
@@ -0,0 +1,82 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_voucher_payment
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-05-13 20:11:36+0000\n"
"PO-Revision-Date: 2009-05-13 20:11:36+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: account_voucher_payment
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation transactions"
msgstr ""
#. module: account_voucher_payment
#: model:ir.module.module,description:account_voucher_payment.module_name_translation
msgid "This module includes :\n"
" * It reconcile the invoice (supplier, customer) while paying through \n"
" Accounting Vouchers\n"
" "
msgstr ""
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable"
msgstr ""
#. module: account_voucher_payment
#: view:account.voucher:0
#: field:account.voucher,voucher_line_ids:0
msgid "Voucher Lines"
msgstr ""
#. module: account_voucher_payment
#: model:ir.module.module,shortdesc:account_voucher_payment.module_name_translation
msgid "Invoice Payment/Receipt by Vouchers."
msgstr ""
#. module: account_voucher_payment
#: model:ir.actions.wizard,name:account_voucher_payment.wizard_unreconcile_voucher
msgid "Unreconcile entries"
msgstr ""
#. module: account_voucher_payment
#: field:account.move.line,voucher_invoice:0
#: field:account.voucher.line,invoice_id:0
msgid "Invoice"
msgstr ""
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,end:0
msgid "Cancel"
msgstr ""
#. module: account_voucher_payment
#: field:account.voucher,partner_id:0
msgid "Partner"
msgstr ""
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,unrec:0
msgid "Unreconcile"
msgstr ""
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation"
msgstr ""
+94
View File
@@ -0,0 +1,94 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_voucher_payment
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-05-13 20:11+0000\n"
"PO-Revision-Date: 2010-01-26 11:00+0000\n"
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
"<jesteve@zikzakmedia.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-05-21 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_voucher_payment
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invàlid per a la definició de la vista!"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation transactions"
msgstr "Trenca conciliació de transaccions"
#. module: account_voucher_payment
#: model:ir.module.module,description:account_voucher_payment.module_name_translation
msgid ""
"This module includes :\n"
" * It reconcile the invoice (supplier, customer) while paying through \n"
" Accounting Vouchers\n"
" "
msgstr ""
"Aquest mòdul inclou:\n"
" * Concilia factures de proveïdors i clients mentre són pagades "
"mitjançant \n"
" comprovants comptables\n"
" "
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid ""
"If you unreconciliate transactions, you must also verify all the actions "
"that are linked to those transactions because they will not be disable"
msgstr ""
"Si trenqueu conciliació de transaccions, també heu de comprovar totes les "
"accions que estan relacionades amb aquestes transaccions ja que no seran "
"eliminades"
#. module: account_voucher_payment
#: view:account.voucher:0
#: field:account.voucher,voucher_line_ids:0
msgid "Voucher Lines"
msgstr "Línies de comprovant"
#. module: account_voucher_payment
#: model:ir.module.module,shortdesc:account_voucher_payment.module_name_translation
msgid "Invoice Payment/Receipt by Vouchers."
msgstr "Pagaments i rebuts de factures per comprovant."
#. module: account_voucher_payment
#: model:ir.actions.wizard,name:account_voucher_payment.wizard_unreconcile_voucher
msgid "Unreconcile entries"
msgstr "Trenca conciliació entrades"
#. module: account_voucher_payment
#: field:account.move.line,voucher_invoice:0
#: field:account.voucher.line,invoice_id:0
msgid "Invoice"
msgstr "Factura"
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,end:0
msgid "Cancel"
msgstr "Cancel·la"
#. module: account_voucher_payment
#: field:account.voucher,partner_id:0
msgid "Partner"
msgstr ""
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,unrec:0
msgid "Unreconcile"
msgstr "Trenca conciliació"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation"
msgstr "Trenca conciliació"
@@ -0,0 +1,81 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_voucher_payment
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-05-13 19:47:47+0000\n"
"PO-Revision-Date: 2009-05-16 18:57+0100\n"
"Last-Translator: Jordi Esteve <jesteve@zikzakmedia.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
#. module: account_voucher_payment
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invàlid per a la definició de la vista!"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation transactions"
msgstr "Trenca conciliació de transaccions"
#. module: account_voucher_payment
#: field:account.move.line,voucher_invoice:0
#: field:account.voucher.line,invoice_id:0
msgid "Invoice"
msgstr "Factura"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable"
msgstr "Si trenqueu conciliació de transaccions, també heu de comprovar totes les accions que estan relacionades amb aquestes transaccions ja que no seran eliminades"
#. module: account_voucher_payment
#: view:account.voucher:0
#: field:account.voucher,voucher_line_ids:0
msgid "Voucher Lines"
msgstr "Línies de comprovant"
#. module: account_voucher_payment
#: model:ir.module.module,shortdesc:account_voucher_payment.module_name_translation
msgid "Invoice Payment/Receipt by Vouchers."
msgstr "Pagaments i rebuts de factures per comprovant."
#. module: account_voucher_payment
#: model:ir.actions.wizard,name:account_voucher_payment.wizard_unreconcile_voucher
msgid "Unreconcile entries"
msgstr "Trenca conciliació entrades"
#. module: account_voucher_payment
#: model:ir.module.module,description:account_voucher_payment.module_name_translation
msgid ""
"This module includes :\n"
" * It reconcile the invoice (supplier, customer) while paying through \n"
" Accounting Vouchers\n"
" "
msgstr ""
"Aquest mòdul inclou:\n"
" * Concilia factures de proveïdors i clients mentre són pagades mitjançant \n"
" comprovants comptables\n"
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,end:0
msgid "Cancel"
msgstr "Cancel·la"
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,unrec:0
msgid "Unreconcile"
msgstr "Trenca conciliació"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation"
msgstr "Trenca conciliació"
+92
View File
@@ -0,0 +1,92 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_voucher_payment
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-05-13 20:11+0000\n"
"PO-Revision-Date: 2010-02-19 05:54+0000\n"
"Last-Translator: Luis Alejandro Rangel Sánchez <xlarsx@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-05-21 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_voucher_payment
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "¡XML inválido para la definición de la vista!"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation transactions"
msgstr "Romper conciliación de transacciones"
#. module: account_voucher_payment
#: model:ir.module.module,description:account_voucher_payment.module_name_translation
msgid ""
"This module includes :\n"
" * It reconcile the invoice (supplier, customer) while paying through \n"
" Accounting Vouchers\n"
" "
msgstr ""
"Este módulo incluye :\n"
" * Concilia facturas de proveedores y clientes mientras son pagadas "
"mediante \n"
" comprobantes contables\n"
" "
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid ""
"If you unreconciliate transactions, you must also verify all the actions "
"that are linked to those transactions because they will not be disable"
msgstr ""
"Si rompe conciliación de transacciones, también debe verificar todas las "
"acciones que están enlazadas a estas transacciones porque no serán eliminadas"
#. module: account_voucher_payment
#: view:account.voucher:0
#: field:account.voucher,voucher_line_ids:0
msgid "Voucher Lines"
msgstr "Líneas de comprobante"
#. module: account_voucher_payment
#: model:ir.module.module,shortdesc:account_voucher_payment.module_name_translation
msgid "Invoice Payment/Receipt by Vouchers."
msgstr "Pagos y recibos de facturas por comprobantes."
#. module: account_voucher_payment
#: model:ir.actions.wizard,name:account_voucher_payment.wizard_unreconcile_voucher
msgid "Unreconcile entries"
msgstr "Romper concilación entradas"
#. module: account_voucher_payment
#: field:account.move.line,voucher_invoice:0
#: field:account.voucher.line,invoice_id:0
msgid "Invoice"
msgstr "Factura"
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,end:0
msgid "Cancel"
msgstr "Cancelar"
#. module: account_voucher_payment
#: field:account.voucher,partner_id:0
msgid "Partner"
msgstr "Compañero"
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,unrec:0
msgid "Unreconcile"
msgstr "Romper conciliación"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation"
msgstr "Romper conciliación"
@@ -0,0 +1,81 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_voucher_payment
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-05-13 19:47:47+0000\n"
"PO-Revision-Date: 2009-05-16 18:57+0100\n"
"Last-Translator: Jordi Esteve <jesteve@zikzakmedia.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
#. module: account_voucher_payment
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "¡XML inválido para la definición de la vista!"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation transactions"
msgstr "Romper conciliación de transacciones"
#. module: account_voucher_payment
#: field:account.move.line,voucher_invoice:0
#: field:account.voucher.line,invoice_id:0
msgid "Invoice"
msgstr "Factura"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable"
msgstr "Si rompe conciliación de transacciones, también debe verificar todas las acciones que están enlazadas a estas transacciones porque no serán eliminadas"
#. module: account_voucher_payment
#: view:account.voucher:0
#: field:account.voucher,voucher_line_ids:0
msgid "Voucher Lines"
msgstr "Líneas de comprobante"
#. module: account_voucher_payment
#: model:ir.module.module,shortdesc:account_voucher_payment.module_name_translation
msgid "Invoice Payment/Receipt by Vouchers."
msgstr "Pagos y recibos de facturas por comprobantes."
#. module: account_voucher_payment
#: model:ir.actions.wizard,name:account_voucher_payment.wizard_unreconcile_voucher
msgid "Unreconcile entries"
msgstr "Romper concilación entradas"
#. module: account_voucher_payment
#: model:ir.module.module,description:account_voucher_payment.module_name_translation
msgid ""
"This module includes :\n"
" * It reconcile the invoice (supplier, customer) while paying through \n"
" Accounting Vouchers\n"
" "
msgstr ""
"Este módulo incluye :\n"
" * Concilia facturas de proveedores y clientes mientras son pagadas mediante \n"
" comprobantes contables\n"
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,end:0
msgid "Cancel"
msgstr "Cancelar"
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,unrec:0
msgid "Unreconcile"
msgstr "Romper conciliación"
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation"
msgstr "Romper conciliación"
@@ -0,0 +1,77 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_voucher_payment
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-26 06:54:11+0000\n"
"PO-Revision-Date: 2009-11-26 06:54:11+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: account_voucher_payment
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation transactions"
msgstr ""
#. module: account_voucher_payment
#: field:account.move.line,voucher_invoice:0
#: field:account.voucher.line,invoice_id:0
msgid "Invoice"
msgstr ""
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable"
msgstr ""
#. module: account_voucher_payment
#: view:account.voucher:0
#: field:account.voucher,voucher_line_ids:0
msgid "Voucher Lines"
msgstr ""
#. module: account_voucher_payment
#: model:ir.module.module,shortdesc:account_voucher_payment.module_meta_information
msgid "Invoice Payment/Receipt by Vouchers."
msgstr ""
#. module: account_voucher_payment
#: model:ir.actions.wizard,name:account_voucher_payment.wizard_unreconcile_voucher
msgid "Unreconcile entries"
msgstr ""
#. module: account_voucher_payment
#: model:ir.module.module,description:account_voucher_payment.module_meta_information
msgid "This module includes :\n"
" * It reconcile the invoice (supplier, customer) while paying through \n"
" Accounting Vouchers\n"
" "
msgstr ""
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,end:0
msgid "Cancel"
msgstr ""
#. module: account_voucher_payment
#: wizard_button:account.voucher.unreconcile,init,unrec:0
msgid "Unreconcile"
msgstr ""
#. module: account_voucher_payment
#: wizard_view:account.voucher.unreconcile,init:0
msgid "Unreconciliation"
msgstr ""
@@ -25,7 +25,7 @@
'category': 'Generic Modules/Others',
'description': """
This module allows you to define what is the default invoicing rate for a specific journal on a given account. This is mostly used when a user encode his timesheet: the values are retrieved and the fields are auto-filled... but the possibility to change these values is still available.
This module allows you to define what is the default invoicing rate for a specific journal on a given account. This is mostly used when a user encodes his timesheet: the values are retrieved and the fields are auto-filled... but the possibility to change these values is still available.
Obviously if no data has been recorded for the current account, the default value is given as usual by the account data so that this module is perfectly compatible with older configurations.
+1 -1
View File
@@ -26,7 +26,7 @@
'category': 'Generic Modules/Others',
'description': """
This module allows you to define what is the default function of a specific user on a given account. This is mostly used when a user encode his timesheet: the values are retrieved and the fields are auto-filled... but the possibility to change these values is still available.
This module allows you to define what is the default function of a specific user on a given account. This is mostly used when a user encodes his timesheet: the values are retrieved and the fields are auto-filled... but the possibility to change these values is still available.
Obviously if no data has been recorded for the current account, the default value is given as usual by the employee data so that this module is perfectly compatible with older configurations.
+5 -4
View File
@@ -20,10 +20,11 @@
##############################################################################
{
"name" : "Basic Calendar Functionality",
"version" : "1.0",
"depends" : ["base"],
'description': """Full featured calendar system that support:
"name" : "Basic Calendar Functionality",
"version" : "1.0",
"depends" : ["base"],
'description': """Full featured calendar system that supports:
- Alerts (create requests)
- Recurring events (*)
- Invitations to others people""",
+2 -1
View File
@@ -1660,9 +1660,10 @@ class ir_model(osv.osv):
@param ids: List of IR Model’s IDs.
@param context: A standard dictionary for contextual values
"""
new_ids = isinstance(ids, (str, int, long)) and [ids] or ids
if not context:
context = {}
data = super(ir_model, self).read(cr, uid, ids, fields=fields, \
data = super(ir_model, self).read(cr, uid, new_ids, fields=fields, \
context=context, load=load)
if data:
for val in data:
+24 -28
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Attendee form view-->
<record id="base_calendar_attendee_form_view" model="ir.ui.view">
@@ -24,7 +24,7 @@
<field name="user_id" string="Invited User"/>
<newline/>
<field name="partner_address_id"
string="Partner Contact" />
string="Contact" />
<field name="partner_id"
string="Partner" readonly="1" />
</group>
@@ -67,7 +67,7 @@
</form>
</field>
</record>
<!-- Attendee tree view-->
<record id="base_calendar_attendee_tree_view" model="ir.ui.view">
@@ -86,9 +86,9 @@
</tree>
</field>
</record>
<!-- Attendee search view-->
<record id="base_calendar_attendee_search_view" model="ir.ui.view">
<field name="name">calendar.attendee.search</field>
<field name="model">calendar.attendee</field>
@@ -108,7 +108,7 @@
<field name="cutype" string="Invitation type" select="1"/>
<field name="event_date" select="1"/>
<newline/>
<group expand="0" string="Group By..." colspan="16">
<group expand="1" string="Group By...">
<filter string="Type" icon="terp-project" help="Invitation Type"
domain="[]" context="{'group_by':'cutype'}" />
<filter string="Role" icon="terp-project"
@@ -119,14 +119,13 @@
<filter string="User" icon="terp-partner" domain="[]"
context="{'group_by':'user_id'}" />
<filter string="Contact" icon="terp-partner" domain="[]"
context="{'group_by':'partner_address_id'}" />
context="{'group_by':'partner_address_id'}" />
<filter string="State" icon="terp-project" help="Invitation Type"
domain="[]" context="{'group_by':' state'}" />
</group>
</search>
</field>
</record>
<!-- Action for attendee view-->
<record id="action_view_attendee_form" model="ir.actions.act_window">
<field name="name">Event Invitations</field>
<field name="type">ir.actions.act_window</field>
@@ -136,14 +135,14 @@
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
<field name="context">{'default_sent_by_uid': uid}</field>
</record>
<!-- Calenadar's menu -->
<menuitem id="base.menu_calendar_configuration" name="Calendar"
parent="base.menu_base_config" sequence="10" />
<!-- Invitation menu -->
<menuitem id="menu_attendee_invitations"
name="Event Invitations" parent="base.menu_calendar_configuration"
sequence="10" action="action_view_attendee_form" />
@@ -183,9 +182,6 @@
</tree>
</field>
</record>
<!-- Action for alarms view-->
<record id="action_res_alarm_view" model="ir.actions.act_window">
<field name="name">Available Alarms</field>
<field name="type">ir.actions.act_window</field>
@@ -193,7 +189,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Menu for Alarms-->
<menuitem id="menu_crm_meeting_avail_alarm"
@@ -201,8 +197,8 @@
action="base_calendar.action_res_alarm_view"
parent="base.menu_calendar_configuration" />
<!-- Event Form View-->
<!-- Event Form View-->
<record model="ir.ui.view" id="event_form_view">
<field name="name">Event Form</field>
<field name="model">calendar.event</field>
@@ -300,7 +296,7 @@
nolabel="1" widget="one2many" mode="tree,form">
<tree string="Invitation details" editable="top">
<field name="email" />
<field name="role" select="1" />
<field name="role" width="200" select="1" />
<field name="state" />
</tree>
<form string="Invitation details">
@@ -363,7 +359,7 @@
</tree>
</field>
</record>
<!-- Event Calendar View -->
<record model="ir.ui.view" id="event_calendar_view">
@@ -379,9 +375,9 @@
</calendar>
</field>
</record>
<!-- Event Search View-->
<record id="view_calendar_event_filter" model="ir.ui.view">
<field name="name">Calendar Events Search</field>
<field name="model">calendar.event</field>
@@ -402,7 +398,7 @@
<field name="class" select="1"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="16">
<group expand="1" string="Group By...">
<filter string="Date" icon="terp-project"
domain="[]" context="{'group_by':'date'}" />
<filter string="Availability" icon="terp-project"
@@ -419,7 +415,7 @@
<!-- Event action -->
<record id="action_view_event" model="ir.actions.act_window">
<field name="name">Events</field>
<field name="type">ir.actions.act_window</field>
@@ -428,12 +424,12 @@
<field name="view_mode">tree,form,calendar</field>
<field name="search_view_id" ref="view_calendar_event_filter"/>
</record>
<!-- Event menu -->
<menuitem id="menu_events"
name="Events" parent="base.menu_calendar_configuration"
sequence="5" action="action_view_event" />
</data>
</openerp>
@@ -6,3 +6,4 @@
"access_calendar_todo","calendar.todo","model_calendar_todo",,1,1,1,1
"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",,1,1,1,1
"access_calendar_event_edit_all","calendar_event_edit_all","model_calendar_event_edit_all",,1,1,1,1
"access_base_calendar_set_exrule","base.calendar.set.exrule","model_base_calendar_set_exrule",,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
6 access_calendar_todo calendar.todo model_calendar_todo 1 1 1 1
7 access_base_calendar_invite_attendee base_calendar.invite.attendee model_base_calendar_invite_attendee 1 1 1 1
8 access_calendar_event_edit_all calendar_event_edit_all model_calendar_event_edit_all 1 1 1 1
9 access_base_calendar_set_exrule base.calendar.set.exrule model_base_calendar_set_exrule 1 1 1 1
+2 -2
View File
@@ -25,14 +25,14 @@
'version': '1.0',
'category': 'Generic Modules/Base',
'description': """
This module allows you to manage entirely your contacts.
This module allows you to manage your contacts entirely.
It lets you define
*contacts unrelated to a partner,
*contacts working at several addresses (possibly for different partners),
*contacts with possibly different functions for each of its job's addresses
It also add new menu items located in
It also adds new menu items located in
Partners \ Contacts
Partners \ Functions
+1 -1
View File
@@ -23,7 +23,7 @@
'version': '1.0',
'category': 'Generic Modules/Base',
'description': """
This module install the base for IBAN (International Bank Account Number) bank accounts and checks for its validity
This module installs the base for IBAN (International Bank Account Number) bank accounts and checks for its validity
""",
'author': 'Tiny',
+1 -1
View File
@@ -27,7 +27,7 @@
'description': """
This module's aim is to check the quality of other modules.
It defines a wizard on the list of modules in OpenERP, which allow you to
It defines a wizard on the list of modules in OpenERP, which allows you to
evaluate them on different criteria such as: the respect of OpenERP coding
standards, the speed efficiency...
+1 -1
View File
@@ -39,7 +39,7 @@ for custom configurations and demo/testing data.
How to use it:
Run Administration/Customization/Module Creation/Export Customizations As a Module wizard.
Select datetime critearea of recording and objects to be recorded and Record module.
Select datetime critearia of recording and objects to be recorded and Record module.
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
+2 -2
View File
@@ -24,8 +24,8 @@
'name': 'Report Creator',
'version': '1.0',
'category': 'Generic Modules/Base',
'description': """This modules allows you to create any statistic
report on several object. It's a SQL query builder and browser
'description': """This module allows you to create any statistic
report on several objects. It's a SQL query builder and browser
for and users.
After installing the module, it adds a menu to define custom report in
+17 -17
View File
@@ -7,24 +7,24 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 12:10+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-25 16:41+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:16+0000\n"
"X-Launchpad-Export-Date: 2010-05-27 03:42+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_account
#: view:board.board:0
msgid "Analytic accounts to close"
msgstr ""
msgstr "Konta analityczne do zamknięcia"
#. module: board_account
#: view:board.board:0
msgid "Draft invoices"
msgstr ""
msgstr "Projekty faktur"
#. module: board_account
#: constraint:ir.ui.view:0
@@ -35,61 +35,61 @@ msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
#: model:ir.actions.act_window,name:board_account.open_board_account
#: model:ir.ui.menu,name:board_account.menu_board_account
msgid "Accounting Dashboard"
msgstr ""
msgstr "Konsola księgowości"
#. module: board_account
#: model:ir.actions.act_window,name:board_account.action_aged_receivable
msgid "Receivable Accounts"
msgstr ""
msgstr "Konta wierzytelności"
#. module: board_account
#: view:board.board:0
#: model:ir.actions.act_window,name:board_account.act_my_account
msgid "Accounts to invoice"
msgstr ""
msgstr "Konta do faktur"
#. module: board_account
#: view:board.board:0
#: model:ir.actions.act_window,name:board_account.action_account_analytic_line_to_invoice
msgid "Costs to invoice"
msgstr ""
msgstr "Koszty do faktur"
#. module: board_account
#: view:board.board:0
msgid "Aged receivables"
msgstr ""
msgstr "Przeterminowane wierzytelności"
#. module: board_account
#: model:ir.module.module,shortdesc:board_account.module_meta_information
msgid "Board for accountant"
msgstr ""
msgstr "Konsola dla księgowści"
#. module: board_account
#: model:ir.actions.act_window,name:board_account.action_aged_income
msgid "Income Accounts"
msgstr ""
msgstr "Konta przychodowe"
#. module: board_account
#: view:board.board:0
msgid "My indicators"
msgstr ""
msgstr "Moje wskaźniki"
#. module: board_account
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: board_account
#: model:ir.ui.menu,name:board_account.next_id_68
msgid "Accounting"
msgstr ""
msgstr "Księgowość"
#. module: board_account
#: view:board.board:0
msgid "Account Board"
msgstr ""
msgstr "Konsola kont"
#. module: board_account
#: view:board.board:0
msgid "Aged income"
msgstr ""
msgstr "Przeterminowany dochód"
+1 -1
View File
@@ -25,7 +25,7 @@
'version': '1.0',
'category': 'Board/Manufacturing',
'description': """
This module creates a dashboards for Manufaturing that includes:
This module creates a dashboard for Manufaturing that includes:
* List of next production orders
* List of deliveries (out picking)
* Graph of work center load
+1 -1
View File
@@ -25,7 +25,7 @@
'version': '1.0',
'category': 'Board/Projects & Services',
'description': """
This module implements a dashboard for project member that includes:
This module implements a dashboard for project members that includes:
* List of my open tasks
* List of messages
* Members list of project
+1 -1
View File
@@ -25,7 +25,7 @@
'version': '1.0',
'category': 'Board/Purchase',
'description': """
This module implements a dashboard for purcgase management that includes:
This module implements a dashboard for purchase management that includes:
* Current Purchase Orders
* Draft Purchase Orders
* Graph for quantity and amount per month
+1 -1
View File
@@ -26,7 +26,7 @@
'category': 'Board/Sales & Purchase',
'description': """
This module implements a dashboard for salesman that includes:
* You open quotations
* Your open quotations
* Top 10 sales of the month
* Cases statistics
* Graph of sales by product
+1
View File
@@ -33,6 +33,7 @@ import crm_installer
import report
import wizard
import res_partner
+5 -3
View File
@@ -32,12 +32,12 @@ assignment, resolution and notification.
Open ERP ensures that all cases are successfully tracked by users, customers and
suppliers. It can automatically send reminders, escalate the request, trigger
specific methods and lots of others actions based on your enterprise own rules.
specific methods and lots of other actions based on your own enterprise rules.
The greatest thing about this system is that users don't need to do anything
special. They can just send email to the request tracker. Open ERP will take
care of thanking them for their message, automatically routing it to the
appropriate staff, and making sure all future correspondence gets to the right
appropriate staff, and make sure all future correspondence gets to the right
place.
The CRM module has a email gateway for the synchronisation interface
@@ -96,7 +96,9 @@ between mails and Open ERP.""",
'report/crm_phonecall_report_view.xml',
'process/crm_configuration_process.xml',
'crm_installer_view.xml'
'crm_installer_view.xml',
'res_partner_view.xml'
],
'demo_xml': [
'crm_demo.xml',
+7 -8
View File
@@ -2,7 +2,7 @@
<openerp>
<data>
<!--Lead Stage Form view -->
<!--Lead Stage Form view -->
<record id="crm_lead_stage_act" model="ir.actions.act_window">
<field name="name">Lead Stages</field>
@@ -16,7 +16,7 @@
groups="base.group_extended"
parent="crm.menu_crm_case_stage" />
<!-- Resource Type Form View -->
<!-- Resource Type Form View -->
<record id="crm_lead_resource_act" model="ir.actions.act_window">
<field name="name">Lead Resource Type</field>
@@ -31,7 +31,7 @@
groups="base.group_extended"
parent="crm.menu_crm_case_resource_type" />
<!-- CRM Lead Form View -->
<!-- CRM Lead Form View -->
<record model="ir.ui.view" id="crm_case_form_view_leads">
<field name="name">CRM - Leads Form</field>
@@ -190,7 +190,7 @@
</field>
</record>
<!-- CRM Lead Tree View -->
<!-- CRM Lead Tree View -->
<record model="ir.ui.view" id="crm_case_tree_view_leads">
<field name="name">CRM - Leads Tree</field>
@@ -239,7 +239,7 @@
</field>
</record>
<!-- CRM Lead Calendar View -->
<!-- CRM Lead Calendar View -->
<record model="ir.ui.view" id="crm_case_calendar_view_leads">
<field name="name">CRM - Leads Calendar</field>
@@ -257,7 +257,7 @@
</field>
</record>
<!-- CRM Lead Search View -->
<!-- CRM Lead Search View -->
<record id="view_crm_case_leads_filter" model="ir.ui.view">
<field name="name">CRM - Leads Search</field>
@@ -306,7 +306,7 @@
help="Show Sales Team"/>
</field>
<newline/>
<group expand="0" string="Group By..." colspan="14">
<group expand="1" string="Group By...">
<filter string="Stage" icon="terp-crm" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="State" icon="terp-crm" domain="[]" context="{'group_by':'state'}"/>
<filter string="Source" icon="terp-crm" domain="[]" context="{'group_by':'categ_id'}"/>
@@ -322,6 +322,5 @@
</field>
</record>
</data>
</openerp>
-12
View File
@@ -175,16 +175,4 @@ class res_users(osv.osv):
res_users()
class res_partner(osv.osv):
""" Inherits partner and adds meetings information in the partner form """
_inherit = 'res.partner'
_columns = {
'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\
'Meetings'),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+9 -25
View File
@@ -2,7 +2,7 @@
<openerp>
<data>
<!-- CRM Meetings Categories Form View -->
<!-- CRM Meetings Categories Form View -->
<record id="crm_meeting_categ_action" model="ir.actions.act_window">
<field name="name">Meeting Categories</field>
@@ -16,7 +16,7 @@
<menuitem action="crm_meeting_categ_action"
id="menu_crm_case_meeting-act" parent="crm.menu_crm_case_categ" />
<!-- CRM Meetings Form View -->
<!-- CRM Meetings Form View -->
<record model="ir.ui.view" id="crm_case_form_view_meet">
<field name="name">CRM - Meetings Form</field>
@@ -204,7 +204,7 @@
</field>
</record>
<!-- CRM Meeting Tree View -->
<!-- CRM Meeting Tree View -->
<record model="ir.ui.view" id="crm_case_tree_view_meet">
<field name="name">CRM - Meetings Tree</field>
@@ -222,7 +222,7 @@
</field>
</record>
<!-- CRM Meeting Calendar -->
<!-- CRM Meeting Calendar -->
<record model="ir.ui.view" id="crm_case_calendar_view_meet">
<field name="name">CRM - Meetings Calendar</field>
@@ -238,7 +238,7 @@
</field>
</record>
<!-- CRM Meeting Gantt -->
<!-- CRM Meeting Gantt -->
<record id="crm_case_gantt_view_meet" model="ir.ui.view">
<field name="name">CRM - Meetings Gantt</field>
@@ -254,7 +254,7 @@
</field>
</record>
<!-- CRM Meeting Search View -->
<!-- CRM Meeting Search View -->
<record id="view_crm_case_meetings_filter" model="ir.ui.view">
<field name="name">CRM - Meetings Search</field>
@@ -277,7 +277,7 @@
<field name="user_id" select="1" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="16">
<group expand="1" string="Group By...">
<filter string="Date" icon="terp-project"
domain="[]" context="{'group_by':'date'}" />
<filter string="Privacy" icon="terp-crm"
@@ -296,7 +296,7 @@
</field>
</record>
<!-- Calendar Attendee Form View -->
<!-- Calendar Attendee Form View -->
<record id="attendee_form_view_inherit" model="ir.ui.view">
<field name="name">calendar.attendee.form.inherit</field>
@@ -310,7 +310,7 @@
</field>
</record>
<!-- Calendar Attendee Tree View -->
<!-- Calendar Attendee Tree View -->
<record id="attendee_tree_view_inherit" model="ir.ui.view">
<field name="name">calendar.attendee.tree.inherit</field>
@@ -324,21 +324,5 @@
</field>
</record>
<!-- Partners inherited form -->
<record id="view_meeting_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.meeting.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="CRM Info">
<field name="meeting_ids" colspan="4" nolabel="1" />
</page>
</notebook>
</field>
</record>
</data>
</openerp>
-12
View File
@@ -163,16 +163,4 @@ class crm_opportunity(osv.osv):
crm_opportunity()
class res_partner(osv.osv):
""" Inherits partner and adds Opportunities information in the partner form """
_inherit = 'res.partner'
_columns = {
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
'Opportunities', domain=[('type', '=', 'opportunity')]),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+18 -73
View File
@@ -2,7 +2,7 @@
<openerp>
<data>
<!-- Opportunity Categories Form View -->
<!-- Opportunity Categories Form View -->
<record id="crm_opportunity_categ_action" model="ir.actions.act_window">
<field name="name">Opportunity Categories</field>
@@ -17,7 +17,7 @@
id="menu_crm_case_opportunity-act"
parent="crm.menu_crm_case_categ" />
<!-- Opportunity Stages Form View-->
<!-- Opportunity Stages Form View-->
<record id="crm_opportunity_stage_act" model="ir.actions.act_window">
<field name="name">Opportunity Stages</field>
@@ -32,7 +32,7 @@
id="menu_crm_opportunity_stage_act"
parent="crm.menu_crm_case_stage" />
<!-- Opportunity Resource Type Form View -->
<!-- Opportunity Resource Type Form View -->
<record id="crm_opportunity_resource_act" model="ir.actions.act_window">
<field name="name">Opportunity Resource Type</field>
@@ -47,7 +47,7 @@
id="menu_crm_opportunity_resource_act"
parent="crm.menu_crm_case_resource_type" />
<!-- Opportunities Form View -->
<!-- Opportunities Form View -->
<record model="ir.ui.view" id="crm_case_form_view_oppor">
<field name="name">Opportunities</field>
@@ -204,7 +204,7 @@
</field>
</record>
<!-- Opportunities Tree View -->
<!-- Opportunities Tree View -->
<record model="ir.ui.view" id="crm_case_tree_view_oppor">
<field name="name">Opportunities Tree</field>
@@ -246,7 +246,7 @@
</field>
</record>
<!-- Opportunities Graph View -->
<!-- Opportunities Graph View -->
<record model="ir.ui.view" id="crm_case_graph_view_opportunity">
<field name="name">CRM - Opportunity Graph</field>
@@ -261,7 +261,7 @@
</field>
</record>
<!-- Opportunities Search View -->
<!-- Opportunities Search View -->
<record id="view_crm_case_opportunities_filter" model="ir.ui.view">
<field name="name">CRM - Opportunities Search</field>
@@ -293,11 +293,10 @@
<field name="user_id" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]"
help="My Opportunities" default="1"
/>
help="My Opportunities" default="1"/>
<filter icon="terp-partner"
domain="[('user_id','=', uid)]"
help="Unassigned Opportunities" />
help="Unassigned Opportunities"/>
</field>
<field name="section_id"
default="context.get('section_id', False)" select="1"
@@ -307,80 +306,26 @@
help="My Sale Team" />
</field>
<newline/>
<group expand="0" string="Group By..." colspan="16">
<group expand="1" string="Group By...">
<filter string="Stage" icon="terp-crm" domain="[]"
context="{'group_by':'stage_id'}" />
context="{'group_by':'stage_id'}"/>
<filter string="Priority" icon="terp-crm" domain="[]"
context="{'group_by':'priority'}" />
context="{'group_by':'priority'}"/>
<filter string="Category" icon="terp-crm"
domain="[]" context="{'group_by':'categ_id'}" />
domain="[]" context="{'group_by':'categ_id'}"/>
<separator orientation="vertical" />
<separator orientation="vertical"/>
<filter string="Salesman" icon="terp-crm"
domain="[('user_id','=',uid)]" context="{'group_by':'user_id'}" />
<separator orientation="vertical" />
domain="[('user_id','=',uid)]" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Creation" icon="terp-project"
domain="[]" context="{'group_by':'create_date'}" />
domain="[]" context="{'group_by':'create_date'}"/>
<filter string="Exp.Closing" icon="terp-project"
domain="[]" context="{'group_by':'date_deadline'}" />
domain="[]" context="{'group_by':'date_deadline'}"/>
</group>
</search>
</field>
</record>
<!-- Partners inherited form -->
<record id="view_opp_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.opportunity.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="phonecall_ids" position="after">
<field name="opportunity_ids" colspan="4" nolabel="1" domain="[('type', '=', 'opportunity')]">
<tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
<field name="create_date"/>
<field name="partner_name"/>
<field name="name"/>
<field name="email_from"/>
<field name="phone"/>
<field name="categ_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="referred" invisible="1"/>
<field name="stage_id"/>
<button name="stage_previous" string="Previous"
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next"
states="open,pending" type="object"
icon="gtk-go-forward" />
<field name="section_id"
invisible="context.get('invisible_section', True)" />
<field name="user_id" />
<field name="state" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_close" string="Close"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button string="Convert to Opportunity"
name="convert_opportunity"
states="draft,open,pending" icon="gtk-index"
type="object" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
</tree>
</field>
</field>
</field>
</record>
</data>
</openerp>
-10
View File
@@ -178,15 +178,5 @@ class crm_phonecall(osv.osv, crm_case):
crm_phonecall()
class res_partner(osv.osv):
""" Inherits partner and adds Phonecalls information in the partner form """
_inherit = 'res.partner'
_columns = {
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id', 'Phonecalls'),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-14
View File
@@ -289,19 +289,5 @@
</field>
</record>
<!-- Partners inherited form -->
<record id="view_phonecall_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.phonecall.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="meeting_ids" position="after">
<field name="phonecall_ids" colspan="4" nolabel="1" />
</field>
</field>
</record>
</data>
</openerp>
+17 -18
View File
@@ -45,7 +45,7 @@
</field>
</record>
<!-- Case Sections Tree View -->
<!-- Case Sections Tree View -->
<record id="crm_case_section_view_tree" model="ir.ui.view">
<field name="name">crm.case.section.tree</field>
@@ -61,7 +61,7 @@
</field>
</record>
<!-- Case Sections Action -->
<!-- Case Sections Action -->
<record id="crm_case_section_act" model="ir.actions.act_window">
<field name="name">Sales Team</field>
@@ -70,7 +70,7 @@
<field name="view_id" ref="crm_case_section_view_tree"/>
</record>
<!-- CRM Stage Tree View -->
<!-- CRM Stage Tree View -->
<record model="ir.ui.view" id="crm_case_stage_tree">
<field name="name">crm.case.stage.tree</field>
@@ -87,7 +87,7 @@
</field>
</record>
<!-- CRM Stage Form View -->
<!-- CRM Stage Form View -->
<record model="ir.ui.view" id="crm_case_stage_form">
<field name="name">crm.case.stage.form</field>
@@ -108,7 +108,7 @@
</field>
</record>
<!-- CRM Stage Action -->
<!-- CRM Stage Action -->
<record id="crm_case_stage_act" model="ir.actions.act_window">
<field name="name">Stages</field>
@@ -119,7 +119,7 @@
<menuitem id="menu_crm_case_stage" name="Stages" parent="base.menu_crm_configuration" groups="base.group_extended"/>
<!-- Case Categories Form View -->
<!-- Case Categories Form View -->
<record id="crm_case_categ-view" model="ir.ui.view">
<field name="name">crm.case.categ.form</field>
@@ -134,7 +134,7 @@
</field>
</record>
<!-- Case Categories Tree View -->
<!-- Case Categories Tree View -->
<record id="crm_case_categ_tree-view" model="ir.ui.view">
<field name="name">crm.case.categ.tree</field>
@@ -148,7 +148,7 @@
</field>
</record>
<!-- Case Categories Action -->
<!-- Case Categories Action -->
<record id="crm_case_categ-act" model="ir.actions.act_window">
<field name="name">Categories</field>
@@ -163,7 +163,7 @@
parent="base.menu_crm_configuration" />
<!-- Resource Type of case Tree View -->
<!-- Resource Type of case Tree View -->
<record model="ir.ui.view" id="crm_case_resource_type_tree">
<field name="name">crm.case.resource.type.tree</field>
@@ -178,7 +178,7 @@
</field>
</record>
<!-- Resource Type of case Form View -->
<!-- Resource Type of case Form View -->
<record model="ir.ui.view" id="crm_case_resource_type_form">
<field name="name">crm.case.resource.type.form</field>
@@ -193,7 +193,7 @@
</field>
</record>
<!-- Resource Type of case Action -->
<!-- Resource Type of case Action -->
<record id="crm_case_resource_type_act" model="ir.actions.act_window">
<field name="name">Resource Type</field>
@@ -212,7 +212,7 @@
<field name="view_id" ref="crm_case_section_view_tree"/>
</record>
<!-- Cases Tree View -->
<!-- Cases Tree View -->
<record id="crm_case_log_tree-view" model="ir.ui.view">
<field name="name">crm.case.log.tree</field>
@@ -232,8 +232,7 @@
</field>
</record>
<!-- Segmentation line Tree View -->
<!-- Segmentation line Tree View -->
<record id="crm_segmentation_line_tree-view" model="ir.ui.view">
<field name="name">crm.segmentation.line.tree</field>
@@ -250,7 +249,7 @@
</field>
</record>
<!-- Segmentation line Form View -->
<!-- Segmentation line Form View -->
<record id="crm_segmentation_line-view" model="ir.ui.view">
<field name="name">crm.segmentation.line.form</field>
@@ -270,7 +269,7 @@
</field>
</record>
<!-- CRM Segmentation Form View -->
<!-- CRM Segmentation Form View -->
<record id="crm_segmentation-view" model="ir.ui.view">
<field name="name">crm.segmentation.form</field>
@@ -315,7 +314,7 @@
</field>
</record>
<!-- CRM Segmentation Tree View -->
<!-- CRM Segmentation Tree View -->
<record id="crm_segmentation_tree-view" model="ir.ui.view">
<field name="name">crm.segmentation.tree</field>
@@ -375,7 +374,7 @@
</field>
</record>
<!-- Inherit View From Partner -->
<!-- Inherit View From Partner -->
<record id="view_partners_form_crm1" model="ir.ui.view">
<field name="name">view.res.partner.form.crm.inherited1</field>
+17 -16
View File
@@ -107,7 +107,7 @@
help="My section" />
</field>
<field name="company_id" widget="selection">
<field name="company_id" widget="selection" groups="base.group_multi_company">
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[('section_id.user_id.company_id','=',uid)]"
@@ -119,21 +119,7 @@
</field>
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12" groups="base.group_extended">
<filter icon="terp-sale"
string="Done"
domain="[('state','=','done')]"/>
<filter icon="terp-sale"
string="Cancel"
domain="[('state','=','cancel')]"/>
<group>
<separator orientation="vertical"/>
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
</group>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-sale"
domain="[]" context="{'group_by':'user_id'}" />
@@ -166,6 +152,21 @@
domain="[]" context="{'group_by':'name'}" />
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<filter icon="terp-sale"
string="Done"
domain="[('state','=','done')]"/>
<filter icon="terp-sale"
string="Cancel"
domain="[('state','=','cancel')]"/>
<group>
<separator orientation="vertical"/>
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
</group>
</group>
</search>
</field>
</record>
+34 -34
View File
@@ -63,7 +63,7 @@
</record>
<!-- Phone calls by user and section Search View -->
<record id="view_report_crm_phonecall_filter" model="ir.ui.view">
<field name="name">crm.phonecall.report.select</field>
<field name="model">crm.phonecall.report</field>
@@ -107,7 +107,7 @@
help="My section" />
</field>
<field name="company_id" widget="selection">
<field name="company_id" widget="selection" groups="base.group_multi_company">
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[('section_id.user_id.company_id','=',uid)]"
@@ -118,8 +118,39 @@
<filter icon="terp-crm" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
</field>
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-sale"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Company" icon="terp-sale"
domain="[]"
context="{'group_by':'company_id'}" />
<filter string="Section" icon="terp-sale"
domain="[]"
context="{'group_by':'section_id'}" />
<separator orientation="vertical" />
<filter string="State" icon="terp-sale"
domain="[]" context="{'group_by':'state'}" />
<filter string="Category" icon="terp-sale"
domain="[]" context="{'group_by':'categ_id'}" />
<separator orientation="vertical" />
<filter string="Day" icon="terp-sale"
domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-sale"
domain="[]" context="{'group_by':'month'}" />
<filter string="Year" icon="terp-sale"
domain="[]" context="{'group_by':'name'}" />
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12">
<group expand="0" string="Extended options..." groups="base.group_extended">
<filter icon="terp-sale"
string="Done"
domain="[('state','=','done')]"/>
@@ -131,39 +162,8 @@
<separator orientation="vertical"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
</group>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="User" name="User" icon="terp-sale"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Company" icon="terp-sale"
domain="[]"
context="{'group_by':'company_id'}" />
<filter string="Section" icon="terp-sale"
domain="[]"
context="{'group_by':'section_id'}" />
<separator orientation="vertical" />
<filter string="State" icon="terp-sale"
domain="[]" context="{'group_by':'state'}" />
<filter string="Category" icon="terp-sale"
domain="[]" context="{'group_by':'categ_id'}" />
<separator orientation="vertical" />
<filter string="Day" icon="terp-sale"
domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-sale"
domain="[]" context="{'group_by':'month'}" />
<filter string="Year" icon="terp-sale"
domain="[]" context="{'group_by':'name'}" />
</group>
</search>
</field>
</record>
+39
View File
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields,osv
class res_partner(osv.osv):
""" Inherits partner and adds CRM information in the partner form """
_inherit = 'res.partner'
_columns = {
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
'Opportunities', domain=[('type', '=', 'opportunity')]),
'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\
'Meetings'),
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id', 'Phonecalls'),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- Partners inherited form -->
<record id="view_crm_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.crm.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="CRM">
<field name="meeting_ids" colspan="4" nolabel="1" />
<field name="phonecall_ids" colspan="4" nolabel="1" />
<field name="opportunity_ids" colspan="4" nolabel="1" domain="[('type', '=', 'opportunity')]">
<tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
<field name="create_date"/>
<field name="partner_name"/>
<field name="name"/>
<field name="email_from"/>
<field name="phone"/>
<field name="categ_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="referred" invisible="1"/>
<field name="stage_id"/>
<button name="stage_previous" string="Previous"
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next"
states="open,pending" type="object"
icon="gtk-go-forward" />
<field name="section_id"
invisible="context.get('invisible_section', True)" />
<field name="user_id" />
<field name="state" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_close" string="Close"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button string="Convert to Opportunity"
name="convert_opportunity"
states="draft,open,pending" icon="gtk-index"
type="object" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
</tree>
</field>
</page>
</notebook>
</field>
</record>
</data>
</openerp>
+1 -2
View File
@@ -147,7 +147,6 @@ class crm_lead2partner(osv.osv_memory):
'user_id': lead.user_id.id,
'comment': lead.description,
})
function_id = self.pool.get('res.partner.function').search(cr,uid,[('name','=',lead.function_name)])
contact_id = contact_obj.create(cr, uid, {
'partner_id': partner_id,
'name': lead.name,
@@ -156,7 +155,7 @@ class crm_lead2partner(osv.osv_memory):
'email': lead.email_from,
'fax': lead.fax,
'title': lead.title,
'function': function_id and function_id[0] or False,
'function': lead.function_name,
'street': lead.street,
'street2': lead.street2,
'zip': lead.zip,
+1 -1
View File
@@ -271,7 +271,7 @@
<field name="section_id" select="1"
widget="selection"/>
<newline/>
<group expand="0" string="Group By..." colspan="10" col="20">
<group expand="1" string="Group By...">
<filter string="Deadline" icon="terp-crm"
domain="[]"
context="{'group_by':'date_deadline'}" />
@@ -67,7 +67,7 @@
</record>
<!-- CRM Claim Report Search View -->
<record id="view_report_crm_claim_filter" model="ir.ui.view">
<field name="name">crm.claim.report.select</field>
<field name="model">crm.claim.report</field>
@@ -122,8 +122,47 @@
<filter icon="terp-crm" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
</field>
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-sale"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Company" icon="terp-sale"
domain="[]"
context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Section" icon="terp-sale"
domain="[]"
context="{'group_by':'section_id'}" />
<separator orientation="vertical" />
<filter string="State" icon="terp-sale"
domain="[]" context="{'group_by':'state'}" />
<filter string="Stage" icon="terp-sale" domain="[]"
context="{'group_by':'stage_id'}" />
<filter string="Category" icon="terp-sale"
domain="[]" context="{'group_by':'categ_id'}" />
<separator orientation="vertical"/>
<filter string="Priority" icon="terp-sale" domain="[]"
context="{'group_by':'priority'}" />
<filter string="Type" icon="terp-sale" domain="[]"
context="{'group_by':'type_id'}" />
<separator orientation="vertical" />
<filter string="Day" icon="terp-sale"
domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-sale"
domain="[]" context="{'group_by':'month'}" />
<filter string="Year" icon="terp-sale"
domain="[]" context="{'group_by':'name'}" />
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12">
<group expand="0" string="Extended options..." groups="base.group_extended">
<filter icon="terp-sale"
string="Done"
domain="[('state','=','done')]"/>
@@ -141,46 +180,6 @@
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
</group>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="User" name="User" icon="terp-sale"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Company" icon="terp-sale"
domain="[]"
context="{'group_by':'company_id'}" />
<filter string="Section" icon="terp-sale"
domain="[]"
context="{'group_by':'section_id'}" />
<separator orientation="vertical" />
<filter string="State" icon="terp-sale"
domain="[]" context="{'group_by':'state'}" />
<filter string="Stage" icon="terp-sale" domain="[]"
context="{'group_by':'stage_id'}" />
<filter string="Category" icon="terp-sale"
domain="[]" context="{'group_by':'categ_id'}" />
<separator orientation="vertical"/>
<filter string="Priority" icon="terp-sale" domain="[]"
context="{'group_by':'priority'}" />
<filter string="Type" icon="terp-sale" domain="[]"
context="{'group_by':'type_id'}" />
<separator orientation="vertical" />
<filter string="Day" icon="terp-sale"
domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-sale"
domain="[]" context="{'group_by':'month'}" />
<filter string="Year" icon="terp-sale"
domain="[]" context="{'group_by':'name'}" />
</group>
</search>
</field>
</record>
@@ -256,7 +256,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Funds">
<group col='6' colspan='4'>
<group>
<filter icon="gtk-new" string="Current"
domain="[('state','in',('draft', 'open'))]" name="current"
help="Current Funds" />
@@ -284,7 +284,7 @@
</field>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="10" col="20">
<group expand="1" string="Group By...">
<filter string="Partner" icon="terp-partner"
domain="[]"
context="{'group_by':'partner_id'}" />
@@ -121,8 +121,38 @@
<filter icon="terp-crm" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
</field>
</group>
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-sale"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Company" icon="terp-sale"
domain="[]"
context="{'group_by':'company_id'}" />
<filter string="Section" icon="terp-sale"
domain="[]"
context="{'group_by':'section_id'}" />
<separator orientation="vertical" />
<filter string="State" icon="terp-sale"
domain="[]" context="{'group_by':'state'}" />
<filter string="Category" icon="terp-sale"
domain="[]" context="{'group_by':'categ_id'}" />
<separator orientation="vertical" />
<filter string="Day" icon="terp-sale"
domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-sale"
domain="[]" context="{'group_by':'month'}" />
<filter string="Year" icon="terp-sale"
domain="[]" context="{'group_by':'name'}" />
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12">
<group expand="0" string="Extended options..." groups="base.group_extended">
<filter icon="terp-sale"
string="Done"
domain="[('state','=','done')]"/>
@@ -130,44 +160,12 @@
<filter icon="terp-sale"
string="Cancel"
domain="[('state','=','cancel')]"/>
<group>
<separator orientation="vertical"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
</group>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="User" name="User" icon="terp-sale"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Company" icon="terp-sale"
domain="[]"
context="{'group_by':'company_id'}" />
<filter string="Section" icon="terp-sale"
domain="[]"
context="{'group_by':'section_id'}" />
<separator orientation="vertical" />
<filter string="State" icon="terp-sale"
domain="[]" context="{'group_by':'state'}" />
<filter string="Category" icon="terp-sale"
domain="[]" context="{'group_by':'categ_id'}" />
<separator orientation="vertical" />
<filter string="Day" icon="terp-sale"
domain="[]" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-sale"
domain="[]" context="{'group_by':'month'}" />
<filter string="Year" icon="terp-sale"
domain="[]" context="{'group_by':'name'}" />
</group>
</search>
</field>
</record>
+1 -1
View File
@@ -243,7 +243,7 @@
help="My section" />
</field>
<newline/>
<group expand="0" string="Group By..." colspan="12" col="20">
<group expand="1" string="Group By...">
<filter string="Customer" icon="terp-crm"
domain="[]" context="{'group_by':'partner_id'}" />
<filter string="State" icon="terp-crm" domain="[]"
@@ -114,36 +114,10 @@
<field name="user_id" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="4" col="5">
<filter icon="terp-sale"
string="Lowest"
domain="[('priority','=','5')]"/>
<filter icon="terp-sale"
string="Low"
domain="[('priority','=','4')]"/>
<filter icon="terp-sale"
string="Normal"
domain="[('priority','=','3')]"/>
<filter icon="terp-sale"
string="High"
domain="[('priority','=','2')]"/>
<filter icon="terp-sale"
string="Highest"
domain="[('priority','=','1')]"/>
</group>
<newline/>
<!-- Helpdesk report after Sales Services Apply Group -->
<group expand="1" string="Group By..." colspan="4" col="8">
<group expand="1" string="Group By...">
<filter string="User" icon="terp-sale"
domain="[]" context="{'group_by':'user_id'}"
default="1" />
domain="[]" context="{'group_by':'user_id'}"
default="1" />
<filter string="Company" icon="terp-sale"
domain="[]"
@@ -169,6 +143,31 @@
domain="[]" context="{'group_by':'name'}" />
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<filter icon="terp-sale"
string="Lowest"
domain="[('priority','=','5')]"/>
<filter icon="terp-sale"
string="Low"
domain="[('priority','=','4')]"/>
<filter icon="terp-sale"
string="Normal"
domain="[('priority','=','3')]"/>
<filter icon="terp-sale"
string="High"
domain="[('priority','=','2')]"/>
<filter icon="terp-sale"
string="Highest"
domain="[('priority','=','1')]"/>
</group>
</search>
</field>
</record>
+1 -1
View File
@@ -24,7 +24,7 @@
'name': 'Carriers and deliveries',
'version': '1.0',
'category': 'Generic Modules/Sales & Purchases',
'description': """Allows you to add delivery methods in sales orders and picking.
'description': """Allows you to add delivery methods in sale orders and picking.
You can define your own carrier and delivery grids for prices.
When creating invoices from picking, Open ERP is able to add and compute the shipping line.
+1 -1
View File
@@ -31,7 +31,7 @@
ATTENTION:
- When you install this module in a running company that have already PDF files stored into the database,
you will lose them all.
- After installing this module PDF's are not longer stored into the database,
- After installing this module PDF's are no longer stored into the database,
but in the servers rootpad like /server/bin/filestore.
""",
'author': 'Tiny',
+1 -1
View File
@@ -26,7 +26,7 @@
'category': 'Generic Modules/Others',
'description': """This is a support FTP Interface with document management system.
With this module you would not only be able to access documents through open erp
also you would be able to connect with them through the file system using the FTP protocol.
but you would also be able to connect with them through the file system using the FTP protocol.
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
+1 -1
View File
@@ -26,7 +26,7 @@
"version" : "1.0",
"depends" : ["base"],
"author" : "Tiny",
"description": """Fetchail:
"description": """Fetchmail:
* Fetch email from Pop / IMAP server
* Support SSL
* Integrated with all Modules
Regular → Executable
+2
View File
@@ -47,6 +47,8 @@
],
'demo_xml': ['hr_demo.xml',
'hr_department_demo.xml'],
'test': ['test/test_hr.yml'],
'installable': True,
'active': False,
'certificate': '0086710558965',
+1 -1
View File
@@ -109,7 +109,7 @@
<field name="job_id" widget="selection"/>
<field name="parent_id" widget="selection" />
<newline />
<group expand="1" string="Group By..." colspan="11" col="11">
<group expand="1" string="Group By...">
<filter string="Manager" icon="terp-sale" domain="[]" context="{'group_by':'parent_id'}"/>
<filter string="Coach" icon="terp-sale" domain="[]" context="{'group_by':'coach_id'}" groups="base.group_extended"/>
<separator orientation="vertical" />
+68
View File
@@ -0,0 +1,68 @@
- |
In order to test the hr module in OpenERP, I will create new Employee , Department and Job Position.
-
|
First I create Department "R & D" in Department form.
-
!record {model: hr.department, id: hr_department_rd0}:
manager_id: base.user_root
name: 'R & D '
-
|
Now, I create a new employee “employee1”.
select "R & D" Department which I had created.
-
!record {model: hr.employee, id: hr_employee_employee0}:
address_home_id: base.res_partner_address_1
company_id: base.main_company
gender: male
marital: hr.hr_employee_marital_status_single
name: employee1
user_id: base.user_root
department_id: 'hr_department_rd0'
- |
In order to check the wizard “Employee Hierarchy” I will create new employee “employee2” and select "employee1" as
Manager.
-
!record {model: hr.employee, id: hr_employee_employee1}:
address_home_id: base.res_partner_address_3000
company_id: base.main_company
gender: male
name: employee2
user_id: base.user_demo
parent_id: 'hr_employee_employee0'
- |
Now I will open up form view of “employee1” and test the wizard “Employee Hierarchy” so it display the employee
hierarchy starting from “employee1”.
- |
Now I will create new Job Position. I will check successfull creation of new Job Position by adding the information.
-
!record {model: hr.job, id: hr_job_jea0}:
department_id: 'hr_department_rd0'
description: 'Position of Junier Application Engineer '
expected_employees: 5
name: 'JEA '
- |
I check that Employee form is in "Open" state.
-
!assert {model: hr.job, id: hr_job_jea0}:
- state == 'open'
- |
I create Employee for this position in this Job Position form.
-
!record {model: hr.job, id: hr_job_jea0}:
employee_ids:
- address_home_id: base.res_partner_address_1
name: employee3
department_id: 'hr_department_rd0'
gender: male
parent_id: 'hr_employee_employee0'
-
I check that "NO of Employee" is "1"
-
!assert {model: hr.job, id: hr_job_jea0}:
- no_of_employee != False
+1 -1
View File
@@ -55,7 +55,7 @@
<field name="name" select="1" />
<field name="action" select="1" />
<newline/>
<group expand="1" string="Group By..." colspan="11" col="11">
<group expand="1" string="Group By...">
<filter name="employee" string="Employee" icon="terp-sale" domain="[]" context="{'group_by':'employee_id'}"/>
<filter string="Day" icon="terp-sale" domain="[]" context="{'group_by':'day'}"/>
</group>
+1
View File
@@ -42,6 +42,7 @@
'hr_contract_view.xml'
],
'demo_xml': [],
'test': ['test/test_hr_contract.yml'],
'installable': True,
'active': False,
'certificate': '0046298028637',
@@ -0,0 +1,46 @@
- |
In order to test hr_contract module in OpenERP,
I will create contract for "Mark Johnson" employee.
- |
First I create Employee "Mark Johnson"
-
!record {model: hr.employee, id: hr_employee_employee0}:
address_home_id: base.res_partner_address_1
company_id: base.main_company
gender: male
name: Mark Johnson
user_id: base.user_root
- |
Given that I have Contract wage period "monthly" and
specify "hours in period" is "176.00"
-
!record {model: hr.contract.wage.type.period, id: hr_contract_wage_type_period_monthly0}:
factor_days: 178.0
name: monthly
- |
Given that I have Contract wage type "Monthly Gross Wage".
select wage period "monthly" and type "Gross". with hour cost "1.9"
-
!record {model: hr.contract.wage.type, id: hr_contract_wage_type_monthlygrosswage0}:
factor_type: 1.9
name: Monthly Gross Wage
period_id: 'hr_contract_wage_type_period_monthly0'
type: gross
- |
Now I start by create contract for "Mark Johnson".
Select wage type "Monthly Gross Wage" and Wage period "monthly"
which I have given.
-
!record {model: hr.contract, id: hr_contract_contract0}:
advantages_gross: 0.0
employee_id: 'hr_employee_employee0'
advantages_net: 0.0
date_end: '2011-05-18'
date_start: '2010-05-18'
name: contract1
wage: 1.0
wage_type_id: hr_contract_wage_type_monthlygrosswage0
working_hours: resource.timesheet_group1
+1 -1
View File
@@ -28,7 +28,7 @@
"depends" : ["hr",'hr_recruitment','survey'],
"description": """
Ability to create employees evaluation.
An evaluation can be created by employee for subordinates
An evaluation can be created by employee for subordinates,
juniors as well as his manager.The evaluation is done under a plan
in which various surveys can be created and it can be defined which
level of employee hierarchy fills what and final review and evaluation
+4 -4
View File
@@ -10,10 +10,10 @@
<search string="Search Evaluation Plan">
<group col='15' colspan='4'>
<field name="name"/>
<field name="company_id" widget="selection"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="20">
<group expand="1" string="Group By..." groups="base.group_multi_company">
<filter string="Company" icon="terp-project" domain="[]" context="{'group_by':'company_id'}"/>
</group>
</search>
@@ -28,7 +28,7 @@
<form string="Evaluation Plan">
<group col="6" colspan="4">
<field name="name" select="1"/>
<field name="company_id" select="1" widget="selection"/>
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
<field name="active"/>
<field name="month_first"/>
<field name="month_next"/>
@@ -51,7 +51,7 @@
<field name="name"/>
<field name="month_first"/>
<field name="month_next"/>
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
@@ -71,7 +71,19 @@
<field name="employee_id" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<group expand="1" string="Group By...">
<filter string="Employee" name="employee" icon="terp-hr" context="{'group_by':'employee_id'}"/>
<filter string="Rating" icon="terp-hr" context="{'group_by':'rating'}"/>
<separator orientation="vertical"/>
<filter string="Plan" icon="terp-hr" context="{'group_by':'plan_id'}"/>
<filter string="State" icon="terp-hr" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-hr" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-hr" context="{'group_by':'create_date'}"/>
<filter string="Year" icon="terp-hr" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<filter icon="terp-hr"
string="Done"
domain="[('state','=','done')]"/>
@@ -87,18 +99,6 @@
<field name="create_date"/>
<field name="closed"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Employee" name="employee" icon="terp-hr" context="{'group_by':'employee_id'}"/>
<filter string="Rating" icon="terp-hr" context="{'group_by':'rating'}"/>
<separator orientation="vertical"/>
<filter string="Plan" icon="terp-hr" context="{'group_by':'plan_id'}"/>
<filter string="State" icon="terp-hr" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-hr" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-hr" context="{'group_by':'create_date'}"/>
<filter string="Year" icon="terp-hr" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>

Some files were not shown because too many files have changed in this diff Show More