[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
bzr revid: mtr@mtr-20100615043241-e6sm33ukdu574ghy
This commit is contained in:
commit
152ee4740d
|
@ -19,26 +19,26 @@
|
|||
position="attributes">
|
||||
<attribute name="string">You can enhance OpenERP's basic accounting support with a few additional OpenERP applications.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>23</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<group colspan="4" height="450" width="600">
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<group colspan="4" height="450" width="600">
|
||||
<field name="charts"/>
|
||||
<group colspan="4">
|
||||
<separator col="4" colspan="4" string="Configure Fiscal Year"/>
|
||||
<separator col="4" colspan="4" string="Configure Fiscal Year"/>
|
||||
<field name="date_start" on_change="on_change_start_date(date_start)"/>
|
||||
<field name="date_stop"/>
|
||||
<field name="period" colspan="4"/>
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
|
||||
<separator col="4" colspan="4" string="Bank and Cost Account"/>
|
||||
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
|
||||
<form string="">
|
||||
<separator col="4" colspan="4" string="Bank and Cost Account"/>
|
||||
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
|
||||
<form string="">
|
||||
<field name="acc_name"/>
|
||||
<field name="account_type"/>
|
||||
<field name="currency_id" widget="selection"/>
|
||||
|
@ -51,15 +51,15 @@
|
|||
</field>
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('charts','!=','configurable')]}">
|
||||
<field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
|
||||
<field name="purchase_tax" colspan="2" />
|
||||
<field name="sale_tax" colspan="2" on_change="on_change_tax(sale_tax)"/>
|
||||
<field name="purchase_tax" colspan="2" />
|
||||
</group>
|
||||
<group colspan="4" groups="base.group_extended">
|
||||
<separator col="4" colspan="4" string="Install Extra Account Module"/>
|
||||
<field name="account_analytic_plans"/>
|
||||
<field name="account_payment"/>
|
||||
<field name="account_followup"/>
|
||||
<field name="account_asset"/>
|
||||
<separator col="4" colspan="4" string="Install Extra Account Module"/>
|
||||
<field name="account_analytic_plans"/>
|
||||
<field name="account_payment"/>
|
||||
<field name="account_followup"/>
|
||||
<field name="account_asset"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
|
@ -88,12 +88,12 @@
|
|||
<field name="name">account_installer_action_replace</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@string='Launch']" position="replace">
|
||||
<button name="%(action_account_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@string='Launch']" position="replace">
|
||||
<button name="%(action_account_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -488,20 +488,5 @@
|
|||
|
||||
<act_window domain="[('partner_id', '=', partner_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_invoice_account_move_unreconciled" name="Unreconciled Receivables & Payables" res_model="account.move.line" src_model="account.invoice"/>
|
||||
|
||||
<!-- Partners inherited form -->
|
||||
|
||||
<record id="view_invoice_partner_info_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.invoice.info.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Account Info">
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -577,13 +577,16 @@ class account_move_line(osv.osv):
|
|||
# writeoff; entry generated for the difference between the lines
|
||||
#
|
||||
|
||||
def reconcile_partial(self, cr, uid, ids, type='auto', context={}):
|
||||
def reconcile_partial(self, cr, uid, ids, type='auto', context=None):
|
||||
merges = []
|
||||
unmerge = []
|
||||
total = 0.0
|
||||
merges_rec = []
|
||||
|
||||
company_list = []
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if company_list and not line.company_id.id in company_list:
|
||||
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries'))
|
||||
|
@ -613,13 +616,15 @@ class account_move_line(osv.osv):
|
|||
self.pool.get('account.move.reconcile').reconcile_partial_check(cr, uid, [r_id] + merges_rec, context=context)
|
||||
return True
|
||||
|
||||
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context={}):
|
||||
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context=None):
|
||||
lines = self.browse(cr, uid, ids, context=context)
|
||||
unrec_lines = filter(lambda x: not x['reconcile_id'], lines)
|
||||
credit = debit = 0.0
|
||||
currency = 0.0
|
||||
account_id = False
|
||||
partner_id = False
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
company_list = []
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
|
|
|
@ -1554,7 +1554,7 @@
|
|||
|
||||
<act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable'])]" id="act_account_partner_account_move_all" name="Receivables & Payables" res_model="account.move.line" src_model="res.partner"/>
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="All Account Entries" res_model="account.move.line" src_model="res.partner"/>
|
||||
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="All Account Entries" res_model="account.move.line" src_model="res.partner"/>
|
||||
|
||||
<record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
|
||||
<field name="name">Account Add wizard</field>
|
||||
|
@ -1577,7 +1577,7 @@
|
|||
res_model="account.addtmpl.wizard"
|
||||
context="{'tmpl_ids': active_id}"
|
||||
src_model="account.account.template"
|
||||
view_type="form" view_mode="form"/>
|
||||
view_type="form" view_mode="form"/>
|
||||
|
||||
<!-- Account Templates -->
|
||||
<menuitem
|
||||
|
@ -1820,17 +1820,17 @@
|
|||
<attribute name="string">Generate Chart of Accounts from a Chart Template</attribute>
|
||||
</form>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string"
|
||||
<attribute name="string"
|
||||
>Generate Chart of Accounts from a Chart Template</attribute>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>
|
||||
<attribute name="width">150</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>15</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template</attribute>
|
||||
<attribute name="width">150</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>15</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<field name="company_id" widget="selection"
|
||||
/>
|
||||
|
|
|
@ -89,7 +89,7 @@ class res_partner(osv.osv):
|
|||
_inherit = 'res.partner'
|
||||
_description = 'Partner'
|
||||
def _credit_debit_get(self, cr, uid, ids, field_names, arg, context):
|
||||
query = self.pool.get('account.move.line')._query_get(cr, uid, context=context)
|
||||
query = self.pool.get('account.move.line')._query_get(cr, 1, context=context)
|
||||
cr.execute("""select
|
||||
l.partner_id, a.type, sum(l.debit-l.credit)
|
||||
from
|
||||
|
|
|
@ -118,7 +118,6 @@
|
|||
<field name="acc_number"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
|
@ -126,21 +125,14 @@
|
|||
|
||||
<!-- Partners info tab view-->
|
||||
|
||||
<record id="view_account_partner_info_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.account.info.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook[last()]" position="after">
|
||||
<notebook colspan="4">
|
||||
<page string="Project">
|
||||
<field name="contract_ids" colspan="4" nolabel="1" />
|
||||
</page>
|
||||
</notebook>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
id="action_analytic_open"
|
||||
name="Analytic Accounts"
|
||||
res_model="account.analytic.account"
|
||||
domain="[('partner_id','=',active_id)]"
|
||||
src_model="res.partner"
|
||||
view_type="form"
|
||||
view_mode="tree,form,graph,calendar"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_invoiceinvoice0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_finance_invoice"/>
|
||||
<field name="menu_id" ref="account.menu_finance_receivables"/>
|
||||
<field name="model_id" ref="account.model_account_invoice"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Create Invoice"""" name="name"/>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_supplierinvoiceinvoice0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_finance_invoice"/>
|
||||
<field name="menu_id" ref="account.menu_finance_payables"/>
|
||||
<field name="model_id" ref="account.model_account_invoice"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Create Invoice"""" name="name"/>
|
||||
|
|
|
@ -312,23 +312,23 @@
|
|||
<field name="domain">[('journal_id','=',active_id)]</field>
|
||||
</record>
|
||||
<menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_entries"/>
|
||||
<record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<field name="name">Check Register</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id','=',active_id)]</field>
|
||||
</record>
|
||||
</record> -->
|
||||
<!-- <menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_bank_and_cash"/>-->
|
||||
<record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<!-- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
|
||||
<field name="name">Checks Register</field>
|
||||
<field name="res_model">account.analytic.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id','=',active_id)]</field>
|
||||
</record>
|
||||
</record> -->
|
||||
<!-- <menuitem action="action_account_analytic_journal_open_form" id="account_analytic_journal_entries" parent="menu_finance_bank_and_cash"/>-->
|
||||
|
||||
|
||||
<!-- <record id="ir_open_account_journal_analytic" model="ir.values">-->
|
||||
<!-- <field eval="'tree_but_open'" name="key2"/>-->
|
||||
<!-- <field eval="'account.analytic.journal'" name="model"/>-->
|
||||
|
|
|
@ -24,7 +24,11 @@
|
|||
<field eval="[(6,0,[ref('group_account_manager')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_invoice" model="ir.ui.menu">
|
||||
<record id="menu_finance_receivables" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_invoice')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
<record id="menu_finance_payables" model="ir.ui.menu">
|
||||
<field eval="[(6,0,[ref('group_account_invoice')])]" name="groups_id"/>
|
||||
</record>
|
||||
|
||||
|
@ -44,77 +48,77 @@
|
|||
</record>
|
||||
|
||||
<record id="account_move_line_comp_rule" model="ir.rule">
|
||||
<field name="name">Entry lines</field>
|
||||
<field name="name">Entry lines</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_move_line"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="journal_period_comp_rule" model="ir.rule">
|
||||
<field name="name">Journal Period</field>
|
||||
<field name="name">Journal Period</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_journal_period"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="journal_comp_rule" model="ir.rule">
|
||||
<field name="name">Journal multi-company</field>
|
||||
<field name="name">Journal multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_journal"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="analytic_journal_comp_rule" model="ir.rule">
|
||||
<field name="name">Analytic journal multi-company</field>
|
||||
<field name="name">Analytic journal multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_analytic_journal"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="analytic_journal_comp_rule_false" model="ir.rule">
|
||||
<field name="name">Analytic journal multi-company</field>
|
||||
<field name="name">Analytic journal multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_analytic_journal"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="period_comp_rule" model="ir.rule">
|
||||
<field name="name">Period multi-company</field>
|
||||
<field name="name">Period multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_period"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="fiscal_year_comp_rule" model="ir.rule">
|
||||
<field name="name">Fiscal year multi-company</field>
|
||||
<field name="name">Fiscal year multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_fiscalyear"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="account_comp_rule" model="ir.rule">
|
||||
<field name="name">Account multi-company</field>
|
||||
<field name="name">Account multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_account"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="tax_comp_rule" model="ir.rule">
|
||||
<field name="name">Tax multi-company</field>
|
||||
<field name="name">Tax multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_tax"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="tax_code_comp_rule" model="ir.rule">
|
||||
<field name="name">Tax code multi-company</field>
|
||||
<field name="name">Tax code multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_tax_code"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="invoice_comp_rule" model="ir.rule">
|
||||
<field name="name">Invoice multi-company</field>
|
||||
<field name="name">Invoice multi-company</field>
|
||||
<field model="ir.model" name="model_id" ref="model_account_invoice"/>
|
||||
<field eval="True" name="global"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_product_product_account_user","product.product.account.user","product.model_product_product","group_account_user",1,0,0,0
|
||||
"access_account_payment_term","account.payment.term","model_account_payment_term","account.group_account_user",1,0,0,0
|
||||
"access_account_payment_term_line","account.payment.term.line","model_account_payment_term_line","account.group_account_user",1,0,0,0
|
||||
"access_account_account_type","account.account.type","model_account_account_type","account.group_account_user",1,0,0,0
|
||||
|
@ -69,7 +70,6 @@
|
|||
"access_account_add_tmpl_wizard_system_manager","account.addtmpl.wizard system manager","model_account_addtmpl_wizard","base.group_system",1,1,1,1
|
||||
"access_account_invoice_user","account.invoice user","model_account_invoice","base.group_user",1,0,0,0
|
||||
"access_account_invoice_user","account.invoice.line user","model_account_invoice_line","base.group_user",1,0,0,0
|
||||
"access_account_invoice_user","account.invoice.tax user","model_account_invoice_tax","base.group_user",1,0,0,0
|
||||
"access_account_payment_term_partner_manager","account.payment.term partner manager","model_account_payment_term","base.group_user",1,0,0,0
|
||||
"access_account_payment_term_line_partner_manager","account.payment.term.line partner manager","model_account_payment_term_line","base.group_user",1,0,0,0
|
||||
"access_account_account_product_manager","account.account product manager","model_account_account","product.group_product_manager",1,0,0,0
|
||||
|
@ -85,7 +85,7 @@
|
|||
"access_account_fiscal_position_account_template","account.fiscal.position.account.template","model_account_fiscal_position_account_template","account.group_account_manager",1,1,1,1
|
||||
"access_account_sequence_fiscal_year","account.sequence.fiscalyear","model_account_sequence_fiscalyear","account.group_account_user",1,1,1,1
|
||||
"access_account_sequence_fiscal_year_user","account.sequence.fiscalyear user","model_account_sequence_fiscalyear","base.group_user",1,0,0,0
|
||||
"access_account_installer","account.installer","model_account_installer","base.group_user",1,0,0,0
|
||||
"access_account_installer","account.installer","model_account_installer","base.group_system",1,1,1,1
|
||||
"access_report_account_receivable","report.account.receivable","model_report_account_receivable","account.group_account_manager",1,0,0,0
|
||||
"access_temp_range","temp.range","model_temp_range","account.group_account_manager",1,0,0,0
|
||||
"access_report_aged_receivable","report.aged.receivable","model_report_aged_receivable","account.group_account_manager",1,0,0,0
|
||||
|
|
|
|
@ -31,15 +31,16 @@ class account_automatic_reconcile(osv.osv_memory):
|
|||
_columns = {
|
||||
'account_ids': fields.many2many('account.account', 'reconcile_account_rel', 'reconcile_id', 'account_id', 'Account to reconcile', domain = [('reconcile','=',1)], \
|
||||
help = 'If no account is specified, the reconciliation will be made using every accounts that can be reconcilied'),
|
||||
'writeoff_acc_id': fields.many2one('account.account', 'Account', required=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
|
||||
'period_id': fields.many2one('account.period', 'Period', required=True),
|
||||
'writeoff_acc_id': fields.many2one('account.account', 'Account'),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal'),
|
||||
'period_id': fields.many2one('account.period', 'Period'),
|
||||
'max_amount': fields.float('Maximum write-off amount'),
|
||||
'power': fields.selection([(p, str(p)) for p in range(2, 10)], 'Power', required=True),
|
||||
'date1': fields.date('Start of period', required=True),
|
||||
'date2': fields.date('End of period', required=True),
|
||||
'reconciled': fields.integer('Reconciled transactions', readonly=True),
|
||||
'unreconciled': fields.integer('Not reconciled transactions', readonly=True),
|
||||
'allow_write_off': fields.boolean('Allow write off')
|
||||
}
|
||||
|
||||
def _get_reconciled(self, cr, uid, context={}):
|
||||
|
@ -134,7 +135,6 @@ class account_automatic_reconcile(osv.osv_memory):
|
|||
return (reconciled, len(credits)+len(debits))
|
||||
|
||||
def reconcile(self, cr, uid, ids, context=None):
|
||||
service = netsvc.LocalService("object_proxy")
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
if context is None:
|
||||
|
@ -146,16 +146,18 @@ class account_automatic_reconcile(osv.osv_memory):
|
|||
if not form['account_ids']:
|
||||
raise osv.except_osv(_('UserError'), _('You must select accounts to reconcile'))
|
||||
for account_id in form['account_ids']:
|
||||
if not context.get('allow_write_off', False):
|
||||
query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
|
||||
AND state <> 'draft' GROUP BY partner_id \
|
||||
HAVING ABS(SUM(debit-credit)) <> %s AND count(*)>0"%(account_id, 0.0)
|
||||
# query="SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
|
||||
# AND state <> 'draft' GROUP BY partner_id AND debit = credi"%(account_id)
|
||||
else:
|
||||
query = "SELECT partner_id FROM account_move_line WHERE account_id=%s AND reconcile_id IS NULL \
|
||||
AND state <> 'draft' GROUP BY partner_id \
|
||||
HAVING ABS(SUM(debit-credit)) <= %s AND count(*)>0"%(account_id, max_amount or 0.0)
|
||||
# reconcile automatically all transactions from partners whose balance is 0
|
||||
cr.execute(
|
||||
"SELECT partner_id " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"GROUP BY partner_id " \
|
||||
"HAVING ABS(SUM(debit-credit)) < %s AND count(*)>0",
|
||||
(account_id, max_amount or 0.0))
|
||||
cr.execute(query)
|
||||
partner_ids = [id for (id,) in cr.fetchall()]
|
||||
for partner_id in partner_ids:
|
||||
cr.execute(
|
||||
|
@ -168,63 +170,67 @@ class account_automatic_reconcile(osv.osv_memory):
|
|||
(account_id, partner_id))
|
||||
line_ids = [id for (id,) in cr.fetchall()]
|
||||
if len(line_ids):
|
||||
move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
|
||||
reconciled += len(line_ids)
|
||||
if not context.get('allow_write_off', False):
|
||||
move_line_obj.reconcile_partial(cr, uid, line_ids, 'manual', context={})
|
||||
else:
|
||||
move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
|
||||
|
||||
# get the list of partners who have more than one unreconciled transaction
|
||||
cr.execute(
|
||||
"SELECT partner_id " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND partner_id IS NOT NULL " \
|
||||
"GROUP BY partner_id " \
|
||||
"HAVING count(*)>1",
|
||||
(account_id,))
|
||||
partner_ids = [id for (id,) in cr.fetchall()]
|
||||
#filter?
|
||||
for partner_id in partner_ids:
|
||||
# get the list of unreconciled 'debit transactions' for this partner
|
||||
cr.execute(
|
||||
"SELECT id, debit " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND partner_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND debit > 0",
|
||||
(account_id, partner_id))
|
||||
debits = cr.fetchall()
|
||||
# get the list of partners who have more than one unreconciled transaction
|
||||
cr.execute(
|
||||
"SELECT partner_id " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND partner_id IS NOT NULL " \
|
||||
"GROUP BY partner_id " \
|
||||
"HAVING count(*)>1",
|
||||
(account_id,))
|
||||
partner_ids = [id for (id,) in cr.fetchall()]
|
||||
#filter?
|
||||
for partner_id in partner_ids:
|
||||
# get the list of unreconciled 'debit transactions' for this partner
|
||||
cr.execute(
|
||||
"SELECT id, debit " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND partner_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND debit > 0",
|
||||
(account_id, partner_id))
|
||||
debits = cr.fetchall()
|
||||
|
||||
# get the list of unreconciled 'credit transactions' for this partner
|
||||
cr.execute(
|
||||
"SELECT id, credit " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND partner_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND credit > 0",
|
||||
(account_id, partner_id))
|
||||
credits = cr.fetchall()
|
||||
# get the list of unreconciled 'credit transactions' for this partner
|
||||
cr.execute(
|
||||
"SELECT id, credit " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND partner_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " \
|
||||
"AND credit > 0",
|
||||
(account_id, partner_id))
|
||||
credits = cr.fetchall()
|
||||
|
||||
(rec, unrec) = self.do_reconcile(cr, uid, credits, debits, max_amount, power, form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
|
||||
reconciled += rec
|
||||
unreconciled += unrec
|
||||
(rec, unrec) = self.do_reconcile(cr, uid, credits, debits, max_amount, power, form['writeoff_acc_id'], form['period_id'], form['journal_id'], context)
|
||||
reconciled += rec
|
||||
unreconciled += unrec
|
||||
|
||||
# add the number of transactions for partners who have only one
|
||||
# unreconciled transactions to the unreconciled count
|
||||
partner_filter = partner_ids and 'AND partner_id not in (%s)' % ','.join(map(str, filter(None, partner_ids))) or ''
|
||||
cr.execute(
|
||||
"SELECT count(*) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " + partner_filter,
|
||||
(account_id,))
|
||||
additional_unrec = cr.fetchone()[0]
|
||||
context.update({'reconciled': reconciled, 'unreconciled': unreconciled + additional_unrec})
|
||||
# add the number of transactions for partners who have only one
|
||||
# unreconciled transactions to the unreconciled count
|
||||
partner_filter = partner_ids and 'AND partner_id not in (%s)' % ','.join(map(str, filter(None, partner_ids))) or ''
|
||||
cr.execute(
|
||||
"SELECT count(*) " \
|
||||
"FROM account_move_line " \
|
||||
"WHERE account_id=%s " \
|
||||
"AND reconcile_id IS NULL " \
|
||||
"AND state <> 'draft' " + partner_filter,
|
||||
(account_id,))
|
||||
additional_unrec = cr.fetchone()[0]
|
||||
unreconciled = unreconciled + additional_unrec
|
||||
context.update({'reconciled': reconciled, 'unreconciled': unreconciled})
|
||||
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','account_automatic_reconcile_view1')])
|
||||
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
|
||||
return {
|
||||
|
|
|
@ -8,20 +8,28 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Reconciliation">
|
||||
<group width="660" height="430">
|
||||
<separator string="Options" colspan="4"/>
|
||||
<group>
|
||||
<field name="account_ids" colspan="4" domain="[('reconcile','=',1)]"/>
|
||||
<field name="date1"/>
|
||||
<field name="date2"/>
|
||||
<field name="power"/>
|
||||
<separator string="Write-Off Move" colspan="4"/>
|
||||
<field name="max_amount"/>
|
||||
<field name="writeoff_acc_id"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<field name="allow_write_off"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group attrs="{'readonly':[('allow_write_off', '!=', True)]}">
|
||||
<separator string="Write-Off Move" colspan="4"/>
|
||||
<field name="max_amount"/>
|
||||
<field name="writeoff_acc_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
<field name="journal_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
<field name="period_id" attrs="{ 'required':[('allow_write_off', '=', True)]}"/>
|
||||
</group>
|
||||
<separator string ="" colspan="4"/>
|
||||
<group colspan="2" col="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="reconcile" string="Reconcile" type="object" icon="gtk-ok"/>
|
||||
<button name="reconcile" string="Reconcile" type="object" icon="gtk-ok" context="{'allow_write_off': allow_write_off}"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -64,4 +72,3 @@
|
|||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
|
|
@ -56,11 +56,11 @@ class account_move_line_reconcile(osv.osv_memory):
|
|||
if 'trans_nbr' in fields:
|
||||
res.update({'trans_nbr':data['trans_nbr']})
|
||||
if 'credit' in fields:
|
||||
res.update({'trans_nbr':data['credit']})
|
||||
res.update({'credit':data['credit']})
|
||||
if 'debit' in fields:
|
||||
res.update({'trans_nbr':data['debit']})
|
||||
res.update({'debit':data['debit']})
|
||||
if 'writeoff' in fields:
|
||||
res.update({'trans_nbr':data['writeoff']})
|
||||
res.update({'writeoff':data['writeoff']})
|
||||
return res
|
||||
|
||||
def partial_check(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -32,13 +32,12 @@ class account_budget_spread(osv.osv_memory):
|
|||
}
|
||||
|
||||
def check_spread(self, cr, uid, ids, context=None):
|
||||
service = netsvc.LocalService("object_proxy")
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
res = service.execute(cr.dbname, uid, 'account.budget.post', 'spread', context['active_ids'], data['fiscalyear'], data['amount'])
|
||||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
res = self.pool.get('account.budget.post').spread(cr, uid, context['active_ids'], data.fiscalyear.id, data.amount)
|
||||
return {}
|
||||
|
||||
account_budget_spread()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# 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/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -23,11 +23,10 @@
|
|||
# Init Sales
|
||||
#----------------------------------------------------------
|
||||
|
||||
import payment
|
||||
import account_payment
|
||||
import wizard
|
||||
import account_move_line
|
||||
import account_invoice
|
||||
import report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
|
|
@ -41,11 +41,11 @@
|
|||
'wizard/account_payment_pay_view.xml',
|
||||
'wizard/account_payment_populate_statement_view.xml',
|
||||
'wizard/account_payment_create_order_view.xml',
|
||||
'payment_view.xml',
|
||||
'payment_workflow.xml',
|
||||
'payment_sequence.xml',
|
||||
'account_payment_view.xml',
|
||||
'account_payment_workflow.xml',
|
||||
'account_payment_sequence.xml',
|
||||
'account_invoice_view.xml',
|
||||
'payment_report.xml',
|
||||
'account_payment_report.xml',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': ['test/account_payment.yml'],
|
||||
|
|
|
@ -18,29 +18,25 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields
|
||||
from osv import osv
|
||||
import time
|
||||
import netsvc
|
||||
import pooler
|
||||
|
||||
from osv import osv, fields
|
||||
import netsvc
|
||||
|
||||
class payment_type(osv.osv):
|
||||
_name= 'payment.type'
|
||||
_description= 'Payment Type'
|
||||
_columns= {
|
||||
'name': fields.char('Name', size=64, required=True,help='Payment Type'),
|
||||
'code': fields.char('Code', size=64, required=True,help='Specifies the Code for Payment Type'),
|
||||
'name': fields.char('Name', size=64, required=True, help='Payment Type'),
|
||||
'code': fields.char('Code', size=64, required=True, help='Specifies the Code for Payment Type'),
|
||||
'suitable_bank_types': fields.many2many('res.partner.bank.type',
|
||||
'bank_type_payment_type_rel',
|
||||
'pay_type_id','bank_type_id',
|
||||
'Suitable bank types')
|
||||
}
|
||||
}
|
||||
|
||||
payment_type()
|
||||
|
||||
|
||||
class payment_mode(osv.osv):
|
||||
_name= 'payment.mode'
|
||||
_description= 'Payment Mode'
|
||||
|
@ -66,16 +62,14 @@ class payment_mode(osv.osv):
|
|||
where pm.id = %s """, [payment_code])
|
||||
return [x[0] for x in cr.fetchall()]
|
||||
|
||||
|
||||
payment_mode()
|
||||
|
||||
|
||||
class payment_order(osv.osv):
|
||||
_name = 'payment.order'
|
||||
_description = 'Payment Order'
|
||||
_rec_name = 'reference'
|
||||
|
||||
def get_wizard(self,type):
|
||||
def get_wizard(self, type):
|
||||
logger = netsvc.Logger()
|
||||
logger.notifyChannel("warning", netsvc.LOG_WARNING,
|
||||
"No wizard found for the payment type '%s'." % type)
|
||||
|
@ -146,7 +140,6 @@ class payment_order(osv.osv):
|
|||
|
||||
payment_order()
|
||||
|
||||
|
||||
class payment_line(osv.osv):
|
||||
_name = 'payment.line'
|
||||
_description = 'Payment Line'
|
|
@ -110,8 +110,7 @@ class payment_order_create(osv.osv_memory):
|
|||
context.update({'line_ids': line_ids})
|
||||
model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_create_payment_order_lines')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
return {
|
||||
'name': ('Entrie Lines'),
|
||||
return {'name': ('Entrie Lines'),
|
||||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
|
|
|
@ -18,16 +18,13 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import time
|
||||
from osv import fields, osv
|
||||
|
||||
class account_payment_make_payment(osv.osv_memory):
|
||||
_name = 'account.payment.make.payment'
|
||||
_description = 'Account make payment'
|
||||
_columns = {
|
||||
}
|
||||
|
||||
def launch_wizard(self, cr, uid, ids, context):
|
||||
def launch_wizard(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Search for a wizard to launch according to the type.
|
||||
If type is manual. just confirm the order.
|
||||
|
@ -35,8 +32,8 @@ class account_payment_make_payment(osv.osv_memory):
|
|||
obj_payment_order = self.pool.get('payment.order')
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
obj_act = self.pool.get('ir.actions.act_window')
|
||||
order= obj_payment_order.browse(cr,uid,context['active_id'],context)
|
||||
t= order.mode and order.mode.type.code or 'manual'
|
||||
order= obj_payment_order.browse(cr, uid, context['active_id'], context)
|
||||
t = order.mode and order.mode.type.code or 'manual'
|
||||
if t == 'manual' :
|
||||
obj_payment_order.set_done(cr,uid,context['active_id'],context)
|
||||
return {}
|
||||
|
@ -49,12 +46,10 @@ class account_payment_make_payment(osv.osv_memory):
|
|||
module, wizard= gw
|
||||
result = mod_obj._get_id(cr, uid, module, wizard)
|
||||
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
|
||||
result = act_obj.read(cr, uid, [id])[0]
|
||||
return act_obj.read(cr, uid, [id])[0]
|
||||
#result['context'] = str({'fiscalyear': data['form']['fiscalyear']})
|
||||
return result
|
||||
|
||||
|
||||
account_payment_make_payment()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -8,7 +8,7 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Make Payment">
|
||||
<group height="80" width="320">
|
||||
<group height="100" width="320">
|
||||
<separator string="Are you sure you want to make payment?"/>
|
||||
<newline/>
|
||||
<group colspan="2" col="4">
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
"category" : "Generic Modules/Accounting",
|
||||
"website" : "http://tinyerp.com",
|
||||
"depends" : [
|
||||
"base",
|
||||
"base",
|
||||
"account"
|
||||
],
|
||||
"init_xml" : [
|
||||
|
@ -54,8 +54,12 @@
|
|||
"voucher_view.xml",
|
||||
"voucher_wizard.xml",
|
||||
"wizard/account_voucher_open_view.xml",
|
||||
|
||||
|
||||
],
|
||||
"test" : [
|
||||
"test/account_voucher.yml",
|
||||
],
|
||||
|
||||
'certificate': '0037580727101',
|
||||
"active": False,
|
||||
"installable": True,
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
|
||||
-
|
||||
In order to check account voucher module in OpenERP I create a customer voucher
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
account_id: account.cash
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
journal_id: account.bank_journal
|
||||
name: Voucher for Axelor
|
||||
narration: Basic Pc
|
||||
payment_ids:
|
||||
- account_id: account.a_recv
|
||||
amount: 1000.0
|
||||
name: Voucher for Axelor
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
period_id: account.period_6
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
I check that Initially customer voucher is in the "Draft" state
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of voucher to "proforma" by clicking PRO-FORMA button
|
||||
-
|
||||
!workflow {model: account.voucher, action: open_voucher, ref: account_voucher_voucherforaxelor0}
|
||||
-
|
||||
I check that the voucher state is now "proforma"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'proforma'
|
||||
-
|
||||
I create voucher by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor0}
|
||||
-
|
||||
I check that the voucher state is "Waiting for re-checking"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'recheck'
|
||||
-
|
||||
I clicked on Validate Button
|
||||
-
|
||||
!workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucherforaxelor0}
|
||||
-
|
||||
I check that the voucher state is "posted"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor0}:
|
||||
- state == 'posted'
|
||||
|
||||
-
|
||||
I check that Moves get created for this voucher
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_voucher_voucherforaxelor0"))
|
||||
assert(acc_id.move_id)
|
||||
|
||||
|
||||
-
|
||||
Now I create a Vendor Voucher
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
account_id: account.cash
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
journal_id: account.bank_journal
|
||||
name: Voucher Axelor
|
||||
narration: Basic PC
|
||||
payment_ids:
|
||||
- account_id: account.cash
|
||||
amount: 1000.0
|
||||
name: Voucher Axelor
|
||||
period_id: account.period_6
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
I check that Initially vendor voucher is in the "Draft" state
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of voucher to "proforma" by clicking PRO-FORMA button
|
||||
-
|
||||
!workflow {model: account.voucher, action: open_voucher, ref: account_voucher_voucheraxelor0}
|
||||
-
|
||||
I check that the voucher state is now "proforma"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'proforma'
|
||||
-
|
||||
I create voucher by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucheraxelor0}
|
||||
-
|
||||
I check that the voucher state is "Waiting for re-checking"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'recheck'
|
||||
-
|
||||
I clicked on Validate Button
|
||||
-
|
||||
!workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucheraxelor0}
|
||||
-
|
||||
I check that the voucher state is "posted"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucheraxelor0}:
|
||||
- state == 'posted'
|
||||
|
||||
-
|
||||
I check that moves get created for this voucher
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_voucher_voucheraxelor0"))
|
||||
assert(acc_id.move_id)
|
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# 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/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
{
|
||||
|
@ -23,24 +23,29 @@
|
|||
"version" : "1.0",
|
||||
"author" : 'Tiny & Axelor',
|
||||
"description": """This module includes :
|
||||
* It reconcile the invoice (supplier, customer) while paying through
|
||||
* It reconcile the invoice (supplier, customer) while paying through
|
||||
Accounting Vouchers
|
||||
""",
|
||||
"category" : "Generic Modules/Indian Accounting",
|
||||
"website" : "http://tinyerpindia.com",
|
||||
"depends" : [
|
||||
"base",
|
||||
"base",
|
||||
"account",
|
||||
"account_voucher",
|
||||
],
|
||||
"init_xml" : [
|
||||
],
|
||||
|
||||
|
||||
"demo_xml" : [],
|
||||
"update_xml" : [
|
||||
"account_voucher_payment_view.xml",
|
||||
"account_voucher_payment_wizard.xml"
|
||||
],
|
||||
"test" : [
|
||||
# "test/account_voucher.yml",
|
||||
"test/account_voucher_payment.yml",
|
||||
],
|
||||
|
||||
"active": False,
|
||||
"installable": True,
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# 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/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -35,9 +35,9 @@ class account_voucher(osv.osv):
|
|||
_columns = {
|
||||
'voucher_line_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'proforma':[('readonly',True)]}),
|
||||
}
|
||||
|
||||
|
||||
def action_move_line_create(self, cr, uid, ids, *args):
|
||||
|
||||
|
||||
for inv in self.browse(cr, uid, ids):
|
||||
if inv.move_id:
|
||||
continue
|
||||
|
@ -55,12 +55,12 @@ class account_voucher(osv.osv):
|
|||
ref = inv.reference
|
||||
else:
|
||||
ref = self._convert_ref(cr, uid, inv.number)
|
||||
|
||||
|
||||
date = inv.date
|
||||
total_currency = 0
|
||||
for i in iml:
|
||||
partner_id=i['partner_id']
|
||||
acc_id = i['account_id']
|
||||
acc_id = i['account_id']
|
||||
if inv.currency_id.id != company_currency:
|
||||
i['currency_id'] = inv.currency_id.id
|
||||
i['amount_currency'] = i['amount']
|
||||
|
@ -97,19 +97,19 @@ class account_voucher(osv.osv):
|
|||
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x,date, context={})) ,iml)
|
||||
an_journal_id=inv.journal_id.analytic_journal_id.id
|
||||
journal_id = inv.journal_id.id
|
||||
|
||||
|
||||
journal = self.pool.get('account.journal').browse(cr, uid, journal_id)
|
||||
if journal.sequence_id:
|
||||
name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id)
|
||||
|
||||
move = {
|
||||
'name': name,
|
||||
'journal_id': journal_id,
|
||||
'name': name,
|
||||
'journal_id': journal_id,
|
||||
'voucher_type':inv.type,
|
||||
'narration' : inv.narration,
|
||||
'data':date
|
||||
}
|
||||
|
||||
|
||||
if inv.period_id:
|
||||
move['period_id'] = inv.period_id.id
|
||||
for i in line:
|
||||
|
@ -128,7 +128,7 @@ class account_voucher(osv.osv):
|
|||
'journal_id':journal_id ,
|
||||
'period_id':inv.period_id.id,
|
||||
'partner_id': False,
|
||||
'ref': ref,
|
||||
'ref': ref,
|
||||
'date': date
|
||||
}
|
||||
if inv.type in ('rec_voucher', 'bank_rec_voucher', 'journal_pur_voucher', 'journal_voucher'):
|
||||
|
@ -144,15 +144,15 @@ class account_voucher(osv.osv):
|
|||
'voucher_invoice' : iml and iml[0]['invoice'] and iml[0]['invoice'].id or False,
|
||||
'debit':False,
|
||||
'credit':False,
|
||||
'move_id':move_id,
|
||||
'move_id':move_id,
|
||||
'account_id':line.account_id.id or False,
|
||||
'journal_id':journal_id ,
|
||||
'period_id':inv.period_id.id,
|
||||
'partner_id':line.partner_id.id or False,
|
||||
'ref':ref,
|
||||
'ref':ref,
|
||||
'date':date
|
||||
}
|
||||
|
||||
|
||||
if line.type == 'dr':
|
||||
move_line['debit'] = line.amount or False
|
||||
amount=line.amount
|
||||
|
@ -161,7 +161,7 @@ class account_voucher(osv.osv):
|
|||
amount=line.amount * (-1)
|
||||
ml_id=self.pool.get('account.move.line').create(cr, uid, move_line)
|
||||
id_mapping_dict[line.id] = ml_id
|
||||
|
||||
|
||||
total = 0.0
|
||||
mline = self.pool.get('account.move.line')
|
||||
if line.invoice_id.id:
|
||||
|
@ -180,7 +180,7 @@ class account_voucher(osv.osv):
|
|||
line.name=inv.narration
|
||||
else:
|
||||
line.name=line.name
|
||||
|
||||
|
||||
if line.account_analytic_id:
|
||||
an_line = {
|
||||
'name':line.name,
|
||||
|
@ -197,22 +197,22 @@ class account_voucher(osv.osv):
|
|||
self.pool.get('account.move.line').reconcile_partial(cr, uid, mline_ids, 'manual', context={})
|
||||
self.write(cr, uid, [inv.id], {'move_id': move_id})
|
||||
obj=self.pool.get('account.move').browse(cr, uid, move_id)
|
||||
|
||||
|
||||
for line in obj.line_id :
|
||||
cr.execute('insert into voucher_id (account_id,rel_account_move) values (%d, %d)',(int(ids[0]),int(line.id)))
|
||||
|
||||
|
||||
return True
|
||||
|
||||
account_voucher()
|
||||
|
||||
class account_voucher_line(osv.osv):
|
||||
_inherit = 'account.voucher.line'
|
||||
|
||||
|
||||
def default_get(self, cr, uid, fields, context={}):
|
||||
data = super(account_voucher_line, self).default_get(cr, uid, fields, context)
|
||||
self.voucher_context = context
|
||||
return data
|
||||
|
||||
|
||||
_columns = {
|
||||
'invoice_id' : fields.many2one('account.invoice','Invoice'),
|
||||
}
|
||||
|
@ -220,8 +220,8 @@ class account_voucher_line(osv.osv):
|
|||
def move_line_get_item(self, cr, uid, line, context={}):
|
||||
res = super(account_voucher_line, self).move_line_get_item(cr, uid, line, context)
|
||||
res['invoice'] = line.invoice_id or False
|
||||
return res
|
||||
|
||||
return res
|
||||
|
||||
def onchange_invoice_id(self, cr, uid, ids, invoice_id, context={}):
|
||||
lines = []
|
||||
if 'lines' in self.voucher_context:
|
||||
|
@ -233,27 +233,27 @@ class account_voucher_line(osv.osv):
|
|||
residual = invoice_obj.residual
|
||||
same_invoice_amounts = [x['amount'] for x in lines if x['invoice_id']==invoice_id]
|
||||
residual -= sum(same_invoice_amounts)
|
||||
return {'value' : {'amount':residual}}
|
||||
|
||||
return {'value' : {'amount':residual}}
|
||||
|
||||
def onchange_line_account(self, cr, uid, ids, account_id, type, type1):
|
||||
if not account_id:
|
||||
return {'value' : {'account_id' : False, 'type' : False ,'amount':False}}
|
||||
obj = self.pool.get('account.account')
|
||||
acc_id = False
|
||||
|
||||
|
||||
if type1 in ('rec_voucher','bank_rec_voucher', 'journal_voucher'):
|
||||
acc_id = obj.browse(cr, uid, account_id)
|
||||
balance = acc_id.credit
|
||||
type = 'cr'
|
||||
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
|
||||
elif type1 in ('pay_voucher','bank_pay_voucher','cont_voucher') :
|
||||
acc_id = obj.browse(cr, uid, account_id)
|
||||
balance = acc_id.debit
|
||||
type = 'dr'
|
||||
elif type1 in ('journal_sale_vou') :
|
||||
elif type1 in ('journal_sale_vou') :
|
||||
acc_id = obj.browse(cr, uid, account_id)
|
||||
balance = acc_id.credit
|
||||
type = 'dr'
|
||||
elif type1 in ('journal_pur_voucher') :
|
||||
elif type1 in ('journal_pur_voucher') :
|
||||
acc_id = obj.browse(cr, uid, account_id)
|
||||
balance = acc_id.debit
|
||||
type = 'cr'
|
||||
|
@ -265,7 +265,7 @@ account_voucher_line()
|
|||
|
||||
class account_invoice(osv.osv):
|
||||
_inherit = "account.invoice"
|
||||
|
||||
|
||||
def action_cancel(self, cr, uid, ids, *args):
|
||||
res = super(account_invoice, self).action_cancel(cr, uid, ids, *args)
|
||||
invoices = self.read(cr, uid, ids, ['move_id'])
|
||||
|
@ -276,7 +276,7 @@ class account_invoice(osv.osv):
|
|||
move_ids = move_db.search(cr, uid, [])
|
||||
move_obj = move_db.browse(cr, uid, move_ids)
|
||||
return res
|
||||
|
||||
|
||||
account_invoice()
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# 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/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
@ -32,11 +32,11 @@ _info_form = '''<?xml version="1.0"?>
|
|||
def _trans_unrec(self, cr, uid, data, context):
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
voucher = pool.get('account.voucher').browse(cr, uid, data.get('id'))
|
||||
recs = None
|
||||
recs = []
|
||||
for line in voucher.move_ids:
|
||||
if line.reconcile_id:
|
||||
recs = [line.reconcile_id.id]
|
||||
|
||||
|
||||
for rec in recs:
|
||||
pool.get('account.move.reconcile').unlink(cr, uid, rec)
|
||||
return {}
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
-
|
||||
In order to test account_voucher_payment module in OpenERP I create an invoice and paid it through voucher
|
||||
-
|
||||
I create a customer invoice record
|
||||
-
|
||||
!record {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
account_id: account.a_recv
|
||||
address_contact_id: base.res_partner_address_3000
|
||||
address_invoice_id: base.res_partner_address_3000
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
invoice_line:
|
||||
- account_id: account.a_sale
|
||||
name: '[PC1] Basic PC'
|
||||
price_unit: 450.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
I check that Initially customer invoice is in the "Draft" state
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of invoice to "Proforma2" by clicking PRO-FORMA button
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_proforma2, ref: account_invoice_voucher_payment}
|
||||
-
|
||||
I check that the invoice state is now "Proforma2"
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
- state == 'proforma2'
|
||||
-
|
||||
I create invoice by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_voucher_payment}
|
||||
-
|
||||
I check that the invoice state is "Open"
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
- state == 'open'
|
||||
|
||||
-
|
||||
I create a voucher record for above invoice
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
account_id: account.cash
|
||||
company_id: base.main_company
|
||||
currency_id: base.EUR
|
||||
journal_id: account.bank_journal
|
||||
name: Voucher for Axelor
|
||||
narration: Basic Pc
|
||||
payment_ids:
|
||||
- account_id: account.a_recv
|
||||
amount: 450.0
|
||||
name: Voucher for Axelor
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
invoice_id: account_invoice_voucher_payment
|
||||
type: cr
|
||||
period_id: account.period_6
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
I check that Initially customer voucher is in the "Draft" state
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I change the state of voucher to "proforma" by clicking PRO-FORMA button
|
||||
-
|
||||
!workflow {model: account.voucher, action: open_voucher, ref: account_voucher_voucherforaxelor1}
|
||||
-
|
||||
I check that the voucher state is now "proforma"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
- state == 'proforma'
|
||||
-
|
||||
I create voucher by clicking on Create button
|
||||
-
|
||||
!workflow {model: account.voucher, action: proforma_voucher, ref: account_voucher_voucherforaxelor1}
|
||||
-
|
||||
I check that the voucher state is "Waiting for re-checking"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
- state == 'recheck'
|
||||
-
|
||||
I clicked on Validate Button
|
||||
-
|
||||
!workflow {model: account.voucher, action: recheck_voucher, ref: account_voucher_voucherforaxelor1}
|
||||
-
|
||||
I check that the voucher state is "posted"
|
||||
-
|
||||
!assert {model: account.voucher, id: account_voucher_voucherforaxelor1}:
|
||||
- state == 'posted'
|
||||
|
||||
-
|
||||
I check that Moves get created for this voucher
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
acc_id=self.browse(cr, uid, ref("account_voucher_voucherforaxelor1"))
|
||||
assert(acc_id.move_id)
|
||||
|
||||
-
|
||||
I check that the invoice state is now Done
|
||||
-
|
||||
!assert {model: account.invoice, id: account_invoice_voucher_payment}:
|
||||
- state == 'paid'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -27,8 +27,7 @@ class auction_invoice(report_int):
|
|||
report_int.__init__(self, name)
|
||||
|
||||
def create(self,cr, uid, ids, datas, context):
|
||||
service = netsvc.LocalService("object_proxy")
|
||||
lots = service.execute(cr.dbname,uid, 'auction.lots', 'read', ids, ['ach_inv_id'])
|
||||
lots = self.pool.get('auction.lots').read(cr,uid, ids, ['ach_inv_id'], context=context)
|
||||
|
||||
invoices = {}
|
||||
for l in lots:
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_base_action_rule","base.action.rule","model_base_action_rule",,1,1,1,1
|
||||
"access_base_action_rule","base.action.rule","model_base_action_rule",,1,0,0,0
|
||||
"access_base_action_rule_config","base.action.rule config","model_base_action_rule",base.group_system,1,0,0,0
|
||||
|
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Attendee form view-->
|
||||
<!-- Attendee form view-->
|
||||
|
||||
<record id="base_calendar_attendee_form_view" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.form</field>
|
||||
|
@ -10,12 +10,12 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Invitation details">
|
||||
<group col="6" colspan="4">
|
||||
<field name="email" string="Invitation To"/>
|
||||
<field name="cutype" string="Invitation type" />
|
||||
<group col="6" colspan="4">
|
||||
<field name="email" string="Invitation To"/>
|
||||
<field name="cutype" string="Invitation type" />
|
||||
<field name="rsvp" />
|
||||
<field name="role" string="Role" />
|
||||
<field name="sent_by_uid" string="Invitation From" />
|
||||
<field name="sent_by_uid" string="Invitation From" />
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Invitation">
|
||||
|
@ -68,7 +68,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Attendee tree view-->
|
||||
<!-- Attendee tree view-->
|
||||
|
||||
<record id="base_calendar_attendee_tree_view" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.tree</field>
|
||||
|
@ -87,7 +87,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Attendee search view-->
|
||||
<!-- Attendee search view-->
|
||||
|
||||
<record id="base_calendar_attendee_search_view" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.search</field>
|
||||
|
@ -103,52 +103,52 @@
|
|||
separator="1" help="Declined Invitations" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="email" select='1'/>
|
||||
<field name="sent_by_uid" select="1" widget="selection"/>
|
||||
<field name="sent_by_uid" select="1"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="cutype" string="Invitation type" select="1"/>
|
||||
<field name="event_date" select="1"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':'cutype'}" />
|
||||
<filter string="Role" icon="terp-gtk-select-all"
|
||||
domain="[]" context="{'group_by':'role'}" />
|
||||
<filter string="Required Reply" icon="terp-mail-replied"
|
||||
domain="[]" context="{'group_by':'rsvp'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="User" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Contact" icon="terp-gtk-jump-to-ltr" domain="[]"
|
||||
context="{'group_by':'partner_address_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" help="Invitation Type"
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':'cutype'}" />
|
||||
<filter string="Role" icon="terp-gtk-select-all"
|
||||
domain="[]" context="{'group_by':'role'}" />
|
||||
<filter string="Required Reply" icon="terp-mail-replied"
|
||||
domain="[]" context="{'group_by':'rsvp'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="User" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Contact" icon="terp-gtk-jump-to-ltr" domain="[]"
|
||||
context="{'group_by':'partner_address_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':' state'}" />
|
||||
</group>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_view_attendee_form" model="ir.actions.act_window">
|
||||
<field name="name">Event Invitations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.attendee</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
|
||||
<field name="context">{'default_sent_by_uid': uid}</field>
|
||||
</record>
|
||||
<record id="action_view_attendee_form" model="ir.actions.act_window">
|
||||
<field name="name">Event Invitations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.attendee</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
|
||||
<field name="context">{'default_sent_by_uid': uid}</field>
|
||||
</record>
|
||||
|
||||
<!-- Calenadar's menu -->
|
||||
<!-- Calenadar's menu -->
|
||||
<menuitem id="base.menu_calendar_configuration" name="Calendar"
|
||||
parent="base.menu_address_book" sequence="15" />
|
||||
parent="base.menu_base_config" sequence="15" />
|
||||
|
||||
<!-- Invitation menu -->
|
||||
<!-- Invitation menu -->
|
||||
|
||||
<menuitem id="menu_attendee_invitations"
|
||||
<menuitem id="menu_attendee_invitations"
|
||||
name="Event Invitations" parent="base.menu_calendar_configuration"
|
||||
sequence="10" action="action_view_attendee_form" />
|
||||
|
||||
<!-- ALARM FORM VIEW-->
|
||||
<!-- ALARM FORM VIEW-->
|
||||
|
||||
<record id="res_alarm_form_view" model="ir.ui.view">
|
||||
<record id="res_alarm_form_view" model="ir.ui.view">
|
||||
<field name="name">res.alarm.form</field>
|
||||
<field name="model">res.alarm</field>
|
||||
<field name="type">form</field>
|
||||
|
@ -165,7 +165,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ALARM TREE VIEW-->
|
||||
<!-- ALARM TREE VIEW-->
|
||||
|
||||
<record id="res_alarm_tree_view" model="ir.ui.view">
|
||||
<field name="name">res.alarm.tree</field>
|
||||
|
@ -189,198 +189,199 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<!-- Menu for Alarms-->
|
||||
<!-- Menu for Alarms-->
|
||||
|
||||
<menuitem id="menu_crm_meeting_avail_alarm"
|
||||
groups="base.group_extended"
|
||||
action="base_calendar.action_res_alarm_view"
|
||||
parent="base.menu_calendar_configuration" />
|
||||
|
||||
<!-- Event Form View-->
|
||||
|
||||
<record model="ir.ui.view" id="event_form_view">
|
||||
<field name="name">Event Form</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Events">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" string="Summary"
|
||||
colspan="4" />
|
||||
<field name="allday" colspan="2" on_change="onchange_allday(allday)" />
|
||||
<newline/>
|
||||
<field name="date" string="Start Date" required="1" select="1"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)" attrs="{'invisible': [('allday', '=', True)]}"/>
|
||||
<field name="date_deadline" string="End Date" required="1"
|
||||
on_change="onchange_dates(date,False,date_deadline)" />
|
||||
<field name="location" />
|
||||
<field name="alarm_id" string="Reminder"
|
||||
widget="selection" />
|
||||
<group colspan="2" col="4" >
|
||||
<field name="rrule_type" string="Recurrency"
|
||||
colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
|
||||
<button string="Edit All"
|
||||
help="Edit all Ourrences of recurrent Meeting"
|
||||
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
|
||||
name="open_event" icon="gtk-edit"
|
||||
type="object" />
|
||||
</group>
|
||||
</group>
|
||||
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
|
||||
<separator string="Select data for Custom Rule" colspan="8"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="freq" />
|
||||
<field name="interval" />
|
||||
<field name="count" />
|
||||
<field name="end_date" />
|
||||
</group>
|
||||
<group col="14" colspan="4" name="Select weekdays"
|
||||
attrs="{'invisible' : [('freq','!=','weekly')]}">
|
||||
<field name="mo" colspan="1" />
|
||||
<field name="tu" colspan="1" />
|
||||
<field name="we" colspan="1" />
|
||||
<field name="th" colspan="1" />
|
||||
<field name="fr" colspan="1" />
|
||||
<field name="sa" colspan="1" />
|
||||
<field name="su" colspan="1" />
|
||||
<newline />
|
||||
</group>
|
||||
<group col="10" colspan="4"
|
||||
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
|
||||
<group col="2" colspan="1">
|
||||
<field name="select1" />
|
||||
</group>
|
||||
<group col="2" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','day')]}">
|
||||
<field name="day"
|
||||
attrs="{'required' : [('select1','=','date')]}" />
|
||||
</group>
|
||||
<group col="3" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','date')]}">
|
||||
<field name="byday" string="The"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
<field name="week_list" nolabel="1"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
</group>
|
||||
<group col="1" colspan="1"
|
||||
attrs="{'invisible' : [('freq','!=','yearly')]}">
|
||||
<field name="month_list" string="of"
|
||||
colspan="1"
|
||||
attrs="{'required' : [('freq','=','yearly')]}" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Event">
|
||||
<group col="6" colspan="4">
|
||||
<separator colspan="6" string="Visibility"/>
|
||||
<field name="user_id" string="Responsible User" />
|
||||
<field name="show_as" string="Show time as"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<field name="recurrent_id" invisible="1" />
|
||||
<field name="recurrent_uid" invisible="1" />
|
||||
</group>
|
||||
<separator string="Description" colspan="4" />
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
<separator colspan="4"/>
|
||||
</page>
|
||||
<page string="Invitation Detail">
|
||||
<button string="Invite People"
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
icon="terp-partner" type="action"
|
||||
context="{'model' : 'calendar.event', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="email" />
|
||||
<field name="role" width="200" select="1" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
<form string="Invitation details">
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="email" />
|
||||
<field name="rsvp" select="1" />
|
||||
<field name="cutype" select="1" />
|
||||
<field name="role" select="1" />
|
||||
<separator colspan="4" string="" />
|
||||
<group col="6" colspan="4">
|
||||
<field name="state" select="2" />
|
||||
<button name="do_tentative"
|
||||
states="needs-action,declined,accepted"
|
||||
string="Uncertain"
|
||||
type="object"
|
||||
icon="terp-crm" />
|
||||
<button name="do_accept"
|
||||
string="Accept"
|
||||
states="needs-action,tentative,declined"
|
||||
type="object"
|
||||
icon="gtk-apply" />
|
||||
<button name="do_decline"
|
||||
string="Decline"
|
||||
states="needs-action,tentative,accepted"
|
||||
type="object"
|
||||
icon="gtk-cancel" />
|
||||
<button
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
string="Delegate"
|
||||
type="action"
|
||||
icon="gtk-sort-descending"
|
||||
states="needs-action,tentative,declined,accepted"
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="event_form_view">
|
||||
<field name="name">Event Form</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Events">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" string="Summary"
|
||||
colspan="4" />
|
||||
<field name="allday" colspan="2" on_change="onchange_allday(allday)" />
|
||||
<newline/>
|
||||
<field name="date" string="Start Date" required="1" select="1"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)" attrs="{'invisible': [('allday', '=', True)]}"/>
|
||||
<field name="date_deadline" string="End Date" required="1"
|
||||
on_change="onchange_dates(date,False,date_deadline)" />
|
||||
<field name="location" />
|
||||
<field name="alarm_id" string="Reminder"
|
||||
widget="selection" />
|
||||
<group colspan="2" col="4" >
|
||||
<field name="rrule_type" string="Recurrency"
|
||||
colspan="1" attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
|
||||
<button string="Edit All"
|
||||
help="Edit all Ourrences of recurrent Meeting"
|
||||
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
|
||||
name="open_event" icon="gtk-edit"
|
||||
type="object" />
|
||||
</group>
|
||||
</group>
|
||||
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
|
||||
<separator string="Select data for Custom Rule" colspan="8"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="freq" />
|
||||
<field name="interval" />
|
||||
<field name="count" />
|
||||
<field name="end_date" />
|
||||
</group>
|
||||
<group col="14" colspan="4" name="Select weekdays"
|
||||
attrs="{'invisible' : [('freq','!=','weekly')]}">
|
||||
<field name="mo" colspan="1" />
|
||||
<field name="tu" colspan="1" />
|
||||
<field name="we" colspan="1" />
|
||||
<field name="th" colspan="1" />
|
||||
<field name="fr" colspan="1" />
|
||||
<field name="sa" colspan="1" />
|
||||
<field name="su" colspan="1" />
|
||||
<newline />
|
||||
</group>
|
||||
<group col="10" colspan="4"
|
||||
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
|
||||
<group col="2" colspan="1">
|
||||
<field name="select1" />
|
||||
</group>
|
||||
<group col="2" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','day')]}">
|
||||
<field name="day"
|
||||
attrs="{'required' : [('select1','=','date')]}" />
|
||||
</group>
|
||||
<group col="3" colspan="1"
|
||||
attrs="{'invisible' : [('select1','=','date')]}">
|
||||
<field name="byday" string="The"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
<field name="week_list" nolabel="1"
|
||||
attrs="{'required' : [('select1','=','day')]}" />
|
||||
</group>
|
||||
<group col="1" colspan="1"
|
||||
attrs="{'invisible' : [('freq','!=','yearly')]}">
|
||||
<field name="month_list" string="of"
|
||||
colspan="1"
|
||||
attrs="{'required' : [('freq','=','yearly')]}" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Event">
|
||||
<group col="6" colspan="4">
|
||||
<separator colspan="6" string="Visibility"/>
|
||||
<field name="user_id" string="Responsible User" />
|
||||
<field name="show_as" string="Show time as"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<field name="recurrent_id" invisible="1" />
|
||||
<field name="recurrent_uid" invisible="1" />
|
||||
</group>
|
||||
<separator string="Description" colspan="4" />
|
||||
<field name="description" nolabel="1" colspan="4" />
|
||||
<separator colspan="4"/>
|
||||
</page>
|
||||
<page string="Invitation Detail">
|
||||
<button string="Invite People"
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
icon="terp-partner" type="action"
|
||||
context="{'model' : 'calendar.event', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="email" />
|
||||
<field name="role" width="200" select="1" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
<form string="Invitation details">
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="email" />
|
||||
<field name="rsvp" select="1" />
|
||||
<field name="cutype" select="1" />
|
||||
<field name="role" select="1" />
|
||||
<separator colspan="4" string="" />
|
||||
<group col="6" colspan="4">
|
||||
<field name="state" select="2" />
|
||||
<button name="do_tentative"
|
||||
states="needs-action,declined,accepted"
|
||||
string="Uncertain"
|
||||
type="object"
|
||||
icon="terp-crm" />
|
||||
<button name="do_accept"
|
||||
string="Accept"
|
||||
states="needs-action,tentative,declined"
|
||||
type="object"
|
||||
icon="gtk-apply" />
|
||||
<button name="do_decline"
|
||||
string="Decline"
|
||||
states="needs-action,tentative,accepted"
|
||||
type="object"
|
||||
icon="gtk-cancel" />
|
||||
<button
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
string="Delegate"
|
||||
type="action"
|
||||
icon="gtk-sort-descending"
|
||||
states="needs-action,tentative,declined,accepted"
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Event Tree View -->
|
||||
<!-- Event Tree View -->
|
||||
|
||||
<record model="ir.ui.view" id="event_tree_view">
|
||||
<field name="name">Event Tree</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Events">
|
||||
<field name="name" string="Subject" />
|
||||
<field name="date" string="Meeting Date" />
|
||||
<field name="location" />
|
||||
<field name="show_as" />
|
||||
<field name="class" string="Privacy" />
|
||||
<field name="user_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="event_tree_view">
|
||||
<field name="name">Event Tree</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Events">
|
||||
<field name="name" string="Subject" />
|
||||
<field name="date" string="Meeting Date" />
|
||||
<field name="location" />
|
||||
<field name="show_as" />
|
||||
<field name="class" string="Privacy" />
|
||||
<field name="user_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Event Calendar View -->
|
||||
<!-- Event Calendar View -->
|
||||
|
||||
<record model="ir.ui.view" id="event_calendar_view">
|
||||
<field name="name">Events Calendar</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Events" date_start="date" color="show_as" date_delay="duration">
|
||||
<field name="name"/>
|
||||
<field name="class"/>
|
||||
<field name="show_as"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="event_calendar_view">
|
||||
<field name="name">Events Calendar</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Events" date_start="date" color="show_as" date_delay="duration">
|
||||
<field name="name"/>
|
||||
<field name="class"/>
|
||||
<field name="show_as"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Event Search View-->
|
||||
<!-- Event Search View-->
|
||||
|
||||
<record id="view_calendar_event_filter" model="ir.ui.view">
|
||||
<field name="name">Calendar Events Search</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<record id="view_calendar_event_filter" model="ir.ui.view">
|
||||
<field name="name">Calendar Events Search</field>
|
||||
<field name="model">calendar.event</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Events">
|
||||
<group col="12" colspan="4">
|
||||
<filter icon="terp-go-today" string="My Events"
|
||||
|
@ -390,42 +391,42 @@
|
|||
<field name="name" select="1" string="Summary"/>
|
||||
<field name="location" select="1" string="Location"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" select="1" widget="selection"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="show_as" select="1"/>
|
||||
<field name="class" select="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Availability" icon="terp-camera_test"
|
||||
domain="[]" context="{'group_by':'show_as'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
</group>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Availability" icon="terp-camera_test"
|
||||
domain="[]" context="{'group_by':'show_as'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Event action -->
|
||||
<!-- Event action -->
|
||||
|
||||
<record id="action_view_event" model="ir.actions.act_window">
|
||||
<field name="name">Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.event</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="search_view_id" ref="view_calendar_event_filter"/>
|
||||
</record>
|
||||
<record id="action_view_event" model="ir.actions.act_window">
|
||||
<field name="name">Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.event</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,calendar</field>
|
||||
<field name="search_view_id" ref="view_calendar_event_filter"/>
|
||||
</record>
|
||||
|
||||
<!-- Event menu -->
|
||||
<!-- Event menu -->
|
||||
|
||||
<menuitem id="menu_events"
|
||||
<menuitem id="menu_events"
|
||||
name="Events" parent="base.menu_calendar_configuration"
|
||||
sequence="5" action="action_view_event" />
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_calendar_attendee","calendar.attendee","model_calendar_attendee",,1,1,1,1
|
||||
"access_calendar_alarm","calendar.alarm","model_calendar_alarm",,1,1,1,1
|
||||
"access_res_alarm","res.alarm","model_res_alarm",,1,1,1,1
|
||||
"access_calendar_event_all","calendar.event","model_calendar_event",,1,1,1,1
|
||||
"access_calendar_todo","calendar.todo","model_calendar_todo",,1,1,1,1
|
||||
"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",,1,1,1,1
|
||||
"access_calendar_event_edit_all","calendar_event_edit_all","model_calendar_event_edit_all",,1,1,1,1
|
||||
"access_base_calendar_set_exrule","base.calendar.set.exrule","model_base_calendar_set_exrule",,1,1,1,1
|
||||
"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_event_all","calendar.event","model_calendar_event",base.group_user,1,1,1,1
|
||||
"access_calendar_todo","calendar.todo","model_calendar_todo",base.group_user,1,1,1,1
|
||||
"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",base.group_user,1,1,1,1
|
||||
"access_calendar_event_edit_all","calendar_event_edit_all","model_calendar_event_edit_all",base.group_user,1,1,1,1
|
||||
"access_base_calendar_set_exrule","base.calendar.set.exrule","model_base_calendar_set_exrule",base.group_user,1,1,1,1
|
||||
|
|
|
|
@ -18,10 +18,10 @@
|
|||
If you don't think you need any of these right now, you can easily install them later on.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='string'></attribute>
|
||||
<attribute name='rowspan'>15</attribute>
|
||||
</xpath>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name='string'></attribute>
|
||||
<attribute name='rowspan'>15</attribute>
|
||||
</xpath>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Install Generic Modules</attribute>
|
||||
</separator>
|
||||
<group colspan="8">
|
||||
|
@ -29,13 +29,14 @@ If you don't think you need any of these right now, you can easily install them
|
|||
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
<field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)" groups="base.group_extended"/>
|
||||
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
<field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)" groups="base.group_extended"/> <field name="misc_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
<separator string="Install Specific Business Modules" colspan="4"/>
|
||||
<field name="profile_association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
<field name="profile_auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,profile_association,profile_auction,profile_bookstore)"/>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
|
@ -60,11 +61,11 @@ If you don't think you need any of these right now, you can easily install them
|
|||
<field name="name">base_setup_installer_action_replace</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base.ir_actions_todo_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@string='Launch']" position="replace">
|
||||
<button name="%(action_base_setup_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@string='Launch']" position="replace">
|
||||
<button name="%(action_base_setup_installer)d" states="open,skip" string="Launch" type="action" icon="gtk-execute" help="Launch Configuration Wizard"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -10,45 +10,45 @@
|
|||
<form position="attributes">
|
||||
<attribute name="string">Main Company Setup</attribute>
|
||||
</form>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Information of your company will be used to custiomise your documents like Invoices, Sale Orders,...</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="title"]' position='attributes'>
|
||||
<attribute name='string'>Configure Your Company</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>25</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Information of your company will be used to custiomise your documents like Invoices, Sale Orders,...</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="title"]' position='attributes'>
|
||||
<attribute name='string'>Configure Your Company</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>25</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<group colspan="5">
|
||||
<group colspan="2">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="name" required="True"/><field name="account_no"/>
|
||||
<field name="currency" widget="selection"/><field name="street"/>
|
||||
<field name="zip"/>
|
||||
<field name="street2"/>
|
||||
<field name="country_id"/>
|
||||
<field name="state_id"/>
|
||||
<field name="city"/>
|
||||
<field name="email"/>
|
||||
<field name="phone"/>
|
||||
<field name="website"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="2" groups="base.group_extended">
|
||||
<separator string="Report Information" colspan="4"/>
|
||||
<field name="rml_header1" colspan="5"/>
|
||||
<field name="rml_footer1" colspan="5"/>
|
||||
<field name="rml_footer2" colspan="5"/>
|
||||
<group colspan="5">
|
||||
<group colspan="2">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="name" required="True"/><field name="account_no"/>
|
||||
<field name="currency" widget="selection"/><field name="street"/>
|
||||
<field name="zip"/>
|
||||
<field name="street2"/>
|
||||
<field name="country_id"/>
|
||||
<field name="state_id"/>
|
||||
<field name="city"/>
|
||||
<field name="email"/>
|
||||
<field name="phone"/>
|
||||
<field name="website"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="2" groups="base.group_extended">
|
||||
<separator string="Report Information" colspan="4"/>
|
||||
<field name="rml_header1" colspan="5"/>
|
||||
<field name="rml_footer1" colspan="5"/>
|
||||
<field name="rml_footer2" colspan="5"/>
|
||||
|
||||
<separator colspan="4"
|
||||
string="Your Logo - Use a size of about 450x150 pixels."/>
|
||||
<field colspan="5" name="logo" widget="image"
|
||||
nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<separator colspan="4"
|
||||
string="Your Logo - Use a size of about 450x150 pixels."/>
|
||||
<field colspan="5" name="logo" widget="image"
|
||||
nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<xpath expr='//button[@name="action_skip"]' position='replace'/>
|
||||
</data>
|
||||
|
|
|
@ -75,6 +75,9 @@ class base_setup_installer(osv.osv_memory):
|
|||
"OpenERP's report creation."),
|
||||
'thunderbird' :fields.boolean('Thunderbird'),
|
||||
# Vertical modules
|
||||
'product_expiry':fields.boolean('Food Industry',
|
||||
help="Installs a preselected set of OpenERP "
|
||||
"applications which will help you manage foods."),
|
||||
'profile_association':fields.boolean('Associations',
|
||||
help="Installs a preselected set of OpenERP "
|
||||
"applications which will help you manage your association "
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
"access_base_setup_installer","base.setup.installer","model_base_setup_installer",,1,0,0,0
|
||||
"access_base_setup_company","base.setup.company","model_base_setup_company",,1,0,0,0
|
||||
"access_base_setup_config","base.setup.config","model_base_setup_config",,1,0,0,0
|
||||
"access_base_setup_installer","base.setup.installer","model_base_setup_installer",base.group_system,1,1,1,1
|
||||
"access_base_setup_company","base.setup.company","model_base_setup_company",base.group_system,1,1,1,1
|
||||
"access_base_setup_config","base.setup.config","model_base_setup_config",base.group_system,1,1,1,1
|
||||
|
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
<menuitem id="base.menu_sales" name="Sales"
|
||||
parent="base.menu_base_partner" sequence="1" />
|
||||
|
||||
|
||||
<menuitem parent="base.menu_sales" name="Leads"
|
||||
groups="base.group_extended"
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
</group>
|
||||
<field name="type" readonly="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Lead">
|
||||
|
@ -298,7 +298,7 @@
|
|||
<separator orientation="vertical"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="email_from"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<field name="user_id">
|
||||
<filter icon="terp-personal-"
|
||||
domain="[('user_id','=', False)]"
|
||||
help="Unassigned Leads" />
|
||||
|
|
|
@ -32,11 +32,12 @@ from tools.translate import _
|
|||
import tools
|
||||
from osv import fields,osv,orm
|
||||
from osv.orm import except_orm
|
||||
import collections
|
||||
|
||||
from tools import command_re
|
||||
|
||||
class crm_cases(osv.osv):
|
||||
""" crm cases """
|
||||
class mailgate_thread(osv.osv):
|
||||
""" mailgate_thread """
|
||||
|
||||
_name = "mailgate.thread"
|
||||
_inherit = "mailgate.thread"
|
||||
|
@ -127,7 +128,7 @@ class crm_cases(osv.osv):
|
|||
#getattr(self, act)(cr, uid, select)
|
||||
return res
|
||||
|
||||
def emails_get(self, cr, uid, ids, context={}):
|
||||
def emails_get(self, cr, uid, ids, context=None):
|
||||
|
||||
"""
|
||||
Get Emails
|
||||
|
@ -137,16 +138,24 @@ class crm_cases(osv.osv):
|
|||
@param ids: List of email’s IDs
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
res = []
|
||||
res = {}
|
||||
|
||||
if isinstance(ids, (str, int, long)):
|
||||
select = [ids]
|
||||
select = [long(ids)]
|
||||
else:
|
||||
select = ids
|
||||
for case in self.browse(cr, uid, select):
|
||||
user_email = (case.user_id and case.user_id.address_id and case.user_id.address_id.email) or False
|
||||
res += [(user_email, case.email_from, case.email_cc or False, getattr(case,'priority') and case.priority or False)]
|
||||
if isinstance(ids, (str, int, long)):
|
||||
return len(res) and res[0] or False
|
||||
|
||||
for thread in self.browse(cr, uid, select, context=context):
|
||||
values = collections.defaultdict(set)
|
||||
|
||||
for message in thread.message_ids:
|
||||
user_email = (message.user_id and message.user_id.address_id and message.user_id.address_id.email) or False
|
||||
values['user_email'].add(user_email)
|
||||
values['email_from'].add(message.email_from)
|
||||
values['email_cc'].add(message.email_cc or False)
|
||||
|
||||
res[str(thread.id)] = dict((key,list(values[key])) for key, value in values.iteritems())
|
||||
|
||||
return res
|
||||
|
||||
def msg_send(self, cr, uid, id, *args, **argv):
|
||||
|
@ -161,4 +170,4 @@ class crm_cases(osv.osv):
|
|||
"""
|
||||
return True
|
||||
|
||||
crm_cases()
|
||||
mailgate_thread()
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<field name="act_window_id" ref="crm_case_categ_meet_create_partner"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_partner">
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_partner">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">gantt</field>
|
||||
<field name="view_id" ref="crm_case_gantt_view_meet"/>
|
||||
|
@ -85,33 +85,33 @@
|
|||
<!-- ALL MEETINGS -->
|
||||
|
||||
<menuitem name="Meetings" id="menu_meeting_sale"
|
||||
parent="base.menu_base_partner" sequence="3" />
|
||||
parent="base.menu_base_partner" sequence="3" />
|
||||
|
||||
<menuitem name="Meetings" id="menu_crm_case_categ_meet"
|
||||
action="crm_case_categ_meet" parent="menu_meeting_sale"
|
||||
sequence="1" />
|
||||
action="crm_case_categ_meet" parent="menu_meeting_sale"
|
||||
sequence="1" />
|
||||
|
||||
<record id="ir_ui_view_sc_calendar0" model="ir.ui.view_sc">
|
||||
<record id="ir_ui_view_sc_calendar0" model="ir.ui.view_sc">
|
||||
<field name="name">Calendar</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="res_id" ref="crm.menu_crm_case_categ_meet"/>
|
||||
</record>
|
||||
</record>
|
||||
<record id="action_view_attendee_form" model="ir.actions.act_window">
|
||||
<field name="name">Meeting Invitations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.attendee</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
|
||||
<field name="name">Meeting Invitations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">calendar.attendee</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
|
||||
<field name="domain">[('ref','like','crm.meeting,')]</field>
|
||||
<field name="context">{'default_sent_by_uid': uid}</field>
|
||||
</record>
|
||||
<field name="context">{'default_sent_by_uid': uid}</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_attendee_invitations"
|
||||
name="Meeting Invitations" parent="crm.menu_meeting_sale"
|
||||
sequence="10" action="action_view_attendee_form"
|
||||
groups="base.group_extended" />
|
||||
name="Meeting Invitations" parent="crm.menu_meeting_sale"
|
||||
sequence="10" action="action_view_attendee_form"
|
||||
groups="base.group_extended" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- CRM Meetings Categories Form View -->
|
||||
<!-- CRM Meetings Categories Form View -->
|
||||
|
||||
<record id="crm_meeting_categ_action" model="ir.actions.act_window">
|
||||
<field name="name">Meeting Categories</field>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<menuitem action="crm_meeting_categ_action" name="Categories"
|
||||
id="menu_crm_case_meeting-act" parent="menu_crm_config_meeting" />
|
||||
|
||||
<!-- CRM Meetings Form View -->
|
||||
<!-- CRM Meetings Form View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_form_view_meet">
|
||||
<field name="name">CRM - Meetings Form</field>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<form string="Meetings">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1" string="Summary"
|
||||
required="1" colspan="2" />
|
||||
required="1" colspan="2" />
|
||||
<field name="categ_id" widget="selection"
|
||||
string="Meeting Type"
|
||||
groups="base.group_extended"
|
||||
|
@ -51,9 +51,9 @@
|
|||
name="open_meeting" icon="gtk-edit"
|
||||
type="object" />
|
||||
<button string="ExRule"
|
||||
name="%(base_calendar.action_base_calendar_set_exrule)d" icon="gtk-zoom-out" type="action"
|
||||
context="{'model' : 'crm.meeting'}"
|
||||
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"/>
|
||||
name="%(base_calendar.action_base_calendar_set_exrule)d" icon="gtk-zoom-out" type="action"
|
||||
context="{'model' : 'crm.meeting'}"
|
||||
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="4" colspan="4" name="rrule" attrs="{'invisible': [('rrule_type','!=','custom')]}">
|
||||
|
@ -133,7 +133,7 @@
|
|||
<button name="case_close" string="Done"
|
||||
states="open" type="object"
|
||||
icon="gtk-jump-to" />
|
||||
<button name="case_reset" string="Reset to Unconfirmed"
|
||||
<button name="case_reset" string="Reset to Unconfirmed"
|
||||
states="open,done,cancel" type="object"
|
||||
icon="gtk-convert" />
|
||||
<button name="case_open" string="Confirm"
|
||||
|
@ -204,7 +204,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Meeting Tree View -->
|
||||
<!-- CRM Meeting Tree View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_tree_view_meet">
|
||||
<field name="name">CRM - Meetings Tree</field>
|
||||
|
@ -222,7 +222,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Meeting Calendar -->
|
||||
<!-- CRM Meeting Calendar -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_calendar_view_meet">
|
||||
<field name="name">CRM - Meetings Calendar</field>
|
||||
|
@ -238,7 +238,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Meeting Gantt -->
|
||||
<!-- CRM Meeting Gantt -->
|
||||
|
||||
<record id="crm_case_gantt_view_meet" model="ir.ui.view">
|
||||
<field name="name">CRM - Meetings Gantt</field>
|
||||
|
@ -254,7 +254,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Meeting Search View -->
|
||||
<!-- CRM Meeting Search View -->
|
||||
|
||||
<record id="view_crm_case_meetings_filter" model="ir.ui.view">
|
||||
<field name="name">CRM - Meetings Search</field>
|
||||
|
@ -274,29 +274,29 @@
|
|||
domain="[('section_id','=',context.get('section_id',False))]"
|
||||
help="My Sale Team" />
|
||||
</field>
|
||||
<field name="user_id" select="1" widget="selection"/>
|
||||
<field name="user_id" select="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
</group>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Date" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Calendar Attendee Form View -->
|
||||
<!-- Calendar Attendee Form View -->
|
||||
|
||||
<record id="attendee_form_view_inherit" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.form.inherit</field>
|
||||
|
@ -310,7 +310,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Calendar Attendee Tree View -->
|
||||
<!-- Calendar Attendee Tree View -->
|
||||
|
||||
<record id="attendee_tree_view_inherit" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.tree.inherit</field>
|
||||
|
|
|
@ -52,8 +52,9 @@ class crm_opportunity(osv.osv):
|
|||
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
|
||||
'phone': fields.char("Phone", size=64),
|
||||
'date_deadline': fields.date('Expected Closing'),
|
||||
'date_action': fields.date('Next Action'),
|
||||
}
|
||||
'date_action': fields.date('Next Action Date'),
|
||||
'title_action': fields.char('Next Action', size=64),
|
||||
}
|
||||
def case_close(self, cr, uid, ids, *args):
|
||||
"""Overrides close for crm_case for setting probability and close date
|
||||
@param self: The object pointer
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<act_window
|
||||
<act_window
|
||||
id="act_crm_opportunity_crm_phonecall_new"
|
||||
name="Phone calls"
|
||||
res_model="crm.phonecall"
|
||||
|
@ -12,7 +12,7 @@
|
|||
domain="[('user_id','=',uid),('opportunity_id', '=', active_id)]"
|
||||
view_type="form"/>
|
||||
|
||||
<act_window
|
||||
<act_window
|
||||
id="act_crm_opportunity_crm_meeting_new"
|
||||
name="Meetings"
|
||||
res_model="crm.meeting"
|
||||
|
@ -25,11 +25,10 @@
|
|||
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
|
||||
<field name="name">Opportunities</field>
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="domain">['|',('type','=','opportunity'),('state','=','draft')]</field>
|
||||
<field name="context">{'search_default_user_id':uid,'search_default_current':1}</field>
|
||||
<field name="view_mode">tree,form,graph,calendar</field>
|
||||
<field name="domain">[('type','=','opportunity')]</field>
|
||||
<field name="context">{'search_default_user_id':uid,'search_default_current':1, 'default_type': 'opportunity'}</field>
|
||||
<field name="view_id" ref="crm_case_tree_view_oppor"/>
|
||||
<field name="context">{'search_default_current':1, 'default_type': 'opportunity'}</field>
|
||||
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
|
||||
</record>
|
||||
|
||||
|
@ -55,11 +54,11 @@
|
|||
</record>
|
||||
|
||||
<menuitem id="base.menu_sales" name="Sales"
|
||||
parent="base.menu_base_partner" sequence="1" />
|
||||
parent="base.menu_base_partner" sequence="1" />
|
||||
|
||||
<menuitem name="Opportunities" id="menu_crm_case_opp"
|
||||
parent="base.menu_sales" action="crm_case_category_act_oppor11"
|
||||
sequence="2" />
|
||||
parent="base.menu_sales" action="crm_case_category_act_oppor11"
|
||||
sequence="2" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
id="menu_crm_opportunity_stage_act" name="Stages"
|
||||
parent="menu_crm_config_opportunity" />
|
||||
|
||||
<!-- Opportunity Resource Type Form View -->
|
||||
<!-- Opportunity Resource Type Form View -->
|
||||
|
||||
<record id="crm_opportunity_resource_act" model="ir.actions.act_window">
|
||||
<field name="name">Opportunity Resource Type</field>
|
||||
|
@ -81,8 +81,10 @@
|
|||
name="%(opportunity2phonecall_act)d" icon="gtk-redo" type="action" />
|
||||
<newline/>
|
||||
<field name="date_action"/>
|
||||
<field name="title_action"/>
|
||||
<field name="priority" string="Priority"/>
|
||||
<field name="type" readonly="1"/>
|
||||
<newline/>
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Opportunity">
|
||||
|
@ -133,6 +135,27 @@
|
|||
icon="gtk-convert" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Lead">
|
||||
<group colspan="2" col="4">
|
||||
<separator string="Contact" colspan="4" col="4"/>
|
||||
<field name="partner_name" string="Partner Name" colspan="4"/>
|
||||
<newline/>
|
||||
<field domain="[('domain', '=', 'contact')]" name="title"/>
|
||||
<field name="function" />
|
||||
<field name="street" colspan="4"/>
|
||||
<field name="street2" colspan="4"/>
|
||||
<field name="zip"/>
|
||||
<field name="city"/>
|
||||
<field name="country_id"/>
|
||||
<field name="state_id"/>
|
||||
</group>
|
||||
<group colspan="2" col="3">
|
||||
<separator string="Communication" colspan="4" col="3"/>
|
||||
<field name="fax"/>
|
||||
<newline/>
|
||||
<field name="mobile"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
<page string="Emails" groups="base.group_extended">
|
||||
<group colspan="4">
|
||||
|
@ -160,10 +183,10 @@
|
|||
icon="gtk-undo" type="action" />
|
||||
</form>
|
||||
<tree string="Communication history">
|
||||
<field name="date"/>
|
||||
<field name="email_from" />
|
||||
<field name="email_to"/>
|
||||
<field name="description"/>
|
||||
<field name="date"/>
|
||||
<field name="email_from" />
|
||||
<field name="email_to"/>
|
||||
<field name="description"/>
|
||||
</tree>
|
||||
</field>
|
||||
<button colspan="2" string="Send New Email"
|
||||
|
@ -223,8 +246,8 @@
|
|||
<field name="create_date"/>
|
||||
<field name="name" string="Opportunity"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="date_action"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="categ_id" invisible="1" groups="base.group_extended"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next"
|
||||
|
@ -232,10 +255,9 @@
|
|||
icon="gtk-go-forward" />
|
||||
<field name="planned_revenue" sum="Total of Planned Revenue"/>
|
||||
<field name="probability" widget="progressbar" avg="Avg. of Probability"/>
|
||||
<field name="date_action"/>
|
||||
<field name="section_id" groups="base.group_extended"/>
|
||||
<field name="section_id"
|
||||
invisible="context.get('invisible_section', True)" />
|
||||
<field name="user_id"/>
|
||||
<field name="priority"/>
|
||||
<field name="state"/>
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
|
@ -297,17 +319,23 @@
|
|||
/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Opportunity"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<field name="user_id">
|
||||
<filter icon="terp-personal-"
|
||||
domain="[('user_id','=', False)]"
|
||||
help="Unassigned Opportunities" />
|
||||
</field>
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)" select="1"
|
||||
default="context.get('section_id', False)"
|
||||
context="{'invisible_section': False}"
|
||||
widget="selection">
|
||||
<filter icon="terp-personal+"
|
||||
domain="[('section_id','=',context.get('section_id',False))]"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
context="{'invisible_section': False}"
|
||||
help="My Sale Team" />
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[]"
|
||||
help="Show Sales Team"/>
|
||||
</field>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="16">
|
||||
|
|
|
@ -261,7 +261,7 @@
|
|||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Call Summary"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<field name="user_id">
|
||||
<filter icon="terp-personal-"
|
||||
domain="[('user_id','=',False)]"
|
||||
help="Unassigned Phonecalls" />
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<menuitem id="base.menu_crm_config_sales" name="Sales"
|
||||
parent="base.menu_base_config" sequence="1" groups="base.group_extended"/>
|
||||
parent="base.menu_base_config" sequence="1"/>
|
||||
|
||||
<menuitem id="menu_crm_config_lead" name="Lead"
|
||||
parent="base.menu_crm_config_sales" sequence="0" groups="base.group_extended"/>
|
||||
|
||||
<menuitem id="menu_crm_config_opportunity" name="Opportunity"
|
||||
parent="base.menu_crm_config_sales" sequence="1" groups="base.group_extended"/>
|
||||
parent="base.menu_crm_config_sales" sequence="1"/>
|
||||
|
||||
<menuitem id="menu_crm_config_meeting" name="Meeting"
|
||||
parent="base.menu_base_config" sequence="4" groups="base.group_extended"/>
|
||||
parent="base.menu_base_config" sequence="4"/>
|
||||
|
||||
<menuitem id="menu_crm_config_phonecall" name="Phone Call"
|
||||
parent="base.menu_base_config" sequence="5" groups="base.group_extended"/>
|
||||
|
||||
<menuitem id="base.next_id_64" name="Reporting"
|
||||
parent="base.menu_base_partner" sequence="8" />
|
||||
parent="base.menu_base_partner" sequence="8" />
|
||||
|
||||
<!-- Case Sections Form View -->
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Case Sections Tree View -->
|
||||
<!-- Case Sections Tree View -->
|
||||
|
||||
<record id="crm_case_section_view_tree" model="ir.ui.view">
|
||||
<field name="name">crm.case.section.tree</field>
|
||||
|
@ -73,7 +73,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Case Sections Action -->
|
||||
<!-- Case Sections Action -->
|
||||
|
||||
<record id="crm_case_section_act" model="ir.actions.act_window">
|
||||
<field name="name">Sales Team</field>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<field name="view_id" ref="crm_case_section_view_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- CRM Stage Tree View -->
|
||||
<!-- CRM Stage Tree View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_stage_tree">
|
||||
<field name="name">crm.case.stage.tree</field>
|
||||
|
@ -99,7 +99,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Stage Form View -->
|
||||
<!-- CRM Stage Form View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_stage_form">
|
||||
<field name="name">crm.case.stage.form</field>
|
||||
|
@ -120,7 +120,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Stage Action -->
|
||||
<!-- CRM Stage Action -->
|
||||
|
||||
<record id="crm_case_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Stages</field>
|
||||
|
@ -144,7 +144,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Case Categories Tree View -->
|
||||
<!-- Case Categories Tree View -->
|
||||
|
||||
<record id="crm_case_categ_tree-view" model="ir.ui.view">
|
||||
<field name="name">crm.case.categ.tree</field>
|
||||
|
@ -158,7 +158,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Case Categories Action -->
|
||||
<!-- Case Categories Action -->
|
||||
|
||||
<record id="crm_case_categ-act" model="ir.actions.act_window">
|
||||
<field name="name">Categories</field>
|
||||
|
@ -173,7 +173,7 @@
|
|||
|
||||
|
||||
|
||||
<!-- Resource Type of case Tree View -->
|
||||
<!-- Resource Type of case Tree View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_resource_type_tree">
|
||||
<field name="name">crm.case.resource.type.tree</field>
|
||||
|
@ -188,7 +188,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Resource Type of case Form View -->
|
||||
<!-- Resource Type of case Form View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_resource_type_form">
|
||||
<field name="name">crm.case.resource.type.form</field>
|
||||
|
@ -203,7 +203,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Resource Type of case Action -->
|
||||
<!-- Resource Type of case Action -->
|
||||
|
||||
<record id="crm_case_resource_type_act" model="ir.actions.act_window">
|
||||
<field name="name">Resource Type</field>
|
||||
|
@ -220,7 +220,7 @@
|
|||
<field name="view_id" ref="crm_case_section_view_tree"/>
|
||||
</record>
|
||||
|
||||
<!-- Cases Tree View -->
|
||||
<!-- Cases Tree View -->
|
||||
|
||||
<record id="crm_case_log_tree-view" model="ir.ui.view">
|
||||
<field name="name">crm.case.log.tree</field>
|
||||
|
@ -240,7 +240,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Segmentation line Tree View -->
|
||||
<!-- Segmentation line Tree View -->
|
||||
|
||||
<record id="crm_segmentation_line_tree-view" model="ir.ui.view">
|
||||
<field name="name">crm.segmentation.line.tree</field>
|
||||
|
@ -257,7 +257,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Segmentation line Form View -->
|
||||
<!-- Segmentation line Form View -->
|
||||
|
||||
<record id="crm_segmentation_line-view" model="ir.ui.view">
|
||||
<field name="name">crm.segmentation.line.form</field>
|
||||
|
@ -277,7 +277,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Segmentation Form View -->
|
||||
<!-- CRM Segmentation Form View -->
|
||||
|
||||
<record id="crm_segmentation-view" model="ir.ui.view">
|
||||
<field name="name">crm.segmentation.form</field>
|
||||
|
@ -322,7 +322,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Segmentation Tree View -->
|
||||
<!-- CRM Segmentation Tree View -->
|
||||
|
||||
<record id="crm_segmentation_tree-view" model="ir.ui.view">
|
||||
<field name="name">crm.segmentation.tree</field>
|
||||
|
@ -383,7 +383,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Inherit View From Partner -->
|
||||
<!-- Inherit View From Partner -->
|
||||
|
||||
<record id="view_partners_form_crm1" model="ir.ui.view">
|
||||
<field name="name">view.res.partner.form.crm.inherited1</field>
|
||||
|
|
|
@ -232,11 +232,9 @@
|
|||
</record>
|
||||
|
||||
<menuitem name="Leads Analysis" id="menu_report_crm_leads_tree"
|
||||
groups="base.group_extended"
|
||||
parent="base.next_id_64" action="action_report_crm_lead" />
|
||||
|
||||
<menuitem name="Opportunities Analysis" id="menu_report_crm_opportunities_tree"
|
||||
groups="base.group_extended"
|
||||
<menuitem name="Opportunities Analysis" id="menu_report_crm_opportunities_tree"
|
||||
parent="base.next_id_64" action="action_report_crm_opportunity" />
|
||||
|
||||
</data>
|
||||
|
|
|
@ -187,9 +187,8 @@
|
|||
<field name="act_window_id" ref="action_report_crm_phonecall"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Phone Calls"
|
||||
<menuitem name="Phone Calls Analysis"
|
||||
action="action_report_crm_phonecall"
|
||||
groups="base.group_extended"
|
||||
id="menu_report_crm_phonecalls_tree" parent="base.next_id_64" />
|
||||
|
||||
</data>
|
||||
|
|
|
@ -4,62 +4,62 @@
|
|||
|
||||
<!-- Partners inherited form -->
|
||||
|
||||
<record id="view_crm_partner_info_form" model="ir.ui.view">
|
||||
<field name="name">res.partner.crm.info.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//notebook[last()]" position="after">
|
||||
<notebook colspan="4">
|
||||
<page string="CRM">
|
||||
<field name="meeting_ids" colspan="4" nolabel="1" />
|
||||
<field name="phonecall_ids" colspan="4" nolabel="1" />
|
||||
<field name="opportunity_ids" colspan="4" nolabel="1" domain="[('type', '=', 'opportunity')]">
|
||||
<tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
|
||||
<field name="create_date"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="name"/>
|
||||
<field name="email_from"/>
|
||||
<field name="phone"/>
|
||||
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="type_id" invisible="1"/>
|
||||
<field name="referred" invisible="1"/>
|
||||
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="section_id"
|
||||
invisible="context.get('invisible_section', True)" />
|
||||
<field name="user_id" />
|
||||
<field name="state" />
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_close" string="Close"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-close" />
|
||||
<button string="Convert to Opportunity"
|
||||
name="convert_opportunity"
|
||||
states="draft,open,pending" icon="gtk-index"
|
||||
type="object" />
|
||||
<button name="case_escalate" string="Escalate"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-go-up" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<!-- <record id="view_crm_partner_info_form" model="ir.ui.view">-->
|
||||
<!-- <field name="name">res.partner.crm.info.inherit</field>-->
|
||||
<!-- <field name="model">res.partner</field>-->
|
||||
<!-- <field name="type">form</field>-->
|
||||
<!-- <field name="inherit_id" ref="base.view_partner_form"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//notebook[last()]" position="after">-->
|
||||
<!-- <notebook colspan="4">-->
|
||||
<!-- <page string="CRM">-->
|
||||
<!-- <field name="meeting_ids" colspan="4" nolabel="1" />-->
|
||||
<!-- <field name="phonecall_ids" colspan="4" nolabel="1" />-->
|
||||
<!-- <field name="opportunity_ids" colspan="4" nolabel="1" domain="[('type', '=', 'opportunity')]">-->
|
||||
<!-- <tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done')">-->
|
||||
<!-- <field name="create_date"/>-->
|
||||
<!-- <field name="partner_name"/>-->
|
||||
<!-- <field name="name"/>-->
|
||||
<!-- <field name="email_from"/>-->
|
||||
<!-- <field name="phone"/>-->
|
||||
<!-- -->
|
||||
<!-- <field name="categ_id" invisible="1"/>-->
|
||||
<!-- <field name="type_id" invisible="1"/>-->
|
||||
<!-- <field name="referred" invisible="1"/>-->
|
||||
<!-- -->
|
||||
<!-- <field name="stage_id"/>-->
|
||||
<!-- <button name="stage_previous" string="Previous"-->
|
||||
<!-- states="open,pending" type="object" icon="gtk-go-back" />-->
|
||||
<!-- <button name="stage_next" string="Next"-->
|
||||
<!-- states="open,pending" type="object"-->
|
||||
<!-- icon="gtk-go-forward" />-->
|
||||
<!-- <field name="section_id"-->
|
||||
<!-- invisible="context.get('invisible_section', True)" />-->
|
||||
<!-- <field name="user_id" />-->
|
||||
<!-- <field name="state" />-->
|
||||
<!-- <button name="case_open" string="Open"-->
|
||||
<!-- states="draft,pending" type="object"-->
|
||||
<!-- icon="gtk-go-forward" />-->
|
||||
<!-- <button name="case_close" string="Close"-->
|
||||
<!-- states="open,draft,pending" type="object"-->
|
||||
<!-- icon="gtk-close" />-->
|
||||
<!-- <button string="Convert to Opportunity"-->
|
||||
<!-- name="convert_opportunity"-->
|
||||
<!-- states="draft,open,pending" icon="gtk-index"-->
|
||||
<!-- type="object" />-->
|
||||
<!-- <button name="case_escalate" string="Escalate"-->
|
||||
<!-- states="open,draft,pending" type="object"-->
|
||||
<!-- icon="gtk-go-up" />-->
|
||||
<!-- <button name="case_cancel" string="Cancel"-->
|
||||
<!-- states="draft,open,pending" type="object"-->
|
||||
<!-- icon="gtk-cancel" />-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </page>-->
|
||||
<!-- </notebook>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_crm_segmentation_user","crm.segmentation user","model_crm_segmentation","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_segmentation_line_user","crm.segmentation.line user","model_crm_segmentation_line","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_segmentation","crm.segmentation","model_crm_segmentation","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_segmentation_line","crm.segmentation.line","model_crm_segmentation_line","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_section","crm.case.section","model_crm_case_section","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_categ","crm.case.categ","model_crm_case_categ","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_meeting","crm.meeting","model_crm_meeting","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_phonecall","crm.phonecall","model_crm_phonecall","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_meeting","crm.meeting","model_crm_meeting","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_phonecall","crm.phonecall","model_crm_phonecall","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_case_section_user","crm.case.section.user","model_crm_case_section","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_section_manager","crm.case.section.manager","model_crm_case_section","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_categ_user","crm.case.categ.user","model_crm_case_categ","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_categ_manager","crm.case.categ.manager","model_crm_case_categ","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_stage","crm.case.stage","model_crm_case_stage","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_stage_manager","crm.case.stage","model_crm_case_stage","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_resource_type_user","crm_case_resource_type user","model_crm_case_resource_type","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_resource_type_manager","crm_case_resource_type manager","model_crm_case_resource_type","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_lead_report_user","crm.lead.report","model_crm_lead_report","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_phonecall_report_user","crm.phonecall.report","model_crm_phonecall_report","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_lead_report_manager","crm.lead.report","model_crm_lead_report","crm.group_crm_manager",1,0,0,0
|
||||
"access_crm_phonecall_report_manager","crm.phonecall.report","model_crm_phonecall_report","crm.group_crm_manager",1,0,0,0
|
||||
"access_crm_lead2partner","crm.lead2partner","model_crm_lead2partner","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_lead2opportunity","crm.lead2opportunity","model_crm_lead2opportunity","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_opportunity2phonecall","crm.opportunity2phonecall","model_crm_opportunity2phonecall","crm.group_crm_user",1,1,1,1
|
||||
|
@ -24,6 +28,11 @@
|
|||
"access_crm_send_mail_attachment","crm.send.mail.attachment","model_crm_send_mail_attachment","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_partner2opportunity","crm.partner2opportunity","model_crm_partner2opportunity","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_lead2opportunity_partner","crm.lead2opportunity.partner","model_crm_lead2opportunity_partner","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_installer","crm.installer.rule","model_crm_installer","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_lead_forward_to_partner","crm.lead.forward.to.partner","model_crm_lead_forward_to_partner","crm.group_crm_user",2,2,2,2
|
||||
"access_crm_installer","crm.installer.rule","model_crm_installer","base.group_system",1,1,1,1
|
||||
"access_crm_lead_forward_to_partner","crm.lead.forward.to.partner","model_crm_lead_forward_to_partner","crm.group_crm_user",1,1,1,1
|
||||
"access_mailgate_thread","mailgate.thread","model_mailgate_thread","crm.group_crm_user",1,1,1,1
|
||||
"access_res_partner","res.partner.crm.user","base.model_res_partner","crm.group_crm_user",1,0,0,0
|
||||
"access_res_partner_address","res.partner.address.crm.user","base.model_res_partner_address","crm.group_crm_user",1,0,0,0
|
||||
"access_res_partner_category","res.partner.category.crm.user","base.model_res_partner_category","crm.group_crm_user",1,0,0,0
|
||||
"mail_gateway_mailgate_message","mail_gateway.mailgate.message","mail_gateway.model_mailgate_message","crm.group_crm_user",1,1,1,1
|
||||
"mail_gateway_mailgate_thread","mail_gateway.mailgate.thread","model_mailgate_thread","crm.group_crm_user",1,1,1,1
|
||||
|
|
|
|
@ -295,5 +295,22 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
domain="[('partner_id', '=', active_id)]"
|
||||
context="{'default_partner_id': active_id}"
|
||||
id="act_claim_partner"
|
||||
name="Report a Claim"
|
||||
res_model="crm.claim"
|
||||
src_model="res.partner"/>
|
||||
|
||||
|
||||
<act_window
|
||||
domain="[('partner_address_id', '=', active_id)]"
|
||||
context="{'default_partner_address_id': active_id}"
|
||||
id="act_claim_partner_address"
|
||||
name="Report a Claim"
|
||||
res_model="crm.claim"
|
||||
src_model="res.partner.address"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# 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/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
import pooler
|
||||
|
@ -50,11 +50,11 @@ class open_questionnaire(wizard.interface):
|
|||
states = {
|
||||
'init': {
|
||||
'actions': [],
|
||||
'result': {'type': 'form', 'arch': _questionnaire_choice_arch, 'fields': _questionnaire_choice_fields, 'state':[('end', 'Cancel'), ('open', 'Open Questionnaire')]}
|
||||
'result': {'type': 'form', 'arch': _questionnaire_choice_arch, 'fields': _questionnaire_choice_fields, 'state':[('end', 'Cancel','gtk-cancel'), ('open', 'Open Questionnaire','terp-camera_test')]}
|
||||
},
|
||||
'open': {
|
||||
'actions': [build_form],
|
||||
'result': {'type': 'form', 'arch':_QUEST_FORM, 'fields': _QUEST_FIELDS, 'state':[('end', 'Cancel'), ('compute', 'Save Data')]}
|
||||
'result': {'type': 'form', 'arch':_QUEST_FORM, 'fields': _QUEST_FIELDS, 'state':[('end', 'Cancel','gtk-cancel'), ('compute', 'Save Data','terp-stock_format-scientific')]}
|
||||
},
|
||||
'compute': {
|
||||
'actions': [],
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<field colspan="4" name="line_ids" nolabel="1" select="1"/>
|
||||
</page>
|
||||
<page string="Destination">
|
||||
<separator colspan="4" string="Countries"/>
|
||||
<separator colspan="4" string="Countries"/>
|
||||
<field colspan="4" name="country_ids" nolabel="1"/>
|
||||
<separator colspan="4" string="States"/>
|
||||
<field colspan="4" name="state_ids" nolabel="1"/>
|
||||
|
@ -243,18 +243,6 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_withweight_tree" model="ir.ui.view">
|
||||
<field name="name">stock.move.tree.weight</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock.view_move_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom" position="after">
|
||||
<field name="weight"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_withweight_form" model="ir.ui.view">
|
||||
<field name="name">stock.move.form.weight</field>
|
||||
<field name="type">form</field>
|
||||
|
@ -267,18 +255,6 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_reception_picking_withweight_tree" model="ir.ui.view">
|
||||
<field name="name">stock.move.reception.packing.tree.weight</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit_id" ref="stock.view_move_tree_reception_picking"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom" position="after">
|
||||
<field name="weight"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_reception_picking_withweight_form" model="ir.ui.view">
|
||||
<field name="name">stock.move.reception.packing.form.weight</field>
|
||||
<field name="type">form</field>
|
||||
|
@ -297,8 +273,8 @@
|
|||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page[@string='Sale Order']/group[1]/button[@name='button_dummy']" position="after">
|
||||
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-execute" context="{'order_id':id}"/>
|
||||
</xpath>
|
||||
<button name="%(action_delivery_cost)d" states="draft" string="Delivery Costs" type="action" icon="gtk-add" context="{'order_id':id}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-04-23 09:08+0000\n"
|
||||
"Last-Translator: grisha <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-06-11 16:12+0000\n"
|
||||
"Last-Translator: Sios <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-24 03:52+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-12 03:44+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: delivery
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<!--<menuitem name="Document Management" icon="terp-stock" id="menu_document"/>
|
||||
<menuitem name="Document Configuration" id="menu_document_configuration" parent="menu_document"/>-->
|
||||
|
||||
<menuitem name="Knowledge Management" icon="terp-stock" id="base.menu_document" sequence="4"/>
|
||||
<menuitem name="Knowledge" icon="terp-stock" id="base.menu_document" sequence="4" groups="base.group_user"/>
|
||||
<menuitem name="Configuration" id="base.menu_document_configuration" parent="base.menu_document" sequence="50"/>
|
||||
<menuitem name="Document Management" id="menu_document_management_configuration" parent="base.menu_document_configuration" sequence="1"/>
|
||||
|
||||
|
@ -13,15 +13,15 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Storage Media">
|
||||
<group colspan="4" col="4">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="user_id"/>
|
||||
<field name="type"/>
|
||||
<field name="online"/>
|
||||
<field name="readonly"/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="user_id"/>
|
||||
<field name="type"/>
|
||||
<field name="online"/>
|
||||
<field name="readonly"/>
|
||||
</group>
|
||||
<group colspan="2" attrs="{'invisible':[('type','!=','realstore')]}">
|
||||
<field name="path"/>
|
||||
<field name="path"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -71,13 +71,13 @@
|
|||
<newline/>
|
||||
<field name="domain" attrs="{'required': [('type','=','ressource')], 'readonly': [('type','=','static')]}"/>
|
||||
<field name="ressource_tree"/>
|
||||
<field name="resource_field" domain="[('model_id','=',ressource_type_id), ('ttype', 'in', ('char', 'selection', 'date', 'datetime'))]"/>
|
||||
<field name="resource_field" domain="[('model_id','=',ressource_type_id), ('ttype', 'in', ('char', 'selection', 'date', 'datetime'))]"/>
|
||||
<field name="ressource_id" select="2" readonly="1"/>
|
||||
<field name="ressource_parent_type_id"/>
|
||||
</page>
|
||||
<page string="Generated Files">
|
||||
<label colspan="4" string="For each entry here, virtual files will appear in this folder." />
|
||||
<field name="content_ids" nolabel="1" colspan="4" attrs="{'readonly': [('ressource_type_id','=',False)]}">
|
||||
<field name="content_ids" nolabel="1" colspan="4" attrs="{'readonly': [('ressource_type_id','=',False)]}">
|
||||
<form string="Contents">
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
|
@ -238,19 +238,19 @@
|
|||
help="less 1 month modified/created attachments"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id">
|
||||
<filter icon="terp-personal"
|
||||
domain="[('user_id','=', False)]"
|
||||
help="Filter on my Attachment" />
|
||||
</field>
|
||||
<field name="partner_id" widget="selection"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
</field>
|
||||
<field name="partner_id"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Partner" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<filter string="Directory" icon="terp-folder-green" domain="[]" context="{'group_by':'parent_id'}"/>
|
||||
</group>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
'email_template_view.xml',
|
||||
'email_template_mailbox_view.xml',
|
||||
'wizard/email_template_send_wizard_view.xml',
|
||||
'security/ir.model.access.csv'
|
||||
],
|
||||
"installable": True,
|
||||
"active": False,
|
||||
|
|
|
@ -17,10 +17,10 @@ try:
|
|||
TEMPLATE_ENGINES.append(('mako', 'Mako Templates'))
|
||||
except:
|
||||
LOGGER.notifyChannel(
|
||||
_("Email Template"),
|
||||
netsvc.LOG_ERROR,
|
||||
_("Mako templates not installed")
|
||||
)
|
||||
_("Email Template"),
|
||||
netsvc.LOG_WARNING,
|
||||
_("Mako templates not installed")
|
||||
)
|
||||
try:
|
||||
from django.template import Context, Template as DjangoTemplate
|
||||
#Workaround for bug:
|
||||
|
@ -31,10 +31,10 @@ try:
|
|||
TEMPLATE_ENGINES.append(('django', 'Django Template'))
|
||||
except:
|
||||
LOGGER.notifyChannel(
|
||||
_("Email Template"),
|
||||
netsvc.LOG_ERROR,
|
||||
_("Django templates not installed")
|
||||
)
|
||||
_("Email Template"),
|
||||
netsvc.LOG_WARNING,
|
||||
_("Django templates not installed")
|
||||
)
|
||||
|
||||
import email_template_engines
|
||||
import tools
|
||||
|
@ -468,7 +468,7 @@ class email_template(osv.osv):
|
|||
context)
|
||||
return True
|
||||
|
||||
def generate_mailbox_item_from_template(self,
|
||||
def _generate_mailbox_item_from_template(self,
|
||||
cursor,
|
||||
user,
|
||||
template,
|
||||
|
@ -559,6 +559,8 @@ class email_template(osv.osv):
|
|||
'folder':'drafts',
|
||||
'mail_type':'multipart/alternative'
|
||||
}
|
||||
if not mailbox_values['account_id']:
|
||||
raise Exception("Unable to send the mail. No account linked to the template.")
|
||||
#Use signatures if allowed
|
||||
if template.use_sign:
|
||||
sign = self.pool.get('res.users').read(cursor,
|
||||
|
@ -570,13 +572,17 @@ class email_template(osv.osv):
|
|||
mailbox_values['body_text'] += sign
|
||||
if mailbox_values['body_html']:
|
||||
mailbox_values['body_html'] += sign
|
||||
print 'Creating', mailbox_values
|
||||
mailbox_id = self.pool.get('email_template.mailbox').create(
|
||||
cursor,
|
||||
user,
|
||||
mailbox_values,
|
||||
context)
|
||||
|
||||
print 'Sending', mailbox_id
|
||||
self.pool.get('email_template.mailbox').send_this_mail(cursor, user, [mailbox_id], context)
|
||||
return mailbox_id
|
||||
|
||||
|
||||
def generate_mail(self,
|
||||
cursor,
|
||||
user,
|
||||
|
@ -588,6 +594,7 @@ class email_template(osv.osv):
|
|||
template = self.browse(cursor, user, template_id, context=context)
|
||||
if not template:
|
||||
raise Exception("The requested template could not be loaded")
|
||||
print 'loaded', record_ids
|
||||
for record_id in record_ids:
|
||||
mailbox_id = self._generate_mailbox_item_from_template(
|
||||
cursor,
|
||||
|
@ -595,6 +602,7 @@ class email_template(osv.osv):
|
|||
template,
|
||||
record_id,
|
||||
context)
|
||||
print 'loaded'
|
||||
mail = self.pool.get('email_template.mailbox').browse(
|
||||
cursor,
|
||||
user,
|
||||
|
@ -616,7 +624,7 @@ class email_template(osv.osv):
|
|||
mailbox_id,
|
||||
{'folder':'outbox'},
|
||||
context=context
|
||||
)
|
||||
)
|
||||
return True
|
||||
|
||||
email_template()
|
||||
|
@ -625,6 +633,18 @@ class email_template_preview(osv.osv_memory):
|
|||
_name = "email_template.preview"
|
||||
_description = "Email Template Preview"
|
||||
|
||||
def _get_model_recs(self, cr, uid, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
#Fills up the selection box which allows records from the selected object to be displayed
|
||||
self.context = context
|
||||
if 'template_id' in context.keys():
|
||||
ref_obj_id = self.pool.get('email.template').read(cr, uid, context['template_id'], ['object_name'], context)
|
||||
ref_obj_name = self.pool.get('ir.model').read(cr, uid, ref_obj_id['object_name'][0], ['model'], context)['model']
|
||||
ref_obj_ids = self.pool.get(ref_obj_name).search(cr, uid, [], context=context)
|
||||
ref_obj_recs = self.pool.get(ref_obj_name).name_get(cr, uid, ref_obj_ids, context)
|
||||
return ref_obj_recs
|
||||
|
||||
def _default_model(self, cursor, user, context=None):
|
||||
"""
|
||||
Returns the default value for model field
|
||||
|
@ -635,7 +655,7 @@ class email_template_preview(osv.osv_memory):
|
|||
return self.pool.get('email.template').read(
|
||||
cursor,
|
||||
user,
|
||||
context['active_id'],
|
||||
context['template_id'],
|
||||
['object_name'],
|
||||
context)['object_name']
|
||||
|
||||
|
@ -644,6 +664,7 @@ class email_template_preview(osv.osv_memory):
|
|||
'email.template',
|
||||
'Template', readonly=True),
|
||||
'rel_model':fields.many2one('ir.model', 'Model', readonly=True),
|
||||
'rel_model_ref':fields.selection(_get_model_recs, 'Referred Document'),
|
||||
'to':fields.char('To', size=250, readonly=True),
|
||||
'cc':fields.char('CC', size=250, readonly=True),
|
||||
'bcc':fields.char('BCC', size=250, readonly=True),
|
||||
|
@ -653,10 +674,9 @@ class email_template_preview(osv.osv_memory):
|
|||
'report':fields.char('Report Name', size=100, readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'ref_template': lambda self, cr, uid, ctx:ctx['active_id'],
|
||||
'ref_template': lambda self, cr, uid, ctx:ctx['template_id'],
|
||||
'rel_model': _default_model
|
||||
}
|
||||
# Need to check
|
||||
def on_change_ref(self, cr, uid, ids, rel_model_ref, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
@ -665,13 +685,13 @@ class email_template_preview(osv.osv_memory):
|
|||
vals = {}
|
||||
if context == {}:
|
||||
context = self.context
|
||||
template = self.pool.get('email.template').browse(cr, uid, context['active_id'], context)
|
||||
template = self.pool.get('email.template').browse(cr, uid, context['template_id'], context)
|
||||
#Search translated template
|
||||
lang = get_value(cr, uid, rel_model_ref, template.lang, template, context)
|
||||
if lang:
|
||||
ctx = context.copy()
|
||||
ctx.update({'lang':lang})
|
||||
template = self.pool.get('email.template').browse(cr, uid, context['active_id'], ctx)
|
||||
template = self.pool.get('email.template').browse(cr, uid, context['template_id'], ctx)
|
||||
vals['to'] = get_value(cr, uid, rel_model_ref, template.def_to, template, context)
|
||||
vals['cc'] = get_value(cr, uid, rel_model_ref, template.def_cc, template, context)
|
||||
vals['bcc'] = get_value(cr, uid, rel_model_ref, template.def_bcc, template, context)
|
||||
|
|
|
@ -1,69 +1,69 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data>
|
||||
|
||||
<menuitem name="Tools" id="base.menu_tools" icon="STOCK_PREFERENCES" sequence="15"/>
|
||||
<menuitem name="Email Template" id="menu_email_template" parent="base.menu_tools"/>
|
||||
|
||||
<record model="ir.ui.view" id="email_template_account_form">
|
||||
<field name="name">email_template.account.form</field>
|
||||
<field name="model">email_template.account</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Email Account Configuration">
|
||||
<group colspan="2">
|
||||
<field name="name" select="1" />
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Outgoing">
|
||||
<separator string="Server Information" colspan="4" />
|
||||
<group colspan="4">
|
||||
<field name="smtpserver" select="1" colspan="2" />
|
||||
<field name="smtpport" select="2" colspan="2" />
|
||||
<field name="smtpssl" select="2" colspan="2" />
|
||||
<field name="smtptls" select="2" colspan="2" />
|
||||
</group>
|
||||
<button name="check_outgoing_connection" type="object" string="Check Outgoing Connection" />
|
||||
<separator string="User Information" colspan="4" />
|
||||
<group col="2" colspan="2">
|
||||
<field name="email_id" select="1" on_change="on_change_emailid(name,email_id)" colspan="2" />
|
||||
<field name="smtppass" password="True" colspan="2" />
|
||||
<field name="company" select="2" colspan="2" />
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<field name="smtpuname" select="1" colspan="2" />
|
||||
<field name="user" select="2" colspan="2" />
|
||||
<field name="send_pref" colspan="2" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<group colspan="4" col="10">
|
||||
<field name="state" select="1"/>
|
||||
<button string="Approve Account" name="button_approval" states="draft" type="workflow"/>
|
||||
<button string="Suspend Account" name="button_suspended" states="approved" type="workflow" />
|
||||
<button string="Request Re-activation" name="get_reapprove" states="suspended" type="workflow" />
|
||||
<button string="Send/Receive" name="send_receive" states="approved" type="object" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="email_template_account_form">
|
||||
<field name="name">email_template.account.form</field>
|
||||
<field name="model">email_template.account</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Email Account Configuration">
|
||||
<group colspan="2">
|
||||
<field name="name" select="1" />
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Outgoing">
|
||||
<separator string="Server Information" colspan="4" />
|
||||
<group colspan="4">
|
||||
<field name="smtpserver" select="1" colspan="2" />
|
||||
<field name="smtpport" select="2" colspan="2" />
|
||||
<field name="smtpssl" select="2" colspan="2" />
|
||||
<field name="smtptls" select="2" colspan="2" />
|
||||
</group>
|
||||
<button name="check_outgoing_connection" type="object" string="Check Outgoing Connection" />
|
||||
<separator string="User Information" colspan="4" />
|
||||
<group col="2" colspan="2">
|
||||
<field name="email_id" select="1" on_change="on_change_emailid(name,email_id)" colspan="2" />
|
||||
<field name="smtppass" password="True" colspan="2" />
|
||||
<field name="company" select="2" colspan="2" />
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<field name="smtpuname" select="1" colspan="2" />
|
||||
<field name="user" select="2" colspan="2" />
|
||||
<field name="send_pref" colspan="2" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<group colspan="4" col="10">
|
||||
<field name="state" select="1"/>
|
||||
<button string="Approve Account" name="button_approval" states="draft" type="workflow"/>
|
||||
<button string="Suspend Account" name="button_suspended" states="approved" type="workflow" />
|
||||
<button string="Request Re-activation" name="get_reapprove" states="suspended" type="workflow" />
|
||||
<button string="Send/Receive" name="send_receive" states="approved" type="object" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="email_template_account_tree">
|
||||
<field name="name">email_template.account.tree</field>
|
||||
<field name="model">email_template.account</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="SMTP Server">
|
||||
<field name="name" select="2" />
|
||||
<field name="email_id" select="2" />
|
||||
<field name="smtpuname" select="2" />
|
||||
<field name="user" select="2" />
|
||||
<field name="smtpserver" select="2" />
|
||||
<field name="smtpport" select="2" />
|
||||
<field name="state" select="2" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="email_template_account_tree">
|
||||
<field name="name">email_template.account.tree</field>
|
||||
<field name="model">email_template.account</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="SMTP Server">
|
||||
<field name="name" select="2" />
|
||||
<field name="email_id" select="2" />
|
||||
<field name="smtpuname" select="2" />
|
||||
<field name="user" select="2" />
|
||||
<field name="smtpserver" select="2" />
|
||||
<field name="smtpport" select="2" />
|
||||
<field name="state" select="2" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_email_template_account_search" model="ir.ui.view">
|
||||
<field name="name">email_template.account.search</field>
|
||||
|
@ -85,21 +85,21 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_email_template_account_tree_all">
|
||||
<field name="name">Accounts</field>
|
||||
<field name="res_model">email_template.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" ref="email_template_account_tree" />
|
||||
<record model="ir.actions.act_window" id="action_email_template_account_tree_all">
|
||||
<field name="name">Accounts</field>
|
||||
<field name="res_model">email_template.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" ref="email_template_account_tree" />
|
||||
<field name="context">{'group_by': [], 'search_default_draft': 1, 'search_default_my': 1}</field>
|
||||
<field name="search_view_id" ref="view_email_template_account_search"/>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<menuitem name="Configuration" id="menu_email_template_configuration" parent="menu_email_template" />
|
||||
<menuitem name="Configuration" id="menu_email_template_configuration" parent="menu_email_template" />
|
||||
|
||||
<menuitem name="All Accounts" id="menu_email_template_account_all" parent="menu_email_template_configuration" action="action_email_template_account_tree_all" groups="res_groups_email_template_manager" />
|
||||
<menuitem name="Email Accounts" id="menu_email_template_account_all" parent="menu_email_template_configuration" action="action_email_template_account_tree_all"/>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
|
|
|
@ -41,9 +41,7 @@ class email_template_mailbox(osv.osv):
|
|||
return True
|
||||
|
||||
def send_this_mail(self, cr, uid, ids=None, context=None):
|
||||
if ids is None:
|
||||
ids = []
|
||||
for id in ids:
|
||||
for id in (ids or []):
|
||||
try:
|
||||
account_obj = self.pool.get('email_template.account')
|
||||
values = self.read(cr, uid, id, [], context)
|
||||
|
|
|
@ -1,81 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- Email Template-->
|
||||
<record model="ir.ui.view" id="email_template_mailbox_form">
|
||||
<field name="name">email_template.mailbox.form</field>
|
||||
<field name="model">email_template.mailbox</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Outbox">
|
||||
<group col="4" colspan="2">
|
||||
<field name="email_from" colspan="4" select="1"/>
|
||||
<field name="email_cc" colspan="4" select="1"/>
|
||||
<field name="date_mail" colspan="4" select="2"/>
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<field name="email_to" colspan="4" required="1" select="1" />
|
||||
<field name="email_bcc" colspan="4" select="2"/>
|
||||
<field name="subject" colspan="4" select="1"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Standard Body">
|
||||
<separator colspan="4" string="Standard Body" />
|
||||
<notebook colspan="4">
|
||||
<page string="Standard Body (Text)">
|
||||
<field name="body_text" nolabel="1" colspan="4" select="1"/>
|
||||
</page>
|
||||
<page string="Body (HTML-Web Client Only)">
|
||||
<field name="body_html" nolabel="1" colspan="4" />
|
||||
<!--<label string="Note: HTML body can't be edited with GTK desktop client." colspan="4"/>
|
||||
--></page>
|
||||
<data>
|
||||
<!-- Email Template-->
|
||||
<record model="ir.ui.view" id="email_template_mailbox_form">
|
||||
<field name="name">email_template.mailbox.form</field>
|
||||
<field name="model">email_template.mailbox</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Outbox">
|
||||
<group col="4" colspan="2">
|
||||
<field name="email_from" colspan="4" select="1"/>
|
||||
<field name="email_cc" colspan="4" select="1"/>
|
||||
<field name="date_mail" colspan="4" select="2"/>
|
||||
</group>
|
||||
<group col="4" colspan="2">
|
||||
<field name="email_to" colspan="4" required="1" select="1" />
|
||||
<field name="email_bcc" colspan="4" select="2"/>
|
||||
<field name="subject" colspan="4" select="1"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Standard Body">
|
||||
<separator colspan="4" string="Standard Body" />
|
||||
<notebook colspan="4">
|
||||
<page string="Standard Body (Text)">
|
||||
<field name="body_text" nolabel="1" colspan="4" select="1"/>
|
||||
</page>
|
||||
<page string="Body (HTML-Web Client Only)">
|
||||
<field name="body_html" nolabel="1" colspan="4" />
|
||||
<!--<label string="Note: HTML body can't be edited with GTK desktop client." colspan="4"/>
|
||||
--></page>
|
||||
|
||||
</notebook>
|
||||
</page>
|
||||
</notebook>
|
||||
</page>
|
||||
|
||||
|
||||
<page string="Attachments">
|
||||
<group col="4">
|
||||
<separator colspan="4" string="Attachments" />
|
||||
<field name="attachments_ids" colspan="4" nolabel="1" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Advanced">
|
||||
<group col="4">
|
||||
<field name="account_id" colspan="2" />
|
||||
<field name="server_ref" colspan="2" />
|
||||
<field name="mail_type" colspan="2" />
|
||||
<field name="folder" colspan="2" select="2"/>
|
||||
<separator string="History" colspan="4" />
|
||||
<field name="history" nolabel="1" colspan="4"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<separator colspan="4" string="" />
|
||||
<group col="4" colspan="4">
|
||||
<field name="state" readonly="1" />
|
||||
<button name="complete_mail" type="object" string="Download Full Mail" states="read,unread" />
|
||||
<button name="send_this_mail" type="object" string="Send Mail" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<page string="Attachments">
|
||||
<group col="4">
|
||||
<separator colspan="4" string="Attachments" />
|
||||
<field name="attachments_ids" colspan="4" nolabel="1" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Advanced">
|
||||
<group col="4">
|
||||
<field name="account_id" colspan="2" />
|
||||
<field name="server_ref" colspan="2" />
|
||||
<field name="mail_type" colspan="2" />
|
||||
<field name="folder" colspan="2" select="2"/>
|
||||
<separator string="History" colspan="4" />
|
||||
<field name="history" nolabel="1" colspan="4"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
<separator colspan="4" string="" />
|
||||
<group col="4" colspan="4">
|
||||
<field name="state" readonly="1" />
|
||||
<button name="complete_mail" type="object" string="Download Full Mail" states="read,unread" />
|
||||
<button name="send_this_mail" type="object" string="Send Mail" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!--============================================= TREE VIEWS =============================================-->
|
||||
<record id="view_email_template_mailbox_tree" model="ir.ui.view">
|
||||
<field name="name">email_template.mailbox.tree</field>
|
||||
<field name="model">email_template.mailbox</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Drafts">
|
||||
<field name="user" />
|
||||
<field name="email_from" select="1" />
|
||||
<field name="subject" select="1" />
|
||||
<field name="attachments_ids" select="2" />
|
||||
<field name="date_mail" select="2" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!--============================================= TREE VIEWS =============================================-->
|
||||
<record id="view_email_template_mailbox_tree" model="ir.ui.view">
|
||||
<field name="name">email_template.mailbox.tree</field>
|
||||
<field name="model">email_template.mailbox</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Drafts">
|
||||
<field name="user" />
|
||||
<field name="email_from" select="1" />
|
||||
<field name="subject" select="1" />
|
||||
<field name="attachments_ids" select="2" />
|
||||
<field name="date_mail" select="2" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_email_template_mailbox_search" model="ir.ui.view">
|
||||
<field name="name">email_template.mailbox.search</field>
|
||||
|
@ -109,14 +109,14 @@
|
|||
<field name="search_view_id" ref="view_email_template_mailbox_search"/>
|
||||
</record>
|
||||
|
||||
<!--======================================== MENUS ========================================-->
|
||||
<menuitem name="MailBox" id="menu_email_template_mailbox_all_main2" parent="menu_email_template" />
|
||||
<menuitem name="Personal" id="menu_email_template_personal" parent="menu_email_template_mailbox_all_main2" />
|
||||
<!--======================================== MENUS ========================================-->
|
||||
<menuitem name="MailBox" id="menu_email_template_mailbox_all_main2" parent="menu_email_template" />
|
||||
<menuitem name="Personal" id="menu_email_template_personal" parent="menu_email_template_mailbox_all_main2" />
|
||||
<menuitem name="Mails" id="menu_email_template_personal_mails" parent="menu_email_template_personal" action="action_email_template_mailbox"/>
|
||||
<menuitem name="Company" id="menu_email_template_company" parent="menu_email_template_mailbox_all_main2" />
|
||||
<menuitem name="Company" id="menu_email_template_company" parent="menu_email_template_mailbox_all_main2" />
|
||||
<menuitem name="Mails" id="menu_email_template_company_mails" parent="menu_email_template_company" action="action_email_template_mailbox"/>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
|
|
|
@ -1,147 +1,147 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- Email Template PReview -->
|
||||
<record model="ir.ui.view" id="email_template_preview_form">
|
||||
<field name="name">email_template.preview.form</field>
|
||||
<field name="model">email_template.preview</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Email Preview">
|
||||
<field name="rel_model" />
|
||||
<newline />
|
||||
<field name="rel_model_ref" on_change="on_change_ref(rel_model_ref, context)" />
|
||||
<newline />
|
||||
<field name="to" />
|
||||
<newline />
|
||||
<field name="cc" />
|
||||
<newline />
|
||||
<field name="bcc" />
|
||||
<newline />
|
||||
<field name="subject" />
|
||||
<newline />
|
||||
<field name="body_text" />
|
||||
<newline />
|
||||
<!-- <field name="body_html" widget="text_html" />-->
|
||||
<!--
|
||||
Removed text_html because it doesnt work in GTK
|
||||
And TinyMCE messes up the HTML in Web Client
|
||||
-->
|
||||
<field name="body_html"/>
|
||||
<newline />
|
||||
<field name="report" />
|
||||
<group>
|
||||
<button icon="gtk-ok" special="cancel" string="OK" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<data>
|
||||
<!-- Email Template PReview -->
|
||||
<record model="ir.ui.view" id="email_template_preview_form">
|
||||
<field name="name">email_template.preview.form</field>
|
||||
<field name="model">email_template.preview</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Email Preview">
|
||||
<field name="rel_model" />
|
||||
<newline />
|
||||
<field name="rel_model_ref" on_change="on_change_ref(rel_model_ref, context)" />
|
||||
<newline />
|
||||
<field name="to" />
|
||||
<newline />
|
||||
<field name="cc" />
|
||||
<newline />
|
||||
<field name="bcc" />
|
||||
<newline />
|
||||
<field name="subject" />
|
||||
<newline />
|
||||
<field name="body_text" />
|
||||
<newline />
|
||||
<!-- <field name="body_html" widget="text_html" />-->
|
||||
<!--
|
||||
Removed text_html because it doesnt work in GTK
|
||||
And TinyMCE messes up the HTML in Web Client
|
||||
-->
|
||||
<field name="body_html"/>
|
||||
<newline />
|
||||
<field name="report" />
|
||||
<group>
|
||||
<button icon="gtk-ok" special="cancel" string="OK" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="wizard_email_template_preview" model="ir.actions.act_window">
|
||||
<field name="name">Template Preview</field>
|
||||
<field name="res_model">email_template.preview</field>
|
||||
<field name="src_model">email_template.preview</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="auto_refresh" eval="1" />
|
||||
<field name="target">new</field>
|
||||
<field name="context">{'ids':active_id}</field>
|
||||
</record>
|
||||
<!--EMail client Form view -->
|
||||
<record id="wizard_email_template_preview" model="ir.actions.act_window">
|
||||
<field name="name">Template Preview</field>
|
||||
<field name="res_model">email_template.preview</field>
|
||||
<field name="src_model">email_template.preview</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="auto_refresh" eval="1" />
|
||||
<field name="target">new</field>
|
||||
<field name="context">{'template_id':active_id}</field>
|
||||
</record>
|
||||
<!--EMail client Form view -->
|
||||
|
||||
<record model="ir.ui.view" id="email_template_form">
|
||||
<field name="name">email.template.form</field>
|
||||
<field name="model">email.template</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Email Templates">
|
||||
<field name="name" />
|
||||
<field name="object_name" required="1"
|
||||
on_change="change_model(object_name)" />
|
||||
<field name="model_int_name" invisible="1" />
|
||||
<notebook colspan="4">
|
||||
<page string="Mail Details">
|
||||
<field name="enforce_from_account" required= "1"/>
|
||||
<group col="4" colspan="2">
|
||||
<field name="from_email"/>
|
||||
<field name="def_to" colspan="4" required="1" />
|
||||
<field name="def_cc" colspan="4" />
|
||||
<field name="def_bcc" colspan="4" />
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<field name="def_subject" colspan="4" required="1" />
|
||||
<field name="use_sign" colspan="4" />
|
||||
<field name="lang" colspan="4" />
|
||||
</group>
|
||||
<separator colspan="3" string="Standard Body" />
|
||||
<separator colspan="1" string="Expression Builder" />
|
||||
<record model="ir.ui.view" id="email_template_form">
|
||||
<field name="name">email.template.form</field>
|
||||
<field name="model">email.template</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Email Templates">
|
||||
<field name="name" />
|
||||
<field name="object_name" required="1"
|
||||
on_change="change_model(object_name)" />
|
||||
<field name="model_int_name" invisible="1" />
|
||||
<notebook colspan="4">
|
||||
<page string="Mail Details">
|
||||
<field name="enforce_from_account" required= "1"/>
|
||||
<group col="4" colspan="2">
|
||||
<field name="from_email"/>
|
||||
<field name="def_to" colspan="4" required="1" />
|
||||
<field name="def_cc" colspan="4" />
|
||||
<field name="def_bcc" colspan="4" />
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<field name="def_subject" colspan="4" required="1" />
|
||||
<field name="use_sign" colspan="4" />
|
||||
<field name="lang" colspan="4" />
|
||||
</group>
|
||||
<separator colspan="3" string="Standard Body" />
|
||||
<separator colspan="1" string="Expression Builder" />
|
||||
|
||||
<notebook>
|
||||
<page string="Body (Text)">
|
||||
<field name="def_body_text" colspan="4" nolabel="1" />
|
||||
</page>
|
||||
<page string="Body (Raw HTML)">
|
||||
<field name="def_body_html" colspan="4" nolabel="1" />
|
||||
<label string="Note: This is Raw HTML." colspan="4" />
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="4">
|
||||
<field name="template_language"
|
||||
on_change="onchange_null_value(model_object_field,sub_model_object_field,null_value,template_language,context)" />
|
||||
<notebook>
|
||||
<page string="Insert Simple Field">
|
||||
<notebook>
|
||||
<page string="Body (Text)">
|
||||
<field name="def_body_text" colspan="4" nolabel="1" />
|
||||
</page>
|
||||
<page string="Body (Raw HTML)">
|
||||
<field name="def_body_html" colspan="4" nolabel="1" />
|
||||
<label string="Note: This is Raw HTML." colspan="4" />
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="4">
|
||||
<field name="template_language"
|
||||
on_change="onchange_null_value(model_object_field,sub_model_object_field,null_value,template_language,context)" />
|
||||
<notebook>
|
||||
<page string="Insert Simple Field">
|
||||
|
||||
<field name="model_object_field"
|
||||
domain="[('model_id','=',object_name),('ttype','!=','one2many'),('ttype','!=','many2many')]"
|
||||
on_change="onchange_model_object_field(model_object_field, template_language,context)"
|
||||
colspan="4" />
|
||||
<field name="sub_object" readonly="1" colspan="4" />
|
||||
<field name="sub_model_object_field"
|
||||
domain="[('model_id','=',sub_object),('ttype','!=','one2many'),('ttype','!=','many2many')]"
|
||||
colspan="4"
|
||||
attrs="{'readonly':[('sub_object','=',False)],'required':[('sub_object','!=',False)]}"
|
||||
on_change="onchange_sub_model_object_field(model_object_field,sub_model_object_field,template_language,context)" />
|
||||
<field name="null_value" colspan="4"
|
||||
on_change="onchange_null_value(model_object_field,sub_model_object_field,null_value,template_language,context)" />
|
||||
<field name="copyvalue" colspan="4" />
|
||||
</page>
|
||||
</notebook>
|
||||
<button name="%(wizard_email_template_preview)d" string="Preview Template"
|
||||
type="action" colspan="4" target="new" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Advanced">
|
||||
<field name="ref_ir_act_window" />
|
||||
<field name="ref_ir_value" />
|
||||
<separator string="Attachments (Report to attach)" colspan="4"/>
|
||||
<field name="file_name" colspan="2" />
|
||||
<field name="report_template" colspan="2"
|
||||
domain="[('model','=',model_int_name)]" />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<field name="model_object_field"
|
||||
domain="[('model_id','=',object_name),('ttype','!=','one2many'),('ttype','!=','many2many')]"
|
||||
on_change="onchange_model_object_field(model_object_field, template_language,context)"
|
||||
colspan="4" />
|
||||
<field name="sub_object" readonly="1" colspan="4" />
|
||||
<field name="sub_model_object_field"
|
||||
domain="[('model_id','=',sub_object),('ttype','!=','one2many'),('ttype','!=','many2many')]"
|
||||
colspan="4"
|
||||
attrs="{'readonly':[('sub_object','=',False)],'required':[('sub_object','!=',False)]}"
|
||||
on_change="onchange_sub_model_object_field(model_object_field,sub_model_object_field,template_language,context)" />
|
||||
<field name="null_value" colspan="4"
|
||||
on_change="onchange_null_value(model_object_field,sub_model_object_field,null_value,template_language,context)" />
|
||||
<field name="copyvalue" colspan="4" />
|
||||
</page>
|
||||
</notebook>
|
||||
<button name="%(wizard_email_template_preview)d" string="Preview Template"
|
||||
type="action" colspan="4" target="new" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Advanced">
|
||||
<field name="ref_ir_act_window" />
|
||||
<field name="ref_ir_value" />
|
||||
<separator string="Attachments (Report to attach)" colspan="4"/>
|
||||
<field name="file_name" colspan="2" />
|
||||
<field name="report_template" colspan="2"
|
||||
domain="[('model','=',model_int_name)]" />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="email_template_tree">
|
||||
<field name="name">email.template.tree</field>
|
||||
<field name="model">email.template</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Email Templates">
|
||||
<field name="name" select="1" />
|
||||
<field name="object_name" required="1" select="1" />
|
||||
<field name="def_to" colspan="4" select="2" />
|
||||
<field name="def_cc" colspan="4" select="2" />
|
||||
<field name="def_bcc" colspan="4" select="2" />
|
||||
<field name="def_subject" colspan="4" select="2" />
|
||||
<field name="use_sign" colspan="4" select="2" />
|
||||
<field name="file_name" colspan="4" />
|
||||
<field name="enforce_from_account" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="email_template_tree">
|
||||
<field name="name">email.template.tree</field>
|
||||
<field name="model">email.template</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Email Templates">
|
||||
<field name="name" select="1" />
|
||||
<field name="object_name" required="1" select="1" />
|
||||
<field name="def_to" colspan="4" select="2" />
|
||||
<field name="def_cc" colspan="4" select="2" />
|
||||
<field name="def_bcc" colspan="4" select="2" />
|
||||
<field name="def_subject" colspan="4" select="2" />
|
||||
<field name="use_sign" colspan="4" select="2" />
|
||||
<field name="file_name" colspan="4" />
|
||||
<field name="enforce_from_account" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_email_template_search" model="ir.ui.view">
|
||||
<field name="name">email.template.search</field>
|
||||
|
@ -161,19 +161,19 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_email_template_tree_all">
|
||||
<field name="name">Email Templates</field>
|
||||
<field name="res_model">email.template</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" ref="email_template_tree" />
|
||||
<record model="ir.actions.act_window" id="action_email_template_tree_all">
|
||||
<field name="name">Email Templates</field>
|
||||
<field name="res_model">email.template</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="view_id" ref="email_template_tree" />
|
||||
<field name="search_view_id" ref="view_email_template_search"/>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<menuitem name="E-MAIL Templates" id="menu_email_template_all"
|
||||
parent="menu_email_template_configuration" action="action_email_template_tree_all" />
|
||||
<menuitem name="E-MAIL Templates" id="menu_email_template_all"
|
||||
parent="menu_email_template_configuration" action="action_email_template_tree_all" />
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
|
|
|
@ -11,24 +11,24 @@
|
|||
<field name="osv">email_template.account</field>
|
||||
<field name="on_create">True</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!--Activity -->
|
||||
|
||||
|
||||
<record id="act_draft" model="workflow.activity">
|
||||
<field name="wkf_id" ref="wkf_email_template_setting"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="name">draft</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">write({'state':'draft'})</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="act_approved" model="workflow.activity">
|
||||
<field name="name">approval</field>
|
||||
<field name="wkf_id" ref="wkf_email_template_setting"/>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">do_approval()</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="act_suspended" model="workflow.activity">
|
||||
<field name="name">suspended</field>
|
||||
<field name="wkf_id" ref="wkf_email_template_setting"/>
|
||||
|
@ -40,16 +40,16 @@
|
|||
<field name="wkf_id" ref="wkf_email_template_setting"/>
|
||||
<field name="flow_stop">True</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Transition -->
|
||||
|
||||
|
||||
<record id="trans_awaiting_approved" model="workflow.transition">
|
||||
<field name="act_from" ref="act_draft"/>
|
||||
<field name="act_to" ref="act_approved"/>
|
||||
<field name="signal">button_approval</field>
|
||||
<field name="role_id" ref="PE_ADMIN"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="trans_approved_suspended" model="workflow.transition">
|
||||
<field name="act_from" ref="act_approved"/>
|
||||
<field name="act_to" ref="act_suspended"/>
|
||||
|
@ -67,6 +67,6 @@
|
|||
<field name="act_to" ref="act_dummy"/>
|
||||
<field name="signal">get_never</field>
|
||||
<field name="role_id" ref="PE_ADMIN"/>
|
||||
</record>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,19 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
<data noupdate="0">
|
||||
|
||||
<record id="res_groups_email_template_manager" model="res.groups">
|
||||
<field name="name">Email Template / Settings_Manager</field>
|
||||
</record>
|
||||
<record id="res_groups_email_template_admin" model="res.groups">
|
||||
<field name="name">Marketing / Email Template</field>
|
||||
</record>
|
||||
|
||||
<record id="res_groups_email_template_userse" model="res.groups">
|
||||
<field name="name">Email Template / External_users</field>
|
||||
</record>
|
||||
|
||||
<record id="res_groups_email_template_usersi" model="res.groups">
|
||||
<field name="name">Email Template / Internal_users</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_email_template_engines","email_template.engines","model_email_template_engines","email_template.res_groups_email_template_admin",1,1,1,1
|
||||
"access_email_template_account","email_template.account","model_email_template_account","email_template.res_groups_email_template_admin",1,1,1,1
|
||||
"access_email_template","email.template","model_email_template","email_template.res_groups_email_template_admin",1,1,1,1
|
||||
"access_email_template_preview","email_template.preview","model_email_template_preview","email_template.res_groups_email_template_admin",1,1,1,1
|
||||
"access_email_template_mailbox","email_template.mailbox","model_email_template_mailbox","email_template.res_groups_email_template_admin",1,1,1,1
|
||||
"access_email_template_send_wizard","email_template.send.wizard","model_email_template_send_wizard","email_template.res_groups_email_template_admin",1,1,1,1
|
|
|
@ -7,19 +7,19 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-10-09 07:48+0000\n"
|
||||
"Last-Translator: Sardorbek Pulatov (pROCKrammer) <prockrammer@ya.ru>\n"
|
||||
"PO-Revision-Date: 2010-06-13 13:02+0000\n"
|
||||
"Last-Translator: Alex L. <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-04-17 03:55+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-15 03:32+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: google_map
|
||||
#: model:ir.actions.wizard,name:google_map.wizard_google_map
|
||||
msgid "Launch Google Map"
|
||||
msgstr ""
|
||||
msgstr "Запустить Google Map"
|
||||
|
||||
#. module: google_map
|
||||
#: constraint:ir.ui.view:0
|
||||
|
@ -39,6 +39,9 @@ msgid ""
|
|||
"so that we can directly open google map from the\n"
|
||||
"url widget."
|
||||
msgstr ""
|
||||
"Модуль добавляет поле с Google картой в адрес партнера\n"
|
||||
"поэтому мы можем открыть карту Google непосредственно из\n"
|
||||
"адреса виджета."
|
||||
|
||||
#. module: google_map
|
||||
#: view:res.partner:0
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<search string="Departments">
|
||||
<group col='4' colspan='2'>
|
||||
<field name="name" />
|
||||
<field name="manager_id" widget="selection"/>
|
||||
<field name="manager_id"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -73,7 +73,7 @@
|
|||
</record>
|
||||
|
||||
<menuitem action="open_module_tree_department" id="menu_department_def" parent="hr.menu_department_tree"/>
|
||||
<menuitem action="open_module_tree_department" id="menu_hr_department_tree" parent="menu_hr_root" sequence="5"/>
|
||||
<menuitem action="open_module_tree_department" id="menu_hr_department_tree" parent="menu_hr_main" sequence="5"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_users_form_inherit">
|
||||
<field name="name">res.users.form</field>
|
||||
|
|
|
@ -6,10 +6,16 @@
|
|||
icon="terp-hr"
|
||||
name="Human Resources"
|
||||
sequence="6"/>
|
||||
<menuitem
|
||||
id="menu_hr_main"
|
||||
parent="menu_hr_root"
|
||||
name="Human Resources"
|
||||
sequence="0"/>
|
||||
<menuitem
|
||||
id="menu_hr_configuration"
|
||||
name="Configuration"
|
||||
parent="hr.menu_hr_root"
|
||||
groups="group_hr_manager"
|
||||
sequence="50" />
|
||||
<menuitem
|
||||
id="menu_view_employee_category_configuration_form"
|
||||
|
@ -29,18 +35,18 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Employee">
|
||||
<group colspan="4" col="8">
|
||||
<group colspan="6" col="6">
|
||||
<field colspan="6" name="name" select="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="active" groups="base.group_extended"/>
|
||||
<newline/>
|
||||
<group colspan="6" col="6">
|
||||
<field colspan="6" name="name" select="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="active" groups="base.group_extended"/>
|
||||
<newline/>
|
||||
<field name="parent_id" />
|
||||
<field name="coach_id" />
|
||||
</group>
|
||||
<group colspan="2" col="1">
|
||||
<field name="photo" widget='image' nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="2" col="1">
|
||||
<field name="photo" widget='image' nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="6">
|
||||
<page string="Personal Information">
|
||||
|
@ -112,7 +118,7 @@
|
|||
<field name="name"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="job_id" widget="selection"/>
|
||||
<field name="parent_id" widget="selection" />
|
||||
<field name="parent_id"/>
|
||||
<newline />
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'parent_id'}"/>
|
||||
|
@ -155,7 +161,7 @@
|
|||
action="open_view_employee_list_my"
|
||||
id="menu_open_view_employee_list_my"
|
||||
sequence="3"
|
||||
parent="menu_hr_root"/>
|
||||
parent="menu_hr_main"/>
|
||||
|
||||
|
||||
<!--
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_hr_employee_category","hr.employee.category","model_hr_employee_category","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_employee","hr.employee","model_hr_employee","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_employee_resource","resource.resource","resource.model_resource_resource","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_department","hr.department","model_hr_department","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_employee_category_manager","hr.employee.category.manager","model_hr_employee_category","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_department_manager","hr.department.manager","model_hr_department","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_employee_marital_status","hr.employee.marital.status","model_hr_employee_marital_status","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_job","hr.job","model_hr_job","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_installer","hr.installer","model_hr_installer","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_installer","hr.installer","model_hr_installer","base.group_system",1,1,1,1
|
||||
|
|
|
|
@ -39,14 +39,10 @@ def hour2str(h):
|
|||
|
||||
class report_custom(report_rml):
|
||||
def create_xml(self, cr, uid, ids, datas, context):
|
||||
service = netsvc.LocalService('object_proxy')
|
||||
|
||||
month = DateTime.DateTime(datas['form']['year'], datas['form']['month'], 1)
|
||||
|
||||
user_xml = ['<month>%s</month>' % month2name[month.month], '<year>%s</year>' % month.year]
|
||||
|
||||
for employee_id in ids:
|
||||
emp = service.execute(cr.dbname, uid, 'hr.employee', 'read', [employee_id])[0]
|
||||
emp = self.pool.get('hr.employee').read(cr, uid, 'read', [employee_id], ['name'])[0]
|
||||
stop, days_xml = False, []
|
||||
user_repr = '''
|
||||
<user>
|
||||
|
|
|
@ -32,81 +32,80 @@ one_week = DateTime.RelativeDateTime(days=7)
|
|||
num2day = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
|
||||
|
||||
def to_hour(h):
|
||||
return int(h), int(round((h - int(h)) * 60, 0))
|
||||
return int(h), int(round((h - int(h)) * 60, 0))
|
||||
|
||||
class report_custom(report_rml):
|
||||
def create_xml(self, cr, uid, ids, datas, context):
|
||||
service = netsvc.LocalService('object_proxy')
|
||||
def create_xml(self, cr, uid, ids, datas, context):
|
||||
|
||||
start_date = DateTime.strptime(datas['form']['init_date'], '%Y-%m-%d')
|
||||
end_date = DateTime.strptime(datas['form']['end_date'], '%Y-%m-%d')
|
||||
first_monday = start_date - DateTime.RelativeDateTime(days=start_date.day_of_week)
|
||||
last_monday = end_date + DateTime.RelativeDateTime(days=7 - end_date.day_of_week)
|
||||
start_date = DateTime.strptime(datas['form']['init_date'], '%Y-%m-%d')
|
||||
end_date = DateTime.strptime(datas['form']['end_date'], '%Y-%m-%d')
|
||||
first_monday = start_date - DateTime.RelativeDateTime(days=start_date.day_of_week)
|
||||
last_monday = end_date + DateTime.RelativeDateTime(days=7 - end_date.day_of_week)
|
||||
|
||||
if last_monday < first_monday:
|
||||
first_monday, last_monday = last_monday, first_monday
|
||||
if last_monday < first_monday:
|
||||
first_monday, last_monday = last_monday, first_monday
|
||||
|
||||
user_xml = []
|
||||
user_xml = []
|
||||
|
||||
for employee_id in ids:
|
||||
emp = service.execute(cr.dbname, uid, 'hr.employee', 'read', [employee_id], ['id', 'name'])[0]
|
||||
monday, n_monday = first_monday, first_monday + one_week
|
||||
stop, week_xml = False, []
|
||||
user_repr = '''
|
||||
<user>
|
||||
<name>%s</name>
|
||||
%%s
|
||||
</user>
|
||||
''' % toxml(emp['name'])
|
||||
while monday != last_monday:
|
||||
#### Work hour calculation
|
||||
sql = '''
|
||||
select action, att.name
|
||||
from hr_employee as emp inner join hr_attendance as att
|
||||
on emp.id = att.employee_id
|
||||
where att.name between %s and %s and emp.id = %s
|
||||
order by att.name
|
||||
'''
|
||||
for idx in range(7):
|
||||
cr.execute(sql, (monday.strftime('%Y-%m-%d %H:%M:%S'), (monday + DateTime.RelativeDateTime(days=idx+1)).strftime('%Y-%m-%d %H:%M:%S'), employee_id))
|
||||
attendances = cr.dictfetchall()
|
||||
week_wh = {}
|
||||
# Fake sign ins/outs at week ends, to take attendances across week ends into account
|
||||
# XXX this is wrong for the first sign-in ever and the last sign out to this date
|
||||
if attendances and attendances[0]['action'] == 'sign_out':
|
||||
attendances.insert(0, {'name': monday.strftime('%Y-%m-%d %H:%M:%S'), 'action':'sign_in'})
|
||||
if attendances and attendances[-1]['action'] == 'sign_in':
|
||||
attendances.append({'name' : n_monday.strftime('%Y-%m-%d %H:%M:%S'), 'action':'sign_out'})
|
||||
# sum up the attendances' durations
|
||||
for att in attendances:
|
||||
dt = DateTime.strptime(att['name'], '%Y-%m-%d %H:%M:%S')
|
||||
if att['action'] == 'sign_out':
|
||||
week_wh[ldt.day_of_week] = week_wh.get(ldt.day_of_week, 0) + (dt - ldt).hours
|
||||
ldt = dt
|
||||
for employee_id in ids:
|
||||
emp = self.pool.get('hr.employee').read(cr, uid, [employee_id], ['id', 'name'])[0]
|
||||
monday, n_monday = first_monday, first_monday + one_week
|
||||
stop, week_xml = False, []
|
||||
user_repr = '''
|
||||
<user>
|
||||
<name>%s</name>
|
||||
%%s
|
||||
</user>
|
||||
''' % toxml(emp['name'])
|
||||
while monday != last_monday:
|
||||
#### Work hour calculation
|
||||
sql = '''
|
||||
select action, att.name
|
||||
from hr_employee as emp inner join hr_attendance as att
|
||||
on emp.id = att.employee_id
|
||||
where att.name between %s and %s and emp.id = %s
|
||||
order by att.name
|
||||
'''
|
||||
for idx in range(7):
|
||||
cr.execute(sql, (monday.strftime('%Y-%m-%d %H:%M:%S'), (monday + DateTime.RelativeDateTime(days=idx+1)).strftime('%Y-%m-%d %H:%M:%S'), employee_id))
|
||||
attendances = cr.dictfetchall()
|
||||
week_wh = {}
|
||||
# Fake sign ins/outs at week ends, to take attendances across week ends into account
|
||||
# XXX this is wrong for the first sign-in ever and the last sign out to this date
|
||||
if attendances and attendances[0]['action'] == 'sign_out':
|
||||
attendances.insert(0, {'name': monday.strftime('%Y-%m-%d %H:%M:%S'), 'action':'sign_in'})
|
||||
if attendances and attendances[-1]['action'] == 'sign_in':
|
||||
attendances.append({'name' : n_monday.strftime('%Y-%m-%d %H:%M:%S'), 'action':'sign_out'})
|
||||
# sum up the attendances' durations
|
||||
for att in attendances:
|
||||
dt = DateTime.strptime(att['name'], '%Y-%m-%d %H:%M:%S')
|
||||
if att['action'] == 'sign_out':
|
||||
week_wh[ldt.day_of_week] = week_wh.get(ldt.day_of_week, 0) + (dt - ldt).hours
|
||||
ldt = dt
|
||||
|
||||
# Week xml representation
|
||||
week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime('%Y-%m-%d'), '<weekend>%s</weekend>' % n_monday.strftime('%Y-%m-%d')]
|
||||
for idx in range(7):
|
||||
week_repr.append('<%s>' % num2day[idx])
|
||||
if idx in week_wh:
|
||||
week_repr.append('<workhours>%sh%02d</workhours>' % to_hour(week_wh[idx]))
|
||||
week_repr.append('</%s>' % num2day[idx])
|
||||
week_repr.append('<total>')
|
||||
week_repr.append('<worked>%sh%02d</worked>' % to_hour(reduce(lambda x,y:x+y, week_wh.values(), 0)))
|
||||
week_repr.append('</total>')
|
||||
week_repr.append('</week>')
|
||||
if len(week_repr) > 21: # 21 = minimal length of week_repr
|
||||
week_xml.append('\n'.join(week_repr))
|
||||
|
||||
monday, n_monday = n_monday, n_monday + one_week
|
||||
user_xml.append(user_repr % '\n'.join(week_xml))
|
||||
|
||||
xml = '''<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report>
|
||||
%s
|
||||
</report>
|
||||
''' % '\n'.join(user_xml)
|
||||
return self.post_process_xml_data(cr, uid, xml, context)
|
||||
# Week xml representation
|
||||
week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime('%Y-%m-%d'), '<weekend>%s</weekend>' % n_monday.strftime('%Y-%m-%d')]
|
||||
for idx in range(7):
|
||||
week_repr.append('<%s>' % num2day[idx])
|
||||
if idx in week_wh:
|
||||
week_repr.append('<workhours>%sh%02d</workhours>' % to_hour(week_wh[idx]))
|
||||
week_repr.append('</%s>' % num2day[idx])
|
||||
week_repr.append('<total>')
|
||||
week_repr.append('<worked>%sh%02d</worked>' % to_hour(reduce(lambda x,y:x+y, week_wh.values(), 0)))
|
||||
week_repr.append('</total>')
|
||||
week_repr.append('</week>')
|
||||
if len(week_repr) > 21: # 21 = minimal length of week_repr
|
||||
week_xml.append('\n'.join(week_repr))
|
||||
|
||||
monday, n_monday = n_monday, n_monday + one_week
|
||||
user_xml.append(user_repr % '\n'.join(week_xml))
|
||||
|
||||
xml = '''<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report>
|
||||
%s
|
||||
</report>
|
||||
''' % '\n'.join(user_xml)
|
||||
return self.post_process_xml_data(cr, uid, xml, context)
|
||||
|
||||
report_custom('report.hr.attendance.allweeks', 'hr.employee', '', 'addons/hr_attendance/report/timesheet.xsl')
|
||||
# vim:noexpandtab:tw=0
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_hr_action_reason_employee","hr action reason employee","model_hr_action_reason","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_attendance_employee","hr attendance employee","model_hr_attendance","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_action_reason_employee","hr action reason employee","model_hr_action_reason","hr_attendance.group_hr_attendance",1,0,0,0
|
||||
"access_hr_action_reason_employee","hr action reason employee","model_hr_action_reason","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_attendance_employee","hr attendance employee","model_hr_attendance","hr_attendance.group_hr_attendance",1,1,1,1
|
||||
"access_hr_sign_in_out","hr attendance sign in out","model_hr_sign_in_out","hr_attendance.group_hr_attendance",1,1,1,1
|
||||
"access_hr_attendance_employee","hr employee attendance sign in out","hr.model_hr_employee","hr_attendance.group_hr_attendance",1,0,0,0
|
||||
"access_hr_attendance_resource","hr resource attendance sign in out","resource.model_resource_resource","hr_attendance.group_hr_attendance",1,0,0,0
|
||||
|
|
|
|
@ -33,16 +33,14 @@ class hr_si_so_ask(osv.osv_memory):
|
|||
'emp_id': fields.char('Empoyee ID', size=32, required=True, readonly=True),
|
||||
}
|
||||
def _get_empname(self, cr, uid, context=None):
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
|
||||
emp_id = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
|
||||
if emp_id:
|
||||
employee = emp_obj.read(cr, uid, emp_id)[0]
|
||||
return employee['name']
|
||||
employee = self.pool.get('hr.employee').browse(cr, uid, emp_id, context=context)[0].name
|
||||
return employee
|
||||
return ''
|
||||
|
||||
def _get_empid(self, cr, uid, context=None):
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
|
||||
emp_id = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
|
||||
if emp_id:
|
||||
return emp_id[0]
|
||||
return False
|
||||
|
@ -74,11 +72,10 @@ class hr_sign_in_out(osv.osv_memory):
|
|||
}
|
||||
|
||||
def _get_empid(self, cr, uid, context=None):
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
|
||||
emp_id = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
|
||||
if emp_id:
|
||||
employee = emp_obj.read(cr, uid, emp_id)[0]
|
||||
return {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]}
|
||||
employee = self.pool.get('hr.employee').browse(cr, uid, emp_id, context=context)[0]
|
||||
return {'name': employee.name, 'state': employee.state, 'emp_id': emp_id[0]}
|
||||
return {}
|
||||
|
||||
def default_get(self, cr, uid, fields_list, context=None):
|
||||
|
@ -88,16 +85,15 @@ class hr_sign_in_out(osv.osv_memory):
|
|||
return res
|
||||
|
||||
def si_check(self, cr, uid, ids, context=None):
|
||||
|
||||
att_obj = self.pool.get('hr.attendance')
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
att_obj = self.pool.get('hr.attendance')
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
emp_id = data['emp_id']
|
||||
att_id = att_obj.search(cr, uid, [('employee_id', '=', emp_id)], limit=1, order='name desc')
|
||||
last_att = att_obj.read(cr, uid, att_id)
|
||||
last_att = att_obj.browse(cr, uid, att_id)
|
||||
if last_att:
|
||||
last_att = last_att[0]
|
||||
cond = not last_att or last_att['action'] == 'sign_out'
|
||||
cond = not last_att or last_att.action == 'sign_out'
|
||||
if cond:
|
||||
return self.sign_in(cr, uid, data, context)
|
||||
else:
|
||||
|
@ -114,13 +110,12 @@ class hr_sign_in_out(osv.osv_memory):
|
|||
}
|
||||
|
||||
def so_check(self, cr, uid, ids, context=None):
|
||||
|
||||
att_obj = self.pool.get('hr.attendance')
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
att_obj = self.pool.get('hr.attendance')
|
||||
emp_id = data['emp_id']
|
||||
att_id = att_obj.search(cr, uid, [('employee_id', '=', emp_id),('action','!=','action')], limit=1, order='name desc')
|
||||
last_att = att_obj.read(cr, uid, att_id)
|
||||
last_att = att_obj.browse(cr, uid, att_id, context=context)
|
||||
if last_att:
|
||||
last_att = last_att[0]
|
||||
if not att_id and not last_att:
|
||||
|
@ -153,12 +148,11 @@ class hr_sign_in_out(osv.osv_memory):
|
|||
}
|
||||
|
||||
def sign_in(self, cr, uid, data, context=None):
|
||||
att_obj = self.pool.get('hr.attendance')
|
||||
emp_id = data['emp_id']
|
||||
if 'last_time' in data:
|
||||
if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'):
|
||||
raise osv.except_osv(_('UserError'), _('The sign-out date must be in the past'))
|
||||
att_obj.create(cr, uid, {
|
||||
self.pool.get('hr.attendance').create(cr, uid, {
|
||||
'name': data['last_time'],
|
||||
'action': 'sign_out',
|
||||
'employee_id': emp_id
|
||||
|
@ -170,12 +164,12 @@ class hr_sign_in_out(osv.osv_memory):
|
|||
return {} # To do: Return Success message
|
||||
|
||||
def sign_out(self, cr, uid, data, context=None):
|
||||
att_obj = self.pool.get('hr_attendance')
|
||||
|
||||
emp_id = data['emp_id']
|
||||
if 'last_time' in data:
|
||||
if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'):
|
||||
raise osv.except_osv(_('UserError'), _('The Sign-in date must be in the past'))
|
||||
att_obj.create(cr, uid, {'name':data['last_time'], 'action':'sign_in', 'employee_id':emp_id})
|
||||
self.pool.get('hr.attendance').create(cr, uid, {'name':data['last_time'], 'action':'sign_in', 'employee_id':emp_id})
|
||||
try:
|
||||
success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_out')
|
||||
except:
|
||||
|
@ -184,4 +178,4 @@ class hr_sign_in_out(osv.osv_memory):
|
|||
|
||||
hr_sign_in_out()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_hr_attendance_sigh_in_out" model="ir.ui.view">
|
||||
<record id="view_hr_attendance_sigh_in_out" model="ir.ui.view">
|
||||
<field name="name">hr.sign.in.out.form</field>
|
||||
<field name="model">hr.sign.in.out</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sign in / Sign out">
|
||||
<group colspan="4" >
|
||||
<separator string="You are now ready to sign in or out of the attendance follow up" colspan="4" />
|
||||
<field name="name" />
|
||||
<field name="state" />
|
||||
</group>
|
||||
<group colspan="4" >
|
||||
<separator string="You are now ready to sign in or out of the attendance follow up" colspan="4" />
|
||||
<field name="name" />
|
||||
<field name="state" />
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-go-back" string="Sign in" name="si_check" type="object"/>
|
||||
<button icon="gtk-go-forward" string="Sign out" name="so_check" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-go-back" string="Sign in" name="si_check" type="object"/>
|
||||
<button icon="gtk-go-forward" string="Sign out" name="so_check" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -27,15 +27,15 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Sign in / Sign out">
|
||||
<label string="Sign-Out Entry must follow Sign-In." colspan="4" />
|
||||
<label string="Sign-Out Entry must follow Sign-In." colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Ok"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_hr_attendance_sigh_in_out" model="ir.actions.act_window">
|
||||
<record id="action_hr_attendance_sigh_in_out" model="ir.actions.act_window">
|
||||
<field name="name">Sign in / Sign out</field>
|
||||
<field name="res_model">hr.sign.in.out</field>
|
||||
<field name="view_type">form</field>
|
||||
|
@ -45,8 +45,8 @@
|
|||
</record>
|
||||
|
||||
<menuitem action="action_hr_attendance_sigh_in_out"
|
||||
id="menu_hr_attendance_sigh_in_out"
|
||||
parent="menu_hr_time_tracking" groups="base.group_extended" />
|
||||
id="menu_hr_attendance_sigh_in_out"
|
||||
parent="menu_hr_time_tracking"/>
|
||||
|
||||
<record id="view_hr_attendance_so_ask" model="ir.ui.view">
|
||||
<field name="name">hr.sign.in.out.ask.form</field>
|
||||
|
@ -54,14 +54,14 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="hr.sign.out.ask">
|
||||
<group colspan="4" >
|
||||
<separator string="You did not sign out the last time. Please enter the date and time you signed out." colspan="4" />
|
||||
<field name="name" />
|
||||
<field name="last_time" string="Your last sign out" />
|
||||
</group>
|
||||
<group colspan="4" >
|
||||
<separator string="You did not sign out the last time. Please enter the date and time you signed out." colspan="4" />
|
||||
<field name="name" />
|
||||
<field name="last_time" string="Your last sign out" />
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-go-back" string="Sign in" name="sign_in" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-go-back" string="Sign in" name="sign_in" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -73,14 +73,14 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="hr.sign.in.out.ask">
|
||||
<group colspan="4" >
|
||||
<separator string="You did not sign in the last time. Please enter the date and time you signed in." colspan="4" />
|
||||
<field name="name" />
|
||||
<field name="last_time" string="Your last sign in" />
|
||||
</group>
|
||||
<group colspan="4" >
|
||||
<separator string="You did not sign in the last time. Please enter the date and time you signed in." colspan="4" />
|
||||
<field name="name" />
|
||||
<field name="last_time" string="Your last sign in" />
|
||||
</group>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-go-back" string="Sign out" name="sign_out" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-go-back" string="Sign out" name="sign_out" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -27,11 +27,11 @@ class hr_employee(osv.osv):
|
|||
_description = "Employee"
|
||||
_inherit = "hr.employee"
|
||||
_columns = {
|
||||
'manager': fields.boolean('Manager'),
|
||||
'manager': fields.boolean('Is a Manager'),
|
||||
'medic_exam': fields.date('Medical Examination Date'),
|
||||
'place_of_birth': fields.char('Place of Birth', size=30),
|
||||
'children': fields.integer('Number of Children'),
|
||||
'vehicle': fields.integer('Company Vehicle'),
|
||||
'vehicle': fields.char('Company Vehicle', size=64),
|
||||
'vehicle_distance': fields.integer('Home-Work Distance', help="In kilometers"),
|
||||
'contract_ids': fields.one2many('hr.contract', 'employee_id', 'Contracts'),
|
||||
}
|
||||
|
|
|
@ -69,47 +69,6 @@
|
|||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<notebook position="inside">
|
||||
<page string="Contracts">
|
||||
<field colspan="4" mode="form,tree" name="contract_ids" nolabel="1">
|
||||
<tree string="Contracts">
|
||||
<field name="name"/>
|
||||
<field name="job_id"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="working_hours"/>
|
||||
<field name="wage_type_id"/>
|
||||
<field name="wage"/>
|
||||
</tree>
|
||||
<form string="Contract">
|
||||
<group colspan="3" col="6">
|
||||
<field name="name" select="1"/>
|
||||
<field name="job_id"/>
|
||||
<newline/>
|
||||
<field name="wage"/>
|
||||
<field name="wage_type_id" widget="selection"/>
|
||||
<field name="type_id" widget="selection"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Main Data">
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Duration"/>
|
||||
<field name="date_start" select="1"/>
|
||||
<field name="date_end" select="1"/>
|
||||
<field name="working_hours"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Advantages"/>
|
||||
<field name="advantages_net"/>
|
||||
<field name="advantages_gross"/>
|
||||
<field name="advantages" nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field colspan="4" name="notes" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Miscelleanous">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Personal Info" colspan="2"/>
|
||||
|
@ -122,7 +81,6 @@
|
|||
<field name="manager" select="1"/>
|
||||
<field name="vehicle" select="1"/>
|
||||
<field name="vehicle_distance" select="1"/>
|
||||
<field name="medic_exam" select="1"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Others Info" colspan="2"/>
|
||||
|
@ -140,15 +98,15 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Search Contract">
|
||||
<group col='15' colspan='4'>
|
||||
<field name="name"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="name"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Wage Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'wage_type_id'}"/>
|
||||
</group>
|
||||
<filter string="Wage Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'wage_type_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -246,8 +204,7 @@
|
|||
</record>
|
||||
<menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56"/>
|
||||
|
||||
<!--<menuitem id="hr_menu_contract_main" parent="hr.menu_hr_root" name="Contracts" sequence="3"/> -->
|
||||
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_root" name="Contracts" sequence="4"/>
|
||||
<menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_main" name="Contracts" sequence="4"/>
|
||||
|
||||
<!-- Contracts Button on Employee Form -->
|
||||
<act_window domain="[('employee_id', '=', active_id)]" id="act_hr_employee_2_hr_contract" name="Contracts" res_model="hr.contract" src_model="hr.employee"/>
|
||||
|
|
|
@ -8,5 +8,8 @@
|
|||
"access_hr_contract_user","hr.contract user","model_hr_contract","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_contract","hr.contract","model_hr_contract","group_hr_contract",1,1,1,1
|
||||
"access_hr_employee_contract","hr.employee contract","hr.model_hr_employee","group_hr_contract",1,0,0,0
|
||||
"access_hr_resource_contract","hr.employee.resource contract","resource.model_resource_resource","group_hr_contract",1,0,0,0
|
||||
"access_hr_resource_calendar_contract","hr.employee.resource.calendar contract","resource.model_resource_calendar","group_hr_contract",1,0,0,0
|
||||
"access_hr_job_contract","hr.employee.job contract","hr.model_hr_job","group_hr_contract",1,0,0,0
|
||||
"access_hr_contract_type_user","hr.contract.type user","model_hr_contract_type","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_contract_type","hr.contract.type","model_hr_contract_type","group_hr_contract",1,1,1,1
|
||||
|
|
|
|
@ -257,7 +257,7 @@
|
|||
/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<field name="employee_id" widget="selection" select="1"/>
|
||||
<field name="employee_id" select="1"/>
|
||||
<field name="plan_id" widget="selection" select="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
|
@ -349,8 +349,8 @@
|
|||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-gnome-cpu-frequency-applet+" string="Late" domain="[('date_deadline','<',current_date)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_to_review_id" widget="selection"/>
|
||||
<field name="user_id" string="Interviewer" widget="selection"/>
|
||||
<field name="user_to_review_id"/>
|
||||
<field name="user_id" string="Interviewer"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_hr_evaluation_evaluation","hr_evaluation.evaluation","model_hr_evaluation_evaluation","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_evaluation_manager","hr_evaluation.evaluation","model_hr_evaluation_evaluation","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_evaluation","hr_evaluation.evaluation","model_hr_evaluation_evaluation","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_evaluation_plan","hr_evaluation.plan","model_hr_evaluation_evaluation","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_plan_manager","hr_evaluation.plan","model_hr_evaluation_plan","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_plan_phase","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_plan_phase_manager","hr_evaluation.plan.phase","model_hr_evaluation_plan_phase","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_interview","hr.evaluation.interview","model_hr_evaluation_interview","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_interview_manager","hr.evaluation.interview","model_hr_evaluation_interview","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_report","hr.evaluation.report","model_hr_evaluation_report",,1,0,0,0
|
||||
"access_hr_evaluation_reminder_manager","hr.evaluation.reminder","model_hr_evaluation_reminder","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_evaluation_reminder","hr.evaluation.reminder","model_hr_evaluation_reminder","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_evaluation_interview","hr.evaluation.interview","model_hr_evaluation_interview","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_evaluation_report","hr.evaluation.report","model_hr_evaluation_report","hr.group_hr_manager",1,0,0,0
|
||||
"access_hr_evaluation_reminder","hr.evaluation.reminder","model_hr_evaluation_reminder","hr.group_hr_user",1,1,1,1
|
||||
|
|
|
|
@ -145,8 +145,8 @@
|
|||
<separator orientation="vertical"/>
|
||||
<field name="name" select='1'/>
|
||||
<field name="date" select='1'/>
|
||||
<field name="user_id" select="1" widget="selection" string="User">
|
||||
<filter icon="terp-personal+"
|
||||
<field name="user_id" select="1" string="User">
|
||||
<filter icon="terp-personal+"
|
||||
domain="[('department_id','=',context.get('department_id',False))]"
|
||||
string="Expenses of My Department"/>
|
||||
</field>
|
||||
|
@ -183,7 +183,7 @@
|
|||
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<field groups="base.group_extended" name="rental" position="after">
|
||||
<field name="purchase_ok" position="after">
|
||||
<field name="hr_expense_ok"/>
|
||||
</field>
|
||||
</field>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<filter icon="terp-camera_test" domain="[('state','=','validate')]" string="Validated"
|
||||
default="context.get('report', False)"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" widget="selection"/>
|
||||
<field name="user_id"/>
|
||||
<field name="department_id" widget="selection">
|
||||
<filter icon="terp-personal+" help="My Department Holidays"
|
||||
domain="[('department_id.manager_id','=',uid)]"
|
||||
|
|
|
@ -9,3 +9,4 @@
|
|||
"access_available_holidays_report","hr.available.holidays.report","model_available_holidays_report","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_holidays_report_user","hr.holidays.report","model_hr_holidays_report","hr.group_hr_user",1,0,0,0
|
||||
"access_available_holidays_report_user","hr.available.holidays.report","model_available_holidays_report","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_holidays_summary_dept","hr.holidays.summary.dept","model_hr_holidays_summary_dept","hr.group_hr_manager",1,1,1,1
|
||||
|
|
|
|
@ -80,6 +80,9 @@ class hr_applicant(osv.osv, crm.crm_case):
|
|||
# 'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
# domain="[('section_id','=',section_id),\
|
||||
# ('object_id.model', '=', 'crm.opportunity')]"),
|
||||
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.opportunity')]"),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
|
@ -98,8 +101,6 @@ class hr_applicant(osv.osv, crm.crm_case):
|
|||
'partner_name': fields.char("Applicant's Name", size=64),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'partner_mobile': fields.char('Mobile', size=32),
|
||||
# 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'hr.applicant')]"),
|
||||
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage'),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Degree', domain="[('section_id','=',section_id),('object_id.model', '=', 'hr.applicant')]"),
|
||||
'department_id':fields.many2one('hr.department', 'Department'),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
<field name="object_id" search="[('model','=','hr.applicant')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!-- STAGE(stage_id) -->
|
||||
|
||||
<record model="hr.recruitment.stage" id="stage_job1">
|
||||
<field name="name">Initial Jobs Demand</field>
|
||||
<field name="sequence">1</field>
|
||||
|
|
|
@ -13,23 +13,22 @@
|
|||
# ------------------------------------------------------
|
||||
|
||||
<record id="hr_job_categ_action" model="ir.actions.act_window">
|
||||
<field name="name">Applicant Categories</field>
|
||||
<field name="res_model">crm.case.categ</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
|
||||
<field name="domain">[('object_id.model', '=', 'hr.applicant')]</field>
|
||||
<field name="context">{'object_id':'hr.applicant'}</field>
|
||||
<field name="name">Applicant Categories</field>
|
||||
<field name="res_model">crm.case.categ</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
|
||||
<field name="domain">[('object_id.model', '=', 'hr.applicant')]</field>
|
||||
<field name="context">{'object_id':'hr.applicant'}</field>
|
||||
</record>
|
||||
# ------------------------------------------------------
|
||||
# Stage
|
||||
# ------------------------------------------------------
|
||||
<record id="hr_job_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Applicant Stages</field>
|
||||
<field name="res_model">crm.case.stage</field>
|
||||
<field name="res_model">hr.recruitment.stage</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_stage_tree"/>
|
||||
<field name="domain">[('object_id.model', '=', 'hr.applicant')]</field>
|
||||
<field name="context">{'object_id':'hr.applicant'}</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="context">{}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="hr_job_stage_act" id="menu_hr_job_stage_act" name="Stages" parent="menu_hr_config_applicant"/>
|
||||
|
@ -89,9 +88,10 @@
|
|||
</group>
|
||||
<field name="user_id"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<button name="action_makeMeeting" type="object" string="Schedule Meeting" icon="terp-hr"/>
|
||||
<button name="action_print_survey" string="Print Interview" type="object" icon="gtk-print" attrs="{'readonly':[('survey','=',False)]}"/>
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Interview Question" type="action" icon="gtk-execute" context="{'survey_id': survey, 'response_id': [response], 'response_no':0 ,'active' : response, 'object' : 'hr.applicant', 'cur_id' :active_id}" attrs="{'readonly':[('survey','=',False)]}" groups="base.group_extended"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Job Info">
|
||||
<group col="2" colspan="2">
|
||||
|
@ -183,9 +183,9 @@
|
|||
</tree>
|
||||
</field>
|
||||
<button colspan="4" string="Send New Email"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'hr.applicant'}"
|
||||
icon="gtk-go-forward" type="action" />
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'hr.applicant'}"
|
||||
icon="gtk-go-forward" type="action" />
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
|
@ -278,56 +278,56 @@
|
|||
|
||||
<!-- Stage Tree View -->
|
||||
|
||||
<record model="ir.ui.view" id="hr_recruitment_stage_tree">
|
||||
<field name="name">hr.recruitment.stage.tree</field>
|
||||
<field name="model">hr.recruitment.stage</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Stages">
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="hr_recruitment_stage_tree">
|
||||
<field name="name">hr.recruitment.stage.tree</field>
|
||||
<field name="model">hr.recruitment.stage</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Stages">
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Stage Form View -->
|
||||
|
||||
<record model="ir.ui.view" id="hr_recruitment_stage_form">
|
||||
<field name="name">hr.recruitment.stage.form</field>
|
||||
<field name="model">hr.recruitment.stage</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stage">
|
||||
<separator string="Stage Definition" colspan="4"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<separator string="Requirements" colspan="4"/>
|
||||
<field name="requirements" nolabel="1" colspan="4"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="hr_recruitment_stage_form">
|
||||
<field name="name">hr.recruitment.stage.form</field>
|
||||
<field name="model">hr.recruitment.stage</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stage">
|
||||
<separator string="Stage Definition" colspan="4"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="sequence"/>
|
||||
<separator string="Requirements" colspan="4"/>
|
||||
<field name="requirements" nolabel="1" colspan="4"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Stage Action -->
|
||||
|
||||
<record id="hr_recruitment_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Stages</field>
|
||||
<field name="res_model">hr.recruitment.stage</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="hr_recruitment_stage_tree"/>
|
||||
</record>
|
||||
<record id="hr_recruitment_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Stages</field>
|
||||
<field name="res_model">hr.recruitment.stage</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="hr_recruitment_stage_tree"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_hr_recruitment_recruitment"
|
||||
name="Recruitment"
|
||||
parent="hr.menu_hr_configuration"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_hr_recruitment_recruitment"
|
||||
name="Recruitment"
|
||||
parent="hr.menu_hr_configuration"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_hr_recruitment_stage"
|
||||
name="Stages"
|
||||
parent="menu_hr_recruitment_recruitment"
|
||||
action="hr_recruitment_stage_act"
|
||||
sequence="1"/>
|
||||
<menuitem
|
||||
id="menu_hr_recruitment_stage"
|
||||
name="Stages"
|
||||
parent="menu_hr_recruitment_recruitment"
|
||||
action="hr_recruitment_stage_act"
|
||||
sequence="1"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_hr_applicant","hr.applicant","model_hr_applicant","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_recruitment_report","hr.recruitment.report","model_hr_recruitment_report",,1,0,0,0
|
||||
"access_hr_applicant","hr.applicant","model_hr_applicant","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_recruitment_report","hr.recruitment.report","model_hr_recruitment_report","hr.group_hr_manager",1,0,0,0
|
||||
|
|
|
|
@ -1,4 +1,8 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_hr_analytic_timesheet","hr.analytic.timesheet","model_hr_analytic_timesheet","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_account_analytic_line","account.account.analytic.line","account.model_account_analytic_line","hr.group_hr_user",1,1,1,0
|
||||
"access_account_analytic_journal","account.account.analytic.journal","account.model_account_analytic_journal","hr.group_hr_user",1,0,0,0
|
||||
"access_account_analytic_journal","account.account.analytic.journal","account.model_account_analytic_journal","hr.group_hr_user",1,0,0,0
|
||||
"access_hr_sign_in_project","hr.sign.in.project","model_hr_sign_in_project","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_sign_out_project","hr.sign.out.project","model_hr_sign_out_project","hr.group_hr_user",1,1,1,1
|
||||
"access_hr_analytal_timesheet_employee","hr.analytical.timesheet.employee","model_hr_analytical_timesheet_employee","hr.group_hr_manager",1,1,1,1
|
||||
"access_hr_analytal_timesheet_user","hr.analytical.timesheet.user","model_hr_analytical_timesheet_users","hr.group_hr_user",1,1,1,1
|
||||
|
|
|
|
@ -1,10 +1,9 @@
|
|||
- |
|
||||
In order to test hr_timesheet Module in OpenERP, I make "Sign In or Sign Out for Project" to encode and
|
||||
track time spent on the different projects.
|
||||
|
||||
|
||||
- |
|
||||
Now, I create a new employee “Mark Johnson” to test Timesheet.
|
||||
|
||||
-
|
||||
!record {model: hr.employee, id: hr_employee_employee0}:
|
||||
address_home_id: base.res_partner_address_1
|
||||
|
@ -13,41 +12,43 @@
|
|||
marital: hr.hr_employee_marital_status_single
|
||||
name: Mark Johnson
|
||||
user_id: base.user_root
|
||||
|
||||
|
||||
- |
|
||||
I start by "Sign In/Sign Out by Project" wizard and click on "Sign In/Sign Out" button of this wizard.
|
||||
I create new user "user1" which is assigned to employee.
|
||||
-
|
||||
!python {model: hr.sign.in.project}: |
|
||||
self.check_state(cr, uid, [ref("hr_employee_employee0")])
|
||||
!record {model: res.users, id: res_users_user0}:
|
||||
company_id: base.main_company
|
||||
context_lang: en_US
|
||||
groups_id:
|
||||
- hr.group_hr_user
|
||||
- hr_attendance.group_hr_attendance
|
||||
- base.group_user
|
||||
- base.group_extended
|
||||
- hr.group_hr_manager
|
||||
login: user1
|
||||
name: user1
|
||||
password: user1
|
||||
|
||||
- |
|
||||
I select start date and Perform start work on project.
|
||||
I create another employee "Francline" as "user1".
|
||||
-
|
||||
!record {model: hr.sign.in.project, id: hr_employee_employee0}:
|
||||
name: employee1
|
||||
server_date: '2010-05-20 16:10:59'
|
||||
state: absent
|
||||
!record {model: hr.employee, id: hr_employee_fracline1}:
|
||||
address_home_id: base.res_partner_address_8
|
||||
name: Francline
|
||||
parent_id: 'hr_employee_employee0'
|
||||
user_id: 'res_users_user0'
|
||||
|
||||
- |
|
||||
I click on "Start Working" button of this wizard to start work on Project.
|
||||
-
|
||||
!python {model: hr.sign.in.project}: |
|
||||
self.sign_in_result(cr, uid, [ref("hr_employee_employee0")], context)
|
||||
- |
|
||||
My work is done and I want to stop work.for that I click on "Sign In/Sign Out" button of "Sign In/Sign Out by Project" wizard.
|
||||
Which check state in hr attendace form for user.
|
||||
-
|
||||
!python {model: hr.sign.in.project}: |
|
||||
obj_attendance = self.pool.get('hr.employee')
|
||||
emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "employee1")])
|
||||
if emp_id:
|
||||
employee = obj_attendance.read(cr, uid, emp_id)[0]
|
||||
self.write(cr, uid, [ref('hr_employee_employee0')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]})
|
||||
self.check_state(cr, uid, [ref("hr_employee_employee0")], {"active_ids": [ref("hr_timesheet.menu_hr_timesheet_sign_in")]
|
||||
})
|
||||
Given that I have Timesheet journal for employee.
|
||||
-
|
||||
!record {model: account.analytic.journal, id: analytic_journal}:
|
||||
code: TS
|
||||
name: Timesheet Journal
|
||||
type: general
|
||||
|
||||
- |
|
||||
Given that I have product for "Consultancy - Senior Developer".
|
||||
|
||||
-
|
||||
-
|
||||
!record {model: product.product, id: product_consultant}:
|
||||
categ_id: product.product_category_10
|
||||
default_code: DEV
|
||||
|
@ -62,35 +63,95 @@
|
|||
uom_po_id: product.uom_hour
|
||||
|
||||
- |
|
||||
I assing product and journal to "Mark Johnson"
|
||||
-
|
||||
I assing product and journal to "Mark Johnson"
|
||||
-
|
||||
!record {model: hr.employee, id: hr_employee_employee0}:
|
||||
product_id: product_consultant
|
||||
journal_id: analytic_journal
|
||||
product_id: product_consultant
|
||||
|
||||
- |
|
||||
This will Open "hr sign out project" form. I select analytical project2 development account.
|
||||
-
|
||||
!record {model: hr.sign.out.project, id: hr_employee_employee0}:
|
||||
account_id: account.analytic_project_2_development
|
||||
analytic_amount: 7.0
|
||||
date: '2010-05-21 16:40:00'
|
||||
date_start: '2010-05-19 16:37:00'
|
||||
info: Create Yaml for hr module
|
||||
name: Mark Johnson
|
||||
server_date: '2010-05-19 16:40:15'
|
||||
state: present
|
||||
|
||||
And also assing product and journal to "francline" employee.
|
||||
-
|
||||
!record {model: hr.employee, id: hr_employee_fracline1}:
|
||||
product_id: product_consultant
|
||||
journal_id: analytic_journal
|
||||
- |
|
||||
My work for this project is over and I stop work by click on "Stop Work" button of this wizard.
|
||||
-
|
||||
!python {model: hr.sign.out.project}: |
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid), ('name', '=', 'employee1')])
|
||||
if emp_id:
|
||||
employee = emp_obj.read(cr, uid, emp_id)[0]
|
||||
self.write(cr, uid, [ref('hr_employee_employee0')], {'emp_id': emp_id[0] })
|
||||
#self.sign_out_result(cr, uid, [ref('hr_employee_employee0')])
|
||||
Now , When I came in office , I create Attendances and perform "Sign In" action with proper reason.
|
||||
-
|
||||
!record {model: hr.attendance, id: hr_attendance_0}:
|
||||
action: sign_in
|
||||
employee_id: 'hr_employee_fracline1'
|
||||
name: '2010-05-26 10:08:08'
|
||||
|
||||
- |
|
||||
I can see employee timesheet for particular month using "Employee Timesheet" report.
|
||||
When I left office , I create attendance and perform "Sign Out".
|
||||
-
|
||||
!record {model: hr.attendance, id: hr_attendance_1}:
|
||||
action: sign_out
|
||||
employee_id: 'hr_employee_fracline1'
|
||||
name: '2010-05-26 15:10:55'
|
||||
|
||||
|
||||
- |
|
||||
I start by "Sign In/Sign Out by Project" wizard and click on "Sign In/Sign Out" button of this wizard.
|
||||
-
|
||||
!python {model: hr.sign.in.project}: |
|
||||
uid = ref('res_users_user0')
|
||||
self.check_state(cr, uid, [ref("hr_employee_fracline1")], {"active_ids": [ref("hr_timesheet.menu_hr_timesheet_sign_in")]})
|
||||
- |
|
||||
I select start date and Perform start work on project.
|
||||
-
|
||||
!record {model: hr.sign.in.project, id: hr_sign_in_project_francline0}:
|
||||
emp_id: 'hr_employee_fracline1'
|
||||
name: Francline
|
||||
server_date: '2010-06-08 19:50:54'
|
||||
state: absent
|
||||
|
||||
|
||||
- |
|
||||
I click on "Start Working" button of this wizard to start work on Project.
|
||||
-
|
||||
!python {model: hr.sign.in.project}: |
|
||||
uid = ref('res_users_user0')
|
||||
obj_attendance = self.pool.get('hr.employee')
|
||||
emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Francline")])
|
||||
if emp_id:
|
||||
employee = obj_attendance.read(cr, uid, emp_id)[0]
|
||||
self.write(cr, uid, [ref('hr_sign_in_project_francline0')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]})
|
||||
#self.sign_in_result(cr, uid, [ref("hr_sign_in_project_francline0")], context)
|
||||
|
||||
- |
|
||||
My work is done and I want to stop work.for that I click on "Sign In/Sign Out" button of "Sign In/Sign Out by Project" wizard.
|
||||
Which check state in hr attendace form for user.
|
||||
-
|
||||
!python {model: hr.sign.in.project}: |
|
||||
uid = ref('res_users_user0')
|
||||
self.check_state(cr, uid, [ref("hr_sign_in_project_francline0")], {"active_ids": [ref("hr_timesheet.menu_hr_timesheet_sign_in")]
|
||||
})
|
||||
|
||||
- |
|
||||
This will Open "hr sign out project" form. I select analytical project2 development account.
|
||||
-
|
||||
!record {model: hr.sign.out.project, id: hr_sign_out_project_francline0}:
|
||||
account_id: account.analytic_project_2_development
|
||||
analytic_amount: 7.0
|
||||
date: '2010-05-25 16:40:00'
|
||||
date_start: '2010-06-05 16:37:00'
|
||||
info: Create Yaml for hr module
|
||||
name: Francline
|
||||
server_date: '2010-06-09 16:40:15'
|
||||
state: present
|
||||
|
||||
- |
|
||||
My work for this project is over and I stop work by click on "Stop Work" button of this wizard.
|
||||
-
|
||||
!python {model: hr.sign.out.project}: |
|
||||
uid = ref('res_users_user0')
|
||||
obj_attendance = self.pool.get('hr.employee')
|
||||
emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Francline")])
|
||||
if emp_id:
|
||||
employee = obj_attendance.read(cr, uid, emp_id)[0]
|
||||
self.write(cr, uid, [ref('hr_sign_out_project_francline0')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]})
|
||||
#self.sign_out_result_end(cr, uid, [ref('hr_sign_out_project_francline0')])
|
||||
|
||||
- |
|
||||
I can see employee timesheet for particular month using "Employee Timesheet" report.
|
||||
|
|
|
@ -35,22 +35,26 @@ class hr_so_project(osv.osv_memory):
|
|||
'name': fields.char('Employees name', size=32, required=True, readonly=True),
|
||||
'state': fields.char('Current state', size=32, required=True, readonly=True),
|
||||
'server_date': fields.datetime('Current Date', required=True, readonly=True),
|
||||
'emp_id': fields.char('Employee ID', size=256, required=False),
|
||||
'emp_id': fields.many2one('hr.employee', 'Employee ID')
|
||||
}
|
||||
|
||||
|
||||
def _get_empid(self, cr, uid, context=None):
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
|
||||
if emp_id:
|
||||
employee = emp_obj.read(cr, uid, emp_id)[0]
|
||||
return {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0], 'server_date':time.strftime('%Y-%m-%d %H:%M:%S')}
|
||||
raise osv.except_osv(_('UserError'), _('No employee defined for your user !'))
|
||||
for employee in emp_obj.browse(cr, uid, emp_id):
|
||||
return {'name': employee.name, 'state': employee.state, 'emp_id': emp_id[0], 'server_date':time.strftime('%Y-%m-%d %H:%M:%S')}
|
||||
|
||||
def _get_empid2(self, cr, uid, context):
|
||||
|
||||
res = self._get_empid(cr, uid, context)
|
||||
cr.execute('select name,action from hr_attendance where employee_id=%s order by name desc limit 1', (res['emp_id'],))
|
||||
|
||||
res['server_date'] = time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
res['date_start'] = cr.fetchone()[0]
|
||||
date_start = cr.fetchone()
|
||||
|
||||
if date_start:
|
||||
res['date_start'] = date_start[0]
|
||||
return res
|
||||
|
||||
def default_get(self, cr, uid, fields_list, context=None):
|
||||
|
@ -67,11 +71,13 @@ class hr_so_project(osv.osv_memory):
|
|||
if minimum:
|
||||
hour = round(round((hour + minimum / 2) / minimum) * minimum, 2)
|
||||
res = timesheet_obj.default_get(cr, uid, ['product_id','product_uom_id'])
|
||||
|
||||
if not res['product_uom_id']:
|
||||
raise osv.except_osv(_('UserError'), _('No cost unit defined for this employee !'))
|
||||
up = timesheet_obj.on_change_unit_amount(cr, uid, False, res['product_id'], hour, res['product_uom_id'])['value']
|
||||
|
||||
res['name'] = data['info']
|
||||
res['account_id'] = data['account_id']
|
||||
res['account_id'] = data['account_id'].id
|
||||
res['unit_amount'] = hour
|
||||
emp_journal = emp_obj.browse(cr, uid, emp_id, context).journal_id
|
||||
res['journal_id'] = emp_journal and emp_journal.id or False
|
||||
|
@ -79,39 +85,60 @@ class hr_so_project(osv.osv_memory):
|
|||
up = timesheet_obj.on_change_account_id(cr, uid, [], res['account_id']).get('value', {})
|
||||
res.update(up)
|
||||
return timesheet_obj.create(cr, uid, res, context=context)
|
||||
|
||||
|
||||
def sign_out_result_end(self, cr, uid, ids, context=None):
|
||||
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
emp_id = data['emp_id']
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], type='sign_out',dt=data['date'])
|
||||
self._write(cr, uid, data, emp_id, context=context)
|
||||
|
||||
for data in self.browse(cr, uid, ids):
|
||||
emp_id = data.emp_id.id
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], type='sign_out',dt=data.date)
|
||||
self._write(cr, uid, data, emp_id, context=context)
|
||||
return {}
|
||||
|
||||
def sign_out_result(self, cr, uid, ids, context=None):
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
emp_id = data['emp_id']
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], type='action', dt=data['date'])
|
||||
self._write(cr, uid, data, emp_id, context=context)
|
||||
|
||||
for data in self.browse(cr, uid, ids):
|
||||
emp_id = data.emp_id.id
|
||||
emp_obj.attendance_action_change(cr, uid, [emp_id], type='action', dt=data.date)
|
||||
self._write(cr, uid, data, emp_id, context=context)
|
||||
return {}
|
||||
|
||||
hr_so_project()
|
||||
|
||||
class hr_si_project(osv.osv_memory):
|
||||
|
||||
_name = 'hr.sign.in.project'
|
||||
_description = 'Sign In By Project'
|
||||
_columns = {
|
||||
'name': fields.char('Employees name', size=32, required=True, readonly=True),
|
||||
'state': fields.char('Current state', size=32, required=True, readonly=True),
|
||||
'name': fields.char('Employees name', size=32, readonly=True),
|
||||
'state': fields.char('Current state', size=32, readonly=True),
|
||||
'date': fields.datetime('Starting Date'),
|
||||
'server_date': fields.datetime('Current Date', required=True, readonly=True),
|
||||
'emp_id': fields.char('Employee ID', size=512, required=False),
|
||||
'server_date': fields.datetime('Current Date', readonly=True),
|
||||
# 'emp_id': fields.char('Employee ID', size=512, required=False),
|
||||
'emp_id': fields.many2one('hr.employee', 'Employee ID')
|
||||
}
|
||||
|
||||
def view_init(self, cr, uid, fields, context=None):
|
||||
"""
|
||||
This function checks for precondition before wizard executes
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param fields: List of fields for default value
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
|
||||
if not emp_id:
|
||||
raise osv.except_osv(_('UserError'), _('No employee defined for your user !'))
|
||||
return False
|
||||
|
||||
def check_state(self, cr, uid, ids, context=None):
|
||||
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
emp_id = self._get_empid(cr, uid, context)['emp_id']
|
||||
emp_id = self.default_get(cr, uid, context)['emp_id']
|
||||
# get the latest action (sign_in or out) for this employee
|
||||
cr.execute('select action from hr_attendance where employee_id=%s and action in (\'sign_in\',\'sign_out\') order by name desc limit 1', (emp_id,))
|
||||
res = (cr.fetchone() or ('sign_out',))[0]
|
||||
|
@ -129,24 +156,20 @@ class hr_si_project(osv.osv_memory):
|
|||
'target': 'new'
|
||||
}
|
||||
|
||||
def _get_empid(self, cr, uid, context=None):
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
|
||||
if emp_id:
|
||||
employee = emp_obj.read(cr, uid, emp_id)[0]
|
||||
return {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0], 'server_date':time.strftime('%Y-%m-%d %H:%M:%S')}
|
||||
raise osv.except_osv(_('UserError'), _('No employee defined for your user !'))
|
||||
|
||||
def sign_in_result(self, cr, uid, ids, context):
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
data = self.read(cr, uid, ids, [], context)[0]
|
||||
emp_id = data['emp_id']
|
||||
success = emp_obj.attendance_action_change(cr, uid, [emp_id], type = 'sign_in' ,dt=data['date'] or False)
|
||||
for data in self.browse(cr, uid, ids, context):
|
||||
emp_id = data.emp_id.id
|
||||
success = emp_obj.attendance_action_change(cr, uid, [emp_id], type = 'sign_in' ,dt=data.date or False)
|
||||
return {}
|
||||
|
||||
def default_get(self, cr, uid, fields_list, context=None):
|
||||
res = super(hr_si_project, self).default_get(cr, uid, fields_list, context=context)
|
||||
res.update(self._get_empid(cr, uid, context=context))
|
||||
emp_obj = self.pool.get('hr.employee')
|
||||
emp_id = emp_obj.search(cr, uid, [('user_id', '=', uid)])
|
||||
if emp_id:
|
||||
for employee in emp_obj.browse(cr, uid, emp_id):
|
||||
res.update({'emp_id': employee.name, 'state': employee.state, 'emp_id': emp_id[0], 'server_date':time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return res
|
||||
|
||||
hr_si_project()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_account_analytic_account_form" model="ir.ui.view">
|
||||
<field name="name">account.analytic.account.form</field>
|
||||
<field name="model">account.analytic.account</field>
|
||||
|
@ -32,7 +32,7 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="hr_timesheet_line_form" model="ir.ui.view">
|
||||
<field name="name">hr.analytic.timesheet.form</field>
|
||||
<field name="model">hr.analytic.timesheet</field>
|
||||
|
@ -117,9 +117,9 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('to_invoice','<>',False)]</field>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_hr_analytic_timesheet_open_tree"
|
||||
id="menu_hr_analytic_timesheet_tree"
|
||||
<menuitem
|
||||
action="action_hr_analytic_timesheet_open_tree"
|
||||
id="menu_hr_analytic_timesheet_tree"
|
||||
parent="account.menu_finance_periodical_processing"/>
|
||||
|
||||
<record id="action_hr_analytic_timesheet_tree_invoiced" model="ir.actions.act_window">
|
||||
|
@ -178,9 +178,9 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="view_hr_timesheet_invoice_factor_tree"/>
|
||||
</record>
|
||||
<menuitem
|
||||
action="action_hr_timesheet_invoice_factor_form"
|
||||
id="hr_timesheet_invoice_factor_view"
|
||||
<menuitem
|
||||
action="action_hr_timesheet_invoice_factor_form"
|
||||
id="hr_timesheet_invoice_factor_view"
|
||||
parent="account.account_analytic_def_account"/>
|
||||
|
||||
</data>
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
"access_hr_timesheet_invoice_factor_acc_inv","hr_timesheet_invoice.factor.account.invoice","model_hr_timesheet_invoice_factor","account.group_account_invoice",1,1,1,1
|
||||
"access_report_analytic_account_close","report.analytic.account.close","model_report_analytic_account_close","account.group_account_manager",1,0,0,0
|
||||
"access_report_account_analytic_line_to_invoice","report.account.analytic.line.to.invoice","model_report_account_analytic_line_to_invoice","account.group_account_manager",1,0,0,0
|
||||
"access_report_timesheet_user","report_timesheet.user","model_report_timesheet_user","base.group_user",1,0,0,0
|
||||
"access_report_timesheet_account","report_timesheet.account","model_report_timesheet_account","base.group_user",1,0,0,0
|
||||
"access_report_timesheet_account_date","report_timesheet.account.date","model_report_timesheet_account_date","base.group_user",1,0,0,0
|
||||
"access_report_timesheet_invoice","report_timesheet.invoice","model_report_timesheet_invoice","base.group_user",1,0,0,0
|
||||
"access_report_random_timesheet","report_random_timesheet","model_report_random_timesheet","base.group_user",1,0,0,0
|
||||
"access_report_random_timesheet_lines","random_timesheet_lines","model_random_timesheet_lines","base.group_user",1,0,0,0
|
||||
"access_report_timesheet_user","report_timesheet.user","model_report_timesheet_user","hr.group_hr_manager",1,0,0,0
|
||||
"access_report_timesheet_account","report_timesheet.account","model_report_timesheet_account","hr.group_hr_manager",1,0,0,0
|
||||
"access_report_timesheet_account_date","report_timesheet.account.date","model_report_timesheet_account_date","hr.group_hr_manager",1,0,0,0
|
||||
"access_report_timesheet_invoice","report_timesheet.invoice","model_report_timesheet_invoice","hr.group_hr_manager",1,0,0,0
|
||||
"access_report_random_timesheet","report_random_timesheet","model_report_random_timesheet","hr.group_hr_manager",1,0,0,0
|
||||
"access_report_random_timesheet_lines","random_timesheet_lines","model_random_timesheet_lines","hr.group_hr_manager",1,0,0,0
|
||||
"access_hr_timesheet_analytic_profit","hr_timesheet_analytic_profit","model_hr_timesheet_analytic_profit","account.group_account_invoice",1,1,1,1
|
||||
|
|
|
|
@ -195,7 +195,7 @@
|
|||
<filter icon="terp-document-new" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
|
||||
<filter icon="terp-gtk-go-back-rtl" string="To Validate" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="user_id" select="1" widget="selection"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="date_from"/>
|
||||
<field name="department_id" widget="selection">
|
||||
<filter icon="terp-personal+"
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
</record>
|
||||
|
||||
<record id="process_node_invoiceonwork0" model="process.node">
|
||||
<field name="menu_id" ref="account.menu_finance_invoice"/>
|
||||
<field name="menu_id" ref="account.menu_finance_receivables"/>
|
||||
<field name="model_id" ref="account.model_account_invoice"/>
|
||||
<field eval=""""subflow"""" name="kind"/>
|
||||
<field eval=""""Invoice on Work"""" name="name"/>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue