[MERGE]: Merge with lp:openobject-addons-trunk
bzr revid: ksa@tinyerp.co.in-20100817113344-j9pe22huobibbve8
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
<field colspan="4" name="name"/>
|
||||
<field colspan="4" name="origin" groups="base.group_extended"/>
|
||||
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)" groups="base.group_user"/>
|
||||
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id" groups="account.group_account_user"/>
|
||||
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id" groups="base.group_extended"/>
|
||||
<newline/>
|
||||
<field name="price_subtotal"/>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<field name="number" readonly="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
|
||||
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}"/>
|
||||
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
|
||||
<newline/>
|
||||
<field name="partner_id" domain="[('supplier','=', 1)]" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" context="{'default_customer': 0}"/>
|
||||
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
|
||||
@@ -178,7 +178,7 @@
|
||||
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, {'company_id': parent.company_id})"/>
|
||||
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)"/>
|
||||
<field name="invoice_line_tax_id" view_mode="2" context="{'type':parent.type}" domain="[('parent_id','=',False)]"/>
|
||||
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id"/>
|
||||
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id" groups="base.group_extended"/>
|
||||
<field name="quantity"/>
|
||||
<field name="price_unit"/>
|
||||
<!-- Removed if subtotal is set -->
|
||||
@@ -263,7 +263,7 @@
|
||||
<field name="number"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
|
||||
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}"/>
|
||||
<button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change" attrs="{'invisible':[('state','!=','draft')]}" groups="account.group_account_user"/>
|
||||
<newline/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)" groups="base.group_user"/>
|
||||
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
|
||||
@@ -302,7 +302,7 @@
|
||||
<field name="state"/>
|
||||
<field name="residual"/>
|
||||
<group col="7" colspan="4" groups="base.group_user">
|
||||
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-check"/>
|
||||
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-check" groups="account.group_account_user"/>
|
||||
<button name="invoice_open" states="draft,proforma2" string="Create" icon="terp-document-new"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
|
||||
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="terp-dolar_ok!"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="2" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
|
||||
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8"/>
|
||||
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="periodical_processing_journal_entries_validation" name="Draft Entries" parent="menu_finance_periodical_processing" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
|
||||
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
|
||||
@@ -20,8 +20,8 @@
|
||||
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
|
||||
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13" groups="base.group_system"/>
|
||||
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
|
||||
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration" groups="base.group_extended"/>
|
||||
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts" groups="base.group_extended"/>
|
||||
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting" groups="base.group_extended"/>
|
||||
<menuitem id="menu_configuration_misc" name="Miscellaneous" parent="menu_finance_configuration"/>
|
||||
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
|
||||
|
||||
@@ -455,7 +455,7 @@ class account_move_line(osv.osv):
|
||||
'invoice': fields.function(_invoice, method=True, string='Invoice',
|
||||
type='many2one', relation='account.invoice', fnct_search=_invoice_search),
|
||||
'account_tax_id':fields.many2one('account.tax', 'Tax'),
|
||||
'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
#TODO: remove this
|
||||
'amount_taxed':fields.float("Taxed Amount", digits_compute=dp.get_precision('Account')),
|
||||
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<field name="model">account.period</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');gray:state in ('done') " string="Period">
|
||||
<tree colors="blue:state in ('draft');gray:state in ('done') " string="Period">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="date_start"/>
|
||||
@@ -895,7 +895,7 @@
|
||||
<field name="debit" sum="Total debit"/>
|
||||
<field name="credit" sum="Total credit"/>
|
||||
<field name="account_tax_id" groups="base.group_extended"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="amount_currency" groups="base.group_extended"/>
|
||||
<field name="currency_id" groups="base.group_extended"/>
|
||||
<field name="reconcile_partial_id" groups="base.group_extended"/>
|
||||
@@ -970,15 +970,15 @@
|
||||
<field name="blocked"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<group col="2" colspan="2" groups="base.group_extended">
|
||||
<separator colspan="2" string="Analytic"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
<separator string="Narration" colspan="4"/>
|
||||
<field name="narration" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Analytic Lines">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
|
||||
<page string="Analytic Lines" groups="base.group_extended">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}" groups="base.group_extended"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
@@ -1017,15 +1017,15 @@
|
||||
<field name="blocked" select="3"/>
|
||||
<newline/>
|
||||
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<separator colspan="4" string="State"/>
|
||||
<newline/>
|
||||
<field name="reconcile_id"/>
|
||||
<field name="reconcile_partial_id"/>
|
||||
<field name="state"/>
|
||||
</page>
|
||||
<page string="Analytic Lines">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1"/>
|
||||
<page string="Analytic Lines" groups="base.group_extended">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" groups="base.group_extended"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
@@ -1243,15 +1243,15 @@
|
||||
<field name="blocked"/>
|
||||
</group>
|
||||
|
||||
<group col="2" colspan="2">
|
||||
<group col="2" colspan="2" groups="base.group_extended">
|
||||
<separator colspan="2" string="Analytic"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
<separator string="Narration" colspan="4"/>
|
||||
<field name="narration" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Analytic Lines">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
|
||||
<page string="Analytic Lines" groups="base.group_extended">
|
||||
<field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}" groups="base.group_extended"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
@@ -1264,7 +1264,7 @@
|
||||
<field name="date_maturity"/>
|
||||
<field name="debit" sum="Total Debit"/>
|
||||
<field name="credit" sum="Total Credit"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="amount_currency" groups="base.group_extended"/>
|
||||
<field name="currency_id" groups="base.group_extended"/>
|
||||
<field name="tax_code_id"/>
|
||||
@@ -1356,6 +1356,10 @@
|
||||
res_model="account.move.line"
|
||||
src_model="account.move"/>
|
||||
|
||||
<record id="account.act_account_move_to_account_move_line_open" model="ir.actions.act_window">
|
||||
<field eval="[(6,0,[ref('account.group_accounting_accountant')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<!-- <record id="action_move_to_review" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">Journal Entries</field>-->
|
||||
<!-- <field name="type">ir.actions.act_window</field>-->
|
||||
@@ -1906,7 +1910,7 @@
|
||||
<field name="debit" sum="Total debit"/>
|
||||
<field name="credit" sum="Total credit"/>
|
||||
<field name="account_tax_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<field name="view_id" ref="board_account_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting"/>
|
||||
<menuitem id="menu_dashboard_acc" name="Dashboard" sequence="2" parent="account.menu_finance_reporting" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
<menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/>
|
||||
<menuitem icon="terp-account" id="account.menu_finance" name="Accounting" sequence="13" action="open_board_account"/>
|
||||
</data>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<group colspan="4" col="6">
|
||||
<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="parent_id" on_change="on_change_parent(parent_id)" groups="base.group_extended"/>
|
||||
<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"/>
|
||||
@@ -113,7 +113,7 @@
|
||||
<field name="search_view_id" ref="account.view_account_analytic_account_search"/>
|
||||
</record>
|
||||
<!--<menuitem id="menu_analytic_account" name="Analytic Accounts" parent="account.menu_analytic_accounting"/>-->
|
||||
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="menu_analytic_accounting"/>
|
||||
<menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" parent="menu_analytic_accounting" groups="base.group_extended"/>
|
||||
|
||||
<record id="act_account_renew_view" model="ir.actions.act_window">
|
||||
<field name="name">Accounts to Renew</field>
|
||||
@@ -144,7 +144,7 @@
|
||||
<!-- <wizard id="wizard_analytic_account_chart" menu="False" model="account.analytic.account" name="account.analytic.account.chart" string="Analytic Chart of Accounts"/>
|
||||
<menuitem icon="STOCK_INDENT" action="wizard_analytic_account_chart" id="menu_action_analytic_account_tree2" parent="account.menu_finance_charts" type="wizard"/>-->
|
||||
|
||||
<menuitem id="next_id_40" name="Analytic" parent="account.menu_finance_generic_reporting" sequence="4"/>
|
||||
<menuitem id="next_id_40" name="Analytic" parent="account.menu_finance_generic_reporting" sequence="4" groups="base.group_extended"/>
|
||||
<!-- <menuitem action="action_account_analytic_account_tree2" id="account_analytic_chart_balance" parent="next_id_40"/>-->
|
||||
|
||||
<record id="view_account_analytic_line_form" model="ir.ui.view">
|
||||
@@ -157,7 +157,7 @@
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field name="amount" select="2"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
<field name="account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="journal_id" select="2"/>
|
||||
<field name="general_account_id" select="2"/>
|
||||
<field name="move_id" select="2"/>
|
||||
@@ -183,7 +183,7 @@
|
||||
<field name="name"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total quantity"/>
|
||||
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
|
||||
<field domain="[('type','=','normal')]" name="account_id"/>
|
||||
<field domain="[('type','=','normal')]" name="account_id" groups="base.group_extended"/>
|
||||
<field invisible="True" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
|
||||
<field name="amount" sum="Total amount"/>
|
||||
<field name="general_account_id"/>
|
||||
@@ -203,7 +203,7 @@
|
||||
<search string="Search Analytic Lines">
|
||||
<group col='6' colspan='4'>
|
||||
<field name="name" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
<field name="account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="amount" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
@@ -215,7 +215,7 @@
|
||||
<newline/>
|
||||
<group string="Group By..." expand="0">
|
||||
<filter string="General Account" context="{'group_by':'general_account_id'}"/>
|
||||
<filter string="Analytic Account" context="{'group_by':'account_id'}"/>
|
||||
<filter string="Analytic Account" context="{'group_by':'account_id'}" groups="base.group_extended"/>
|
||||
<filter string="Analytic Journal" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Product" context="{'group_by':'product_id'}"/>
|
||||
</group>
|
||||
@@ -263,7 +263,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Project line">
|
||||
<field name="name"/>
|
||||
<field name="account_id"/>
|
||||
<field name="account_id" groups="base.group_extended"/>
|
||||
<field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
|
||||
@@ -308,12 +308,12 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Analytic Journals">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="type"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="type"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Type" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
@@ -342,7 +342,7 @@
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="search_view_id" ref="view_analytic_journal_search" />
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting"/>
|
||||
<menuitem action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" groups="base.group_extended"/>
|
||||
|
||||
#
|
||||
# Open journal entries
|
||||
@@ -390,7 +390,7 @@
|
||||
<field name="view_type">tree</field>
|
||||
<field name="help">To print an analytics (or costs) journal for a given period. The report give code, move name, account number, general amount and analytic amount.</field>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_tree" id="account_analytic_journal_print" parent="account.next_id_40"/>
|
||||
<menuitem action="action_account_analytic_journal_tree" id="account_analytic_journal_print" parent="account.next_id_40" groups="base.group_extended"/>
|
||||
|
||||
|
||||
<!-- <record id="action_account_analytic_journal_tree2" model="ir.actions.act_window">-->
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
parent="account.menu_finance_charts"
|
||||
action="action_account_analytic_chart"
|
||||
id="menu_action_analytic_account_tree2"
|
||||
icon="STOCK_INDENT"/>
|
||||
icon="STOCK_INDENT"
|
||||
groups="base.group_extended"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<field name="help">A tool search lets you know statistics on your analytics records that match your needs.</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_analytic_entries_report" id="menu_action_analytic_entries_report" parent="account.menu_finance_statistic_report_statement" sequence="4"/>
|
||||
<menuitem action="action_analytic_entries_report" id="menu_action_analytic_entries_report" parent="account.menu_finance_statistic_report_statement" sequence="4" groups="base.group_extended"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -157,50 +157,56 @@
|
||||
"access_report_account_receivable_user","report.account.receivable.user","model_report_account_receivable","account.group_account_user",1,1,1,1
|
||||
"access_account_sequence_fiscal_year_invoice","account.sequence.fiscalyear invoice","model_account_sequence_fiscalyear","account.group_account_invoice",1,1,1,1
|
||||
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_account_invoice",1,0,0,0
|
||||
"access_account_invoice","account.invoice","model_account_invoice","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_invoice_line","account.invoice.line","model_account_invoice_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_res_partner","res.partner","base.model_res_partner","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_account","account.account","model_account_account","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_account_type","account.type","model_account_account_type","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_tax","account.tax","model_account_tax","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_tax_code","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_invoice_tax","account.invoice.tax","model_account_invoice_tax","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_partner_address","res.partner.address","base.model_res_partner_address","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_move","account.move","model_account_move","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_move_line","account.move.line","model_account_move_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_res_partner_bank","res.partner.bank","base.model_res_partner_bank","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_partner_event","res.partner.event","base.model_res_partner_event","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_currency_rate","res.currency.rate","base.model_res_currency_rate","account.group_accounting_accountant",1,1,0,0
|
||||
"access_res_currency","res.currency","base.model_res_currency","account.group_accounting_accountant",1,1,0,0
|
||||
"access_product_template","product.template","product.model_product_template","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_product","product.product","product.model_product_product","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_category","product.category","product.model_product_category","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_pricelist","product.pricelist","product.model_product_pricelist","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_pricelist_version","product.pricelist.version","product.model_product_pricelist_version","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_pricelist_item","product.pricelist.item","product.model_product_pricelist_item","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_payment_term","account.payment.term","model_account_payment_term","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_payterm","res.payterm","base.model_res_payterm","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_payment_term_line","account.payment.term.line","model_account_payment_term_line","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_journal","account.journal","model_account_journal","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_fiscalyear","account.fiscalyear","model_account_fiscalyear","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_period","account.period","model_account_period","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_move_reconcile","account.move.reconcile","model_account_move_reconcile","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_tax_code","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_invoice_accounting_accountant","account.invoice","model_account_invoice","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_invoice_line_accounting_accountant","account.invoice.line","model_account_invoice_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_res_partner_accounting_accountant","res.partner","base.model_res_partner","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_account_accounting_accountant","account.account","model_account_account","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_account_type_accounting_accountant","account.type","model_account_account_type","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_tax_accounting_accountant","account.tax","model_account_tax","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_tax_code_accounting_accountant","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_invoice_tax_accounting_accountant","account.invoice.tax","model_account_invoice_tax","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_partner_address_accounting_accountant","res.partner.address","base.model_res_partner_address","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_move_accounting_accountant","account.move","model_account_move","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_move_line_accounting_accountant","account.move.line","model_account_move_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_res_partner_bank_accounting_accountant","res.partner.bank","base.model_res_partner_bank","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_partner_event_accounting_accountant","res.partner.event","base.model_res_partner_event","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_currency_rate_accounting_accountant","res.currency.rate","base.model_res_currency_rate","account.group_accounting_accountant",1,1,0,0
|
||||
"access_res_currency_accounting_accountant","res.currency","base.model_res_currency","account.group_accounting_accountant",1,1,0,0
|
||||
"access_product_template_accounting_accountant","product.template","product.model_product_template","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_product_accounting_accountant","product.product","product.model_product_product","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_category_accounting_accountant","product.category","product.model_product_category","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_pricelist_accounting_accountant","product.pricelist","product.model_product_pricelist","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_pricelist_version_accounting_accountant","product.pricelist.version","product.model_product_pricelist_version","account.group_accounting_accountant",1,0,0,0
|
||||
"access_product_pricelist_item_accounting_accountant","product.pricelist.item","product.model_product_pricelist_item","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_payment_term_accounting_accountant","account.payment.term","model_account_payment_term","account.group_accounting_accountant",1,0,0,0
|
||||
"access_res_payterm_accounting_accountant","res.payterm","base.model_res_payterm","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_payment_term_line_accounting_accountant","account.payment.term.line","model_account_payment_term_line","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_journal_accounting_accountant","account.journal","model_account_journal","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_fiscalyear_accounting_accountant","account.fiscalyear","model_account_fiscalyear","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_period_accounting_accountant","account.period","model_account_period","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_move_reconcile_accounting_accountant","account.move.reconcile","model_account_move_reconcile","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_tax_code_accounting_accountant","account.tax.code","model_account_tax_code","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_bank_statement_accounting_accountant","account.bank.statement","model_account_bank_statement","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_cashbox_line_accounting_accountant","account.cashbox.line","model_account_cashbox_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_bank_statement_reconcile_line","account.bank.statement.reconcile.line","model_account_bank_statement_reconcile_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_bank_statement_line","account.bank.statement.line","model_account_bank_statement_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
|
||||
"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_accounting_accountant",1,0,0,0
|
||||
"access_temp_range","temp.range","model_temp_range","account.group_accounting_accountant",1,0,0,0
|
||||
"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_accounting_accountant",1,0,0,0
|
||||
"access_report_invoice_created","report.invoice.created","model_report_invoice_created","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_entries_report","account.entries.report","model_account_entries_report","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_invoice_report","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_journal_view","account.journal.view","model_account_journal_view","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_journal_period","account.journal.period","model_account_journal_period","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_journal_column","account.journal.column","model_account_journal_column","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_analytic_account","account.analytic.account","analytic.model_account_analytic_account","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_analytic_line","account.analytic.line","analytic.model_account_analytic_line","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_analytic_journal","account.analytic.journal","model_account_analytic_journal","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_bank_statement_reconcile","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_bank_statement_line_accounting_accountant","account.bank.statement.line","model_account_bank_statement_line","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_invoice_report_accounting_accountant","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
|
||||
"access_report_account_receivable_accounting_accountant","report.account.receivable","model_report_account_receivable","account.group_accounting_accountant",1,0,0,0
|
||||
"access_temp_range_accounting_accountant","temp.range","model_temp_range","account.group_accounting_accountant",1,0,0,0
|
||||
"access_report_aged_receivable_accounting_accountant","report.aged.receivable","model_report_aged_receivable","account.group_accounting_accountant",1,0,0,0
|
||||
"access_report_invoice_created_accounting_accountant","report.invoice.created","model_report_invoice_created","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_entries_report_accounting_accountant","account.entries.report","model_account_entries_report","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_invoice_report_accounting_accountant","account.invoice.report","model_account_invoice_report","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_journal_view_accounting_accountant","account.journal.view","model_account_journal_view","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_journal_period_accounting_accountant","account.journal.period","model_account_journal_period","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_journal_column_accounting_accountant","account.journal.column","model_account_journal_column","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_analytic_account_accounting_accountant","account.analytic.account","analytic.model_account_analytic_account","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_analytic_line_accounting_accountant","account.analytic.line","analytic.model_account_analytic_line","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_analytic_journal_accounting_accountant","account.analytic.journal","model_account_analytic_journal","account.group_accounting_accountant",1,0,0,0
|
||||
"access_account_bank_statement_reconcile_accounting_accountant","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_accounting_accountant",1,1,1,1
|
||||
"access_account_move_account_user","account.move","model_account_move","account.group_account_user",1,1,1,1
|
||||
"access_account_move_line_account_user","account.move.line","model_account_move_line","account.group_account_user",1,1,1,1
|
||||
"access_account_journal_account_user","account.journal","model_account_journal","account.group_account_user",1,0,0,0
|
||||
"access_account_journal_view_account_user","account.journal.view","model_account_journal_view","account.group_account_user",1,0,0,0
|
||||
"access_account_journal_period_account_user","account.journal.period","model_account_journal_period","account.group_account_user",1,0,0,0
|
||||
"access_account_journal_column_account_user","account.journal.column","model_account_journal_column","account.group_account_user",1,0,0,0
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Standard entries">
|
||||
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -21,7 +21,7 @@
|
||||
<field name="context">{'journal_type':'sale','view_mode':False}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<menuitem action="action_account_moves_sale" sequence="10" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables" icon="STOCK_JUSTIFY_FILL"/>
|
||||
<menuitem action="action_account_moves_sale" sequence="10" id="menu_eaction_account_moves_sale" parent="menu_finance_receivables" icon="STOCK_JUSTIFY_FILL" groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
|
||||
<!-- <record id="action_account_moves_purchase_refund" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">Journal Refund Items</field>-->
|
||||
@@ -42,7 +42,10 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<menuitem action="action_account_moves_purchase" sequence="10"
|
||||
id="menu_eaction_account_moves_purchase" parent="menu_finance_payables" icon="STOCK_JUSTIFY_FILL"/>
|
||||
id="menu_eaction_account_moves_purchase"
|
||||
parent="menu_finance_payables"
|
||||
icon="STOCK_JUSTIFY_FILL"
|
||||
groups="group_account_user,group_account_manager,base.group_system"/>
|
||||
|
||||
<!-- <record id="action_account_moves_sale_refund" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">Journal Refund Items</field>-->
|
||||
@@ -69,6 +72,7 @@
|
||||
id="menu_eaction_account_moves_all"
|
||||
parent="account.menu_finance_entries"
|
||||
sequence="4"
|
||||
groups="group_account_user,group_account_manager,base.group_system"
|
||||
/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
|
||||
from osv import fields, osv
|
||||
@@ -34,15 +35,15 @@ class account_invoice_pay_writeoff(osv.osv_memory):
|
||||
'writeoff_acc_id': fields.many2one('account.account', 'Write-Off account', required=True),
|
||||
'writeoff_journal_id': fields.many2one('account.journal', 'Write-Off journal', required=True),
|
||||
'comment': fields.char('Comment', size=64, required=True),
|
||||
'analytic_id': fields.many2one('account.analytic.account','Analytic Account'),
|
||||
'analytic_id': fields.many2one('account.analytic.account','Analytic Account')
|
||||
}
|
||||
_defaults = {
|
||||
'comment': 'Write-Off',
|
||||
}
|
||||
}
|
||||
|
||||
def pay_and_reconcile_writeoff(self, cr, uid, ids, context=None):
|
||||
data = self.read(cr, uid, ids,context=context)[0]
|
||||
context.update({'write_off':data})
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
context.update({'write_off': data})
|
||||
self.pool.get('account.invoice.pay').pay_and_reconcile(cr, uid, ids, context=context)
|
||||
return {}
|
||||
|
||||
@@ -60,26 +61,33 @@ class account_invoice_pay(osv.osv_memory):
|
||||
'date': fields.date('Date payment', required=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal/Payment Mode', required=True, domain=[('type','=','cash')]),
|
||||
'period_id': fields.many2one('account.period', 'Period', required=True),
|
||||
}
|
||||
}
|
||||
|
||||
def view_init(self, cr, uid, ids, context=None):
|
||||
invoice = self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context=context)
|
||||
if invoice.state in ['draft', 'proforma2', 'cancel']:
|
||||
raise osv.except_osv(_('Error !'), _('Can not pay draft/proforma/cancel invoice.'))
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('active_id', False):
|
||||
invoice = self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context=context)
|
||||
if invoice.state in ['draft', 'proforma2', 'cancel']:
|
||||
raise osv.except_osv(_('Error !'), _('Can not pay draft/proforma/cancel invoice.'))
|
||||
pass
|
||||
|
||||
def _get_period(self, cr, uid, context=None):
|
||||
ids = self.pool.get('account.period').find(cr, uid, context=context)
|
||||
period_id = False
|
||||
ids = self.pool.get('account.period').find(cr, uid, context=context)
|
||||
if len(ids):
|
||||
period_id = ids[0]
|
||||
return period_id
|
||||
|
||||
def _get_amount(self, cr, uid, context=None):
|
||||
return self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context=context).residual
|
||||
if context is None:
|
||||
context = {}
|
||||
if context.get('active_id', False):
|
||||
return self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context=context).residual
|
||||
return 0.0
|
||||
|
||||
_defaults = {
|
||||
'date': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'date': time.strftime('%Y-%m-%d'),
|
||||
'period_id': _get_period,
|
||||
'amount': _get_amount,
|
||||
}
|
||||
@@ -87,10 +95,11 @@ class account_invoice_pay(osv.osv_memory):
|
||||
def wo_check(self, cr, uid, ids, context=None):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids,context=context)[0]
|
||||
invoice = self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context)
|
||||
invoice = inv_obj.browse(cr, uid, context['active_id'], context)
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context)
|
||||
|
||||
# Here we need that:
|
||||
@@ -114,11 +123,11 @@ class account_invoice_pay(osv.osv_memory):
|
||||
amount_paid = data['amount']
|
||||
# Get the old payment if there are some
|
||||
if invoice.payment_ids:
|
||||
debit=credit=0.0
|
||||
debit = credit = 0.0
|
||||
for payment in invoice.payment_ids:
|
||||
debit+=payment.debit
|
||||
credit+=payment.credit
|
||||
amount_paid+=abs(debit-credit)
|
||||
debit += payment.debit
|
||||
credit += payment.credit
|
||||
amount_paid += abs(debit-credit)
|
||||
|
||||
# Test if there is a difference according to currency rouding setting
|
||||
if self.pool.get('res.currency').is_zero(cr, uid, invoice.company_id.currency_id,
|
||||
@@ -136,10 +145,11 @@ class account_invoice_pay(osv.osv_memory):
|
||||
'views': [(resource_id,'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
}
|
||||
}
|
||||
|
||||
def pay_and_reconcile(self, cr, uid, ids, context=None):
|
||||
cur_obj = self.pool.get('res.currency')
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
@@ -154,8 +164,8 @@ class account_invoice_pay(osv.osv_memory):
|
||||
|
||||
amount = data['amount']
|
||||
|
||||
invoice = self.pool.get('account.invoice').browse(cr, uid, context['active_id'], context)
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context)
|
||||
invoice = inv_obj.browse(cr, uid, context['active_id'], context=context)
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, data['journal_id'], context=context)
|
||||
# Compute the amount in company's currency, with the journal currency (which is equal to payment currency)
|
||||
# when it is needed : If payment currency (according to selected journal.currency) is <> from company currency
|
||||
if journal.currency and invoice.company_id.currency_id.id<>journal.currency.id:
|
||||
@@ -181,7 +191,7 @@ class account_invoice_pay(osv.osv_memory):
|
||||
acc_id = journal.default_credit_account_id and journal.default_credit_account_id.id
|
||||
if not acc_id:
|
||||
raise osv.except_osv(_('Error !'), _('Your journal must have a default credit and debit account.'))
|
||||
self.pool.get('account.invoice').pay_and_reconcile(cr, uid, [context['active_id']],
|
||||
inv_obj.pay_and_reconcile(cr, uid, [context['active_id']],
|
||||
amount, acc_id, data['period_id'], data['journal_id'], writeoff_account_id,
|
||||
data['period_id'], writeoff_journal_id, context, data['name'])
|
||||
return {}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
|
||||
<menuitem id="menu_invoicing" name="Billing" parent="base.menu_main_pm" sequence="4"/>
|
||||
<menuitem id="menu_invoicing" name="Billing" parent="base.menu_main_pm" sequence="4" groups="base.group_extended"/>
|
||||
|
||||
<record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
|
||||
<field name="name">All Uninvoiced Entries</field>
|
||||
@@ -11,7 +11,7 @@
|
||||
<field name="domain">[('invoice_id','=',False),('to_invoice','!=',False)]</field>
|
||||
<field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
|
||||
</record>
|
||||
<menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="menu_invoicing"/>
|
||||
<menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="menu_invoicing" groups="base.group_extended"/>
|
||||
|
||||
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
|
||||
<field name="name">Overpassed Accounts</field>
|
||||
@@ -20,6 +20,6 @@
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">[('date','<=',time.strftime('%Y-%m-%d')),('state','=','open')]</field>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_managed_overpassed" id="menu_action_account_analytic_managed_overpassed" sequence="50" parent="menu_invoicing"/>
|
||||
<menuitem action="action_account_analytic_managed_overpassed" id="menu_action_account_analytic_managed_overpassed" sequence="50" parent="menu_invoicing" groups="base.group_extended"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_analytic_default_form" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Defaults</field>
|
||||
<field name="res_model">account.analytic.default</field>
|
||||
@@ -81,7 +81,8 @@
|
||||
id="analytic_rule_action_user"
|
||||
res_model="account.analytic.default"
|
||||
src_model="res.users"
|
||||
domain="[('user_id','=',active_id)]"/>
|
||||
domain="[('user_id','=',active_id)]"
|
||||
groups="base.group_extended"/>
|
||||
|
||||
<act_window
|
||||
name="Analytic Rules"
|
||||
|
||||
@@ -53,7 +53,7 @@ class account_analytic_plan(osv.osv):
|
||||
'name': fields.char('Analytic Plan', size=64, required=True, select=True,),
|
||||
'plan_ids': fields.one2many('account.analytic.plan.line','plan_id','Analytic Plans'),
|
||||
}
|
||||
|
||||
|
||||
account_analytic_plan()
|
||||
|
||||
class account_analytic_plan_line(osv.osv):
|
||||
@@ -72,7 +72,7 @@ class account_analytic_plan_line(osv.osv):
|
||||
'min_required': 100.0,
|
||||
'max_required': 100.0,
|
||||
}
|
||||
|
||||
|
||||
account_analytic_plan_line()
|
||||
|
||||
class account_analytic_plan_instance(osv.osv):
|
||||
@@ -168,7 +168,7 @@ class account_analytic_plan_instance(osv.osv):
|
||||
<field name="account%d_ids" string="%s" colspan="4">
|
||||
<tree string="%s" editable="bottom">
|
||||
<field name="rate"/>
|
||||
<field name="analytic_account_id" domain="[('parent_id','child_of',[%d])]"/>
|
||||
<field name="analytic_account_id" domain="[('parent_id','child_of',[%d])]" groups="base.group_extended"/>
|
||||
</tree>
|
||||
</field>
|
||||
<newline/>"""%(i,tools.to_xml(line.name),tools.to_xml(line.name),line.root_analytic_id and line.root_analytic_id.id or 0)
|
||||
@@ -189,7 +189,7 @@ class account_analytic_plan_instance(osv.osv):
|
||||
pids = self.pool.get('account.analytic.plan.instance').search(cr, uid, [('name','=',vals['name']),('code','=',vals['code']),('plan_id','<>',False)])
|
||||
if pids:
|
||||
raise osv.except_osv(_('Error'), _('A model having this name and code already exists !'))
|
||||
|
||||
|
||||
acct_anal_acct = self.pool.get('account.analytic.account')
|
||||
acct_anal_plan_line_obj = self.pool.get('account.analytic.plan.line')
|
||||
res = acct_anal_plan_line_obj.search(cr, uid, [('plan_id','=',journal.plan_id.id)])
|
||||
@@ -256,7 +256,7 @@ class account_journal(osv.osv):
|
||||
_columns = {
|
||||
'plan_id':fields.many2one('account.analytic.plan', 'Analytic Plans'),
|
||||
}
|
||||
|
||||
|
||||
account_journal()
|
||||
|
||||
class account_invoice_line(osv.osv):
|
||||
@@ -282,7 +282,7 @@ class account_invoice_line(osv.osv):
|
||||
if rec and rec.analytics_id:
|
||||
res_prod['value'].update({'analytics_id':rec.analytics_id.id})
|
||||
return res_prod
|
||||
|
||||
|
||||
account_invoice_line()
|
||||
|
||||
class account_move_line(osv.osv):
|
||||
@@ -396,7 +396,7 @@ class analytic_default(osv.osv):
|
||||
_columns = {
|
||||
'analytics_id': fields.many2one('account.analytic.plan.instance', 'Analytic Distribution'),
|
||||
}
|
||||
|
||||
|
||||
analytic_default()
|
||||
|
||||
class sale_order_line(osv.osv):
|
||||
@@ -409,7 +409,7 @@ class sale_order_line(osv.osv):
|
||||
sale_line = self.browse(cr, uid, ids[0], context)
|
||||
inv_line_obj = self.pool.get('account.invoice.line')
|
||||
acct_anal_def_obj = self.pool.get('account.analytic.default')
|
||||
|
||||
|
||||
for line in inv_line_obj.browse(cr, uid, create_ids, context):
|
||||
rec = acct_anal_def_obj.account_get(cr, uid, line.product_id.id, sale_line.order_id.partner_id.id, uid, time.strftime('%Y-%m-%d'), context)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="analytic_account_id" position="replace">
|
||||
<field name="analytics_id" context="{'journal_id':journal_id}"/>
|
||||
<field name="analytics_id" context="{'journal_id':journal_id}" groups="base.group_extended"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@@ -60,7 +60,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_analytic_id" position="replace">
|
||||
<field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','<>',False)]"/>
|
||||
<field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','<>',False)]" groups="base.group_extended"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@@ -73,7 +73,7 @@
|
||||
<field name="priority">2</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_analytic_id" position="replace">
|
||||
<field name="analytics_id" domain="[('plan_id','<>',False)]" context="{'journal_id':parent.journal_id}" />
|
||||
<field name="analytics_id" domain="[('plan_id','<>',False)]" context="{'journal_id':parent.journal_id}" groups="base.group_extended"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@@ -90,13 +90,13 @@
|
||||
<field name="plan_id" required="True"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="account_ids" nolabel="1" colspan="4">
|
||||
<form string="Analytic Distribution">
|
||||
<form string="Analytic Distribution">
|
||||
<field name="rate"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
</form>
|
||||
<tree string="Analytic Distribution" editable="bottom">
|
||||
<field name="rate"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
</tree>
|
||||
</field>
|
||||
</form>
|
||||
@@ -140,7 +140,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Distribution Line">
|
||||
<field name="plan_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="rate"/>
|
||||
</form>
|
||||
</field>
|
||||
@@ -153,7 +153,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Analytic Distribution Lines">
|
||||
<field name="plan_id" select="1"/>
|
||||
<field name="analytic_account_id" select="1"/>
|
||||
<field name="analytic_account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="rate"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -78,14 +78,14 @@
|
||||
<page string="Budget Lines">
|
||||
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="graph,tree">
|
||||
<graph type="bar" string="Lines">
|
||||
<field name="analytic_account_id" />
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<!--<field name="general_budget_id" operator="+" />-->
|
||||
<field name="planned_amount" operator="+"/>
|
||||
<field group="True" name="general_budget_id"/>
|
||||
</graph>
|
||||
<tree string="Budget Lines" editable="top">
|
||||
<field name="crossovered_budget_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="paid_date"/>
|
||||
@@ -96,7 +96,7 @@
|
||||
</tree>
|
||||
<form string="Budget Lines">
|
||||
<field name="crossovered_budget_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<field name="paid_date"/>
|
||||
@@ -126,7 +126,7 @@
|
||||
<field name="date_to"/>
|
||||
<field name="crossovered_budget_line" colspan="4" nolabel="1">
|
||||
<tree string="Budget Lines">
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="general_budget_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
@@ -137,7 +137,7 @@
|
||||
<field name="percentage"/>
|
||||
</tree>
|
||||
<form string="Budget Lines">
|
||||
<field name="analytic_account_id" select="1"/>
|
||||
<field name="analytic_account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="general_budget_id" select="1"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
@@ -163,7 +163,7 @@
|
||||
<field name="model">crossovered.budget</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('draft');gray:state in ('done','cancel');black:state in ('confirm','validate')" string="Budget">
|
||||
<tree colors="blue:state in ('draft');gray:state in ('done','cancel');black:state in ('confirm','validate')" string="Budget">
|
||||
<field name="name" colspan="1" select="1"/>
|
||||
<field name="code" colspan="1" select="1" />
|
||||
<field name="state"/>
|
||||
@@ -211,7 +211,7 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Budget Lines">
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="general_budget_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
@@ -230,7 +230,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Budget Lines">
|
||||
<field name="crossovered_budget_id"/>
|
||||
<field name="analytic_account_id" select="1"/>
|
||||
<field name="analytic_account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="general_budget_id" select="1"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<menuitem name="Configuration" parent="auction_menu_root" id="auction_config_menu" sequence="7"/>
|
||||
<menuitem name="Tools Bar Codes" id="auction_outils_menu" parent="auction_menu_root" sequence="5" />
|
||||
<menuitem name="Deliveries Management" action="action_auction_taken" id="menu_wizard_emporte" parent="auction_outils_menu"/>
|
||||
|
||||
|
||||
<!-- Auction Management/Configuration/artist -->
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_auction_artist_tree">
|
||||
<field name="name">auction.artists.tree</field>
|
||||
<field name="model">auction.artists</field>
|
||||
@@ -42,9 +42,9 @@
|
||||
</record>
|
||||
<menuitem name="Artists" parent="auction_config_menu" action="action_auction_artist" id="menu_auction_artist"/>
|
||||
|
||||
|
||||
<!-- Auction Management/Configuration/objectcategories -->
|
||||
|
||||
|
||||
<!-- Auction Management/Configuration/objectcategories -->
|
||||
|
||||
<record model="ir.ui.view" id="view_auction_object_categories_tree">
|
||||
<field name="name">auction.lot.category.tree</field>
|
||||
<field name="model">auction.lot.category</field>
|
||||
@@ -55,7 +55,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_auction_object_categories_form">
|
||||
<field name="name">auction.lot.category.form</field>
|
||||
<field name="model">auction.lot.category</field>
|
||||
@@ -71,17 +71,17 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window" id="action_auction_object_categories">
|
||||
<field name="res_model">auction.lot.category</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_auction_object_categories_tree"/>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem name="Object Categories" parent="auction_config_menu" action="action_auction_object_categories" id="menu_auction_object_cat"/>
|
||||
|
||||
|
||||
<!-- Auction Management/Auction Dates/New Auction Dates -->
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_auction_dates_tree">
|
||||
<field name="name">Auction dates</field>
|
||||
<field name="model">auction.dates</field>
|
||||
@@ -95,7 +95,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_auction_dates_form">
|
||||
<field name="name">Auction dates</field>
|
||||
<field name="model">auction.dates</field>
|
||||
@@ -122,8 +122,8 @@
|
||||
<separator string="Analytic" colspan="4"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="journal_seller_id"/>
|
||||
<field name="account_analytic_id"/>
|
||||
</page>
|
||||
<field name="account_analytic_id" groups="base.group_extended"/>
|
||||
</page>
|
||||
<page string="Commissions">
|
||||
<group col="4" colspan="4">
|
||||
<group col="2" colspan="4">
|
||||
@@ -194,7 +194,7 @@
|
||||
<field name="name">Auctions</field>
|
||||
<field name="res_model">auction.dates</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="search_view_id" ref="view_auction_dates_filter"/>
|
||||
<field name="context">{"search_default_draft": "1"}</field>
|
||||
</record>
|
||||
@@ -208,8 +208,8 @@
|
||||
|
||||
<menuitem name="Auctions" parent="auction_menu_root" id="auction_date_menu" sequence="1"/>
|
||||
<menuitem name="Auctions" parent="auction_date_menu" id="menu_auction_dates_next1" action="action_auction_dates_next"/>
|
||||
|
||||
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_auction_lot_tree">
|
||||
<field name="name">Auction lots</field>
|
||||
<field name="model">auction.lots</field>
|
||||
@@ -246,13 +246,13 @@
|
||||
<newline/>
|
||||
<field name="auction_id"/>
|
||||
<field name="lot_type"/>
|
||||
<field name="lot_local"/>
|
||||
</group>
|
||||
<field name="lot_local"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Catalog">
|
||||
<separator string="Inventory" colspan="2"/>
|
||||
<group colspan="4" col="6">
|
||||
<group colspan="2" col="4">
|
||||
<group colspan="2" col="4">
|
||||
<field name="product_id" colspan="4"/>
|
||||
<field name="lot_num" select="1" />
|
||||
<field name="bord_vnd_id"/>
|
||||
@@ -295,7 +295,7 @@
|
||||
<field name="paid_ach"/>
|
||||
<field name="ach_inv_id"/>
|
||||
<field name="ach_emp"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Seller Information" colspan="4"/>
|
||||
<field name="seller_id"/>
|
||||
@@ -306,7 +306,7 @@
|
||||
<field name="paid_vnd"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="4" col="4">
|
||||
<separator string="" colspan="4"/>
|
||||
<field name="state" colspan="1"/>
|
||||
<group col="8" colspan="2">
|
||||
@@ -314,8 +314,8 @@
|
||||
<button name="button_not_bought" string="Not sold" states="draft" type="object" icon="gtk-undo"/>
|
||||
<button name="button_taken_away" string="Taken away" states="sold" type="object" icon="gtk-goto-last"/>
|
||||
<button name="button_unpaid" string="Set to draft" states="sold,unsold,paid" type="object" icon="gtk-convert"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Bids">
|
||||
<field name="bid_lines" colspan="4" nolabel="1" editable="top">
|
||||
@@ -358,7 +358,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<group colspan="2" col="2">
|
||||
<field name="history_ids" colspan="4" readonly="1" nolabel="1">
|
||||
<tree string="History">
|
||||
<field name="name"/>
|
||||
@@ -373,7 +373,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_auction_lots_filter" model="ir.ui.view">
|
||||
<field name="name">Auction Lots search</field>
|
||||
<field name="model">auction.lots</field>
|
||||
@@ -416,9 +416,9 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Graph view for Auction Lots -->
|
||||
|
||||
|
||||
<!-- Graph view for Auction Lots -->
|
||||
|
||||
<record model="ir.ui.view" id="auction_lot_graph">
|
||||
<field name="name">Auction lots</field>
|
||||
<field name="model">auction.lots</field>
|
||||
@@ -440,9 +440,9 @@
|
||||
<field name="search_view_id" ref="view_auction_lots_filter"/>
|
||||
<field name="context">{"search_default_draft": "1"}</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Action for Bids -->
|
||||
|
||||
|
||||
<act_window name="Open Bids"
|
||||
domain="[('lot_id', '=', active_id)]"
|
||||
res_model="auction.bid_line"
|
||||
@@ -468,62 +468,62 @@
|
||||
<newline/>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field name="lot_id" colspan="4" mode="tree,graph" nolabel="1">
|
||||
<tree string="Objects">
|
||||
<field name="lot_num"/>
|
||||
<field name="obj_num"/>
|
||||
<field name="auction_id"/>
|
||||
<field name="name"/>
|
||||
<field name="obj_price"/>
|
||||
<field name="vnd_lim"/>
|
||||
<field name="lot_est1"/>
|
||||
<field name="lot_est2"/>
|
||||
</tree>
|
||||
<form string="Objects">
|
||||
<notebook colspan="4">
|
||||
<page string="Description">
|
||||
<field name="auction_id" colspan="4"/>
|
||||
<field name="lot_num"/>
|
||||
<field name="obj_num"/>
|
||||
<newline/>
|
||||
<field name="name"/>
|
||||
<field name="lot_type" select="1"/>
|
||||
<field name="name2"/>
|
||||
<newline/>
|
||||
<field name="artist_id"/>
|
||||
<field name="artist2_id"/>
|
||||
<separator string="Objects Description" colspan="4"/>
|
||||
<field name="obj_desc" colspan="4" nolabel="1"/>
|
||||
<field name="vnd_lim"/>
|
||||
<field name="vnd_lim_net"/>
|
||||
<field name="lot_est1"/>
|
||||
<field name="lot_est2"/>
|
||||
<field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False),('type_tax_use','<>','sale')]"/>
|
||||
<field name="product_id" domain="[('sale_ok','=',True)]"/>
|
||||
<field name="state" readonly="1" colspan="4"/>
|
||||
</page>
|
||||
<page string="Photos">
|
||||
<field name="image" colspan="4" widget="image"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
<field name="lot_id" colspan="4" mode="tree,graph" nolabel="1">
|
||||
<tree string="Objects">
|
||||
<field name="lot_num"/>
|
||||
<field name="obj_num"/>
|
||||
<field name="auction_id"/>
|
||||
<field name="name"/>
|
||||
<field name="obj_price"/>
|
||||
<field name="vnd_lim"/>
|
||||
<field name="lot_est1"/>
|
||||
<field name="lot_est2"/>
|
||||
</tree>
|
||||
<form string="Objects">
|
||||
<notebook colspan="4">
|
||||
<page string="Description">
|
||||
<field name="auction_id" colspan="4"/>
|
||||
<field name="lot_num"/>
|
||||
<field name="obj_num"/>
|
||||
<newline/>
|
||||
<field name="name"/>
|
||||
<field name="lot_type" select="1"/>
|
||||
<field name="name2"/>
|
||||
<newline/>
|
||||
<field name="artist_id"/>
|
||||
<field name="artist2_id"/>
|
||||
<separator string="Objects Description" colspan="4"/>
|
||||
<field name="obj_desc" colspan="4" nolabel="1"/>
|
||||
<field name="vnd_lim"/>
|
||||
<field name="vnd_lim_net"/>
|
||||
<field name="lot_est1"/>
|
||||
<field name="lot_est2"/>
|
||||
<field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False),('type_tax_use','<>','sale')]"/>
|
||||
<field name="product_id" domain="[('sale_ok','=',True)]"/>
|
||||
<field name="state" readonly="1" colspan="4"/>
|
||||
</page>
|
||||
<page string="Photos">
|
||||
<field name="image" colspan="4" widget="image"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Extra Costs">
|
||||
<field name="specific_cost_ids" widget="one2many_list" nolabel="1" colspan="4">
|
||||
<tree string="Deposit Costs" editable="top">
|
||||
<field name="name"/>
|
||||
<field name="amount"/>
|
||||
<field name="account" domain="[('type','=','income')]"/>
|
||||
</tree>
|
||||
<form string="Deposit Costs">
|
||||
<field name="name"/>
|
||||
<field name="amount"/>
|
||||
<field name="account"/>
|
||||
</form>
|
||||
</field>
|
||||
<page string="Extra Costs">
|
||||
<field name="specific_cost_ids" widget="one2many_list" nolabel="1" colspan="4">
|
||||
<tree string="Deposit Costs" editable="top">
|
||||
<field name="name"/>
|
||||
<field name="amount"/>
|
||||
<field name="account" domain="[('type','=','income')]"/>
|
||||
</tree>
|
||||
<form string="Deposit Costs">
|
||||
<field name="name"/>
|
||||
<field name="amount"/>
|
||||
<field name="account"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -543,7 +543,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_deposit_border_filter" model="ir.ui.view">
|
||||
<field name="name">Deposit border</field>
|
||||
<field name="model">auction.deposit</field>
|
||||
@@ -569,7 +569,7 @@
|
||||
<filter string="Deposit Date"
|
||||
icon="terp-go-month"
|
||||
help="Deposit Date" domain="[]"
|
||||
context="{'group_by':'date_dep'}"/>
|
||||
context="{'group_by':'date_dep'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -603,7 +603,7 @@
|
||||
<menuitem name="Deposit border" parent="auction_seller_menu" action="action_deposit_border" id="menu_auction_deposit_border"/>
|
||||
|
||||
<!-- Bids Lines View -->
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_bids_tree">
|
||||
<field name="name">auction.bid_line.tree1</field>
|
||||
<field name="model">auction.bid_line</field>
|
||||
@@ -617,7 +617,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_bids_form">
|
||||
<field name="name">auction.bid_line.form1</field>
|
||||
<field name="model">auction.bid_line</field>
|
||||
@@ -708,7 +708,7 @@
|
||||
|
||||
<menuitem name="Buyers" id="auction_buyers_menu" parent="auction_menu_root" sequence="4"/>
|
||||
<menuitem name="Bids" parent="auction_buyers_menu" action="action_bid_open" id="menu_action_bid_open"/>
|
||||
|
||||
|
||||
<menuitem name="Reporting" id="auction_report_menu" parent="auction_menu_root" sequence="6"/>
|
||||
|
||||
<act_window name="Deposit slip"
|
||||
@@ -718,5 +718,5 @@
|
||||
id="act_auction_lot_open_deposit"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_calendar_attendee","calendar.attendee","model_calendar_attendee","base.group_system",1,1,1,1
|
||||
"access_calendar_alarm","calendar.alarm","model_calendar_alarm","base.group_system",1,1,1,1
|
||||
"access_res_alarm","res.alarm","model_res_alarm","base.group_system",1,1,1,1
|
||||
"access_calendar_todo","calendar.todo","model_calendar_todo","base.group_system",1,1,1,1
|
||||
"access_calendar_event","calendar.event.user","model_calendar_event","base.group_system",1,1,1,1
|
||||
"access_calendar_attendee","calendar.attendee","model_calendar_attendee","base.group_user",1,1,1,1
|
||||
"access_calendar_alarm","calendar.alarm","model_calendar_alarm","base.group_user",1,1,1,1
|
||||
"access_res_alarm","res.alarm","model_res_alarm","base.group_user",1,1,1,1
|
||||
"access_calendar_todo","calendar.todo","model_calendar_todo","base.group_user",1,1,1,1
|
||||
"access_calendar_event","calendar.event","model_calendar_event","base.group_user",1,1,1,1
|
||||
|
||||
|
@@ -32,6 +32,7 @@
|
||||
groups="base.group_extended"
|
||||
domain="[('object_id.model', '=', 'crm.meeting')]" />
|
||||
<field name="allday" colspan="2" on_change="onchange_allday(allday)" />
|
||||
<newline/>
|
||||
<field name="date" string="Start Date" required="1"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
<field name="duration" widget="float_time"
|
||||
|
||||
@@ -58,12 +58,6 @@ class crm_partner2opportunity(osv.osv_memory):
|
||||
res.update({'partner_id': data and data[0] or False})
|
||||
return res
|
||||
|
||||
def _select_data(self, cr, uid, data, context):
|
||||
part_obj = self.pool.get('res.partner')
|
||||
part = part_obj.read(cr, uid, data['id' ], ['name'])
|
||||
return {'partner_id' : data['id'], 'name' : part['name'] }
|
||||
|
||||
|
||||
def make_opportunity(self, cr, uid, ids, context):
|
||||
"""
|
||||
@param self: The object pointer
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from base_calendar import base_calendar
|
||||
from crm import crm
|
||||
from caldav import calendar
|
||||
from datetime import datetime
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<field name="date_value"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field domain="[('type','=','normal')]" name="analytic_account"/>
|
||||
<field domain="[('type','=','normal')]" name="analytic_account" groups="base.group_extended"/>
|
||||
<field name="unit_amount"/>
|
||||
<field name="unit_quantity"/>
|
||||
<field name="total_amount"/>
|
||||
@@ -67,6 +67,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Expenses Sheet">
|
||||
<group colspan="4" col="6">
|
||||
<field name="employee_id"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="ref" groups="base.group_extended"/>
|
||||
<field name="date" select="1"/>
|
||||
@@ -104,13 +105,17 @@
|
||||
</group>
|
||||
</page>
|
||||
<page string="Other Info" groups="base.group_extended">
|
||||
<separator colspan="4" string="Accounting data"/>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Accounting data"/>
|
||||
<field name="journal_id"/>
|
||||
<separator colspan="4" string="Validation"/>
|
||||
<field name="invoice_id"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Validation"/>
|
||||
<field name="date_confirm" readonly = "1"/>
|
||||
<field name="date_valid" readonly = "1"/>
|
||||
<field name="user_valid"/>
|
||||
<field name="invoice_id"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
</page>
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
<field name="amount_type"/>
|
||||
<field name="amount" on_change="onchange_amount(amount, amount_type)"/>
|
||||
<field name="account_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
@@ -298,7 +298,7 @@
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" colspan="4" select="1"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
<field name="account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="company_id"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
@@ -335,7 +335,7 @@
|
||||
<separator colspan="4" string="Payroll Accounting"/>
|
||||
<field name="company_id" widget="selection" select="2"/>
|
||||
<field name="code"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="account_id"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
@@ -363,7 +363,7 @@
|
||||
<field name="amount_type"/>
|
||||
<field name="amount" on_change="onchange_amount(amount, amount_type)"/>
|
||||
<field name="account_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -391,7 +391,7 @@
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="4" string="Accounting Informations"/>
|
||||
<field name="account_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<separator colspan="4" string="Company contribution"/>
|
||||
<field name="company_contrib"/>
|
||||
</group>
|
||||
@@ -463,7 +463,7 @@
|
||||
<field name="amount" on_change="onchange_amount(amount, amount_type)"/>
|
||||
<field name="total"/>
|
||||
<field name="account_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -956,7 +956,7 @@
|
||||
<form string="Contribution">
|
||||
<field name="name" select="1"/>
|
||||
<field name="account_id"/>
|
||||
<field name="analytic_account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended"/>
|
||||
<field name="company_id" select="1"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Contribution Lines">
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<newline/>
|
||||
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" required="1" domain="[('type','=','service')]"/>
|
||||
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
|
||||
<field domain="[('type','=','normal'),('state', '<>', 'close')]" name="account_id" select="1"/>
|
||||
<field domain="[('type','=','normal'),('state', '<>', 'close')]" name="account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="amount"/>
|
||||
<field name="general_account_id"/>
|
||||
<field name="journal_id"/>
|
||||
|
||||
@@ -47,26 +47,26 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Timesheet by user">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-go-year" string="This Year"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Timesheet lines in this year"/>
|
||||
<filter icon="terp-go-month" string="This Month"
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Timesheet lines in this month"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Timesheet lines during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-personal"
|
||||
string="Non Assigned timesheets to users"
|
||||
help="Non Assigned timesheets to users"
|
||||
domain="[('user_id','=',False)]"/>
|
||||
</field>
|
||||
<field name="account_id"/>
|
||||
<filter icon="terp-go-year" string="This Year"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Timesheet lines in this year"/>
|
||||
<filter icon="terp-go-month" string="This Month"
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Timesheet lines in this month"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Timesheet lines during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-personal"
|
||||
string="Non Assigned timesheets to users"
|
||||
help="Non Assigned timesheets to users"
|
||||
domain="[('user_id','=',False)]"/>
|
||||
</field>
|
||||
<field name="account_id"/>
|
||||
<field name="product_id"/>
|
||||
</group>
|
||||
<group expand="0" string="Group By...">
|
||||
@@ -417,7 +417,7 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Random Timesheets">
|
||||
<field name="analytic_account_id" select="1"/>
|
||||
<field name="analytic_account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="quantity" select="2" />
|
||||
<field name="date" select="1"/>
|
||||
@@ -435,7 +435,7 @@
|
||||
|
||||
<!-- Random Timesheet Lines of random activities -->
|
||||
|
||||
<record id="view_random_timesheet_lines_search" model="ir.ui.view">
|
||||
<record id="view_random_timesheet_lines_search" model="ir.ui.view">
|
||||
<field name="name">random.timesheet.lines.search</field>
|
||||
<field name="model">random.timesheet.lines</field>
|
||||
<field name="type">search</field>
|
||||
@@ -444,8 +444,8 @@
|
||||
<group col='15' colspan='4'>
|
||||
<filter icon="terp-check" string="Current" default="1" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
<field name="product_id" widget="selection"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
<field name="product_id" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
@@ -453,7 +453,7 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Analytic Account" icon="terp-folder-green" domain="[]" context="{'group_by':'analytic_account_id'}"/>
|
||||
<filter string="General Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'general_account_id'}"/>
|
||||
<filter string="General Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'general_account_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -470,7 +470,7 @@
|
||||
<field name="name" select="1"/>
|
||||
<field name="quantity" />
|
||||
<field name="product_id" select="1"/>
|
||||
<field name="analytic_account_id" select="1"/>
|
||||
<field name="analytic_account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="uom_id" />
|
||||
<field name="amount" />
|
||||
<field name="to_invoice" select="1"/>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Timesheet by Accounts">
|
||||
<field name="sheet_id" select="1"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="name" select="1" groups="base.group_extended"/>
|
||||
<field name="total" sum="Total"/>
|
||||
<field name="invoice_rate"/>
|
||||
</form>
|
||||
@@ -53,7 +53,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Timesheet by Accounts">
|
||||
<field name="sheet_id"/>
|
||||
<field name="name"/>
|
||||
<field name="name" groups="base.group_extended"/>
|
||||
<field name="total" sum="Total"/>
|
||||
<field name="invoice_rate"/>
|
||||
</tree>
|
||||
|
||||
@@ -141,6 +141,7 @@ class lunch_order(osv.osv):
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ], \
|
||||
'State', readonly=True, select=True),
|
||||
'price': fields.function(_price_get, method=True, string="Price"),
|
||||
'category': fields.many2one('lunch.category','Category'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -198,7 +199,8 @@ class lunch_order(osv.osv):
|
||||
if not product:
|
||||
return {'value': {'price': 0.0}}
|
||||
price = self.pool.get('lunch.product').read(cr, uid, product, ['price'])['price']
|
||||
return {'value': {'price': price}}
|
||||
categ_id = self.pool.get('lunch.product').browse(cr, uid, product).category_id.id
|
||||
return {'value': {'price': price,'category':categ_id}}
|
||||
|
||||
lunch_order()
|
||||
|
||||
|
||||
@@ -29,8 +29,9 @@
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="product" select="1" on_change="onchange_product(product)"/>
|
||||
<field name="price"/>
|
||||
<field name="category"/>
|
||||
<field name="descript"/>
|
||||
<field name="price"/>
|
||||
<field name="cashmove"/>
|
||||
<field name="state"/>
|
||||
</group>
|
||||
@@ -48,6 +49,7 @@
|
||||
<tree colors="blue:state in ('draft');black:state in ('confirmed')" string="Order">
|
||||
<field name="user_id"/>
|
||||
<field name="product"/>
|
||||
<field name="category"/>
|
||||
<field name="date"/>
|
||||
<field name="cashmove"/>
|
||||
<field name="state"/>
|
||||
@@ -85,7 +87,9 @@
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Cashbox" icon="terp-dolar" domain="[]" context="{'group_by':'cashmove'}"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<!-- <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product'}"/>-->
|
||||
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -575,14 +575,17 @@ class marketing_campaign_workitem(osv.osv):
|
||||
|
||||
if result:
|
||||
# process _chain
|
||||
workitem = workitem.browse(context)[0] # reload
|
||||
date = datetime.strptime(workitem.date, DT_FMT)
|
||||
|
||||
for transition in activity.to_ids:
|
||||
if transition.trigger == 'cosmetic':
|
||||
continue
|
||||
launch_date = False
|
||||
if transition.trigger == 'auto':
|
||||
launch_date = datetime.now()
|
||||
launch_date = date
|
||||
elif transition.trigger == 'time':
|
||||
launch_date = datetime.now() + transition._delta()
|
||||
launch_date = date + transition._delta()
|
||||
|
||||
if launch_date:
|
||||
launch_date = launch_date.strftime(DT_FMT)
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<notebook colspan="4">
|
||||
<page string="Worklogs">
|
||||
<field name="analytic_account_id" invisible="1"/>
|
||||
<field name="analytic_account_id" invisible="1" groups="base.group_extended"/>
|
||||
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
|
||||
<tree editable="top" string="Timesheet">
|
||||
<field name="name"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
|
||||
<field name="account_id" invisible="0" domain="[('partner_id', '=', parent.partner_id)]" on_change="on_change_account_id(account_id)"/>
|
||||
<field name="name"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
|
||||
<field name="account_id" invisible="0" domain="[('partner_id', '=', parent.partner_id)]" on_change="on_change_account_id(account_id)"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field invisible="1" name="journal_id"/>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<field colspan="4" name="planning_account"
|
||||
nolabel="1" widget="one2many_list" readonly="1">
|
||||
<tree string="Planning By Account (in Days)">
|
||||
<field name="account_id" />
|
||||
<field name="account_id" groups="base.group_extended"/>
|
||||
<field name="tasks" sum="Total Remaining Tasks"/>
|
||||
<field name="plan_tasks" sum="Total Time Allocation of Tasks"/>
|
||||
<field name="plan_open" sum="Total Time Allocation without Tasks"/>
|
||||
@@ -68,7 +68,7 @@
|
||||
<tree editable="bottom"
|
||||
string="Planning Lines">
|
||||
<field name="user_id"/>
|
||||
<field name="account_id" />
|
||||
<field name="account_id" groups="base.group_extended"/>
|
||||
<field name="amount" />
|
||||
<field name="amount_unit" />
|
||||
<field name="task_ids" />
|
||||
@@ -78,7 +78,7 @@
|
||||
</tree>
|
||||
<form string="Planning Lines">
|
||||
<field name="user_id" domain="[('id','child_of',[parent.user_id])]"/>
|
||||
<field name="account_id"/>
|
||||
<field name="account_id" groups="base.group_extended"/>
|
||||
<field name="amount" />
|
||||
<field name="amount_unit" />
|
||||
<field name="task_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
@@ -181,7 +181,7 @@
|
||||
<tree string="Planning Line">
|
||||
<field name="planning_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="account_id" />
|
||||
<field name="account_id" groups="base.group_extended"/>
|
||||
<field name="amount" />
|
||||
<field name="amount_unit" />
|
||||
<field name="note" select="1"/>
|
||||
@@ -198,7 +198,7 @@
|
||||
<form string="Planning Line">
|
||||
<field name="planning_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
<field name="account_id" select="1" groups="base.group_extended"/>
|
||||
<field name="amount" />
|
||||
<field name="amount_unit" />
|
||||
<separator string="Notes" colspan="4" />
|
||||
@@ -234,7 +234,7 @@
|
||||
<form string="Planning statistics">
|
||||
<field name="planning_id" select="1" />
|
||||
<field name="user_id" select="1" />
|
||||
<field name="account_id" select="1" />
|
||||
<field name="account_id" select="1" groups="base.group_extended"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -249,7 +249,7 @@
|
||||
<field name="planning_id" />
|
||||
<field name="user_id" />
|
||||
<field name="manager_id" />
|
||||
<field name="account_id" />
|
||||
<field name="account_id" groups="base.group_extended"/>
|
||||
<field name="sum_amount" />
|
||||
<field name="sum_amount_real" />
|
||||
<field name="sum_amount_tasks" />
|
||||
@@ -263,7 +263,7 @@
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Planning statistics" type="bar">
|
||||
<field name="account_id" />
|
||||
<field name="account_id"/>
|
||||
<field name="sum_amount" operator="+" />
|
||||
<field name="sum_amount_real" operator="+" />
|
||||
<field name="sum_amount_tasks" operator="+" />
|
||||
@@ -283,7 +283,7 @@
|
||||
<separator orientation="vertical"/>
|
||||
<field name="planning_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="account_id" select="1"/>
|
||||
<field name="account_id" select="1" groups="base.group_extended"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -325,7 +325,7 @@
|
||||
<tree editable="bottom"
|
||||
string="Planning Lines">
|
||||
<field name="user_id"/>
|
||||
<field name="account_id" />
|
||||
<field name="account_id" groups="base.group_extended"/>
|
||||
<field name="amount" />
|
||||
<field name="amount_unit" />
|
||||
<field name="task_ids" />
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<field name="inherit_id" ref="purchase.purchase_order_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="account_analytic_id" position="replace">
|
||||
<field name="analytics_id" domain="[('plan_id','<>',False)]"/>
|
||||
<field name="analytics_id" domain="[('plan_id','<>',False)]" groups="base.group_extended"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<field name="price_total" sum="Total Price"/>
|
||||
<field name="delay" sum="Commitment Delay"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="analytic_account_id" invisible="1"/>
|
||||
<field name="analytic_account_id" invisible="1" groups="base.group_extended"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1391,7 +1391,7 @@ class stock_move(osv.osv):
|
||||
if context.get('move_line', []):
|
||||
if context['move_line'][0]:
|
||||
if isinstance(context['move_line'][0], (tuple, list)):
|
||||
return context['move_line'][0][2] and context['move_line'][0][2]['location_dest_id'] or False
|
||||
return context['move_line'][0][2] and context['move_line'][0][2].get('location_dest_id',False)
|
||||
else:
|
||||
move_list = self.pool.get('stock.move').read(cr, uid, context['move_line'][0], ['location_dest_id'])
|
||||
return move_list and move_list['location_dest_id'][0] or False
|
||||
|
||||
@@ -148,13 +148,16 @@ class thunderbird_partner(osv.osv_memory):
|
||||
create_id = self.pool.get('res.partner.address').create(cr, user, dictcreate)
|
||||
return create_id
|
||||
|
||||
def history_message(self,cr,uid,vals):
|
||||
def history_message(self, cr, uid, vals):
|
||||
dictcreate = dict(vals)
|
||||
ref_ids = str(dictcreate.get('ref_ids')).split(';')
|
||||
msg = dictcreate.get('message')
|
||||
server_tools_pool = self.pool.get('email.server.tools')
|
||||
res_ids = map(lambda x: int(x), dictcreate.get('res_id').split(','))
|
||||
models = dictcreate.get('model').split(',')
|
||||
for i in range(len(res_ids)):
|
||||
server_tools_pool.history_message(cr, uid, models[i], res_ids[i], dictcreate.get('message'))
|
||||
for ref_id in ref_ids:
|
||||
ref = ref_id.split(',')
|
||||
model = ref[0]
|
||||
res_id = int(ref[1])
|
||||
server_tools_pool.history_message(cr, uid, model, res_id, msg)
|
||||
return True
|
||||
|
||||
def process_email(self,cr,uid,vals):
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+45
-30
@@ -1,6 +1,20 @@
|
||||
/**
|
||||
* Global instance stored here
|
||||
*/
|
||||
/************************************************************
|
||||
* 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/>.
|
||||
***************************************************************/
|
||||
|
||||
var xmlRpcClient;
|
||||
|
||||
@@ -1387,37 +1401,38 @@ function upload_archivemail()
|
||||
list_documents = document.getElementById('listSearchBox')
|
||||
var context = []
|
||||
var cnt = list_documents.selectedCount
|
||||
var res_id = [];
|
||||
var model = [];
|
||||
var ref_ids = "";
|
||||
var branchobj = getPref();
|
||||
setServerService('xmlrpc/object');
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||
var xmlRpcClient = getXmlRpc();
|
||||
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strDbName.data = branchobj.getCharPref("serverdbname");
|
||||
var struids = xmlRpcClient.createType(xmlRpcClient.INT,{});
|
||||
struids.data = branchobj.getIntPref('userid');
|
||||
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strpass.data = branchobj.getCharPref("password");
|
||||
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strmethod.data = 'history_message';
|
||||
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strobj.data = 'thunderbird.partner';
|
||||
var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
|
||||
for(i=0;i<cnt;i++)
|
||||
{
|
||||
var object = list_documents.getSelectedItem(i);
|
||||
var eml_string = parse_eml();
|
||||
|
||||
model[i] = object.label;
|
||||
res_id[i] = object.value;
|
||||
var branchobj = getPref();
|
||||
setServerService('xmlrpc/object');
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
|
||||
var xmlRpcClient = getXmlRpc();
|
||||
var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strDbName.data = branchobj.getCharPref("serverdbname");
|
||||
var struids = xmlRpcClient.createType(xmlRpcClient.INT,{});
|
||||
struids.data = branchobj.getIntPref('userid');
|
||||
var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strpass.data = branchobj.getCharPref("password");
|
||||
var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strmethod.data = 'history_message';
|
||||
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
strobj.data = 'thunderbird.partner';
|
||||
var resobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
|
||||
}
|
||||
var a = ['model','res_id','message'];
|
||||
var b = [[model],[res_id],eml_string];
|
||||
var arrofarr = dictcontact(a,b);
|
||||
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
||||
alert("Mail Archived Successfully");
|
||||
window.close();
|
||||
ref_ids += object.label;
|
||||
ref_ids += ",";
|
||||
ref_ids += object.value;
|
||||
if (i < cnt-1){ref_ids += ";";}
|
||||
}
|
||||
var a = ['ref_ids','message'];
|
||||
var b = [ref_ids, eml_string];
|
||||
var arrofarr = dictcontact(a,b);
|
||||
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
|
||||
alert("Mail Archived Successfully");
|
||||
window.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>{d57f315a-9f5d-4366-a530-a769a4a8c949}</em:id>
|
||||
<em:iconURL>chrome://openerp_plugin/skin/tinyerp-icon.ico</em:iconURL>
|
||||
<em:name>OpenERP Plugin for Thunderbird 2.0</em:name>
|
||||
<em:name>OpenERP Plugin</em:name>
|
||||
<em:version>1.0</em:version>
|
||||
<em:description>OpenERP Thunderbird Integration</em:description>
|
||||
<em:creator>OpenERP SA</em:creator>
|
||||
@@ -15,7 +15,7 @@
|
||||
<Description>
|
||||
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
|
||||
<em:minVersion>2.0</em:minVersion>
|
||||
<em:maxVersion>3.0.*</em:maxVersion>
|
||||
<em:maxVersion>3.1.*</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
</Description>
|
||||
|
||||
Reference in New Issue
Block a user