commit
01d2dacf6f
|
@ -45,6 +45,9 @@
|
|||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to setup a new bank account.
|
||||
</p><p>
|
||||
Configure your company's bank account and select those that must
|
||||
appear on the report footer.
|
||||
</p><p>
|
||||
If you use the accounting application of OpenERP, journals and
|
||||
accounts will be created automatically based on these data.
|
||||
|
|
|
@ -169,7 +169,7 @@ class account_cash_statement(osv.osv):
|
|||
return result
|
||||
|
||||
_columns = {
|
||||
'total_entry_encoding': fields.function(_get_sum_entry_encoding, string="Total Cash Transactions",
|
||||
'total_entry_encoding': fields.function(_get_sum_entry_encoding, string="Total Transactions",
|
||||
store = {
|
||||
'account.bank.statement': (lambda self, cr, uid, ids, context=None: ids, ['line_ids','move_line_ids'], 10),
|
||||
'account.bank.statement.line': (_get_statement_from_line, ['amount'], 10),
|
||||
|
|
|
@ -163,8 +163,10 @@
|
|||
<sheet string="Supplier Invoice">
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<label string="Draft Invoice" attrs="{'invisible': [('state', '<>', 'draft')]}"/>
|
||||
<label string="Invoice" attrs="{'invisible': [('state', '=', 'draft')]}"/>
|
||||
<label string="Draft Invoice" attrs="{'invisible': ['|',('state','<>','draft'), ('type','<>','in_invoice')]}"/>
|
||||
<label string="Draft Refund" attrs="{'invisible': ['|',('state','<>','draft'), ('type','<>','in_refund')]}"/>
|
||||
<label string="Invoice" attrs="{'invisible': ['|',('state', '=', 'draft'), ('type','<>','in_invoice')]}"/>
|
||||
<label string="Refund" attrs="{'invisible': ['|',('state', '=', 'draft'), ('type','<>','in_refund')]}"/>
|
||||
<field name="number" class="oe_inline" attrs="{'invisible': [('state', '=', 'draft')]}"/>
|
||||
</h1>
|
||||
</div>
|
||||
|
@ -309,9 +311,11 @@
|
|||
</header>
|
||||
<sheet string="Invoice">
|
||||
<h1>
|
||||
<label string="Draft Invoice " attrs="{'invisible': [('state','not in',('draft',))]}"/>
|
||||
<label string="Draft Invoice " attrs="{'invisible': ['|',('state','not in',('draft',)), ('type','<>','out_invoice')]}"/>
|
||||
<label string="Draft Refund " attrs="{'invisible': ['|',('state','not in',('draft',)), ('type','<>','out_refund')]}"/>
|
||||
<label string="Pro Forma Invoice " attrs="{'invisible': [('state','not in',('proforma','proforma2'))]}"/>
|
||||
<label string="Invoice " attrs="{'invisible': [('state','in',('draft','proforma','proforma2'))]}"/>
|
||||
<label string="Invoice " attrs="{'invisible': ['|',('state','in',('draft','proforma','proforma2')), ('type','<>','out_invoice')]}"/>
|
||||
<label string="Refund " attrs="{'invisible': ['|',('state','in',('draft','proforma','proforma2')), ('type','<>','out_refund')]}"/>
|
||||
<field name="number" readonly="1" class="oe_inline"/>
|
||||
</h1>
|
||||
<field name="type" invisible="1"/>
|
||||
|
@ -347,7 +351,7 @@
|
|||
<field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}">
|
||||
<tree string="Invoice Lines" editable="bottom">
|
||||
<field name="invoice_line_tax_id" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="product_id" />
|
||||
<field name="name"/>
|
||||
<field name="account_id" groups="account.group_account_user"
|
||||
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
rml="account/report/account_print_invoice.rml"
|
||||
string="Invoices"
|
||||
attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"
|
||||
attachment_use="True"
|
||||
usage="default"
|
||||
/>
|
||||
<report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<record id="test_invoice_1" model="account.invoice">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="partner_id" ref="base.res_partner_asus"/>
|
||||
<field name="partner_id" ref="base.res_partner_1"/>
|
||||
<field name="journal_id" ref="account.sales_journal"/>
|
||||
<field name="state">draft</field>
|
||||
<field name="type">out_invoice</field>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<field name="date_invoice" eval="time.strftime('%Y')+'-01-01'"/>
|
||||
<field eval="14.0" name="amount_untaxed"/>
|
||||
<field eval="14.0" name="amount_total"/>
|
||||
<field name="partner_id" ref="base.res_partner_maxtor"/>
|
||||
<field name="partner_id" ref="base.res_partner_17"/>
|
||||
</record>
|
||||
<record id="demo_invoice_0_line_rpanrearpanelshe0" model="account.invoice.line">
|
||||
<field name="invoice_id" ref="demo_invoice_0"/>
|
||||
|
@ -26,10 +26,10 @@
|
|||
<field name="price_subtotal" eval="10.0" />
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="invoice_line_tax_id" eval="[(6,0,[])]"/>
|
||||
<field name="product_id" ref="product.product_product_rearpanelarm0"/>
|
||||
<field name="product_id" ref="product.product_product_39"/>
|
||||
<field name="quantity" eval="1.0" />
|
||||
<field name="partner_id" ref="base.res_partner_maxtor"/>
|
||||
<field name="name">[RPAN100] Rear Panel SHE100</field>
|
||||
<field name="partner_id" ref="base.res_partner_16"/>
|
||||
<field name="name">Toner Cartridge</field>
|
||||
</record>
|
||||
<record id="demo_invoice_0_line_rckrackcm0" model="account.invoice.line">
|
||||
<field name="invoice_id" ref="demo_invoice_0"/>
|
||||
|
@ -39,10 +39,10 @@
|
|||
<field name="price_subtotal" eval="4.0"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="invoice_line_tax_id" eval="[(6,0,[])]"/>
|
||||
<field name="product_id" ref="product.product_product_shelf1"/>
|
||||
<field name="product_id" ref="product.product_product_43"/>
|
||||
<field name="quantity" eval="1.0" />
|
||||
<field name="partner_id" ref="base.res_partner_maxtor"/>
|
||||
<field name="name">[RCK200] Rack 200cm</field>
|
||||
<field name="partner_id" ref="base.res_partner_17"/>
|
||||
<field name="name">Zed+ Antivirus</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -109,8 +109,8 @@
|
|||
<field name="zip" class="oe_inline" placeholder="ZIP"/>
|
||||
<field name="city" class="oe_inline" placeholder="City"/>
|
||||
</div>
|
||||
<field name="state_id" placeholder="State"/>
|
||||
<field name="country_id" placeholder="Country"/>
|
||||
<field name="state_id" placeholder="State" options='{"no_open": true}'/>
|
||||
<field name="country_id" placeholder="Country" options='{"no_open": true}'/>
|
||||
</div>
|
||||
</group>
|
||||
<group name="bank" string="Information About the Bank">
|
||||
|
|
|
@ -85,14 +85,14 @@
|
|||
<field name="parent_id" ref="analytic_integration"/>
|
||||
<field name="type">normal</field>
|
||||
<field name="state">open</field>
|
||||
<field name="partner_id" ref="base.res_partner_seagate"/>
|
||||
<field name="partner_id" ref="base.res_partner_19"/>
|
||||
</record>
|
||||
<record id="analytic_seagate_p2" model="account.analytic.account">
|
||||
<field name="name">Seagate P2</field>
|
||||
<field name="type">normal</field>
|
||||
<field name="parent_id" ref="analytic_integration"/>
|
||||
<field name="state">open</field>
|
||||
<field name="partner_id" ref="base.res_partner_seagate"/>
|
||||
<field name="partner_id" ref="base.res_partner_19"/>
|
||||
</record>
|
||||
<record id="analytic_magasin_bml_1" model="account.analytic.account">
|
||||
<field name="name">Magasin BML 1</field>
|
||||
|
@ -106,20 +106,20 @@
|
|||
<field eval="str(time.localtime()[0] - 1) + '-08-07'" name="date_start"/>
|
||||
<field eval="time.strftime('%Y-12-31')" name="date"/>
|
||||
<field name="parent_id" ref="analytic_integration"/>
|
||||
<field name="partner_id" ref="base.res_partner_c2c"/>
|
||||
<field name="partner_id" ref="base.res_partner_12"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
<record id="analytic_agrolait" model="account.analytic.account">
|
||||
<field name="name">Agrolait</field>
|
||||
<field name="parent_id" ref="analytic_customers"/>
|
||||
<field name="type">normal</field>
|
||||
<field name="partner_id" ref="base.res_partner_agrolait"/>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
</record>
|
||||
<record id="analytic_asustek" model="account.analytic.account">
|
||||
<field name="name">Asustek</field>
|
||||
<field name="type">normal</field>
|
||||
<field name="parent_id" ref="analytic_customers"/>
|
||||
<field name="partner_id" ref="base.res_partner_asus"/>
|
||||
<field name="partner_id" ref="base.res_partner_1"/>
|
||||
</record>
|
||||
<record id="analytic_distripc" model="account.analytic.account">
|
||||
<field name="name">DistriPC</field>
|
||||
|
@ -127,22 +127,22 @@
|
|||
<field name="type">normal</field>
|
||||
<field name="partner_id" ref="base.res_partner_4"/>
|
||||
</record>
|
||||
<record id="analytic_sednacom" model="account.analytic.account">
|
||||
<field name="name">Sednacom</field>
|
||||
<record id="analytic_spark" model="account.analytic.account">
|
||||
<field name="name">Spark Systems</field>
|
||||
<field eval="str(time.localtime()[0] - 1) + '-05-09'" name="date_start"/>
|
||||
<field eval="time.strftime('%Y-05-08')" name="date"/>
|
||||
<field name="parent_id" ref="analytic_partners"/>
|
||||
<field name="type">normal</field>
|
||||
<field name="partner_id" ref="base.res_partner_sednacom"/>
|
||||
<field name="partner_id" ref="base.res_partner_16"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
<record id="analytic_thymbra" model="account.analytic.account">
|
||||
<field name="name">Thymbra</field>
|
||||
<record id="analytic_nebula" model="account.analytic.account">
|
||||
<field name="name">Nebula</field>
|
||||
<field eval="time.strftime('%Y-02-01')" name="date_start"/>
|
||||
<field eval="time.strftime('%Y-07-01')" name="date"/>
|
||||
<field name="type">normal</field>
|
||||
<field name="parent_id" ref="analytic_partners"/>
|
||||
<field name="partner_id" ref="base.res_partner_thymbra"/>
|
||||
<field name="partner_id" ref="base.res_partner_17"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
<record id="analytic_leclerc" model="account.analytic.account">
|
||||
|
@ -159,13 +159,13 @@
|
|||
<field eval="str(time.localtime()[0] + 1) + '-02-01'" name="date"/>
|
||||
<field name="type">normal</field>
|
||||
<field name="parent_id" ref="analytic_partners"/>
|
||||
<field name="partner_id" ref="base.res_partner_desertic_hispafuentes"/>
|
||||
<field name="partner_id" ref="base.res_partner_12"/>
|
||||
</record>
|
||||
<record id="analytic_tiny_at_work" model="account.analytic.account">
|
||||
<field name="name">OpenERP SA AT Work</field>
|
||||
<field name="type">normal</field>
|
||||
<field name="parent_id" ref="analytic_partners"/>
|
||||
<field name="partner_id" ref="base.res_partner_tinyatwork"/>
|
||||
<field name="partner_id" ref="base.res_partner_18"/>
|
||||
</record>
|
||||
<record id="analytic_partners_camp_to_camp" model="account.analytic.account">
|
||||
<field name="name">Camp to Camp</field>
|
||||
|
@ -173,7 +173,7 @@
|
|||
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
|
||||
<field name="type">normal</field>
|
||||
<field name="parent_id" ref="analytic_partners"/>
|
||||
<field name="partner_id" ref="base.res_partner_c2c"/>
|
||||
<field name="partner_id" ref="base.res_partner_12"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
<record id="analytic_project_2_support" model="account.analytic.account">
|
||||
|
|
|
@ -43,6 +43,8 @@ class account_config_settings(osv.osv_memory):
|
|||
string='Default company currency', help="Main currency of the company."),
|
||||
'paypal_account': fields.related('company_id', 'paypal_account', type='char', size=128,
|
||||
string='Paypal account', help="Paypal account (email) for receiving online payments (credit card, etc.) If you set a paypal account, the customer will be able to pay your invoices or quotations with a button \"Pay with Paypal\" in automated emails or through the OpenERP portal."),
|
||||
'company_footer': fields.related('company_id', 'rml_footer2', type='char', size=250, readonly=True,
|
||||
string='Bank accounts on reports will display as followed', help="Bank accounts as printed in the footer of each customer document. This is for information purpose only, you should configure these bank accounts through the above button \"Configure Bank Accounts\"."),
|
||||
|
||||
'has_chart_of_accounts': fields.boolean('Company has a chart of accounts'),
|
||||
'chart_template_id': fields.many2one('account.chart.template', 'Template', domain="[('visible','=', True)]"),
|
||||
|
@ -152,6 +154,7 @@ class account_config_settings(osv.osv_memory):
|
|||
'expects_chart_of_accounts': company.expects_chart_of_accounts,
|
||||
'currency_id': company.currency_id.id,
|
||||
'paypal_account': company.paypal_account,
|
||||
'company_footer': company.rml_footer2,
|
||||
'has_chart_of_accounts': has_chart_of_accounts,
|
||||
'has_fiscal_year': bool(fiscalyear_count),
|
||||
'chart_template_id': False,
|
||||
|
|
|
@ -225,6 +225,8 @@
|
|||
icon="gtk-go-forward"
|
||||
type="action"
|
||||
class="oe_inline oe_link"/>
|
||||
<label for="company_footer"/>
|
||||
<field name="company_footer"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="paypal_account"/>
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 450.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
partner_id: base.res_partner_12
|
||||
reference_type: none
|
||||
|
||||
-
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
company_id: base.main_company
|
||||
partner_id: base.main_partner
|
||||
acc_number: 123456789
|
||||
footer: True
|
||||
bank: base.res_bank_1
|
||||
bank_name: Reserve
|
||||
-
|
||||
|
@ -21,7 +22,7 @@
|
|||
reference_type: none
|
||||
name: 'Test Customer Invoice'
|
||||
invoice_line:
|
||||
- product_id: product.product_product_pc3
|
||||
- product_id: product.product_product_5
|
||||
quantity: 10.0
|
||||
-
|
||||
I manually assign tax on invoice
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 450.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.bank_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
partner_id: base.res_partner_12
|
||||
reference_type: none
|
||||
-
|
||||
I check that Initially customer invoice state is "Draft"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
!record {model: account.invoice, id: test_invoice_1}:
|
||||
currency_id: base.EUR
|
||||
company_id: base.main_company
|
||||
partner_id: base.res_partner_asus
|
||||
partner_id: base.res_partner_1
|
||||
state: draft
|
||||
type: out_invoice
|
||||
account_id: account.a_recv
|
||||
|
@ -23,7 +23,7 @@
|
|||
-
|
||||
!python {model: res.partner}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_asus'),ref('base.res_partner_agrolait'),ref('base.res_partner_c2c')], {}, {})
|
||||
(data, format) = netsvc.LocalService('report.account.overdue').create(cr, uid, [ref('base.res_partner_1'),ref('base.res_partner_2'),ref('base.res_partner_12')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data)
|
||||
-
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
name: '[PC3] Medium PC'
|
||||
price_unit: 900.0
|
||||
quantity: 10.0
|
||||
product_id: product.product_product_pc3
|
||||
product_id: product.product_product_5
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_3
|
||||
|
|
|
@ -30,13 +30,13 @@
|
|||
- account_id: account.a_expense
|
||||
name: '[PC1] Basic PC'
|
||||
price_unit: 300.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
quantity: 10.0
|
||||
uos_id: product.product_uom_unit
|
||||
invoice_line_tax_id:
|
||||
- tax10
|
||||
journal_id: account.expenses_journal
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
partner_id: base.res_partner_12
|
||||
reference_type: none
|
||||
type: in_invoice
|
||||
-
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
debit: 0.0
|
||||
journal_id: account.bank_journal
|
||||
name: Basic Computer
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
partner_id: base.res_partner_12
|
||||
period_id: account.period_6
|
||||
ref: '2011010'
|
||||
tax_amount: 0.0
|
||||
|
@ -37,8 +37,8 @@
|
|||
'search_default_journal_id': 1, 'journal_type': 'sale', 'search_default_period_id': 6, 'journal_id': 1, 'view_mode': False,
|
||||
'visible_id': 1, 'period_id': 6, 'tz': False, 'active_ids': [ref('menu_eaction_account_moves_sale')],
|
||||
'search_default_posted': 0, 'active_id': ref('menu_eaction_account_moves_sale')})
|
||||
partner = self.onchange_partner_id(cr, uid, [], False, ref('base.res_partner_desertic_hispafuentes'), ref('account.cash'), debit=0, credit=2000, date=date, journal=False)
|
||||
account = self.onchange_account_id(cr, uid, [], account_id=ref('account.a_recv'), partner_id= ref('base.res_partner_desertic_hispafuentes'))
|
||||
partner = self.onchange_partner_id(cr, uid, [], False, ref('base.res_partner_12'), ref('account.cash'), debit=0, credit=2000, date=date, journal=False)
|
||||
account = self.onchange_account_id(cr, uid, [], account_id=ref('account.a_recv'), partner_id= ref('base.res_partner_12'))
|
||||
vals = {
|
||||
'journal_id': ref('account.bank_journal'),
|
||||
'period_id': ref('account.period_6'),
|
||||
|
@ -51,7 +51,7 @@
|
|||
'date': time.strftime('%Y-%m-%d'),
|
||||
'debit': 2000.0,
|
||||
'name': 'Basic Computer',
|
||||
'partner_id': ref('base.res_partner_desertic_hispafuentes'),
|
||||
'partner_id': ref('base.res_partner_12'),
|
||||
'quantity': 0.0,
|
||||
'move_id': ref('account_move_0'),
|
||||
'date_maturity': partner['value']['date_maturity'],
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
account_id: account.a_recv
|
||||
date_invoice: !eval time.strftime('%Y-%m-%d')
|
||||
invoice_line:
|
||||
- product_id: product.product_product_pc1
|
||||
- product_id: product.product_product_3
|
||||
quantity: &qty 11.11
|
||||
account_id: account.a_sale
|
||||
uos_id: product.product_uom_unit
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
-
|
||||
!record {model: account.invoice, id: invoice_edi_1}:
|
||||
journal_id: 1
|
||||
partner_id: base.res_partner_agrolait
|
||||
partner_id: base.res_partner_2
|
||||
currency_id: base.EUR
|
||||
company_id: 1
|
||||
account_id: account.a_pay
|
||||
|
@ -13,14 +13,14 @@
|
|||
name: selling product
|
||||
type: 'out_invoice'
|
||||
invoice_line:
|
||||
- product_id: product.product_product_pc1
|
||||
- product_id: product.product_product_3
|
||||
uos_id: 1
|
||||
quantity: 1.0
|
||||
price_unit: 10.0
|
||||
name: 'basic pc'
|
||||
account_id: account.a_pay
|
||||
invoice_line:
|
||||
- product_id: product.product_product_pc3
|
||||
- product_id: product.product_product_5
|
||||
uos_id: 1
|
||||
quantity: 5.0
|
||||
price_unit: 100.0
|
||||
|
@ -106,7 +106,7 @@
|
|||
"uos_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_uom_unit", "Unit"],
|
||||
"name": "Basic PC",
|
||||
"price_unit": 10.0,
|
||||
"product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_pc1", "[PC1] Basic PC"],
|
||||
"product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_3", "[PC1] Basic PC"],
|
||||
"quantity": 1.0
|
||||
},
|
||||
{
|
||||
|
@ -116,7 +116,7 @@
|
|||
"uos_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_uom_unit", "Unit"],
|
||||
"name": "Medium PC",
|
||||
"price_unit": 100.0,
|
||||
"product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_pc3", "[PC3] Medium PC"],
|
||||
"product_id": ["product:b22acf7a-ddcd-11e0-a4db-701a04e25543.product_product_5", "[PC3] Medium PC"],
|
||||
"quantity": 5.0
|
||||
}]
|
||||
}
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
<field name="model">cash.box.in</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Put Money In">
|
||||
<form string="Put Money In" version="7.0">
|
||||
<separator string="Fill in this form if you put money in the cash register:" colspan="4" />
|
||||
<field name="name" />
|
||||
<field name="amount" />
|
||||
|
||||
<separator colspan="4" />
|
||||
<group colspan="4" col="4">
|
||||
<group col="2" colspan="2" />
|
||||
<button icon="gtk-stop" special="cancel" string="Cancel" />
|
||||
<button name="run" string="Put Money In" colspan="1" type="object" icon="gtk-apply" />
|
||||
<group>
|
||||
<field name="name" class="oe_inline"/>
|
||||
<field name="amount" class="oe_inline"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="run" string="Put Money In" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -35,17 +35,18 @@
|
|||
<field name="model">cash.box.out</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Take Money Out">
|
||||
<separator string="Describe why you take money from the cash register:" colspan="4" />
|
||||
<field name="name" />
|
||||
<field name="amount" />
|
||||
|
||||
<separator colspan="4" />
|
||||
<group colspan="4" col="4">
|
||||
<group col="2" colspan="2" />
|
||||
<button icon="gtk-stop" special="cancel" string="Cancel" />
|
||||
<button name="run" string="Take Money Out" colspan="1" type="object" icon="gtk-apply" />
|
||||
<form string="Take Money Out" version="7.0">
|
||||
<separator string="Describe why you take money from the cash register:"/>
|
||||
<group>
|
||||
<field name="name" class="oe_inline"/>
|
||||
<field name="amount" class="oe_inline"/>
|
||||
</group>
|
||||
|
||||
<footer>
|
||||
<button name="run" string="Take Money Out" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button class="oe_link" special="cancel" string="Cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
%(company_currency)s\n\nThanks,\n--\n%(user_signature)s\n%(company_name)s'
|
||||
email_subject: Invoices Reminder
|
||||
partner_ids:
|
||||
- base.res_partner_desertic_hispafuentes
|
||||
- base.res_partner_12
|
||||
partner_lang: 1
|
||||
-
|
||||
I send a follow-up mail to partner.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<record id="partner_bank_1" model="res.partner.bank">
|
||||
<field name="name">Reserve Bank</field>
|
||||
<field name="acc_number">00987654321</field>
|
||||
<field name="partner_id" ref="base.res_partner_agrolait"></field>
|
||||
<field name="partner_id" ref="base.res_partner_2"></field>
|
||||
<field name="state">bank</field>
|
||||
<field name="bank" ref="base.res_bank_1"/>
|
||||
</record>
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
!record {model: payment.line, id: payment_line_0}:
|
||||
name: Test
|
||||
communication: Test
|
||||
partner_id: base.res_partner_agrolait
|
||||
partner_id: base.res_partner_2
|
||||
order_id: payment_order_2
|
||||
amount_currency: 100.00
|
||||
|
|
|
@ -49,7 +49,6 @@ eInvoicing & Payments module manage all Voucher Entries such as "Reconciliation
|
|||
"account_voucher_sequence.xml",
|
||||
"account_voucher_workflow.xml",
|
||||
"account_voucher_report.xml",
|
||||
"wizard/account_voucher_unreconcile_view.xml",
|
||||
"wizard/account_statement_from_invoice_view.xml",
|
||||
"account_voucher_view.xml",
|
||||
"voucher_payment_receipt_view.xml",
|
||||
|
|
|
@ -46,11 +46,7 @@ class account_voucher(osv.osv):
|
|||
def _check_paid(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
for voucher in self.browse(cr, uid, ids, context=context):
|
||||
paid = False
|
||||
for line in voucher.move_ids:
|
||||
if (line.account_id.type, 'in', ('receivable', 'payable')) and line.reconcile_id:
|
||||
paid = True
|
||||
res[voucher.id] = paid
|
||||
res[voucher.id] = any([((line.account_id.type, 'in', ('receivable', 'payable')) and line.reconcile_id) for line in voucher.move_ids])
|
||||
return res
|
||||
|
||||
def _get_type(self, cr, uid, context=None):
|
||||
|
@ -186,15 +182,16 @@ class account_voucher(osv.osv):
|
|||
res['arch'] = etree.tostring(doc)
|
||||
return res
|
||||
|
||||
def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount):
|
||||
def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount, type):
|
||||
debit = credit = 0.0
|
||||
sign = type == 'payment' and -1 or 1
|
||||
for l in line_dr_ids:
|
||||
debit += l['amount']
|
||||
for l in line_cr_ids:
|
||||
credit += l['amount']
|
||||
return abs(amount - abs(credit - debit))
|
||||
return amount - sign * (credit - debit)
|
||||
|
||||
def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_currency, context=None):
|
||||
def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_currency, type, context=None):
|
||||
context = context or {}
|
||||
if not line_dr_ids and not line_cr_ids:
|
||||
return {'value':{}}
|
||||
|
@ -215,7 +212,7 @@ class account_voucher(osv.osv):
|
|||
if voucher_line.get('currency_id', company_currency) != company_currency:
|
||||
is_multi_currency = True
|
||||
break
|
||||
return {'value': {'writeoff_amount': self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount), 'is_multi_currency': is_multi_currency}}
|
||||
return {'value': {'writeoff_amount': self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, type), 'is_multi_currency': is_multi_currency}}
|
||||
|
||||
def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None):
|
||||
if not ids: return {}
|
||||
|
@ -223,12 +220,13 @@ class account_voucher(osv.osv):
|
|||
res = {}
|
||||
debit = credit = 0.0
|
||||
for voucher in self.browse(cr, uid, ids, context=context):
|
||||
sign = voucher.type == 'payment' and -1 or 1
|
||||
for l in voucher.line_dr_ids:
|
||||
debit += l.amount
|
||||
for l in voucher.line_cr_ids:
|
||||
credit += l.amount
|
||||
currency = voucher.currency_id or voucher.company_id.currency_id
|
||||
res[voucher.id] = currency_obj.round(cr, uid, currency, abs(voucher.amount - abs(credit - debit)))
|
||||
res[voucher.id] = currency_obj.round(cr, uid, currency, voucher.amount - sign * (credit - debit))
|
||||
return res
|
||||
|
||||
def _paid_amount_in_company_currency(self, cr, uid, ids, name, args, context=None):
|
||||
|
@ -716,7 +714,7 @@ class account_voucher(osv.osv):
|
|||
default['value']['pre_line'] = 1
|
||||
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
|
||||
default['value']['pre_line'] = 1
|
||||
default['value']['writeoff_amount'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price)
|
||||
default['value']['writeoff_amount'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, ttype)
|
||||
return default
|
||||
|
||||
def onchange_payment_rate_currency(self, cr, uid, ids, currency_id, payment_rate, payment_rate_currency_id, date, amount, company_id, context=None):
|
||||
|
|
|
@ -274,4 +274,19 @@
|
|||
</record>
|
||||
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- After installation of the module, open the related menu -->
|
||||
<record id="action_client_invoice_menu" model="ir.actions.client">
|
||||
<field name="name">Open Invoicing Menu</field>
|
||||
<field name="tag">reload</field>
|
||||
<field name="params" eval="{'menu_id': ref('account.menu_finance')}"/>
|
||||
</record>
|
||||
<record id="todo_open_invoice_menu" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_client_invoice_menu"/>
|
||||
<field name="type">automatic</field>
|
||||
<field name="sequence">100</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -40,7 +40,7 @@ class invoice(osv.osv):
|
|||
'domain': '[]',
|
||||
'context': {
|
||||
'default_partner_id': inv.partner_id.id,
|
||||
'default_amount': inv.residual,
|
||||
'default_amount': inv.type in ('out_refund', 'in_refund') and -inv.residual or inv.residual,
|
||||
'default_name':inv.name,
|
||||
'close_after_process': True,
|
||||
'invoice_type':inv.type,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
- account_id: account.a_recv
|
||||
amount: 1000.0
|
||||
name: Voucher for Axelor
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
partner_id: base.res_partner_12
|
||||
period_id: account.period_6
|
||||
reference: none
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
|||
- account_id: account.cash
|
||||
amount: 1000.0
|
||||
name: Voucher Axelor
|
||||
partner_id: base.res_partner_desertic_hispafuentes
|
||||
partner_id: base.res_partner_12
|
||||
period_id: account.period_6
|
||||
reference: none
|
||||
|
||||
|
|
|
@ -82,10 +82,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 200.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
-
|
||||
I Validate invoice by clicking on Validate button
|
||||
|
@ -115,10 +115,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 100.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
-
|
||||
I Validate invoice by clicking on Validate button
|
||||
|
@ -141,7 +141,7 @@
|
|||
!context
|
||||
'type': 'receipt'
|
||||
-
|
||||
I create the first voucher of payment with values 240 USD, journal USD,
|
||||
On the first March, I create the first voucher of payment with values 240 USD, journal USD,
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_1_case1, view: view_vendor_receipt_form}:
|
||||
account_id: account.cash
|
||||
|
@ -149,7 +149,7 @@
|
|||
company_id: base.main_company
|
||||
journal_id: bank_journal_USD
|
||||
name: 'First payment: Case 1 USD/USD'
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-03-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -173,25 +173,25 @@
|
|||
self.pool.get('account.voucher.line').write(cr, uid, [line_id], {'amount': amount})
|
||||
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
|
||||
-
|
||||
I check that writeoff amount computed is 10.0
|
||||
I check that writeoff amount computed is -10.0
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (voucher_id.writeoff_amount == 10.0), "Writeoff amount is not 10.0"
|
||||
assert (voucher_id.writeoff_amount == -10.0), "Writeoff amount is not -10.0"
|
||||
-
|
||||
I confirm the voucher
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that the move of my first voucher is valid
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -205,7 +205,7 @@
|
|||
I check that my write-off is correct. 9 debit and 10 amount_currency
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -235,7 +235,7 @@
|
|||
move_line = move_line_obj.browse(cr, uid, move_lines[0])
|
||||
assert (move_line.amount_residual_currency == 30.0) , "Residual amount is not correct for first Invoice"
|
||||
-
|
||||
I create the second voucher of payment with values 45 USD, journal USD,
|
||||
On the first April, I create the second voucher of payment with values 45 USD, journal USD,
|
||||
-
|
||||
!record {model: account.voucher, id: account_voucher_2_case1}:
|
||||
account_id: account.cash
|
||||
|
@ -243,7 +243,7 @@
|
|||
company_id: base.main_company
|
||||
journal_id: bank_journal_USD
|
||||
name: 'Second payment: Case 1'
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-04-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -266,25 +266,25 @@
|
|||
self.pool.get('account.voucher.line').write(cr, uid, [line_id], {'amount': amount})
|
||||
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
|
||||
-
|
||||
I check that writeoff amount computed is 5.0
|
||||
I check that writeoff amount computed is -5.0
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (voucher_id.writeoff_amount == 5.0), "Writeoff amount is not 5.0"
|
||||
assert (voucher_id.writeoff_amount == -5.0), "Writeoff amount is not -5.0"
|
||||
-
|
||||
I confirm the voucher
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that the move of my second voucher is valid
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -302,7 +302,7 @@
|
|||
I check that my writeoff is correct. 4.75 debit and 5 amount_currency
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
|
|
@ -53,10 +53,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 200.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
check_total : 200
|
||||
-
|
||||
|
@ -88,10 +88,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 100.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
check_total : 100.0
|
||||
-
|
||||
|
@ -122,7 +122,7 @@
|
|||
company_id: base.main_company
|
||||
journal_id: bank_journal_EUR
|
||||
name: 'First payment: Case 2 SUPPL USD/EUR',
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-03-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -149,14 +149,14 @@
|
|||
I check that writeoff amount computed is -15.0
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (voucher_id.writeoff_amount == -15.0), "Writeoff amount is not -15.0"
|
||||
-
|
||||
I check that currency rate difference is 34.0
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (voucher_id.currency_rate_difference == 34.0), "Currency rate difference is not 34.0"
|
||||
-
|
||||
|
@ -164,14 +164,14 @@
|
|||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that the move of my voucher is valid
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -187,7 +187,7 @@
|
|||
I check that my writeoff is correct. -15 in credit with no amount_currency
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -226,7 +226,7 @@
|
|||
amount: 45.0
|
||||
company_id: base.main_company
|
||||
journal_id: bank_journal_USD
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-04-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -254,14 +254,14 @@
|
|||
I check that writeoff amount computed is -5.0
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (voucher_id.writeoff_amount == 5.0), "Writeoff amount is not 5.0"
|
||||
-
|
||||
I check that currency rate difference is 8.50
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (voucher_id.currency_rate_difference == 8.50), "Currency rate difference is not 8.50"
|
||||
-
|
||||
|
@ -269,14 +269,14 @@
|
|||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that my voucher state is posted
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert voucher_id.state == 'posted', "Voucher state is not posted"
|
||||
-
|
||||
|
@ -289,7 +289,7 @@
|
|||
I check that my writeoff is correct. 4.75 in credit and 5 in amount_currency
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
|
|
@ -88,10 +88,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 200.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
-
|
||||
I Validate invoice by clicking on Validate button
|
||||
|
@ -121,10 +121,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 100.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
-
|
||||
I Validate invoice by clicking on Validate button
|
||||
|
@ -153,7 +153,7 @@
|
|||
amount: 200.0
|
||||
company_id: base.main_company
|
||||
journal_id: bank_journal_EUR
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-03-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -182,14 +182,14 @@
|
|||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that the move of my voucher is valid
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -221,7 +221,7 @@
|
|||
amount: 80
|
||||
company_id: base.main_company
|
||||
journal_id: bank_journal_USD
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-04-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -249,7 +249,7 @@
|
|||
I check that writeoff amount computed is 2.22
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (round(voucher_id.writeoff_amount, 2) == 2.22), "Writeoff amount is not 2.22$"
|
||||
-
|
||||
|
@ -257,14 +257,14 @@
|
|||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that my voucher state is posted
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert voucher_id.state == 'posted', "Voucher state is not posted"
|
||||
-
|
||||
|
@ -277,7 +277,7 @@
|
|||
I check that my writeoff is correct. 2.11 in credit and 2.22 in amount_currency
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR EUR'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
|
|
@ -88,10 +88,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 200.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
-
|
||||
I Validate invoice by clicking on Validate button
|
||||
|
@ -121,10 +121,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 100.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
-
|
||||
I Validate invoice by clicking on Validate button
|
||||
|
@ -153,7 +153,7 @@
|
|||
amount: 200.0
|
||||
company_id: base.main_company
|
||||
journal_id: bank_journal_EUR
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-03-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -182,14 +182,14 @@
|
|||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that the move of my voucher is valid
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -201,7 +201,7 @@
|
|||
I check that the debtor account has 2 new lines with 144.44 and 77.78 in amount_currency columns and their credit columns are 130 and 70
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 2 USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -236,7 +236,7 @@
|
|||
amount: 80.0
|
||||
company_id: base.main_company
|
||||
journal_id: bank_journal_USD
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-04-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -264,7 +264,7 @@
|
|||
I check that writeoff amount computed is 2.22
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (round(voucher_id.writeoff_amount, 2) == 2.22), "Writeoff amount is not 2.22$"
|
||||
-
|
||||
|
@ -272,14 +272,14 @@
|
|||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that my voucher state is posted
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert voucher_id.state == 'posted', "Voucher state is not posted"
|
||||
-
|
||||
|
@ -292,7 +292,7 @@
|
|||
I check that my writeoff is correct. 2.11 in credit and 2.22 in amount_currency
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 2 SUPPL USD/EUR DR USD'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
|
|
@ -42,10 +42,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 150.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
-
|
||||
I Validate invoice by clicking on Validate button
|
||||
|
@ -75,10 +75,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 80.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
-
|
||||
I Validate invoice by clicking on Validate button
|
||||
|
@ -107,7 +107,7 @@
|
|||
amount: 120.0
|
||||
company_id: base.main_company
|
||||
journal_id: bank_journal_EUR
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-03-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -135,7 +135,7 @@
|
|||
I check that writeoff amount computed is 0.00
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (voucher_id.writeoff_amount == 0.00), "Writeoff amount is not 0.00"
|
||||
-
|
||||
|
@ -143,14 +143,14 @@
|
|||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that the move of my first voucher is valid
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -162,7 +162,7 @@
|
|||
I check that the debtor account has 2 new lines with 0.00 and 0.00 in amount_currency columns and their credit are 20 and 100 respectively
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 3'),('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -197,7 +197,7 @@
|
|||
amount: 120.0
|
||||
company_id: base.main_company
|
||||
journal_id: bank_journal_EUR
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-04-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -225,7 +225,7 @@
|
|||
I check that writeoff amount computed is 0.00
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'),('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'),('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (voucher_id.writeoff_amount == 0.00), "Writeoff amount is not 0"
|
||||
-
|
||||
|
@ -233,14 +233,14 @@
|
|||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that the move of my second voucher is valid
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -252,7 +252,7 @@
|
|||
I check that the debtor account has 2 new lines with 0.00 and 0.00 in amount_currency columns and their credit are 70 and 50
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 3'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
|
|
@ -76,10 +76,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 200.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
reference_type: none
|
||||
-
|
||||
I Validate invoice by clicking on Validate button
|
||||
|
@ -108,7 +108,7 @@
|
|||
amount: 200
|
||||
company_id: base.main_company
|
||||
journal_id: bank_journal_CHF
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_3
|
||||
date: !eval time.strftime("%Y-03-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -135,7 +135,7 @@
|
|||
I check that writeoff amount computed is 13.26
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
assert (round(voucher_id.writeoff_amount,2) == 13.26), "Writeoff amount is not 13.26 CHF"
|
||||
-
|
||||
|
@ -143,14 +143,14 @@
|
|||
-
|
||||
!python {model: account.voucher}: |
|
||||
import netsvc
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
|
||||
-
|
||||
I check that the move of my voucher is valid
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
@ -167,7 +167,7 @@
|
|||
I check that my writeoff is correct. 11.05 credit and 13.26 amount_currency
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_seagate'))])
|
||||
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 4'), ('partner_id', '=', ref('base.res_partner_19'))])
|
||||
voucher_id = self.browse(cr, uid, voucher[0])
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
|
||||
|
|
|
@ -55,10 +55,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 1000.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
-
|
||||
I validate the invoice.
|
||||
-
|
||||
|
@ -88,7 +88,7 @@
|
|||
company_id: base.main_company
|
||||
journal_id: bank_journal_USD1
|
||||
name: 'payment: Case EUR/USD'
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_5
|
||||
date: !eval time.strftime("%Y-02-01")
|
||||
payment_option: 'with_writeoff'
|
||||
|
@ -107,11 +107,11 @@
|
|||
self.pool.get('account.voucher.line').write(cr, uid, [line_id], {'amount': amount})
|
||||
assert (voucher.state=='draft'), "Voucher is not in draft state"
|
||||
-
|
||||
I check that writeoff amount computed is 50.0
|
||||
I check that writeoff amount computed is -50.0
|
||||
-
|
||||
!python {model: account.voucher}: |
|
||||
voucher = self.browse(cr, uid, ref('account_voucher_eur_usd_case'))
|
||||
assert (voucher.writeoff_amount == 50.0), "Writeoff amount is not 50.0"
|
||||
assert (voucher.writeoff_amount == -50.0), "Writeoff amount is not -50.0"
|
||||
-
|
||||
I confirm the voucher
|
||||
-
|
||||
|
@ -167,4 +167,4 @@
|
|||
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
|
||||
move_line = move_line_obj.browse(cr, uid, move_lines[0])
|
||||
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for Invoice"
|
||||
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
name: '[PC1] Basic PC'
|
||||
price_unit: 450.0
|
||||
quantity: 1.0
|
||||
product_id: product.product_product_pc1
|
||||
product_id: product.product_product_3
|
||||
uos_id: product.product_uom_unit
|
||||
journal_id: account.sales_journal
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
|
||||
-
|
||||
I check that the customer invoice is in draft state
|
||||
|
@ -40,14 +40,14 @@
|
|||
import netsvc
|
||||
vals = {}
|
||||
journal_id = self.default_get(cr, uid, ['journal_id']).get('journal_id',None)
|
||||
res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), journal_id, 0.0, 1, ttype='receipt', date=False)
|
||||
res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_19"), journal_id, 0.0, 1, ttype='receipt', date=False)
|
||||
vals = {
|
||||
'account_id': ref('account.cash'),
|
||||
'amount': 450.0,
|
||||
'company_id': ref('base.main_company'),
|
||||
'currency_id': ref('base.EUR'),
|
||||
'journal_id': ref('account.bank_journal'),
|
||||
'partner_id': ref('base.res_partner_seagate'),
|
||||
'partner_id': ref('base.res_partner_19'),
|
||||
'period_id': ref('account.period_8'),
|
||||
'type': 'receipt',
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
- account_id: account.a_sale
|
||||
amount: 30000.0
|
||||
type: cr
|
||||
partner_id: base.res_partner_seagate
|
||||
partner_id: base.res_partner_19
|
||||
period_id: account.period_9
|
||||
type: sale
|
||||
|
||||
|
@ -48,14 +48,14 @@
|
|||
import netsvc
|
||||
vals = {}
|
||||
journal_id = self.default_get(cr, uid, ['journal_id']).get('journal_id',None)
|
||||
res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_seagate"), journal_id, 0.0, 1, ttype='receipt', date=False)
|
||||
res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_19"), journal_id, 0.0, 1, ttype='receipt', date=False)
|
||||
vals = {
|
||||
'account_id': ref('account.cash'),
|
||||
'amount': 30000.0,
|
||||
'company_id': ref('base.main_company'),
|
||||
'currency_id': ref('base.EUR'),
|
||||
'journal_id': ref('account.bank_journal'),
|
||||
'partner_id': ref('base.res_partner_seagate'),
|
||||
'partner_id': ref('base.res_partner_19'),
|
||||
'period_id': ref('account.period_8'),
|
||||
'type': 'receipt',
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
</group>
|
||||
<notebook>
|
||||
<page string="Payment Information">
|
||||
<field name="line_dr_ids" attrs="{'invisible': [('type', '=', 'receipt')]}" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, context)">
|
||||
<field name="line_dr_ids" attrs="{'invisible': [('type', '=', 'receipt')]}" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
|
||||
<tree string="Open Supplier Journal Entries" editable="bottom" colors="gray:amount==0">
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||
on_change="onchange_move_line_id(move_line_id)"
|
||||
|
@ -87,7 +87,7 @@
|
|||
<field name="amount" sum="Total Allocation"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="line_cr_ids" attrs="{'invisible': [('type', '=', 'payment')]}" context="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, context)">
|
||||
<field name="line_cr_ids" attrs="{'invisible': [('type', '=', 'payment')]}" context="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
|
||||
<tree string="Open Customer Journal Entries" editable="bottom" colors="gray:amount==0">
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||
on_change="onchange_move_line_id(move_line_id)"
|
||||
|
@ -332,7 +332,7 @@
|
|||
|
||||
<notebook>
|
||||
<page string="Payment Information" groups="base.group_user">
|
||||
<field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, context)">
|
||||
<field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
|
||||
<tree string="Invoices and outstanding transactions" editable="bottom" colors="gray:amount==0">
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||
on_change="onchange_move_line_id(move_line_id)"
|
||||
|
@ -348,7 +348,7 @@
|
|||
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="line_dr_ids" attrs="{'invisible': [('pre_line','=',False)]}" context="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, context)">
|
||||
<field name="line_dr_ids" attrs="{'invisible': [('pre_line','=',False)]}" context="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
|
||||
<tree string="Credits" editable="bottom" colors="gray:amount==0">
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||
on_change="onchange_move_line_id(move_line_id)"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import account_voucher_unreconcile
|
||||
import account_statement_from_invoice
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -75,16 +75,26 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
|||
statement.currency.id, amount, context=ctx)
|
||||
|
||||
context.update({'move_line_ids': [line.id]})
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, amount=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=line_date, context=context)
|
||||
voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt'),
|
||||
type = 'general'
|
||||
ttype = amount < 0 and 'payment' or 'receipt'
|
||||
sign = 1
|
||||
if line.journal_id.type in ('sale', 'sale_refund'):
|
||||
type = 'customer'
|
||||
ttype = 'receipt'
|
||||
elif line.journal_id.type in ('purchase', 'purhcase_refund'):
|
||||
type = 'supplier'
|
||||
ttype = 'payment'
|
||||
sign = -1
|
||||
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, amount=sign*amount, currency_id= statement.currency.id, ttype=ttype, date=line_date, context=context)
|
||||
voucher_res = { 'type': ttype,
|
||||
'name': line.name,
|
||||
'partner_id': line.partner_id.id,
|
||||
'journal_id': statement.journal_id.id,
|
||||
'account_id': result.get('account_id', statement.journal_id.default_credit_account_id.id), # improve me: statement.journal_id.default_credit_account_id.id
|
||||
'company_id':statement.company_id.id,
|
||||
'currency_id':statement.currency.id,
|
||||
'date':line.date,
|
||||
'amount':abs(amount),
|
||||
'account_id': result.get('account_id', statement.journal_id.default_credit_account_id.id),
|
||||
'company_id': statement.company_id.id,
|
||||
'currency_id': statement.currency.id,
|
||||
'date': line.date,
|
||||
'amount': sign*amount,
|
||||
'period_id':statement.period_id.id}
|
||||
voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
|
||||
|
||||
|
@ -97,12 +107,6 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
|||
if voucher_line_dict:
|
||||
voucher_line_dict.update({'voucher_id': voucher_id})
|
||||
voucher_line_obj.create(cr, uid, voucher_line_dict, context=context)
|
||||
if line.journal_id.type == 'sale':
|
||||
type = 'customer'
|
||||
elif line.journal_id.type == 'purchase':
|
||||
type = 'supplier'
|
||||
else:
|
||||
type = 'general'
|
||||
statement_line_obj.create(cr, uid, {
|
||||
'name': line.name or '?',
|
||||
'amount': amount,
|
||||
|
@ -112,81 +116,10 @@ class account_statement_from_invoice_lines(osv.osv_memory):
|
|||
'statement_id': statement_id,
|
||||
'ref': line.ref,
|
||||
'voucher_id': voucher_id,
|
||||
'date': time.strftime('%Y-%m-%d'), #time.strftime('%Y-%m-%d'), #line.date_maturity or,
|
||||
'date': time.strftime('%Y-%m-%d'),
|
||||
}, context=context)
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
account_statement_from_invoice_lines()
|
||||
|
||||
class account_statement_from_invoice(osv.osv_memory):
|
||||
"""
|
||||
Generate Entries by Statement from Invoices
|
||||
"""
|
||||
_name = "account.statement.from.invoice"
|
||||
_description = "Entries by Statement from Invoices"
|
||||
_columns = {
|
||||
'date': fields.date('Date payment',required=True),
|
||||
'journal_ids': fields.many2many('account.journal', 'account_journal_relation', 'account_id', 'journal_id', 'Journal'),
|
||||
'line_ids': fields.many2many('account.move.line', 'account_move_line_relation', 'move_id', 'line_id', 'Invoices'),
|
||||
}
|
||||
_defaults = {
|
||||
'date': lambda *a: time.strftime('%Y-%m-%d'),
|
||||
}
|
||||
|
||||
def search_invoices(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
line_obj = self.pool.get('account.move.line')
|
||||
statement_obj = self.pool.get('account.bank.statement')
|
||||
journal_obj = self.pool.get('account.journal')
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
statement_id = 'statement_id' in context and context['statement_id']
|
||||
|
||||
data = self.read(cr, uid, ids, context=context)[0]
|
||||
statement = statement_obj.browse(cr, uid, statement_id, context=context)
|
||||
args_move_line = []
|
||||
repeated_move_line_ids = []
|
||||
# Creating a group that is unique for importing move lines(move lines, once imported into statement lines, should not appear again)
|
||||
for st_line in statement.line_ids:
|
||||
args_move_line = []
|
||||
args_move_line.append(('name', '=', st_line.name))
|
||||
args_move_line.append(('ref', '=', st_line.ref))
|
||||
if st_line.partner_id:
|
||||
args_move_line.append(('partner_id', '=', st_line.partner_id.id))
|
||||
args_move_line.append(('account_id', '=', st_line.account_id.id))
|
||||
|
||||
move_line_id = line_obj.search(cr, uid, args_move_line, context=context)
|
||||
if move_line_id:
|
||||
repeated_move_line_ids += move_line_id
|
||||
|
||||
journal_ids = data['journal_ids']
|
||||
if journal_ids == []:
|
||||
journal_ids = journal_obj.search(cr, uid, [('type', 'in', ('sale', 'cash', 'purchase'))], context=context)
|
||||
|
||||
args = [
|
||||
('reconcile_id', '=', False),
|
||||
('journal_id', 'in', journal_ids),
|
||||
('account_id.reconcile', '=', True)]
|
||||
|
||||
if repeated_move_line_ids:
|
||||
args.append(('id', 'not in', repeated_move_line_ids))
|
||||
|
||||
line_ids = line_obj.search(cr, uid, args,
|
||||
context=context)
|
||||
|
||||
model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'), ('name', '=', 'view_account_statement_from_invoice_lines')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
return {
|
||||
'domain': "[('id','in', ["+','.join([str(x) for x in line_ids])+"])]",
|
||||
'name': _('Import Entries'),
|
||||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'account.statement.from.invoice.lines',
|
||||
'views': [(resource_id,'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
}
|
||||
|
||||
account_statement_from_invoice()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -1,34 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_account_statement_from_invoice" model="ir.ui.view">
|
||||
<field name="name">account.statement.from.invoice.form</field>
|
||||
<field name="model">account.statement.from.invoice</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Import Invoices in Statement" version="7.0">
|
||||
<group>
|
||||
<field name="date"/>
|
||||
<field name="journal_ids" domain="[('type','in',['sale','purchase','cash'])]"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button string="Go" name="search_invoices" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_account_statement_from_invoice" model="ir.actions.act_window">
|
||||
<field name="name">Import Invoices in Statement</field>
|
||||
<field name="res_model">account.statement.from.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_account_statement_from_invoice"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_statement_from_invoice_lines" model="ir.ui.view">
|
||||
<field name="name">account.statement.from.invoice.lines.form</field>
|
||||
<field name="model">account.statement.from.invoice.lines</field>
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv
|
||||
from osv import fields
|
||||
|
||||
class account_voucher_unreconcile(osv.osv_memory):
|
||||
_name = "account.voucher.unreconcile"
|
||||
_description = "Account voucher unreconcile"
|
||||
|
||||
_columns = {
|
||||
'remove':fields.boolean('Want to remove accounting entries too ?', required=False),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'remove': True,
|
||||
}
|
||||
|
||||
def trans_unrec(self, cr, uid, ids, context=None):
|
||||
# res = self.browse(cr, uid, ids[0])
|
||||
if context is None:
|
||||
context = {}
|
||||
voucher_pool = self.pool.get('account.voucher')
|
||||
reconcile_pool = self.pool.get('account.move.reconcile')
|
||||
if context.get('active_id'):
|
||||
voucher = voucher_pool.browse(cr, uid, context.get('active_id'), context=context)
|
||||
recs = []
|
||||
for line in voucher.move_ids:
|
||||
if line.reconcile_id:
|
||||
recs += [line.reconcile_id.id]
|
||||
if line.reconcile_partial_id:
|
||||
recs += [line.reconcile_partial_id.id]
|
||||
#for rec in recs:
|
||||
reconcile_pool.unlink(cr, uid, recs)
|
||||
# if res.remove:
|
||||
voucher_pool.cancel_voucher(cr, uid, [context.get('active_id')], context)
|
||||
# wf_service = netsvc.LocalService("workflow")
|
||||
# wf_service.trg_validate(uid, 'account.voucher', context.get('active_id'), 'cancel_voucher', cr)
|
||||
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
account_voucher_unreconcile()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_voucher_unreconcile" model="ir.ui.view">
|
||||
<field name="name">Account voucher unreconcile</field>
|
||||
<field name="model">account.voucher.unreconcile</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Unreconciliation" version="7.0">
|
||||
<separator string="Unreconciliation Transactions" />
|
||||
<label string="If you unreconciliate transactions, you must also verify all the actions that are linked to those transactions because they will not be disable"/>
|
||||
<footer>
|
||||
<button name="trans_unrec" default_focus="1" string="Unreconcile" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_view_account_voucher_unreconcile">
|
||||
<field name="name">Unreconcile entries</field>
|
||||
<field name="res_model">account.voucher.unreconcile</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_account_voucher_unreconcile"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -14,9 +14,9 @@
|
|||
<form string="AuditTrail Rule" version="7.0">
|
||||
<header>
|
||||
<button string="_Subscribe" name="subscribe" icon="gtk-ok"
|
||||
type="object" states="draft" />
|
||||
type="object" states="draft"/>
|
||||
<button string="UnSubscribe" name="unsubscribe" icon="gtk-cancel"
|
||||
type="object" states="subscribed" />
|
||||
type="object" states="subscribed"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet>
|
||||
|
@ -29,11 +29,11 @@
|
|||
<field name="log_create"/>
|
||||
<field name="log_action"/>
|
||||
<field name="log_workflow"/>
|
||||
<separator string="Users (if User is not added then it will applicable for all users)" colspan="4" />
|
||||
<field name="user_id" colspan="4" nolabel="1" />
|
||||
<separator string="Users (if User is not added then it will applicable for all users)" colspan="4"/>
|
||||
<field name="user_id" colspan="4" nolabel="1"/>
|
||||
<field name="action_id" colspan="4" readonly="1" groups="base.group_no_one"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -44,15 +44,15 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state == 'draft';black:state == 'subscribed'" string="AuditTrail Rules">
|
||||
<field name="name" />
|
||||
<field name="name"/>
|
||||
<field name="object_id"/>
|
||||
<field name="log_read" />
|
||||
<field name="log_write" />
|
||||
<field name="log_unlink" />
|
||||
<field name="log_create" />
|
||||
<field name="log_read"/>
|
||||
<field name="log_write"/>
|
||||
<field name="log_unlink"/>
|
||||
<field name="log_create"/>
|
||||
<field name="log_action"/>
|
||||
<field name="log_workflow"/>
|
||||
<field name="state" />
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -108,36 +108,36 @@
|
|||
<form string="Log Lines" version="7.0">
|
||||
<group col="4">
|
||||
<field name="field_id" colspan="4"
|
||||
readonly="1" />
|
||||
<newline />
|
||||
readonly="1"/>
|
||||
<newline/>
|
||||
<field name="field_description" colspan="4"
|
||||
readonly="1" />
|
||||
<newline />
|
||||
readonly="1"/>
|
||||
<newline/>
|
||||
<separator string="Old Value : "
|
||||
colspan="2" />
|
||||
colspan="2"/>
|
||||
<separator string="New Value : "
|
||||
colspan="2" />
|
||||
<newline />
|
||||
colspan="2"/>
|
||||
<newline/>
|
||||
<field name="old_value" nolabel="1"
|
||||
colspan="2" readonly="1" />
|
||||
colspan="2" readonly="1"/>
|
||||
<field name="new_value" nolabel="1"
|
||||
colspan="2" readonly="1" />
|
||||
<newline />
|
||||
colspan="2" readonly="1"/>
|
||||
<newline/>
|
||||
<separator string="Old Value Text : "
|
||||
colspan="2" />
|
||||
colspan="2"/>
|
||||
<separator string="New Value Text: "
|
||||
colspan="2" />
|
||||
<newline />
|
||||
colspan="2"/>
|
||||
<newline/>
|
||||
<field name="old_value_text" nolabel="1"
|
||||
colspan="2" readonly="1" />
|
||||
colspan="2" readonly="1"/>
|
||||
<field name="new_value_text" nolabel="1"
|
||||
colspan="2" readonly="1" />
|
||||
colspan="2" readonly="1"/>
|
||||
</group>
|
||||
</form>
|
||||
<tree string="Log Lines">
|
||||
<field name="field_description" />
|
||||
<field name="old_value_text" />
|
||||
<field name="new_value_text" />
|
||||
<field name="field_description"/>
|
||||
<field name="old_value_text"/>
|
||||
<field name="new_value_text"/>
|
||||
</tree>
|
||||
</field>
|
||||
</sheet>
|
||||
|
@ -151,11 +151,11 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="AuditTrail Logs">
|
||||
<field name="timestamp" />
|
||||
<field name="name" />
|
||||
<field name="object_id" />
|
||||
<field name="method" />
|
||||
<field name="user_id" />
|
||||
<field name="timestamp"/>
|
||||
<field name="name"/>
|
||||
<field name="object_id"/>
|
||||
<field name="method"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -185,7 +185,7 @@
|
|||
<field name="search_view_id" ref="view_audittrail_log_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_audit_logs" name="Audit Logs" parent="menu_audit" action="action_audittrail_log_tree" />
|
||||
<menuitem id="menu_audit_logs" name="Audit Logs" parent="menu_audit" action="action_audittrail_log_tree"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import urllib
|
||||
|
||||
import werkzeug.urls
|
||||
|
@ -31,53 +31,51 @@ from openerp.modules.registry import RegistryManager
|
|||
try:
|
||||
import openerp.addons.web.common.http as openerpweb
|
||||
except ImportError:
|
||||
import web.common.http as openerpweb
|
||||
import web.common.http as openerpweb # noqa
|
||||
|
||||
from openid import oidutil
|
||||
from openid.store import memstore
|
||||
#from openid.store import filestore
|
||||
from openid.store import filestore
|
||||
from openid.consumer import consumer
|
||||
from openid.cryptutil import randomString
|
||||
from openid.extensions import ax, sreg
|
||||
|
||||
from .. import utils
|
||||
|
||||
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
oidutil.log = _logger.debug
|
||||
|
||||
_storedir = os.path.join(tempfile.gettempdir(), 'openerp-auth_openid-store')
|
||||
|
||||
class GoogleAppsAwareConsumer(consumer.GenericConsumer):
|
||||
def complete(self, message, endpoint, return_to):
|
||||
if message.getOpenIDNamespace() == consumer.OPENID2_NS:
|
||||
server_url = message.getArg(consumer.OPENID2_NS, 'op_endpoint', consumer.no_default)
|
||||
server_url = message.getArg(consumer.OPENID2_NS, 'op_endpoint', '')
|
||||
if server_url.startswith('https://www.google.com/a/'):
|
||||
# update fields
|
||||
for attr in ['claimed_id', 'identity']:
|
||||
value = message.getArg(consumer.OPENID2_NS, attr)
|
||||
value = 'https://www.google.com/accounts/o8/user-xrds?uri=%s' % urllib.quote_plus(value)
|
||||
message.setArg(consumer.OPENID2_NS, attr, value)
|
||||
|
||||
# now, resign the message
|
||||
assoc_handle = message.getArg(consumer.OPENID_NS, 'assoc_handle')
|
||||
assoc = self.store.getAssociation(server_url, assoc_handle)
|
||||
message.delArg(consumer.OPENID2_NS, 'sig')
|
||||
message.delArg(consumer.OPENID2_NS, 'signed')
|
||||
message = assoc.signMessage(message)
|
||||
if assoc:
|
||||
# update fields
|
||||
for attr in ['claimed_id', 'identity']:
|
||||
value = message.getArg(consumer.OPENID2_NS, attr, '')
|
||||
value = 'https://www.google.com/accounts/o8/user-xrds?uri=%s' % urllib.quote_plus(value)
|
||||
message.setArg(consumer.OPENID2_NS, attr, value)
|
||||
|
||||
return super(GoogleAppsAwareConsumer, self).complete(message, endpoint, return_to)
|
||||
# now, resign the message
|
||||
message.delArg(consumer.OPENID2_NS, 'sig')
|
||||
message.delArg(consumer.OPENID2_NS, 'signed')
|
||||
message = assoc.signMessage(message)
|
||||
|
||||
return super(GoogleAppsAwareConsumer, self).complete(message, endpoint, return_to)
|
||||
|
||||
|
||||
class OpenIDController(openerpweb.Controller):
|
||||
_cp_path = '/auth_openid/login'
|
||||
|
||||
_store = memstore.MemoryStore() # TODO use a filestore
|
||||
_store = filestore.FileOpenIDStore(_storedir)
|
||||
|
||||
_REQUIRED_ATTRIBUTES = ['email']
|
||||
_OPTIONAL_ATTRIBUTES = 'nickname fullname postcode country language timezone'.split()
|
||||
|
||||
|
||||
def _add_extensions(self, request):
|
||||
"""Add extensions to the request"""
|
||||
|
||||
|
@ -118,8 +116,20 @@ class OpenIDController(openerpweb.Controller):
|
|||
def _get_realm(self, req):
|
||||
return req.httprequest.host_url
|
||||
|
||||
@openerpweb.httprequest
|
||||
def verify_direct(self, req, db, url):
|
||||
result = self._verify(req, db, url)
|
||||
if 'error' in result:
|
||||
return werkzeug.exceptions.BadRequest(result['error'])
|
||||
if result['action'] == 'redirect':
|
||||
return werkzeug.utils.redirect(result['value'])
|
||||
return result['value']
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
def verify(self, req, db, url):
|
||||
return self._verify(req, db, url)
|
||||
|
||||
def _verify(self, req, db, url):
|
||||
redirect_to = werkzeug.urls.Href(req.httprequest.host_url + 'auth_openid/login/process')(session_id=req.session_id)
|
||||
realm = self._get_realm(req)
|
||||
|
||||
|
@ -145,7 +155,6 @@ class OpenIDController(openerpweb.Controller):
|
|||
form_html = request.htmlMarkup(realm, redirect_to)
|
||||
return {'action': 'post', 'value': form_html, 'session_id': req.session_id}
|
||||
|
||||
|
||||
@openerpweb.httprequest
|
||||
def process(self, req, **kw):
|
||||
session = getattr(req.session, 'openid_session', None)
|
||||
|
@ -185,10 +194,8 @@ class OpenIDController(openerpweb.Controller):
|
|||
domain += ['|', ('openid_email', '=', False)]
|
||||
domain += [('openid_email', '=', openid_email)]
|
||||
|
||||
domain += [
|
||||
('openid_url', '=', openid_url),
|
||||
('active', '=', True),
|
||||
]
|
||||
domain += [('openid_url', '=', openid_url), ('active', '=', True)]
|
||||
|
||||
ids = Users.search(cr, 1, domain)
|
||||
assert len(ids) < 2
|
||||
if ids:
|
||||
|
@ -199,12 +206,11 @@ class OpenIDController(openerpweb.Controller):
|
|||
# TODO fill empty fields with the ones from sreg/ax
|
||||
cr.commit()
|
||||
|
||||
u = req.session.login(dbname, login, key)
|
||||
req.session.authenticate(dbname, login, key, {})
|
||||
|
||||
if not user_id:
|
||||
session['message'] = 'This OpenID identifier is not associated to any active users'
|
||||
|
||||
|
||||
elif info.status == consumer.SETUP_NEEDED:
|
||||
session['message'] = info.setup_url
|
||||
elif info.status == consumer.FAILURE and display_identifier:
|
||||
|
@ -217,9 +223,8 @@ class OpenIDController(openerpweb.Controller):
|
|||
# information in a log.
|
||||
session['message'] = 'Verification failed.'
|
||||
|
||||
|
||||
fragment = '#loginerror' if not user_id else ''
|
||||
return werkzeug.utils.redirect('/'+fragment)
|
||||
return werkzeug.utils.redirect('/' + fragment)
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
def status(self, req):
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<header>
|
||||
<button name="do_tentative" states="needs-action,declined,accepted" string="Uncertain" type="object" class="oe_highlight"/>
|
||||
<button name="do_accept" string="Accept" states="needs-action,tentative,declined" type="object" class="oe_highlight"/>
|
||||
<button name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d" string="Delegate" type="action" states="needs-action,tentative,declined,accepted" context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
<button name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d" string="Delegate" type="action" states="needs-action,tentative,declined,accepted" context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}"/>
|
||||
<button name="do_decline" string="Decline" states="needs-action,tentative,accepted" type="object" class="oe_highlight"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="tentative,needs-action,accepted" statusbar_colors='{"proforma":"blue"}'/>
|
||||
|
@ -20,36 +20,36 @@
|
|||
<sheet>
|
||||
|
||||
<div class="oe_title">
|
||||
<label for="email" string="Invitation To" class="oe_edit_only" />
|
||||
<label for="email" string="Invitation To" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="email" class="oe_inline" />
|
||||
(<field name="language" class="oe_inline" />)
|
||||
<field name="email" class="oe_inline"/>
|
||||
(<field name="language" class="oe_inline"/>)
|
||||
</h1>
|
||||
|
||||
|
||||
<h2>
|
||||
From <field name="event_date" class="oe_inline" />
|
||||
From <field name="event_date" class="oe_inline"/>
|
||||
to <field name="event_end_date" class="oe_inline"/>
|
||||
</h2>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="sent_by_uid" string="Invitation From" />
|
||||
<field name="sent_by_uid" string="Invitation From"/>
|
||||
<field name="user_id" string="Invited User"/>
|
||||
<field name="partner_id" string="Contact" />
|
||||
<field name="partner_id" string="Contact"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cutype" string="Invitation Type" />
|
||||
<field name="role" string="Role" />
|
||||
<field name="rsvp" />
|
||||
<field name="cutype" string="Invitation Type"/>
|
||||
<field name="role" string="Role"/>
|
||||
<field name="rsvp"/>
|
||||
<field name="ref" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Delegated From">
|
||||
<field name="parent_ids" readonly="1" nolabel="1" />
|
||||
<field name="parent_ids" readonly="1" nolabel="1"/>
|
||||
</group>
|
||||
<group string="Delegated To" >
|
||||
<field name="child_ids" readonly="1" nolabel="1" />
|
||||
<field name="child_ids" readonly="1" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
|
@ -65,12 +65,12 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Invitation details">
|
||||
<field name="sent_by_uid" string="Invitation From" />
|
||||
<field name="sent_by_uid" string="Invitation From"/>
|
||||
<field name="role" string="My Role"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="cutype" string="Invitation Type"/>
|
||||
<field name="state" />
|
||||
<field name="state"/>
|
||||
<field name="rsvp" string="Required to Join"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -86,20 +86,20 @@
|
|||
<search string="Search Invitations">
|
||||
<field name="email" string="Email"/>
|
||||
<field name="event_date"/>
|
||||
<filter icon="terp-gtk-jump-to-ltr" name="toreview" string="To Review" domain="[('state','=', 'needs-action')]" help="Invitations To Review" />
|
||||
<filter icon="terp-check" string="Accepted" domain="[('state','=', 'accepted')]" help="Accepted Invitations" />
|
||||
<filter icon="terp-dialog-close" string="Declined" domain="[('state','=', 'declined')]" help="Declined Invitations" />
|
||||
<filter icon="gtk-sort-descending" string="Delegated" domain="[('state','=', 'delegated')]" help="Delegated Invitations" />
|
||||
<filter icon="terp-gtk-jump-to-ltr" name="toreview" string="To Review" domain="[('state','=', 'needs-action')]" help="Invitations To Review"/>
|
||||
<filter icon="terp-check" string="Accepted" domain="[('state','=', 'accepted')]" help="Accepted Invitations"/>
|
||||
<filter icon="terp-dialog-close" string="Declined" domain="[('state','=', 'declined')]" help="Declined Invitations"/>
|
||||
<filter icon="gtk-sort-descending" string="Delegated" domain="[('state','=', 'delegated')]" help="Delegated Invitations"/>
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="cutype" string="Invitation type"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Contact" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}" />
|
||||
<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'}" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Contact" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<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'}"/>
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" help="Invitation Type"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -110,7 +110,7 @@
|
|||
<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="view_id" ref="base_calendar.base_calendar_attendee_tree_view"/>
|
||||
<field name="context">{'default_sent_by_uid': uid}</field>
|
||||
</record>
|
||||
|
||||
|
@ -122,7 +122,7 @@
|
|||
|
||||
<menuitem id="menu_attendee_invitations"
|
||||
parent="base.menu_calendar_configuration"
|
||||
sequence="10" action="action_view_attendee_form" />
|
||||
sequence="10" action="action_view_attendee_form"/>
|
||||
|
||||
<!-- ALARM FORM VIEW-->
|
||||
|
||||
|
@ -133,13 +133,13 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Reminder details" version="7.0">
|
||||
<group col="4">
|
||||
<field name="name" />
|
||||
<field name="active" />
|
||||
<separator string="Reminder Details" colspan="4" />
|
||||
<field name="trigger_duration" />
|
||||
<field name="trigger_interval" />
|
||||
<field name="trigger_occurs" />
|
||||
<field name="trigger_related" />
|
||||
<field name="name"/>
|
||||
<field name="active"/>
|
||||
<separator string="Reminder Details" colspan="4"/>
|
||||
<field name="trigger_duration"/>
|
||||
<field name="trigger_interval"/>
|
||||
<field name="trigger_occurs"/>
|
||||
<field name="trigger_related"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -169,7 +169,7 @@
|
|||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to setup a new alarm type.
|
||||
Click to setup a new alarm type.
|
||||
</p><p>
|
||||
You can define a customized type of calendar alarm that may be
|
||||
assigned to calendar events or meetings.
|
||||
|
@ -195,25 +195,25 @@
|
|||
<header>
|
||||
<button name="do_confirm" string="Confirm" states="tentative,cancelled" type="object" class="oe_highlight"/>
|
||||
<button name="do_tentative" states="confirmed,cancelled" string="Uncertain" type="object" class="oe_highlight"/>
|
||||
<button name="do_cancel" string="Cancel" states="tentative,confirmed" type="object" />
|
||||
<button name="do_cancel" string="Cancel" states="tentative,confirmed" type="object"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="tentative,confirmed" statusbar_colors='{"proforma":"blue"}'/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group col="6">
|
||||
<field name="name" string="Summary"
|
||||
colspan="4" required="1" />
|
||||
<field name="allday" colspan="2" on_change="onchange_dates(date,False,False,allday)" />
|
||||
colspan="4" required="1"/>
|
||||
<field name="allday" colspan="2" on_change="onchange_dates(date,False,False,allday)"/>
|
||||
<newline/>
|
||||
<field name="date" string="Start Date" required="1"
|
||||
on_change="onchange_dates(date,duration,False,allday)" />
|
||||
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" />
|
||||
on_change="onchange_dates(date,False,date_deadline)"/>
|
||||
<field name="location"/>
|
||||
<field name="alarm_id" string="Reminder"
|
||||
widget="selection" />
|
||||
widget="selection"/>
|
||||
<group colspan="2" col="4" attrs="{'readonly': [('state','=','done')]}">
|
||||
<field name="recurrency"/>
|
||||
</group>
|
||||
|
@ -222,11 +222,11 @@
|
|||
<page string="Event">
|
||||
<group col="6" colspan="4">
|
||||
<separator colspan="6" string="Visibility"/>
|
||||
<field name="user_id" string="Responsible User" />
|
||||
<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" />
|
||||
<field name="recurrent_id" invisible="1"/>
|
||||
<field name="recurrent_uid" invisible="1"/>
|
||||
</group>
|
||||
<separator string="Description"/>
|
||||
<field name="description"/>
|
||||
|
@ -241,31 +241,31 @@
|
|||
<tree string="Invitation details" editable="top">
|
||||
<field name="sent_by_uid" string="From"/>
|
||||
<field name="user_id" string="To"/>
|
||||
<field name="email" />
|
||||
<field name="role" width="200" />
|
||||
<field name="state" />
|
||||
<field name="email"/>
|
||||
<field name="role" width="200"/>
|
||||
<field name="state"/>
|
||||
<button name="do_tentative"
|
||||
states="needs-action,declined,accepted"
|
||||
string="Uncertain" type="object"
|
||||
icon="terp-crm" />
|
||||
icon="terp-crm"/>
|
||||
<button name="do_accept" string="Accept"
|
||||
states="needs-action,tentative,declined"
|
||||
type="object" icon="gtk-apply" />
|
||||
type="object" icon="gtk-apply"/>
|
||||
<button name="do_decline" string="Decline"
|
||||
states="needs-action,tentative,accepted"
|
||||
type="object" icon="gtk-cancel" />
|
||||
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'}" />
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}"/>
|
||||
</tree>
|
||||
<form string="Invitation details" version="7.0">
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<group col="4">
|
||||
<field name="email" />
|
||||
<field name="email"/>
|
||||
<field name="rsvp"/>
|
||||
<field name="cutype"/>
|
||||
<field name="role"/>
|
||||
|
@ -276,24 +276,24 @@
|
|||
states="needs-action,declined,accepted"
|
||||
string="Uncertain"
|
||||
type="object"
|
||||
icon="terp-crm" />
|
||||
icon="terp-crm"/>
|
||||
<button name="do_accept"
|
||||
string="Accept"
|
||||
states="needs-action,tentative,declined"
|
||||
type="object"
|
||||
icon="gtk-apply" />
|
||||
icon="gtk-apply"/>
|
||||
<button name="do_decline"
|
||||
string="Decline"
|
||||
states="needs-action,tentative,accepted"
|
||||
type="object"
|
||||
icon="gtk-cancel" />
|
||||
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'}" />
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
@ -304,49 +304,49 @@
|
|||
<group col="4" colspan="4" name="rrule">
|
||||
<group col="4" colspan="4">
|
||||
<field name="rrule_type" string="Recurrency period"
|
||||
attrs="{'readonly':[('recurrent_uid','!=',False)]}" />
|
||||
<field name="interval" />
|
||||
attrs="{'readonly':[('recurrent_uid','!=',False)]}"/>
|
||||
<field name="interval"/>
|
||||
<separator string="End of Recurrence" colspan="4"/>
|
||||
<field name="end_type" />
|
||||
<label string=" " colspan="2" />
|
||||
<newline />
|
||||
<field name="end_type"/>
|
||||
<label string=" " colspan="2"/>
|
||||
<newline/>
|
||||
<field name="count" attrs="{'invisible' : [('end_type', '!=', 'count')] }"/>
|
||||
<label string=" " colspan="2" />
|
||||
<newline />
|
||||
<label string=" " colspan="2"/>
|
||||
<newline/>
|
||||
<field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')] }"/>
|
||||
<newline />
|
||||
<newline/>
|
||||
|
||||
|
||||
</group>
|
||||
<group col="8" colspan="4" name="Select weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">
|
||||
<separator string="Choose day where repeat the meeting" colspan="8"/>
|
||||
<field name="mo" colspan="1" />
|
||||
<field name="tu" colspan="1" />
|
||||
<field name="we" colspan="1" />
|
||||
<field name="th" colspan="1" />
|
||||
<field name="mo" colspan="1"/>
|
||||
<field name="tu" colspan="1"/>
|
||||
<field name="we" colspan="1"/>
|
||||
<field name="th" colspan="1"/>
|
||||
<newline/>
|
||||
<field name="fr" colspan="1"/>
|
||||
<field name="sa" colspan="1" />
|
||||
<field name="su" colspan="1" />
|
||||
<newline/>
|
||||
<field name="fr" colspan="1" />
|
||||
<field name="sa" colspan="1" />
|
||||
<field name="su" colspan="1" />
|
||||
<newline />
|
||||
</group>
|
||||
<group col="10" colspan="4"
|
||||
attrs="{'invisible' : [('rrule_type','!=','monthly')]}">
|
||||
<separator string="Choose day in the month where repeat the meeting" colspan="12"/>
|
||||
<group col="2" colspan="1">
|
||||
<field name="select1" />
|
||||
<field name="select1"/>
|
||||
</group>
|
||||
<group col="2" colspan="1">
|
||||
<field name="day"
|
||||
attrs="{'required' : [('select1','=','date'), ('rrule_type','=','monthly')],
|
||||
'invisible' : ['|', ('select1','=','day'), ('rrule_type','!=','monthly')]}" />
|
||||
'invisible' : ['|', ('select1','=','day'), ('rrule_type','!=','monthly')]}"/>
|
||||
</group>
|
||||
<group col="3" colspan="1"
|
||||
attrs="{'invisible' : ['|', ('select1','=','date'), ('rrule_type','!=','monthly')]}">
|
||||
<field name="byday" string="The"
|
||||
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')]}" />
|
||||
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')]}"/>
|
||||
<field name="week_list" nolabel="1"
|
||||
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')]}" />
|
||||
attrs="{'required' : [('select1','=','day'), ('rrule_type','=','monthly')]}"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
|
@ -366,11 +366,11 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Events">
|
||||
<field name="name" string="Subject" />
|
||||
<field name="date" string="Event Date" />
|
||||
<field name="location" />
|
||||
<field name="show_as" />
|
||||
<field name="class" string="Privacy" />
|
||||
<field name="name" string="Subject"/>
|
||||
<field name="date" string="Event Date"/>
|
||||
<field name="location"/>
|
||||
<field name="show_as"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</tree>
|
||||
|
@ -404,16 +404,16 @@
|
|||
<field name="name" filter_domain="['|',('name','ilike',self),('location','ilike',self)]" string="Event"/>
|
||||
<field name="show_as"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<filter icon="terp-go-today" string="My Events" domain="[('user_id','=',uid)]" help="My Events" />
|
||||
<filter icon="terp-go-today" string="My Events" domain="[('user_id','=',uid)]" help="My Events"/>
|
||||
<separator/>
|
||||
<filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Events" />
|
||||
<filter icon="terp-check" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Events"/>
|
||||
<field name="user_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Availability" icon="terp-camera_test" domain="[]" context="{'group_by':'show_as'}" />
|
||||
<filter string="Privacy" icon="terp-locked" domain="[]" context="{'group_by':'class'}" />
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Availability" icon="terp-camera_test" domain="[]" context="{'group_by':'show_as'}"/>
|
||||
<filter string="Privacy" icon="terp-locked" domain="[]" context="{'group_by':'class'}"/>
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -435,7 +435,7 @@
|
|||
|
||||
<menuitem id="menu_events"
|
||||
name="Events" parent="base.menu_calendar_configuration"
|
||||
sequence="15" action="action_view_event" />
|
||||
sequence="15" action="action_view_event"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</record>
|
||||
|
||||
<record model="crm.meeting.type" id="categ_meet3">
|
||||
<field name="name">Phone Call</field>
|
||||
<field name="name">Off-site Meeting</field>
|
||||
</record>
|
||||
|
||||
<record model="res.request.link" id="request_link_meeting">
|
||||
|
|
|
@ -1,79 +1,80 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
((((((((((( Demo Cases )))))))))))
|
||||
<!--
|
||||
((((((((((( Demo Cases )))))))))))
|
||||
-->
|
||||
|
||||
<!--For Meetings-->
|
||||
<record id="crm_case_followuponproposal0" model="crm.meeting">
|
||||
<record id="crm_meeting_1" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Meeting to discuss project plan and hash out the details of implementation "" name="description"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field eval="time.strftime('%Y-%m-03 10:20:03')" name="date"/>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet2')])]"/>
|
||||
<field eval=""Follow-up on proposal"" name="name"/>
|
||||
<field eval="time.strftime('%Y-%m-03 16:38:03')" name="date_deadline"/>
|
||||
<field eval="6.3" name="duration"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_initialdiscussion0" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="7.0" name="duration"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""draft"" name="state"/>
|
||||
<field eval="time.strftime('%Y-%m-05 12:01:01')" name="date"/>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet3')])]"/>
|
||||
<field eval=""Initial discussion"" name="name"/>
|
||||
<field eval="time.strftime('%Y-%m-05 19:01:01')" name="date_deadline"/>
|
||||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_discusspricing0" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="3.0" name="duration"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Meeting to discuss project plan and hash out the details of implementation "" name="description"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
<field eval="time.strftime('%Y-%m-12 15:55:05')" name="date"/>
|
||||
<field name="name">Follow-up for Project proposal</field>
|
||||
<field name="description">Meeting to discuss project plan and hash out the details of implementation.</field>
|
||||
<field eval="time.strftime('%Y-%m-03 10:20:00')" name="date"/>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet1')])]"/>
|
||||
<field eval=""Discuss pricing"" name="name"/>
|
||||
<field eval="time.strftime('%Y-%m-12 18:55:05')" name="date_deadline"/>
|
||||
<field eval="time.strftime('%Y-%m-03 16:30:00')" name="date_deadline"/>
|
||||
<field eval="6.3" name="duration"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_reviewneeds0" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="6.0" name="duration"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field eval="time.strftime('%Y-%m-20 10:02:02')" name="date"/>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet3')])]"/>
|
||||
<field eval=""Review needs"" name="name"/>
|
||||
<field eval="time.strftime('%Y-%m-20 16:02:02')" name="date_deadline"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_changesindesigning0" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="05" name="duration"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field eval=""draft"" name="state"/>
|
||||
<field eval="time.strftime('%Y-%m-22 11:05:05')" name="date"/>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet2')])]"/>
|
||||
<field eval=""Changes in Designing"" name="name"/>
|
||||
<field eval="time.strftime('%Y-%m-22 16:05:05')" name="date_deadline"/>
|
||||
<field eval=""info@opensides.be"" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_updatethedata0" model="crm.meeting">
|
||||
<record id="crm_meeting_2" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
<field eval="time.strftime('%Y-%m-18 13:12:49')" name="date"/>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet2')])]"/>
|
||||
<field eval=""Update the data"" name="name"/>
|
||||
<field eval="13.3" name="duration"/>
|
||||
<field eval="time.strftime('%Y-%m-19 02:30:49')" name="date_deadline"/>
|
||||
<field name="name">Initial discussion</field>
|
||||
<field name="description">Discussion with partner for product.</field>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet3')])]"/>
|
||||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
<field eval="time.strftime('%Y-%m-05 12:00:00')" name="date"/>
|
||||
<field eval="time.strftime('%Y-%m-05 19:00:00')" name="date_deadline"/>
|
||||
<field eval="7.0" name="duration"/>
|
||||
<field name="state">draft</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_meeting_3" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="name">Pricing Discussion</field>
|
||||
<field name="description">Internal meeting for discussion for new pricing for product and services.</field>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet2'), ref('categ_meet4')])]"/>
|
||||
<field eval="time.strftime('%Y-%m-12 15:55:05')" name="date"/>
|
||||
<field eval="time.strftime('%Y-%m-12 18:55:05')" name="date_deadline"/>
|
||||
<field eval="3.0" name="duration"/>
|
||||
<field name="state">done</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_meeting_4" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="name">Requirements review</field>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet3')])]"/>
|
||||
<field eval="time.strftime('%Y-%m-20 8:00:00')" name="date"/>
|
||||
<field eval="time.strftime('%Y-%m-20 10:30:00')" name="date_deadline"/>
|
||||
<field eval="2.5" name="duration"/>
|
||||
<field name="state">open</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_meeting_5" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="name">Changes in Designing</field>
|
||||
<field name="email_from">info@opensides.be</field>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet5')])]"/>
|
||||
<field eval="time.strftime('%Y-%m-22 11:05:00')" name="date"/>
|
||||
<field eval="time.strftime('%Y-%m-22 16:05:00')" name="date_deadline"/>
|
||||
<field eval="5" name="duration"/>
|
||||
<field name="state">draft</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_meeting_6" model="crm.meeting">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="name">Presentation for new Services</field>
|
||||
<field name="categ_ids" eval="[(6,0,[ref('categ_meet1'), ref('categ_meet4')])]"/>
|
||||
<field eval="time.strftime('%Y-%m-18 2:00:00')" name="date"/>
|
||||
<field eval="time.strftime('%Y-%m-18 10:30:00')" name="date_deadline"/>
|
||||
<field eval="8.5" name="duration"/>
|
||||
<field name="state">done</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<page string="Meeting Detail">
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id" />
|
||||
<field name="user_id"/>
|
||||
<field name="categ_ids" widget="many2many_tags"/>
|
||||
<field name="location"/>
|
||||
<field name="organizer" groups="base.group_no_one"/>
|
||||
|
|
|
@ -53,6 +53,8 @@ class sale_config_settings(osv.osv_memory):
|
|||
_name = 'sale.config.settings'
|
||||
_inherit = 'res.config.settings'
|
||||
_columns = {
|
||||
'module_web_linkedin': fields.boolean('get contacts automatically from LinkedIn',
|
||||
help="""When you create a new contact (person or company), you will be able to load all the data from LinkedIn (photos, address, etc)."""),
|
||||
'module_crm': fields.boolean('CRM'),
|
||||
'module_plugin_thunderbird': fields.boolean('enable Thunderbird plugin',
|
||||
help="""The plugin allows you archive email and its attachments to the selected
|
||||
|
|
|
@ -71,6 +71,18 @@
|
|||
or
|
||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
||||
</header>
|
||||
<div name="linkedin">
|
||||
<separator string="Social Network Integration"/>
|
||||
<group name="LinkedIn">
|
||||
<label for="id" string="Contacts"/>
|
||||
<div name="LinkedIn">
|
||||
<div name="module_web_linkedin" class="oe_inline">
|
||||
<field name="module_web_linkedin"/>
|
||||
<label for="module_web_linkedin"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
</div>
|
||||
<div name="customer feature">
|
||||
<separator string="Quotations and Sales Orders"/>
|
||||
<group name="Customer">
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
|
@ -15,11 +16,11 @@
|
|||
# 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 board
|
||||
import wizard
|
||||
import controllers
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
|
@ -35,15 +36,19 @@ The user can also publish notes.
|
|||
'depends': ['base'],
|
||||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
'wizard/board_menu_create_view.xml',
|
||||
'board_view.xml',
|
||||
'board_data_admin.xml',
|
||||
'board_data_home.xml',
|
||||
'board_mydashboard_view.xml'
|
||||
],
|
||||
'demo_xml': [
|
||||
'board_demo.xml'
|
||||
"js": [
|
||||
'static/src/js/dashboard.js',
|
||||
],
|
||||
"css": [
|
||||
'static/src/css/dashboard.css',
|
||||
],
|
||||
'qweb': [
|
||||
"static/src/xml/*.xml",
|
||||
],
|
||||
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'certificate': '0076912305725',
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
|
@ -19,75 +20,58 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from operator import itemgetter
|
||||
from textwrap import dedent
|
||||
from osv import fields, osv
|
||||
import time
|
||||
import tools
|
||||
|
||||
class board_board(osv.osv):
|
||||
"""
|
||||
Board
|
||||
"""
|
||||
_name = 'board.board'
|
||||
_description = "Board"
|
||||
_auto = False
|
||||
_columns = {}
|
||||
|
||||
def create_view(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Create view
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Board's IDs
|
||||
@return: arch of xml view.
|
||||
"""
|
||||
arch = """<?xml version="1.0"?>
|
||||
<form string="My Board" version="7.0">
|
||||
<board style="1-1">
|
||||
<column/>
|
||||
<column/>
|
||||
</board>
|
||||
</form>"""
|
||||
return arch
|
||||
@tools.cache()
|
||||
def list(self, cr, uid, context=None):
|
||||
Actions = self.pool.get('ir.actions.act_window')
|
||||
Menus = self.pool.get('ir.ui.menu')
|
||||
IrValues = self.pool.get('ir.values')
|
||||
|
||||
act_ids = Actions.search(cr, uid, [('res_model', '=', self._name)], context=context)
|
||||
refs = ['%s,%s' % (Actions._name, act_id) for act_id in act_ids]
|
||||
|
||||
# cannot search "action" field on menu (non stored function field without search_fnct)
|
||||
irv_ids = IrValues.search(cr, uid, [
|
||||
('model', '=', 'ir.ui.menu'),
|
||||
('key', '=', 'action'),
|
||||
('key2', '=', 'tree_but_open'),
|
||||
('value', 'in', refs),
|
||||
], context=context)
|
||||
menu_ids = map(itemgetter('res_id'), IrValues.read(cr, uid, irv_ids, ['res_id'], context=context))
|
||||
menu_names = Menus.name_get(cr, uid, menu_ids, context=context)
|
||||
return [dict(id=m[0], name=m[1]) for m in menu_names]
|
||||
|
||||
def _clear_list_cache(self):
|
||||
self.list.clear_cache(self)
|
||||
|
||||
def create(self, cr, user, vals, context=None):
|
||||
"""
|
||||
create new record.
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param vals: dictionary of values for every field.
|
||||
dictionary must use this form: {‘name_of_the_field’: value, ...}
|
||||
@return: id of new created record of board.board.
|
||||
"""
|
||||
return 0
|
||||
|
||||
|
||||
if not 'name' in vals:
|
||||
return False
|
||||
id = super(board_board, self).create(cr, user, vals, context=context)
|
||||
view_id = self.pool.get('ir.ui.view').create(cr, user, {
|
||||
'name': vals['name'],
|
||||
'model': 'board.board',
|
||||
'priority': 16,
|
||||
'type': 'form',
|
||||
'arch': self.create_view(cr, user, id, context=context),
|
||||
})
|
||||
|
||||
super(board_board, self).write(cr, user, [id], {'view_id': view_id}, context)
|
||||
return id
|
||||
|
||||
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None,\
|
||||
toolbar=False, submenu=False):
|
||||
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
"""
|
||||
Overrides orm field_view_get.
|
||||
@return: Dictionary of Fields, arch and toolbar.
|
||||
"""
|
||||
|
||||
res = {}
|
||||
res = super(board_board, self).fields_view_get(cr, user, view_id, view_type,\
|
||||
context, toolbar=toolbar, submenu=submenu)
|
||||
res = super(board_board, self).fields_view_get(cr, user, view_id, view_type,
|
||||
context, toolbar=toolbar, submenu=submenu)
|
||||
|
||||
vids = self.pool.get('ir.ui.view.custom').search(cr, user,\
|
||||
[('user_id', '=', user), ('ref_id' ,'=', view_id)])
|
||||
CustView = self.pool.get('ir.ui.view.custom')
|
||||
vids = CustView.search(cr, user, [('user_id', '=', user), ('ref_id', '=', view_id)], context=context)
|
||||
if vids:
|
||||
view_id = vids[0]
|
||||
arch = self.pool.get('ir.ui.view.custom').browse(cr, user, view_id, context=context)
|
||||
arch = CustView.browse(cr, user, view_id, context=context)
|
||||
res['custom_view_id'] = view_id
|
||||
res['arch'] = arch.arch
|
||||
res['arch'] = self._arch_preprocessing(cr, user, res['arch'], context=context)
|
||||
|
@ -98,10 +82,10 @@ class board_board(osv.osv):
|
|||
from lxml import etree
|
||||
def remove_unauthorized_children(node):
|
||||
for child in node.iterchildren():
|
||||
if child.tag=='action' and child.get('invisible'):
|
||||
if child.tag == 'action' and child.get('invisible'):
|
||||
node.remove(child)
|
||||
else:
|
||||
child=remove_unauthorized_children(child)
|
||||
child = remove_unauthorized_children(child)
|
||||
return node
|
||||
|
||||
def encode(s):
|
||||
|
@ -110,16 +94,84 @@ class board_board(osv.osv):
|
|||
return s
|
||||
|
||||
archnode = etree.fromstring(encode(arch))
|
||||
return etree.tostring(remove_unauthorized_children(archnode),pretty_print=True)
|
||||
return etree.tostring(remove_unauthorized_children(archnode), pretty_print=True)
|
||||
|
||||
|
||||
class board_create(osv.osv_memory):
|
||||
|
||||
def board_create(self, cr, uid, ids, context=None):
|
||||
assert len(ids) == 1
|
||||
this = self.browse(cr, uid, ids[0], context=context)
|
||||
|
||||
view_arch = dedent("""<?xml version="1.0"?>
|
||||
<form string="%s" version="7.0">
|
||||
<board style="2-1">
|
||||
<column/>
|
||||
<column/>
|
||||
</board>
|
||||
</form>
|
||||
""".strip() % (this.name,))
|
||||
|
||||
view_id = self.pool.get('ir.ui.view').create(cr, uid, {
|
||||
'name': this.name,
|
||||
'model': 'board.board',
|
||||
'priority': 16,
|
||||
'type': 'form',
|
||||
'arch': view_arch,
|
||||
}, context=context)
|
||||
|
||||
action_id = self.pool.get('ir.actions.act_window').create(cr, uid, {
|
||||
'name': this.name,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'board.board',
|
||||
'usage': 'menu',
|
||||
'view_id': view_id,
|
||||
'help': dedent('''<div class="oe_empty_custom_dashboard">
|
||||
<p>
|
||||
<b>This dashboard is empty.</b>
|
||||
</p><p>
|
||||
To add the first report into this dashboard, go to any
|
||||
menu, switch to list or graph view, and click <i>'Add to
|
||||
Dashboard'</i> in the extended search options.
|
||||
</p><p>
|
||||
You can filter and group data before inserting into the
|
||||
dashboard using the search options.
|
||||
</p>
|
||||
</div>
|
||||
''')
|
||||
}, context=context)
|
||||
|
||||
menu_id = self.pool.get('ir.ui.menu').create(cr, uid, {
|
||||
'name': this.name,
|
||||
'parent_id': this.menu_parent_id.id,
|
||||
'action': 'ir.actions.act_window,%s' % (action_id,)
|
||||
}, context=context)
|
||||
|
||||
self.pool.get('board.board')._clear_list_cache()
|
||||
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'reload',
|
||||
'params': {
|
||||
'menu_id': menu_id
|
||||
},
|
||||
}
|
||||
|
||||
def _default_menu_parent_id(self, cr, uid, context=None):
|
||||
_, menu_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'menu_reporting_dashboard')
|
||||
return menu_id
|
||||
|
||||
_name = "board.create"
|
||||
_description = "Board Creation"
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Dashboard', size=64, required=True),
|
||||
'view_id': fields.many2one('ir.ui.view', 'Board View'),
|
||||
'name': fields.char('Board Name', size=64, required=True),
|
||||
'menu_parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', required=True),
|
||||
}
|
||||
|
||||
# the following lines added to let the button on dashboard work.
|
||||
_defaults = {
|
||||
'name':lambda *args: 'Dashboard'
|
||||
'menu_parent_id': _default_menu_parent_id,
|
||||
}
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,41 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- neat client actions that can be used in dashboards to display res_widgets -->
|
||||
<record id="action_application_tiles" model="ir.actions.client">
|
||||
<field name="name">Applications Tiles</field>
|
||||
<field name="tag">board.home.applications</field>
|
||||
</record>
|
||||
<record id="action_res_widgets_tweets" model="ir.actions.client">
|
||||
<field name="name">Tweets Widget</field>
|
||||
<field name="tag">board.home.widgets</field>
|
||||
<field name="params" eval="{'widget_id': ref('base.openerp_favorites_twitter_widget')}"/>
|
||||
</record>
|
||||
<record id="action_res_widgets_events" model="ir.actions.client">
|
||||
<field name="name">Events Widget</field>
|
||||
<field name="tag">board.home.widgets</field>
|
||||
<field name="params" eval="{'widget_id': ref('base.events_widget')}"/>
|
||||
</record>
|
||||
<record id="action_res_widgets_facebook" model="ir.actions.client">
|
||||
<field name="name">Facebook Widget</field>
|
||||
<field name="tag">board.home.widgets</field>
|
||||
<field name="params" eval="{'widget_id': ref('base.facebook_widget')}"/>
|
||||
</record>
|
||||
<record id="action_res_widgets_note" model="ir.actions.client">
|
||||
<field name="name">Note Widget</field>
|
||||
<field name="tag">board.home.widgets</field>
|
||||
<field name="params" eval="{'widget_id': ref('base.note_widget')}"/>
|
||||
</record>
|
||||
<record id="action_res_widgets_map" model="ir.actions.client">
|
||||
<field name="name">Google Maps Widget</field>
|
||||
<field name="tag">board.home.widgets</field>
|
||||
<field name="params" eval="{'widget_id': ref('base.google_maps_widget')}"/>
|
||||
</record>
|
||||
<record id="action_res_widgets_currency_converter" model="ir.actions.client">
|
||||
<field name="name">Currency Converter Widget</field>
|
||||
<field name="tag">board.home.widgets</field>
|
||||
<field name="params" eval="{'widget_id': ref('base.currency_converter_widget')}"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="1">
|
||||
<!--My Dashboard-->
|
||||
<record model="ir.ui.view" id="board_my_dash_view">
|
||||
<field name="name">My Dashboard</field>
|
||||
|
|
|
@ -1,64 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- Board Search View -->
|
||||
<record id="view_board_search" model="ir.ui.view">
|
||||
<field name="name">board.board.search</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Dashboard">
|
||||
<field name="name" string="Dashboard"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Board Tree View -->
|
||||
<record id="view_board_tree" model="ir.ui.view">
|
||||
<field name="name">board.board.tree</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Dashboard">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Board Form View -->
|
||||
<record id="view_board_form" model="ir.ui.view">
|
||||
<field name="name">board.board.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<record id="view_board_create" model="ir.ui.view">
|
||||
<field name="name">board.create.form</field>
|
||||
<field name="model">board.create</field>
|
||||
<field name="type">form</field>
|
||||
<field eval="1" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Dashboard" version="7.0">
|
||||
<header>
|
||||
<button name="%(action_board_menu_create)d" string="Create Menu" type="action" class="oe_highlight"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="view_id" invisible="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
<form string="Create New Dashboard" version="7.0">
|
||||
<group colspan="4">
|
||||
<field name="name"/>
|
||||
<field name="menu_parent_id"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button string="Create" name="board_create" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for DashBoard Definition form -->
|
||||
<record id="action_view_board_list_form" model="ir.actions.act_window">
|
||||
<field name="name">Dashboard Definition</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<record id="action_board_create" model="ir.actions.act_window">
|
||||
<field name="name">Create Board</field>
|
||||
<field name="res_model">board.create</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_board_search"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_board_create"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_view_board_list_form"
|
||||
id="menu_view_board_form" parent="base.menu_reporting_config"
|
||||
|
||||
<menuitem action="action_board_create"
|
||||
id="menu_board_create" parent="base.menu_reporting_config"
|
||||
groups="base.group_no_one"
|
||||
sequence="2"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from xml.etree import ElementTree
|
||||
|
||||
try:
|
||||
import openerp.addons.web.common.http as openerpweb
|
||||
from openerp.addons.web.common import nonliterals
|
||||
from openerp.addons.web.controllers.main import load_actions_from_ir_values
|
||||
except ImportError:
|
||||
import web.common.http as openerpweb # noqa
|
||||
from web.common import nonliterals # noqa
|
||||
from web.controllers.main import load_actions_from_ir_values # noqa
|
||||
|
||||
class Board(openerpweb.Controller):
|
||||
_cp_path = '/board'
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
def add_to_dashboard(self, req, menu_id, action_id, context_to_save, domain, view_mode, name=''):
|
||||
# FIXME move this method to board.board model
|
||||
to_eval = nonliterals.CompoundContext(context_to_save)
|
||||
to_eval.session = req.session
|
||||
ctx = dict((k, v) for k, v in to_eval.evaluate().iteritems()
|
||||
if not k.startswith('search_default_'))
|
||||
ctx['dashboard_merge_domains_contexts'] = False # TODO: replace this 6.1 workaround by attribute on <action/>
|
||||
domain = nonliterals.CompoundDomain(domain)
|
||||
domain.session = req.session
|
||||
domain = domain.evaluate()
|
||||
|
||||
dashboard_action = load_actions_from_ir_values(req, 'action', 'tree_but_open', [('ir.ui.menu', menu_id)], False)
|
||||
|
||||
if dashboard_action:
|
||||
action = dashboard_action[0][2]
|
||||
if action['res_model'] == 'board.board' and action['views'][0][1] == 'form':
|
||||
# Maybe should check the content instead of model board.board ?
|
||||
view_id = action['views'][0][0]
|
||||
board = req.session.model(action['res_model']).fields_view_get(view_id, 'form')
|
||||
if board and 'arch' in board:
|
||||
xml = ElementTree.fromstring(board['arch'])
|
||||
column = xml.find('./board/column')
|
||||
if column is not None:
|
||||
new_action = ElementTree.Element('action', {
|
||||
'name': str(action_id),
|
||||
'string': name,
|
||||
'view_mode': view_mode,
|
||||
'context': str(ctx),
|
||||
'domain': str(domain)
|
||||
})
|
||||
column.insert(0, new_action)
|
||||
arch = ElementTree.tostring(xml, 'utf-8')
|
||||
return req.session.model('ir.ui.view.custom').create({
|
||||
'user_id': req.session._uid,
|
||||
'ref_id': view_id,
|
||||
'arch': arch
|
||||
}, req.session.eval_context(req.context))
|
||||
|
||||
return False
|
|
@ -1,3 +1,2 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_board_board all,board.board,model_board_board,,1,0,0,0
|
||||
access_board_board system,board.board system,model_board_board,base.group_system,1,1,1,1
|
||||
|
|
|
|
@ -0,0 +1,73 @@
|
|||
.openerp .oe_dashboard_links {
|
||||
text-align: right;
|
||||
margin: 0 4px 6px 0;
|
||||
}
|
||||
.openerp .oe_dashboard {
|
||||
width: 100%;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action {
|
||||
margin: 0 8px 8px 0;
|
||||
background-color: white;
|
||||
border: 1px solid;
|
||||
border-color: #e5e5e5 #dbdbdb #d2d2d2;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_header {
|
||||
font-size: 16px;
|
||||
vertical-align: middle;
|
||||
margin: 0;
|
||||
padding: 12px;
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
-webkit-border-radius: 3px 3px 0 0;
|
||||
border-radius: 3px 3px 0 0;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_header:hover {
|
||||
cursor: move;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_header .oe_icon {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
color: #b3b3b3;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_header .oe_icon:hover {
|
||||
color: #666666;
|
||||
text-decoration: none;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_header .oe_close:after {
|
||||
content: "×";
|
||||
margin-left: 4px;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_header .oe_minimize:after {
|
||||
content: "-";
|
||||
margin-left: 4px;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_header .oe_maximize:after {
|
||||
content: "+";
|
||||
margin-left: 4px;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_header_empty {
|
||||
padding-top: 0;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_button_create {
|
||||
margin-left: 4px;
|
||||
padding: 0 4px 0 4px;
|
||||
height: 16px !important;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_content {
|
||||
padding: 0 12px 12px 12px;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_content .oe_view_manager_header {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_content .oe_list_content > thead {
|
||||
border-bottom: 1px;
|
||||
}
|
||||
.openerp .oe_dashboard .oe_action .oe_content .oe_list_content > tbody tr:nth-child(odd) {
|
||||
background: transparent;
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
@mixin radius($radius: 5px)
|
||||
-moz-border-radius: $radius
|
||||
-webkit-border-radius: $radius
|
||||
border-radius: $radius
|
||||
|
||||
@mixin box-shadow($bsval: 0px 1px 4px #777)
|
||||
-moz-box-shadow: $bsval
|
||||
-webkit-box-shadow: $bsval
|
||||
box-shadow: $bsval
|
||||
|
||||
.openerp
|
||||
.oe_dashboard_links
|
||||
text-align: right
|
||||
margin: 0 4px 6px 0
|
||||
.oe_dashboard
|
||||
width: 100%
|
||||
.oe_action
|
||||
margin: 0 8px 8px 0
|
||||
background-color: white
|
||||
border: 1px solid
|
||||
border-color: #e5e5e5 #dbdbdb #d2d2d2
|
||||
@include radius(3px)
|
||||
@include box-shadow(0 0 2px rgba(0,0,0,0.2))
|
||||
.oe_header
|
||||
font-size: 16px
|
||||
vertical-align: middle
|
||||
margin: 0
|
||||
padding: 12px
|
||||
@include radius(3px 3px 0 0)
|
||||
|
||||
//border-bottom: 1px dotted #dbdbdb
|
||||
//@include radius(2px 2px 0 0)
|
||||
//@include vertical-gradient(#FCFCFC, #DEDEDE)
|
||||
&:hover
|
||||
cursor: move
|
||||
.oe_icon
|
||||
float: right
|
||||
cursor: pointer
|
||||
color: #b3b3b3
|
||||
&:hover
|
||||
color: #666
|
||||
text-decoration: none
|
||||
.oe_close:after
|
||||
content: "×"
|
||||
margin-left: 4px
|
||||
.oe_minimize:after
|
||||
content: "-"
|
||||
margin-left: 4px
|
||||
.oe_maximize:after
|
||||
content: "+"
|
||||
margin-left: 4px
|
||||
.oe_header_empty
|
||||
padding-top: 0
|
||||
padding-bottom: 2px
|
||||
.oe_button_create
|
||||
margin-left: 4px
|
||||
padding: 0 4px 0 4px
|
||||
height: 16px !important
|
||||
//.oe_rename
|
||||
//float: left
|
||||
//padding-right: 4px
|
||||
//position: relative
|
||||
//top: 1px
|
||||
//.oe_input
|
||||
//height: 16px;
|
||||
//position: relative;
|
||||
//top: 2px;
|
||||
//.ui-sortable-placeholder
|
||||
//border: 1px dotted black;
|
||||
//visibility: visible !important;
|
||||
//height: 50px !important;
|
||||
//*
|
||||
//visibility: hidden;
|
||||
.oe_content
|
||||
padding: 0 12px 12px 12px
|
||||
.oe_view_manager_header
|
||||
display: none
|
||||
.oe_list_content
|
||||
> thead
|
||||
border-bottom: 1px
|
||||
> tbody
|
||||
tr:nth-child(odd)
|
||||
background: transparent
|
Binary file not shown.
After Width: | Height: | Size: 306 B |
Binary file not shown.
After Width: | Height: | Size: 313 B |
Binary file not shown.
After Width: | Height: | Size: 313 B |
Binary file not shown.
After Width: | Height: | Size: 292 B |
Binary file not shown.
After Width: | Height: | Size: 304 B |
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
|
@ -0,0 +1,378 @@
|
|||
openerp.board = function(instance) {
|
||||
var QWeb = instance.web.qweb,
|
||||
_t = instance.web._t;
|
||||
|
||||
if (!instance.board) {
|
||||
/** @namespace */
|
||||
instance.board = {};
|
||||
}
|
||||
|
||||
instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
|
||||
init: function(view, node) {
|
||||
this._super(view, node);
|
||||
this.form_template = 'DashBoard';
|
||||
this.actions_attrs = {};
|
||||
this.action_managers = [];
|
||||
},
|
||||
start: function() {
|
||||
var self = this;
|
||||
this._super.apply(this, arguments);
|
||||
|
||||
this.$element.find('.oe_dashboard_column').sortable({
|
||||
connectWith: '.oe_dashboard_column',
|
||||
handle: '.oe_header',
|
||||
scroll: false
|
||||
}).disableSelection().bind('sortstop', self.do_save_dashboard);
|
||||
|
||||
// Events
|
||||
this.$element.find('.oe_dashboard_link_reset').click(this.on_reset);
|
||||
this.$element.find('.oe_dashboard_link_change_layout').click(this.on_change_layout);
|
||||
|
||||
this.$element.delegate('.oe_dashboard_column .oe_fold', 'click', this.on_fold_action);
|
||||
this.$element.delegate('.oe_dashboard_column .oe_close', 'click', this.on_close_action);
|
||||
|
||||
// Init actions
|
||||
_.each(this.node.children, function(column, column_index) {
|
||||
_.each(column.children, function(action, action_index) {
|
||||
delete(action.attrs.width);
|
||||
delete(action.attrs.height);
|
||||
delete(action.attrs.colspan);
|
||||
var action_id = _.str.toNumber(action.attrs.name);
|
||||
if (!_.isNaN(action_id)) {
|
||||
self.rpc('/web/action/load', {action_id: action_id}, function(result) {
|
||||
self.on_load_action(result, column_index + '_' + action_index, action.attrs);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
on_reset: function() {
|
||||
this.rpc('/web/view/undo_custom', {
|
||||
view_id: this.view.fields_view.view_id,
|
||||
reset: true
|
||||
}, this.do_reload);
|
||||
},
|
||||
on_change_layout: function() {
|
||||
var self = this;
|
||||
var qdict = {
|
||||
current_layout : this.$element.find('.oe_dashboard').attr('data-layout')
|
||||
};
|
||||
var $dialog = instance.web.dialog($('<div>'), {
|
||||
modal: true,
|
||||
title: _t("Edit Layout"),
|
||||
width: 'auto',
|
||||
height: 'auto'
|
||||
}).html(QWeb.render('DashBoard.layouts', qdict));
|
||||
$dialog.find('li').click(function() {
|
||||
var layout = $(this).attr('data-layout');
|
||||
$dialog.dialog('destroy');
|
||||
self.do_change_layout(layout);
|
||||
});
|
||||
},
|
||||
do_change_layout: function(new_layout) {
|
||||
var $dashboard = this.$element.find('.oe_dashboard');
|
||||
var current_layout = $dashboard.attr('data-layout');
|
||||
if (current_layout != new_layout) {
|
||||
var clayout = current_layout.split('-').length,
|
||||
nlayout = new_layout.split('-').length,
|
||||
column_diff = clayout - nlayout;
|
||||
if (column_diff > 0) {
|
||||
var $last_column = $();
|
||||
$dashboard.find('.oe_dashboard_column').each(function(k, v) {
|
||||
if (k >= nlayout) {
|
||||
$(v).find('.oe_action').appendTo($last_column);
|
||||
} else {
|
||||
$last_column = $(v);
|
||||
}
|
||||
});
|
||||
}
|
||||
$dashboard.toggleClass('oe_dashboard_layout_' + current_layout + ' oe_dashboard_layout_' + new_layout);
|
||||
$dashboard.attr('data-layout', new_layout);
|
||||
this.do_save_dashboard();
|
||||
}
|
||||
},
|
||||
on_fold_action: function(e) {
|
||||
var $e = $(e.currentTarget),
|
||||
$action = $e.parents('.oe_action:first'),
|
||||
id = parseInt($action.attr('data-id'), 10);
|
||||
if ($e.is('.oe_minimize')) {
|
||||
$action.data('action_attrs').fold = '1';
|
||||
} else {
|
||||
delete($action.data('action_attrs').fold);
|
||||
}
|
||||
$e.toggleClass('oe_minimize oe_maximize');
|
||||
$action.find('.oe_content').toggle();
|
||||
this.do_save_dashboard();
|
||||
},
|
||||
on_close_action: function(e) {
|
||||
if (confirm(_t("Are you sure you want to remove this item ?"))) {
|
||||
$(e.currentTarget).parents('.oe_action:first').remove();
|
||||
this.do_save_dashboard();
|
||||
}
|
||||
},
|
||||
do_save_dashboard: function() {
|
||||
var self = this;
|
||||
var board = {
|
||||
form_title : this.view.fields_view.arch.attrs.string,
|
||||
style : this.$element.find('.oe_dashboard').attr('data-layout'),
|
||||
columns : []
|
||||
};
|
||||
this.$element.find('.oe_dashboard_column').each(function() {
|
||||
var actions = [];
|
||||
$(this).find('.oe_action').each(function() {
|
||||
var action_id = $(this).attr('data-id'),
|
||||
new_attrs = _.clone($(this).data('action_attrs'));
|
||||
if (new_attrs.domain) {
|
||||
new_attrs.domain = new_attrs.domain_string;
|
||||
delete(new_attrs.domain_string);
|
||||
}
|
||||
if (new_attrs.context) {
|
||||
new_attrs.context = new_attrs.context_string;
|
||||
delete(new_attrs.context_string);
|
||||
}
|
||||
actions.push(new_attrs);
|
||||
});
|
||||
board.columns.push(actions);
|
||||
});
|
||||
var arch = QWeb.render('DashBoard.xml', board);
|
||||
this.rpc('/web/view/add_custom', {
|
||||
view_id: this.view.fields_view.view_id,
|
||||
arch: arch
|
||||
}, function() {
|
||||
self.$element.find('.oe_dashboard_link_reset').show();
|
||||
});
|
||||
},
|
||||
on_load_action: function(result, index, action_attrs) {
|
||||
var self = this,
|
||||
action = result.result,
|
||||
view_mode = action_attrs.view_mode;
|
||||
|
||||
if (action_attrs.context && action_attrs.context['dashboard_merge_domains_contexts'] === false) {
|
||||
// TODO: replace this 6.1 workaround by attribute on <action/>
|
||||
action.context = action_attrs.context || {};
|
||||
action.domain = action_attrs.domain || [];
|
||||
} else {
|
||||
if (action_attrs.context) {
|
||||
action.context = _.extend((action.context || {}), action_attrs.context);
|
||||
}
|
||||
if (action_attrs.domain) {
|
||||
action.domain = action.domain || [];
|
||||
action.domain.unshift.apply(action.domain, action_attrs.domain);
|
||||
}
|
||||
}
|
||||
|
||||
var action_orig = _.extend({ flags : {} }, action);
|
||||
|
||||
if (view_mode && view_mode != action.view_mode) {
|
||||
action.views = _.map(view_mode.split(','), function(mode) {
|
||||
mode = mode === 'tree' ? 'list' : mode;
|
||||
return _(action.views).find(function(view) { return view[1] == mode; })
|
||||
|| [false, mode];
|
||||
});
|
||||
}
|
||||
|
||||
action.flags = {
|
||||
search_view : false,
|
||||
sidebar : false,
|
||||
views_switcher : false,
|
||||
action_buttons : false,
|
||||
pager: false,
|
||||
low_profile: true,
|
||||
display_title: false,
|
||||
list: {
|
||||
selectable: false
|
||||
}
|
||||
};
|
||||
var am = new instance.web.ActionManager(this),
|
||||
// FIXME: ideally the dashboard view shall be refactored like kanban.
|
||||
$action = $('#' + this.view.element_id + '_action_' + index);
|
||||
$action.parent().data('action_attrs', action_attrs);
|
||||
this.action_managers.push(am);
|
||||
am.appendTo($action);
|
||||
am.do_action(action);
|
||||
am.do_action = function (action) {
|
||||
self.do_action(action);
|
||||
};
|
||||
if (action_attrs.creatable && action_attrs.creatable !== 'false') {
|
||||
var action_id = parseInt(action_attrs.creatable, 10);
|
||||
$action.parent().find('button.oe_dashboard_button_create').click(function() {
|
||||
if (isNaN(action_id)) {
|
||||
action_orig.flags.default_view = 'form';
|
||||
self.do_action(action_orig);
|
||||
} else {
|
||||
self.rpc('/web/action/load', {
|
||||
action_id: action_id
|
||||
}, function(result) {
|
||||
result.result.flags = result.result.flags || {};
|
||||
result.result.flags.default_view = 'form';
|
||||
self.do_action(result.result);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (am.inner_widget) {
|
||||
am.inner_widget.on_mode_switch.add(function(mode) {
|
||||
var new_views = [];
|
||||
_.each(action_orig.views, function(view) {
|
||||
new_views[view[1] === mode ? 'unshift' : 'push'](view);
|
||||
});
|
||||
if (!new_views.length || new_views[0][1] !== mode) {
|
||||
new_views.unshift([false, mode]);
|
||||
}
|
||||
action_orig.views = new_views;
|
||||
action_orig.res_id = am.inner_widget.dataset.ids[am.inner_widget.dataset.index];
|
||||
self.do_action(action_orig);
|
||||
});
|
||||
}
|
||||
},
|
||||
renderElement: function() {
|
||||
this._super();
|
||||
|
||||
var check = _.detect(this.node.children, function(column, column_index) {
|
||||
return _.detect(column.children,function(element){
|
||||
return element.tag === "action"? element: false;
|
||||
});
|
||||
});
|
||||
if (!check) {
|
||||
return this.no_result();
|
||||
}
|
||||
// We should start with three columns available
|
||||
for (var i = this.node.children.length; i < 3; i++) {
|
||||
this.node.children.push({
|
||||
tag: 'column',
|
||||
attrs: {},
|
||||
children: []
|
||||
});
|
||||
}
|
||||
var rendered = QWeb.render(this.form_template, this);
|
||||
this.$element.html(rendered);
|
||||
},
|
||||
no_result: function() {
|
||||
if (this.view.options.action.help) {
|
||||
this.$element.append(
|
||||
$('<div class="oe_view_nocontent">')
|
||||
.append($('<div>').html(this.view.options.action.help || " "))
|
||||
);
|
||||
}
|
||||
},
|
||||
do_reload: function() {
|
||||
var view_manager = this.view.getParent(),
|
||||
action_manager = view_manager.getParent();
|
||||
this.view.destroy();
|
||||
action_manager.do_action(view_manager.action);
|
||||
}
|
||||
});
|
||||
instance.web.form.DashBoardLegacy = instance.web.form.DashBoard.extend({
|
||||
renderElement: function() {
|
||||
if (this.node.tag == 'hpaned') {
|
||||
this.node.attrs.style = '2-1';
|
||||
} else if (this.node.tag == 'vpaned') {
|
||||
this.node.attrs.style = '1';
|
||||
}
|
||||
this.node.tag = 'board';
|
||||
_.each(this.node.children, function(child) {
|
||||
if (child.tag.indexOf('child') == 0) {
|
||||
child.tag = 'column';
|
||||
var actions = [], first_child = child.children[0];
|
||||
if (first_child && first_child.tag == 'vpaned') {
|
||||
_.each(first_child.children, function(subchild) {
|
||||
actions.push.apply(actions, subchild.children);
|
||||
});
|
||||
child.children = actions;
|
||||
}
|
||||
}
|
||||
});
|
||||
this._super(this);
|
||||
}
|
||||
});
|
||||
|
||||
instance.web.form.tags.add('hpaned', 'instance.web.form.DashBoardLegacy');
|
||||
instance.web.form.tags.add('vpaned', 'instance.web.form.DashBoardLegacy');
|
||||
instance.web.form.tags.add('board', 'instance.web.form.DashBoard');
|
||||
|
||||
|
||||
instance.board.AddToDashboard = instance.web.search.Input.extend({
|
||||
template: 'SearchView.addtodashboard',
|
||||
_in_drawer: true,
|
||||
start: function () {
|
||||
var self = this;
|
||||
this.$element
|
||||
.on('click', 'h4', this.proxy('show_option'))
|
||||
.on('submit', 'form', function (e) {
|
||||
e.preventDefault();
|
||||
self.add_dashboard();
|
||||
});
|
||||
return this.load_data().then(this.proxy("render_data"));
|
||||
},
|
||||
load_data:function(){
|
||||
var board = new instance.web.Model('board.board');
|
||||
return board.call('list');
|
||||
},
|
||||
_x:function() {
|
||||
if (!instance.webclient) { return $.Deferred().reject(); }
|
||||
var dashboard_menu = instance.webclient.menu.data.data.children;
|
||||
return new instance.web.Model('ir.model.data')
|
||||
.query(['res_id'])
|
||||
.filter([['name','=','menu_reporting_dashboard']])
|
||||
.first().pipe(function (result) {
|
||||
var menu = _(dashboard_menu).chain()
|
||||
.pluck('children')
|
||||
.flatten(true)
|
||||
.find(function (child) { return child.id === result.res_id; })
|
||||
.value();
|
||||
return menu ? menu.children : [];
|
||||
});
|
||||
},
|
||||
render_data: function(dashboard_choices){
|
||||
var selection = instance.web.qweb.render(
|
||||
"SearchView.addtodashboard.selection", {
|
||||
selections: dashboard_choices});
|
||||
this.$("input").before(selection)
|
||||
},
|
||||
add_dashboard: function(){
|
||||
var self = this;
|
||||
var getParent = this.getParent();
|
||||
var view_parent = this.getParent().getParent();
|
||||
if (! view_parent.action || ! this.$element.find("select").val()) {
|
||||
this.do_warn("Can't find dashboard action");
|
||||
return;
|
||||
}
|
||||
var data = getParent.build_search_data();
|
||||
var context = new instance.web.CompoundContext(getParent.dataset.get_context() || []);
|
||||
var domain = new instance.web.CompoundDomain(getParent.dataset.get_domain() || []);
|
||||
_.each(data.contexts, context.add, context);
|
||||
_.each(data.domains, domain.add, domain);
|
||||
this.rpc('/board/add_to_dashboard', {
|
||||
menu_id: this.$element.find("select").val(),
|
||||
action_id: view_parent.action.id,
|
||||
context_to_save: context,
|
||||
domain: domain,
|
||||
view_mode: view_parent.active_view,
|
||||
name: this.$element.find("input").val()
|
||||
}, function(r) {
|
||||
if (r === false) {
|
||||
self.do_warn("Could not add filter to dashboard");
|
||||
} else {
|
||||
self.$element.toggleClass('oe_opened');
|
||||
self.do_notify("Filter added to dashboard", '');
|
||||
}
|
||||
});
|
||||
},
|
||||
show_option:function(){
|
||||
this.$element.toggleClass('oe_opened');
|
||||
if (! this.$element.hasClass('oe_opened'))
|
||||
return;
|
||||
this.$("input").val(this.getParent().fields_view.name || "" );
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
instance.web.SearchView.include({
|
||||
add_common_inputs: function() {
|
||||
this._super();
|
||||
(new instance.board.AddToDashboard(this));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
};
|
|
@ -0,0 +1,80 @@
|
|||
<template>
|
||||
<t t-name="DashBoard">
|
||||
<div class="oe_dashboard_links">
|
||||
<button type="button" class="button oe_dashboard_link_reset" title="Reset Layout.." t-att-style="view.fields_view.custom_view_id ? null : 'display: none'">
|
||||
<img src="/board/static/src/img/layout_2-1.png" width="16" height="16"/>
|
||||
<span> Reset </span>
|
||||
</button>
|
||||
<button type="button" class="button oe_dashboard_link_change_layout" title="Change Layout..">
|
||||
<img src="/board/static/src/img/layout_1-1-1.png" width="16" height="16"/>
|
||||
<span> Change Layout </span>
|
||||
</button>
|
||||
</div>
|
||||
<table t-att-data-layout="node.attrs.style" t-attf-class="oe_dashboard oe_dashboard_layout_#{node.attrs.style}" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td t-foreach="node.children" t-as="column" t-if="column.tag == 'column'"
|
||||
t-att-id="view.element_id + '_column_' + column_index" t-attf-class="oe_dashboard_column index_#{column_index}">
|
||||
|
||||
<t t-foreach="column.children" t-as="action" t-if="action.tag == 'action'" t-call="DashBoard.action"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
<t t-name="DashBoard.action">
|
||||
<div t-att-data-id="action.attrs.name" class="oe_action">
|
||||
<h2 t-attf-class="oe_header #{action.attrs.string ? '' : 'oe_header_empty'}">
|
||||
<t t-esc="action.attrs.string"/>
|
||||
<t t-if="!action.attrs.string">&nbsp;</t>
|
||||
<button t-if="action.attrs.creatable and action.attrs.creatable !== 'false'" class="oe_button oe_button_create">Create</button>
|
||||
<span class='oe_icon oe_close'></span>
|
||||
<span class='oe_icon oe_minimize oe_fold' t-if="!action.attrs.fold"></span>
|
||||
<span class='oe_icon oe_maximize oe_fold' t-if="action.attrs.fold"></span>
|
||||
</h2>
|
||||
<div t-attf-id="#{view.element_id}_action_#{column_index}_#{action_index}" class="oe_content" t-att-style="action.attrs.fold ? 'display: none' : null"></div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="DashBoard.layouts">
|
||||
<div class="oe_dashboard_layout_selector">
|
||||
<p>
|
||||
<strong>Choose dashboard layout</strong>
|
||||
</p>
|
||||
<ul>
|
||||
<li t-foreach="'1 1-1 1-1-1 1-2 2-1'.split(' ')" t-as="layout" t-att-data-layout="layout">
|
||||
<img t-attf-src="/board/static/src/img/layout_#{layout}.png"/>
|
||||
<img t-if="layout == current_layout"
|
||||
src="/web/static/src/img/icons/gtk-apply.png" width="16" height="16" class="oe_dashboard_selected_layout"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="DashBoard.xml">
|
||||
<form t-att-string="form_title" version="7.0">
|
||||
<board t-att-style="style">
|
||||
<column t-foreach="columns" t-as="column">
|
||||
<action t-foreach="column" t-as="action" t-att="action"/>
|
||||
</column>
|
||||
</board>
|
||||
</form>
|
||||
</t>
|
||||
<div t-name="HomeWidget" class="oe_dashboard_home_widget"/>
|
||||
<t t-name="HomeWidget.content">
|
||||
<h3><t t-esc="widget.title"/></h3>
|
||||
<iframe width="100%" frameborder="0" t-att-src="url"/>
|
||||
</t>
|
||||
|
||||
<div t-name="SearchView.addtodashboard" class="oe_searchview_dashboard">
|
||||
<h4>Add to Dashboard</h4>
|
||||
<form>
|
||||
<p><input placeholder="Title of new dashboard item"/></p>
|
||||
<button class="oe_apply" type="submit">Add</button>
|
||||
</form>
|
||||
</div>
|
||||
<t t-name="SearchView.addtodashboard.selection">
|
||||
<select>
|
||||
<option t-foreach="selections" t-as="element"
|
||||
t-att-value="element.id ">
|
||||
<t t-esc="element.name"/></option>
|
||||
</select>
|
||||
</t>
|
||||
|
||||
</template>
|
|
@ -1,102 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
class board_menu_create(osv.osv_memory):
|
||||
"""
|
||||
Create Menu
|
||||
"""
|
||||
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
|
||||
|
||||
check dashboard view on menu name field.
|
||||
@return: False
|
||||
"""
|
||||
data = context and context.get('active_id', False) or False
|
||||
if data:
|
||||
return False
|
||||
|
||||
|
||||
def board_menu_create(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Create Menu.
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Board Menu Create's IDs
|
||||
@return: Dictionary {}.
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
context_id = context and context.get('active_id', False) or False
|
||||
if context_id:
|
||||
board = self.pool.get('board.board').browse(cr, uid, context_id, context=context)
|
||||
action_id = self.pool.get('ir.actions.act_window').create(cr, uid, {
|
||||
'name': board.name,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'board.board',
|
||||
'view_id': board.view_id.id,
|
||||
'help': _('''<div class="oe_empty_custom_dashboard">
|
||||
<p>
|
||||
<b>This dashboard is empty.</b>
|
||||
</p><p>
|
||||
To add the first report into this dashboard, go to any
|
||||
menu, switch to list or graph view, and click <i>'Add to
|
||||
Dashboard'</i> in the extended search options.
|
||||
</p><p>
|
||||
You can filter and group data before inserting into the
|
||||
dashboard using the search options.
|
||||
</p>
|
||||
</div>
|
||||
''')
|
||||
})
|
||||
obj_menu = self.pool.get('ir.ui.menu')
|
||||
#start Loop
|
||||
for data in self.browse(cr, uid, ids, context=context):
|
||||
obj_menu.create(cr, uid, {
|
||||
'name': data.menu_name,
|
||||
'parent_id': data.menu_parent_id.id,
|
||||
'action': 'ir.actions.act_window,' + str(action_id)
|
||||
}, context=context)
|
||||
#End Loop
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
_name = "board.menu.create"
|
||||
_description = "Menu Create"
|
||||
|
||||
_columns = {
|
||||
'menu_name': fields.char('Menu Name', size=64, required=True),
|
||||
'menu_parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', required=True),
|
||||
}
|
||||
|
||||
board_menu_create()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!--Board menu create wizard -->
|
||||
|
||||
<record id="view_board_menu_create" model="ir.ui.view">
|
||||
<field name="name">board.menu.create.form</field>
|
||||
<field name="model">board.menu.create</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Menu For Dashboard" version="7.0">
|
||||
<group colspan="4" string="Menu Information">
|
||||
<field name="menu_name"/>
|
||||
<field name="menu_parent_id"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button string="Create Menu" name="board_menu_create" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Action for Board Menu create wizard. -->
|
||||
|
||||
<record id="action_board_menu_create" model="ir.actions.act_window">
|
||||
<field name="name">Create Board Menu</field>
|
||||
<field name="res_model">board.menu.create</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_board_menu_create"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,821 @@
|
|||
# Mongolian translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-08-10 08:54+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Mongolian <mn@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-11 05:46+0000\n"
|
||||
"X-Generator: Launchpad (build 15780)\n"
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "Value Mapping"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:caldav.browse,url:0
|
||||
msgid "Url of the caldav server, use for synchronization"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:99
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Prerequire\n"
|
||||
"----------\n"
|
||||
"There is no buit-in way to synchronize calendar with caldav.\n"
|
||||
"So you need to install a third part software : Calendar (CalDav)\n"
|
||||
"for now it's the only one\n"
|
||||
"\n"
|
||||
"configuration\n"
|
||||
"-------------\n"
|
||||
"\n"
|
||||
"1. Open Calendar Sync\n"
|
||||
" I'll get an interface with 2 tabs\n"
|
||||
" Stay on the first one\n"
|
||||
"\n"
|
||||
"2. CaDAV Calendar URL : put the URL given above (ie : "
|
||||
"http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)\n"
|
||||
"\n"
|
||||
"3. Put your openerp username and password\n"
|
||||
"\n"
|
||||
"4. If your server don't use SSL, you'll get a warnign, say \"Yes\"\n"
|
||||
"\n"
|
||||
"5. Then you can synchronize manually or custom the settings to synchronize "
|
||||
"every x minutes.\n"
|
||||
"\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.alias,name:0
|
||||
msgid "Filename"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_calendar_event_export
|
||||
msgid "Event Export"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "Provide Path for Remote Calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_event_import_values
|
||||
msgid "Import .ics File"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:caldav.browse:0
|
||||
#: view:calendar.event.export:0
|
||||
msgid "_Close"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.attributes,type:0
|
||||
#: selection:basic.calendar.lines,name:0
|
||||
msgid "Attendee"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: sql_constraint:basic.calendar.fields:0
|
||||
msgid "Can not map a field more than once"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.actions.act_window,help:caldav.action_caldav_form
|
||||
msgid ""
|
||||
"\"Calendars\" allow you to Customize calendar event and todo attribute with "
|
||||
"any of OpenERP model.Caledars provide iCal Import/Export "
|
||||
"functionality.Webdav server that provides remote access to calendar.Help You "
|
||||
"to synchronize Meeting with Calendars client.You can access Calendars using "
|
||||
"CalDAV clients, like sunbird, Calendar Evaluation, Mobile."
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:789
|
||||
#: code:addons/caldav/calendar.py:879
|
||||
#: code:addons/caldav/wizard/calendar_event_import.py:63
|
||||
#, python-format
|
||||
msgid "Warning !"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.lines,object_id:0
|
||||
msgid "Object"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "Todo"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_user_preference
|
||||
msgid "User preference Form"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:user.preference,service:0
|
||||
msgid "Services"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.fields,fn:0
|
||||
msgid "Expression as constant"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "Evolution"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "Ok"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:123
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
" 1. Go to Calendar View\n"
|
||||
"\n"
|
||||
" 2. File -> New -> Calendar\n"
|
||||
"\n"
|
||||
" 3. Fill the form\n"
|
||||
" - type : CalDav\n"
|
||||
" - name : Whaterver you want (ie : Meeting)\n"
|
||||
" - url : "
|
||||
"http://HOST:PORT/webdav/DB_NAME/calendars/users/USER/c/Meetings (ie : "
|
||||
"http://localhost:8069/webdav/db_1/calendars/users/demo/c/Meetings) the one "
|
||||
"given on the top of this window\n"
|
||||
" - uncheck \"User SSL\"\n"
|
||||
" - Username : Your username (ie : Demo)\n"
|
||||
" - Refresh : everytime you want that evolution synchronize the data "
|
||||
"with the server\n"
|
||||
"\n"
|
||||
" 4. Click ok and give your openerp password\n"
|
||||
"\n"
|
||||
" 5. A new calendar named with the name you gave should appear on the left "
|
||||
"side.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:879
|
||||
#, python-format
|
||||
msgid "Please provide proper configuration of \"%s\" in Calendar Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:user.preference:0
|
||||
msgid "Caldav's host name configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:caldav.browse,url:0
|
||||
msgid "Caldav Server"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.fields,fn:0
|
||||
msgid "Datetime In UTC"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "iPhone"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar,type:0
|
||||
#: selection:basic.calendar.attributes,type:0
|
||||
#: selection:basic.calendar.lines,name:0
|
||||
msgid "TODO"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.export:0
|
||||
msgid "Export ICS"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.fields,fn:0
|
||||
msgid "Use the field"
|
||||
msgstr "Энгийн талбар"
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:789
|
||||
#, python-format
|
||||
msgid "Can not create line \"%s\" more than once"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "Webcal Calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:basic.calendar,line_ids:0
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_lines
|
||||
msgid "Calendar Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_calendar_event_subscribe
|
||||
msgid "Event subscribe"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
msgid "Import ICS"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
#: view:calendar.event.subscribe:0
|
||||
#: view:user.preference:0
|
||||
msgid "_Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_event
|
||||
msgid "basic.calendar.event"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: selection:basic.calendar,type:0
|
||||
#: selection:basic.calendar.attributes,type:0
|
||||
#: selection:basic.calendar.lines,name:0
|
||||
msgid "Event"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:document.directory,calendar_collection:0
|
||||
#: field:user.preference,collection:0
|
||||
msgid "Calendar Collection"
|
||||
msgstr "Каледарын Цуглуулга"
|
||||
|
||||
#. module: caldav
|
||||
#: constraint:document.directory:0
|
||||
msgid "Error! You can not create recursive Directories."
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:user.preference:0
|
||||
msgid "_Open"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:user.preference:0
|
||||
msgid "Next"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,type:0
|
||||
#: field:basic.calendar.attributes,type:0
|
||||
#: field:basic.calendar.fields,type_id:0
|
||||
#: field:basic.calendar.lines,name:0
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:calendar.event.export,name:0
|
||||
msgid "Save in .ics format"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:1293
|
||||
#, python-format
|
||||
msgid "Error !"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_attributes
|
||||
msgid "Calendar attributes"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_caldav_browse
|
||||
msgid "Caldav Browse"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "Android based device"
|
||||
msgstr "Андройд дээр суурилсан төхөөрөмж"
|
||||
|
||||
#. module: caldav
|
||||
#: view:user.preference:0
|
||||
msgid "Configure your openerp hostname. For example : "
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,create_date:0
|
||||
msgid "Created Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "Attributes Mapping"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_document_directory
|
||||
msgid "Directory"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:calendar.event.subscribe,url_path:0
|
||||
msgid "Provide path for remote calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.lines,domain:0
|
||||
msgid "Domain"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "_Subscribe"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,user_id:0
|
||||
msgid "Owner"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:basic.calendar.alias,cal_line_id:0
|
||||
#: field:basic.calendar.lines,calendar_id:0
|
||||
#: model:ir.ui.menu,name:caldav.menu_calendar
|
||||
#: field:user.preference,calendar:0
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:41
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Please install python-vobject from http://vobject.skyhouseconsulting.com/"
|
||||
msgstr ""
|
||||
"Уучлаарай python-vobject эндээс http://vobject.skyhouseconsulting.com/ "
|
||||
"суулгана уу"
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/calendar_event_import.py:63
|
||||
#, python-format
|
||||
msgid "Invalid format of the ics, file can not be imported"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,service:0
|
||||
msgid "CalDAV"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.fields,field_id:0
|
||||
msgid "OpenObject Field"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.alias,res_id:0
|
||||
msgid "Res. ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "Message..."
|
||||
msgstr "Мессеж"
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:basic.calendar,has_webcal:0
|
||||
msgid "WebCal"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:document.directory:0
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_collection_form
|
||||
#: model:ir.ui.menu,name:caldav.menu_calendar_collection
|
||||
msgid "Calendar Collections"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:815
|
||||
#: sql_constraint:basic.calendar.alias:0
|
||||
#, python-format
|
||||
msgid "The same filename cannot apply to two records!"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: sql_constraint:document.directory:0
|
||||
msgid "Directory cannot be parent of itself!"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:document.directory,calendar_ids:0
|
||||
#: model:ir.actions.act_window,name:caldav.action_caldav_form
|
||||
#: model:ir.ui.menu,name:caldav.menu_caldav_directories
|
||||
msgid "Calendars"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,collection_id:0
|
||||
msgid "Collection"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,write_date:0
|
||||
msgid "Write Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:32
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
" * Webdav server that provides remote access to calendar\n"
|
||||
" * Synchronisation of calendar using WebDAV\n"
|
||||
" * Customize calendar event and todo attribute with any of OpenERP model\n"
|
||||
" * Provides iCal Import/Export functionality\n"
|
||||
"\n"
|
||||
" To access Calendars using CalDAV clients, point them to:\n"
|
||||
" "
|
||||
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/calendars/users/USERNAME/c\n"
|
||||
"\n"
|
||||
" To access OpenERP Calendar using WebCal to remote site use the URL "
|
||||
"like:\n"
|
||||
" "
|
||||
"http://HOSTNAME:PORT/webdav/DATABASE_NAME/Calendars/CALENDAR_NAME.ics\n"
|
||||
"\n"
|
||||
" Where,\n"
|
||||
" HOSTNAME: Host on which OpenERP server(With webdav) is running\n"
|
||||
" PORT : Port on which OpenERP server is running (By Default : 8069)\n"
|
||||
" DATABASE_NAME: Name of database on which OpenERP Calendar is "
|
||||
"created\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: sql_constraint:document.directory:0
|
||||
msgid "The directory name must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:user.preference:0
|
||||
msgid "User Preference"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/calendar_event_subscribe.py:59
|
||||
#, python-format
|
||||
msgid "Please provide Proper URL !"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_timezone
|
||||
msgid "basic.calendar.timezone"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.fields,expr:0
|
||||
msgid "Expression"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_attendee
|
||||
msgid "basic.calendar.attendee"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_alias
|
||||
msgid "basic.calendar.alias"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
#: field:calendar.event.import,file_path:0
|
||||
msgid "Select ICS File"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:user.preference,device:0
|
||||
msgid "Software/Devices"
|
||||
msgstr "Програм /Төхөөрөмжүүд"
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.lines,mapping_ids:0
|
||||
msgid "Fields Mapping"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:141
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
"Prerequire\n"
|
||||
"----------\n"
|
||||
"If you are using thunderbird, first you need to install the lightning "
|
||||
"module\n"
|
||||
"http://www.mozilla.org/projects/calendar/lightning/\n"
|
||||
"\n"
|
||||
"configuration\n"
|
||||
"-------------\n"
|
||||
"\n"
|
||||
"1. Go to Calendar View\n"
|
||||
"\n"
|
||||
"2. File -> New Calendar\n"
|
||||
"\n"
|
||||
"3. Chosse \"On the Network\"\n"
|
||||
"\n"
|
||||
"4. for format choose CalDav\n"
|
||||
" and as location the url given above (ie : "
|
||||
"http://host.com:8069/webdav/db/calendars/users/demo/c/Meetings)\n"
|
||||
"\n"
|
||||
"5. Choose a name and a color for the Calendar, and we advice you to uncheck "
|
||||
"\"alarm\"\n"
|
||||
"\n"
|
||||
"6. Then put your openerp login and password (to give the password only check "
|
||||
"the box \"Use password Manager to remember this password\"\n"
|
||||
"\n"
|
||||
"7. Then Finish, your meetings should appear now in your calendar view\n"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:caldav.browse:0
|
||||
msgid "Browse Caldav"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:user.preference,host_name:0
|
||||
msgid "Host Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar
|
||||
msgid "basic.calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "Other Info"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "My Calendar(s)"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:basic.calendar,has_webcal:0
|
||||
msgid ""
|
||||
"Also export a <name>.ics entry next to the calendar folder, with WebCal "
|
||||
"content."
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.fields,fn:0
|
||||
msgid "Function"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:user.preference:0
|
||||
msgid "database.my.openerp.com or companyserver.com"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
#: field:basic.calendar,description:0
|
||||
#: view:caldav.browse:0
|
||||
#: field:caldav.browse,description:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:basic.calendar.alias,cal_line_id:0
|
||||
msgid "The calendar/line this mapping applies to"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar.fields,mapping:0
|
||||
msgid "Mapping"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/calendar_event_import.py:86
|
||||
#, python-format
|
||||
msgid "Import Sucessful"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
msgid "_Import"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_calendar_event_import
|
||||
msgid "Event Import"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.fields,fn:0
|
||||
msgid "Interval in hours"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:calendar.event.export,name:0
|
||||
msgid "File name"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.subscribe:0
|
||||
msgid "Subscribe to Remote Calendar"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:basic.calendar,calendar_color:0
|
||||
msgid "For supporting clients, the color of the calendar entries"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,name:0
|
||||
#: field:basic.calendar.attributes,name:0
|
||||
#: field:basic.calendar.fields,name:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:basic.calendar.attributes,type:0
|
||||
#: selection:basic.calendar.lines,name:0
|
||||
msgid "Alarm"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_alarm
|
||||
msgid "basic.calendar.alarm"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:1293
|
||||
#, python-format
|
||||
msgid "Attendee must have an Email Id"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_event_export_values
|
||||
msgid "Export .ics File"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/calendar.py:41
|
||||
#, python-format
|
||||
msgid "vobject Import Error!"
|
||||
msgstr "vobject Импорт алдаа !"
|
||||
|
||||
#. module: caldav
|
||||
#: field:calendar.event.export,file_path:0
|
||||
msgid "Save ICS file"
|
||||
msgstr "ICS файл хадгалах"
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/caldav_browse.py:50
|
||||
#, python-format
|
||||
msgid ""
|
||||
"\n"
|
||||
" For SSL specific configuration see the documentation below\n"
|
||||
"\n"
|
||||
"Now, to setup the calendars, you need to:\n"
|
||||
"\n"
|
||||
"1. Click on the \"Settings\" and go to the \"Mail, Contacts, Calendars\" "
|
||||
"page.\n"
|
||||
"2. Go to \"Add account...\"\n"
|
||||
"3. Click on \"Other\"\n"
|
||||
"4. From the \"Calendars\" group, select \"Add CalDAV Account\"\n"
|
||||
"\n"
|
||||
"5. Enter the host's name\n"
|
||||
" (ie : if the url is http://openerp.com:8069/webdav/db_1/calendars/ , "
|
||||
"openerp.com is the host)\n"
|
||||
"\n"
|
||||
"6. Fill Username and password with your openerp login and password\n"
|
||||
"\n"
|
||||
"7. As a description, you can either leave the server's name or\n"
|
||||
" something like \"OpenERP calendars\".\n"
|
||||
"\n"
|
||||
"9. If you are not using a SSL server, you'll get an error, do not worry and "
|
||||
"push \"Continue\"\n"
|
||||
"\n"
|
||||
"10. Then click to \"Advanced Settings\" to specify the right\n"
|
||||
" ports and paths.\n"
|
||||
"\n"
|
||||
"11. Specify the port for the OpenERP server: 8071 for SSL, 8069 without.\n"
|
||||
"\n"
|
||||
"12. Set the \"Account URL\" to the right path of the OpenERP webdav:\n"
|
||||
" the url given by the wizard (ie : "
|
||||
"http://my.server.ip:8069/webdav/dbname/calendars/ )\n"
|
||||
"\n"
|
||||
"11. Click on Done. The phone will hopefully connect to the OpenERP server\n"
|
||||
" and verify it can use the account.\n"
|
||||
"\n"
|
||||
"12. Go to the main menu of the iPhone and enter the Calendar application.\n"
|
||||
" Your OpenERP calendars will be visible inside the selection of the\n"
|
||||
" \"Calendars\" button.\n"
|
||||
" Note that when creating a new calendar entry, you will have to specify\n"
|
||||
" which calendar it should be saved at.\n"
|
||||
"\n"
|
||||
"IF you need SSL (and your certificate is not a verified one, as usual),\n"
|
||||
"then you first will need to let the iPhone trust that. Follow these\n"
|
||||
"steps:\n"
|
||||
"\n"
|
||||
" s1. Open Safari and enter the https location of the OpenERP server:\n"
|
||||
" https://my.server.ip:8071/\n"
|
||||
" (assuming you have the server at \"my.server.ip\" and the HTTPS port\n"
|
||||
" is the default 8071)\n"
|
||||
" s2. Safari will try to connect and issue a warning about the "
|
||||
"certificate\n"
|
||||
" used. Inspect the certificate and click \"Accept\" so that iPhone\n"
|
||||
" now trusts it.\n"
|
||||
" "
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: selection:user.preference,device:0
|
||||
msgid "Sunbird/Thunderbird"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,calendar_order:0
|
||||
msgid "Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: code:addons/caldav/wizard/calendar_event_subscribe.py:59
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: field:basic.calendar,calendar_color:0
|
||||
msgid "Color"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:basic.calendar:0
|
||||
msgid "MY"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_fields
|
||||
msgid "Calendar fields"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: view:calendar.event.import:0
|
||||
msgid "Import Message"
|
||||
msgstr "Импортын Мессеж"
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_event_subscribe
|
||||
#: model:ir.actions.act_window,name:caldav.action_calendar_event_subscribe_values
|
||||
msgid "Subscribe"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: sql_constraint:document.directory:0
|
||||
msgid "Directory must have a parent or a storage"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: model:ir.model,name:caldav.model_basic_calendar_todo
|
||||
msgid "basic.calendar.todo"
|
||||
msgstr ""
|
||||
|
||||
#. module: caldav
|
||||
#: help:basic.calendar,calendar_order:0
|
||||
msgid "For supporting clients, the order of this folder among the calendars"
|
||||
msgstr ""
|
|
@ -14,17 +14,17 @@
|
|||
<field name="sequence">100</field>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.channel">
|
||||
<field name="name">website</field>
|
||||
<record model="crm.case.channel" id="crm_case_channel_website">
|
||||
<field name="name">Website</field>
|
||||
</record>
|
||||
<record model="crm.case.channel">
|
||||
<field name="name">phone</field>
|
||||
<record model="crm.case.channel" id="crm_case_channel_phone">
|
||||
<field name="name">Phone</field>
|
||||
</record>
|
||||
<record model="crm.case.channel">
|
||||
<field name="name">direct</field>
|
||||
<record model="crm.case.channel" id="crm_case_channel_direct">
|
||||
<field name="name">Direct</field>
|
||||
</record>
|
||||
<record model="crm.case.channel">
|
||||
<field name="name">email</field>
|
||||
<record model="crm.case.channel" id="crm_case_channel_email">
|
||||
<field name="name">Email</field>
|
||||
</record>
|
||||
<record id="mail_alias_sales_department" model="mail.alias">
|
||||
<field name="alias_name">sales</field>
|
||||
|
|
|
@ -14,24 +14,42 @@
|
|||
<field name="groups_id" eval="[(4,ref('base.group_sale_salesman'))]"/>
|
||||
</record>
|
||||
|
||||
<record id="ir_ui_view_sc_calendar_demo" model="ir.ui.view_sc">
|
||||
<field name="name">Meetings</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="res_id" ref="base_calendar.menu_crm_meeting"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.section" id="section_sales_marketing_department">
|
||||
<record id="ir_ui_view_sc_calendar_demo" model="ir.ui.view_sc">
|
||||
<field name="name">Meetings</field>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="res_id" ref="base_calendar.menu_crm_meeting"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.section" id="crm_case_section_1">
|
||||
<field name="name">Sales Marketing Department</field>
|
||||
<field name="code">Sales Marketing</field>
|
||||
<field name="code">SMD</field>
|
||||
<field name="parent_id" ref="crm.section_sales_department"></field>
|
||||
<field name="alias_id" ref="mail_alias_marketing_department"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.segmentation" id="crm_segmentation0">
|
||||
<field name="name">OpenERP partners</field>
|
||||
<field name="exclusif">True</field>
|
||||
<field name="categ_id" ref="base.res_partner_category_2"/>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.section" id="crm_case_section_2">
|
||||
<field name="name">Support Department</field>
|
||||
<field name="code">SPD</field>
|
||||
<field name="parent_id" ref="crm.section_sales_department"></field>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.section" id="crm_case_section_3">
|
||||
<field name="name">Direct Marketing</field>
|
||||
<field name="code">DM</field>
|
||||
<field name="parent_id" ref="crm.section_sales_department"></field>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.section" id="crm_case_section_4">
|
||||
<field name="name">Online Support</field>
|
||||
<field name="code">OS</field>
|
||||
<field name="parent_id" ref="crm.crm_case_section_2"></field>
|
||||
</record>
|
||||
|
||||
<record model="crm.segmentation" id="crm_segmentation0">
|
||||
<field name="name">OpenERP partners</field>
|
||||
<field name="exclusif">True</field>
|
||||
<field name="categ_id" ref="base.res_partner_category_2"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -86,11 +86,11 @@
|
|||
<field name="section_id" ref="section_sales_department"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead2">
|
||||
<field name="name">Mail Campaign 1</field>
|
||||
<field name="name">Email Campaign - Services</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead3">
|
||||
<field name="name">Mail Campaign 2</field>
|
||||
<field name="name">Email Campaign - Products</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead4">
|
||||
|
@ -102,7 +102,7 @@
|
|||
<field name="section_id" ref="section_sales_department"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead6">
|
||||
<field name="name">Google Adwords 2</field>
|
||||
<field name="name">Banner Ads</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead7">
|
||||
|
@ -116,37 +116,37 @@
|
|||
|
||||
<!-- crm categories -->
|
||||
<record model="crm.case.categ" id="categ_oppor1">
|
||||
<field name="name">Interest in Computer</field>
|
||||
<field name="name">Product</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor2">
|
||||
<field name="name">Interest in Accessories</field>
|
||||
<field name="name">Software</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor3">
|
||||
<field name="name">Need Services</field>
|
||||
<field name="name">Services</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor4">
|
||||
<field name="name">Need Information</field>
|
||||
<field name="name">Information</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor5">
|
||||
<field name="name">Need a Website Design</field>
|
||||
<field name="name">Design</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor6">
|
||||
<field name="name">Potential Reseller</field>
|
||||
<field name="name">Training</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor7">
|
||||
<field name="name">Need Consulting</field>
|
||||
<field name="name">Consulting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -41,7 +41,7 @@
|
|||
|
||||
<!--
|
||||
CRM CASE STAGE
|
||||
-->
|
||||
-->
|
||||
|
||||
<!-- Stage Search view -->
|
||||
<record id="crm_lead_stage_search" model="ir.ui.view">
|
||||
|
@ -77,7 +77,7 @@
|
|||
|
||||
<!--
|
||||
LEADS/OPPORTUNITIES CATEGORIES
|
||||
-->
|
||||
-->
|
||||
|
||||
<!-- Categories Form View -->
|
||||
<record id="crm_lead_categ_action" model="ir.actions.act_window">
|
||||
|
@ -89,7 +89,7 @@
|
|||
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to define a new sales tag.
|
||||
Click to define a new sales tag.
|
||||
</p><p>
|
||||
Create specific tags that fit your company's activities
|
||||
to better classify and analyse your leads and opportunities.
|
||||
|
@ -100,12 +100,12 @@
|
|||
</record>
|
||||
|
||||
<menuitem action="crm_lead_categ_action"
|
||||
id="menu_crm_lead_categ" name="Categories"
|
||||
id="menu_crm_lead_categ" name="Sales Tags"
|
||||
parent="base.menu_crm_config_lead" sequence="1" groups="base.group_no_one"/>
|
||||
|
||||
<!--
|
||||
LEADS
|
||||
-->
|
||||
-->
|
||||
<act_window
|
||||
id="act_crm_opportunity_crm_phonecall_new"
|
||||
name="Phone calls"
|
||||
|
@ -134,7 +134,7 @@
|
|||
<header>
|
||||
<button name="%(crm.action_crm_lead2opportunity_partner)d" string="Convert to Opportunity" type="action"
|
||||
states="draft,open,pending" help="Convert to Opportunity" class="oe_highlight"/>
|
||||
<button name="case_escalate" string="Escalate" type="object"
|
||||
<button name="case_escalate" string="Escalate" type="object"
|
||||
states="draft,open,pending"/>
|
||||
<button name="case_reset" string="Reset" type="object"
|
||||
states="cancel"/>
|
||||
|
@ -156,7 +156,7 @@
|
|||
<group>
|
||||
<group>
|
||||
<field name="partner_name" string="Company Name"/>
|
||||
<field name="partner_id" string="Customer"
|
||||
<field name="partner_id" string="Customer"
|
||||
on_change="on_change_partner(partner_id)" />
|
||||
<label for="street" string="Address"/>
|
||||
<div>
|
||||
|
@ -174,7 +174,7 @@
|
|||
<label for="contact_name" />
|
||||
<div>
|
||||
<field name="contact_name" class="oe_inline"/>,
|
||||
<field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" class="oe_inline"/>
|
||||
<field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" class="oe_inline" options='{"no_open": true}'/>
|
||||
</div>
|
||||
<field name="email_from" widget="email"/>
|
||||
<field name="function" />
|
||||
|
@ -189,7 +189,7 @@
|
|||
-->
|
||||
</group>
|
||||
<group>
|
||||
<field name="user_id" />
|
||||
<field name="user_id"/>
|
||||
<field name="section_id"/>
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
|
@ -285,286 +285,265 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Lead Kanban View -->
|
||||
<record model="ir.ui.view" id="crm_case_kanban_view_leads">
|
||||
<field name="name">CRM - Leads Kanban</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">kanban</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="stage_id">
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
<field name="color"/>
|
||||
<field name="priority"/>
|
||||
<field name="planned_revenue" sum="Expected Revenues"/>
|
||||
<field name="user_email"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_address_email"/>
|
||||
<field name="message_summary"/>
|
||||
<field name="needaction_pending"/>
|
||||
<templates>
|
||||
<t t-name="lead_details">
|
||||
<ul class="oe_kanban_tooltip">
|
||||
<li t-if="record.phone.raw_value"><b>Phone:</b> <field name="phone"/></li>
|
||||
<li><b>Probability:</b> <field name="probability"/>%%</li>
|
||||
<li><b>Creation date:</b> <field name="create_date"/></li>
|
||||
<li t-if="record.date_deadline.raw_value"><b>Date Deadline:</b> <field name="date_deadline"/></li>
|
||||
</ul>
|
||||
</t>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
|
||||
<div class="oe_dropdown_toggle oe_dropdown_kanban">
|
||||
<span class="oe_e">í</span>
|
||||
<ul class="oe_dropdown_menu">
|
||||
<li><a type="edit" >Edit...</a></li>
|
||||
<li><a type="delete">Delete</a></li>
|
||||
<li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
|
||||
<li><a name="%(opportunity2phonecall_act)d" type="action">Log Call</a></li>
|
||||
<li><a name="action_makeMeeting" type="object">Schedule Meeting</a></li>
|
||||
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
|
||||
</ul>
|
||||
<!-- CRM Lead Kanban View -->
|
||||
<record model="ir.ui.view" id="crm_case_kanban_view_leads">
|
||||
<field name="name">CRM - Leads Kanban</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">kanban</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="stage_id">
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
<field name="color"/>
|
||||
<field name="priority"/>
|
||||
<field name="planned_revenue" sum="Expected Revenues"/>
|
||||
<field name="user_email"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_address_email"/>
|
||||
<field name="message_summary"/>
|
||||
<field name="needaction_pending"/>
|
||||
<templates>
|
||||
<t t-name="lead_details">
|
||||
<ul class="oe_kanban_tooltip">
|
||||
<li t-if="record.phone.raw_value"><b>Phone:</b> <field name="phone"/></li>
|
||||
<li><b>Probability:</b> <field name="probability"/>%%</li>
|
||||
<li><b>Creation date:</b> <field name="create_date"/></li>
|
||||
<li t-if="record.date_deadline.raw_value"><b>Date Deadline:</b> <field name="date_deadline"/></li>
|
||||
</ul>
|
||||
</t>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
|
||||
<div class="oe_dropdown_toggle oe_dropdown_kanban">
|
||||
<span class="oe_e">í</span>
|
||||
<ul class="oe_dropdown_menu">
|
||||
<li><a type="edit" >Edit...</a></li>
|
||||
<li><a type="delete">Delete</a></li>
|
||||
<li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
|
||||
<li><a name="%(opportunity2phonecall_act)d" type="action">Log Call</a></li>
|
||||
<li><a name="action_makeMeeting" type="object">Schedule Meeting</a></li>
|
||||
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="oe_kanban_content">
|
||||
<div>
|
||||
<b><field name="name"/></b>
|
||||
<t t-if="record.planned_revenue.raw_value">
|
||||
- <b><t t-esc="Math.round(record.planned_revenue.value)"/>
|
||||
<field name="company_currency"/></b>
|
||||
</t>
|
||||
</div>
|
||||
<div>
|
||||
<field name="partner_id"/>
|
||||
</div>
|
||||
<div style="padding-left: 0.5em">
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
|
||||
<span t-attf-class="#{red || ''}"><field name="date_action"/></span>
|
||||
<t t-if="record.date_action.raw_value"> : </t>
|
||||
<field name="title_action"/>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>
|
||||
<a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
|
||||
</div>
|
||||
<div class="oe_kanban_footer_left">
|
||||
<t t-if="record.needaction_pending.raw_value"><span class="oe_kanban_mail_new">New</span></t>
|
||||
<t t-raw="record.message_summary.raw_value"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_clear"></div>
|
||||
</div>
|
||||
<div class="oe_kanban_content">
|
||||
<div>
|
||||
<b><field name="name"/></b>
|
||||
<t t-if="record.planned_revenue.raw_value">
|
||||
- <b><t t-esc="Math.round(record.planned_revenue.value)"/>
|
||||
<field name="company_currency"/></b>
|
||||
</t>
|
||||
</div>
|
||||
<div>
|
||||
<field name="partner_id"/>
|
||||
</div>
|
||||
<div style="padding-left: 0.5em">
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
|
||||
<span t-attf-class="#{red || ''}"><field name="date_action"/></span>
|
||||
<t t-if="record.date_action.raw_value"> : </t>
|
||||
<field name="title_action"/>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>
|
||||
<a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>
|
||||
<!--
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kaban_status_red</t>
|
||||
<span t-attf-class="oe_kanban_status #{red}"> </span>
|
||||
-->
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value and record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
|
||||
</div>
|
||||
<div class="oe_kanban_footer_left">
|
||||
<t t-if="record.needaction_pending.raw_value"><span class="oe_kanban_mail_new">New</span></t>
|
||||
<t t-raw="record.message_summary.raw_value"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_clear"></div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="oe_kanban_right">
|
||||
<a name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" icon="kanban-stop" />
|
||||
<a name="case_pending" string="Pending" states="draft,open" type="object" icon="kanban-pause" />
|
||||
<a name="case_open" string="Open" states="pending" type="object" icon="gtk-media-play" />
|
||||
<a name="case_mark_won" string="Mark Won" states="open,pending" type="object" icon="kanban-apply" />
|
||||
</div>
|
||||
-->
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Lead Search View -->
|
||||
<record id="view_crm_case_leads_filter" model="ir.ui.view">
|
||||
<field name="name">CRM - Leads Search</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Leads">
|
||||
<field name="name" string="Lead / Customer" filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
|
||||
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike',self)]" />
|
||||
<!-- subjects is not set as store=True so, it is placed outside filter_domain-->
|
||||
<field name="subjects"/>
|
||||
<field name="create_date"/>
|
||||
<filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
|
||||
<separator/>
|
||||
<filter icon="terp-check" string="New" name="new" help="New Leads" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test" string="Open" name="open" domain="[('state','=','open')]"/>
|
||||
<separator/>
|
||||
<filter string="Unassigned Leads" icon="terp-personal-" domain="[('user_id','=', False)]" help="Unassigned Leads" />
|
||||
<separator/>
|
||||
<filter string="Leads Assigned to Me or My Team(s)" icon="terp-personal+" context="{'invisible_section': False}"
|
||||
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
help="Leads that are assigned to one of the sale teams I manage, or to me"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" context="{'invisible_section': False}"/>
|
||||
<field name="country_id" context="{'invisible_country': False}"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
|
||||
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}" />
|
||||
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Creation" help="Create date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
|
||||
</group>
|
||||
<group string="Display">
|
||||
<filter string="Show Countries" icon="terp-personal+" context="{'invisible_country': False}" help="Show Countries"/>
|
||||
<filter string="Show Sales Team" icon="terp-personal+" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<!-- CRM Lead Search View -->
|
||||
<record id="view_crm_case_leads_filter" model="ir.ui.view">
|
||||
<field name="name">CRM - Leads Search</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Leads">
|
||||
<field name="name" string="Lead / Customer" filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
|
||||
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike',self)]" />
|
||||
<!-- subjects is not set as store=True so, it is placed outside filter_domain-->
|
||||
<field name="subjects"/>
|
||||
<field name="create_date"/>
|
||||
<filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
|
||||
<separator/>
|
||||
<filter icon="terp-check" string="New" name="new" help="New Leads" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test" string="Open" name="open" domain="[('state','=','open')]"/>
|
||||
<separator/>
|
||||
<filter string="Unassigned Leads" icon="terp-personal-" domain="[('user_id','=', False)]" help="Unassigned Leads" />
|
||||
<separator/>
|
||||
<filter string="Leads Assigned to Me or My Team(s)" icon="terp-personal+" context="{'invisible_section': False}"
|
||||
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
help="Leads that are assigned to one of the sale teams I manage, or to me"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" context="{'invisible_section': False}"/>
|
||||
<field name="country_id" context="{'invisible_country': False}"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
|
||||
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}" />
|
||||
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Creation" help="Create date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
|
||||
</group>
|
||||
<group string="Display">
|
||||
<filter string="Show Countries" icon="terp-personal+" context="{'invisible_country': False}" help="Show Countries"/>
|
||||
<filter string="Show Sales Team" icon="terp-personal+" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!--
|
||||
OPPORTUNITY
|
||||
<!--
|
||||
OPPORTUNITY
|
||||
-->
|
||||
|
||||
<!-- Opportunities Form View -->
|
||||
<record model="ir.ui.view" id="crm_case_form_view_oppor">
|
||||
<field name="name">Opportunities</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Opportunities" version="7.0">
|
||||
<header>
|
||||
<button name="case_mark_won" string="Mark Won" type="object"
|
||||
states="open" class="oe_highlight"/>
|
||||
<button name="case_mark_won" string="Mark Won" type="object"
|
||||
states="draft,pending"/>
|
||||
<button name="case_escalate" string="Escalate" type="object"
|
||||
states="open" />
|
||||
<button name="case_mark_lost" string="Mark Lost" type="object"
|
||||
states="draft,open"/>
|
||||
<button name="case_cancel" string="Cancel" type="object"
|
||||
states="draft"/>
|
||||
<field name="stage_id" widget="statusbar" clickable="True"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_right oe_button_box">
|
||||
<button string="Schedule/Log Call"
|
||||
name="%(opportunity2phonecall_act)d"
|
||||
type="action"/>
|
||||
<button string="Meeting"
|
||||
name="action_makeMeeting"
|
||||
type="object"
|
||||
context="{'search_default_attendee_id': active_id, 'default_attendee_id' : active_id}"
|
||||
/>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<label for="planned_revenue" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="planned_revenue" class="oe_inline"/>
|
||||
<field name="company_currency" class="oe_inline"/> at
|
||||
<field name="probability" class="oe_inline" widget="integer"/>%% success rate
|
||||
</h2>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_id"
|
||||
on_change="onchange_partner_id(partner_id, email_from)"
|
||||
string="Customer"
|
||||
context="{'default_name': partner_name, 'default_email': email_from, 'default_phone': phone}"/>
|
||||
<field name="email_from" string="Email"/>
|
||||
<field name="phone"/>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<label for="title_action"/>
|
||||
<div>
|
||||
<field name="date_action" nolabel="1"/> <label string="-" attrs="{'invisible': ['|', ('date_action', '=', False), ('title_action', '=', False)]}"/>
|
||||
<field name="title_action" class="oe_inline" nolabel="1" placeholder="e.g. Call for proposal"/>
|
||||
</div>
|
||||
<field name="date_deadline"/>
|
||||
<field name="priority"/>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="categ_ids"
|
||||
string="Categories" widget="many2many_tags"
|
||||
domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<!--<button string="Mail"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'mail':'new', 'model': 'crm.lead'}"
|
||||
icon="terp-mail-message-new" type="action" />-->
|
||||
|
||||
<notebook colspan="4">
|
||||
<page string="Internal Notes">
|
||||
<field name="description"/>
|
||||
</page>
|
||||
<page string="Lead">
|
||||
<!-- Opportunities Form View -->
|
||||
<record model="ir.ui.view" id="crm_case_form_view_oppor">
|
||||
<field name="name">Opportunities</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">form</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Opportunities" version="7.0">
|
||||
<header>
|
||||
<button name="case_mark_won" string="Mark Won" type="object"
|
||||
states="draft,open,pending" class="oe_highlight"/>
|
||||
<button name="case_mark_lost" string="Mark Lost" type="object"
|
||||
states="draft,open" class="oe_highlight"/>
|
||||
<button name="case_escalate" string="Escalate" type="object"
|
||||
states="open" />
|
||||
<field name="stage_id" widget="statusbar" clickable="True"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_right oe_button_box">
|
||||
<button string="Schedule/Log Call"
|
||||
name="%(opportunity2phonecall_act)d"
|
||||
type="action"/>
|
||||
<button string="Meeting"
|
||||
name="action_makeMeeting"
|
||||
type="object"
|
||||
context="{'search_default_attendee_id': active_id, 'default_attendee_id' : active_id}"
|
||||
/>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<label for="planned_revenue" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="planned_revenue" class="oe_inline"/>
|
||||
<field name="company_currency" class="oe_inline"/> at
|
||||
<field name="probability" class="oe_inline" widget="integer"/>%% success rate
|
||||
</h2>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_name"/>
|
||||
<label for="street" string="Address"/>
|
||||
<field name="partner_id"
|
||||
on_change="onchange_partner_id(partner_id, email_from)"
|
||||
string="Customer"
|
||||
context="{'default_name': partner_name, 'default_email': email_from, 'default_phone': phone}"/>
|
||||
<field name="email_from" string="Email"/>
|
||||
<field name="phone"/>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<label for="title_action"/>
|
||||
<div>
|
||||
<field name="street" placeholder="Street..."/>
|
||||
<field name="street2"/>
|
||||
<div class="address_format">
|
||||
<field name="city" placeholder="City" style="width: 40%%"/>
|
||||
<field name="state_id" options='{"no_open": true}' placeholder="State" style="width: 24%%"/>
|
||||
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
|
||||
<field name="date_action" nolabel="1"/> <label string="-" attrs="{'invisible': ['|', ('date_action', '=', False), ('title_action', '=', False)]}"/>
|
||||
<field name="title_action" class="oe_inline" nolabel="1" placeholder="e.g. Call for proposal"/>
|
||||
</div>
|
||||
<field name="date_deadline"/>
|
||||
<field name="priority"/>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="categ_ids"
|
||||
string="Categories" widget="many2many_tags"
|
||||
domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<notebook colspan="4">
|
||||
<page string="Internal Notes">
|
||||
<field name="description"/>
|
||||
</page>
|
||||
<page string="Lead">
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_name"/>
|
||||
<label for="street" string="Address"/>
|
||||
<div>
|
||||
<field name="street" placeholder="Street..."/>
|
||||
<field name="street2"/>
|
||||
<div class="address_format">
|
||||
<field name="city" placeholder="City" style="width: 40%%"/>
|
||||
<field name="state_id" options='{"no_open": true}' placeholder="State" style="width: 24%%"/>
|
||||
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
|
||||
</div>
|
||||
<field name="country_id" placeholder="Country" options='{"no_open": true}'/>
|
||||
</div>
|
||||
<field name="country_id" placeholder="Country" options='{"no_open": true}'/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<label for="contact_name" />
|
||||
<div>
|
||||
<field name="contact_name" class="oe_inline"/>
|
||||
<field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" options='{"no_open": true}' class="oe_inline"/>
|
||||
</div>
|
||||
<field name="function" />
|
||||
<field name="mobile"/>
|
||||
<field name="fax"/>
|
||||
</group>
|
||||
|
||||
<group string="Categorization">
|
||||
<field name="type_id" widget="selection"/>
|
||||
<field name="channel_id" widget="selection"/>
|
||||
</group>
|
||||
<group string="Mailings">
|
||||
<field name="opt_out" />
|
||||
</group>
|
||||
<group string="Misc">
|
||||
<field name="active"/>
|
||||
<field name="day_open" groups="base.group_no_one"/>
|
||||
<field name="day_close" groups="base.group_no_one"/>
|
||||
<field name="referred"/>
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
<group string="References">
|
||||
<field name="ref"/>
|
||||
<field name="ref2"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Fund Raising" groups="crm.group_fund_raising">
|
||||
<group>
|
||||
<label for="contact_name" />
|
||||
<div>
|
||||
<field name="contact_name" class="oe_inline"/>
|
||||
<field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" options='{"no_open": true}' class="oe_inline"/>
|
||||
</div>
|
||||
<field name="function" />
|
||||
<field name="mobile"/>
|
||||
<field name="fax"/>
|
||||
<field name="payment_mode" widget="selection"/>
|
||||
<field name="planned_cost"/>
|
||||
</group>
|
||||
|
||||
<group string="Categorization">
|
||||
<field name="type_id" widget="selection"/>
|
||||
<field name="channel_id" widget="selection"/>
|
||||
</group>
|
||||
<group string="Mailings">
|
||||
<field name="opt_out" />
|
||||
</group>
|
||||
<group string="Misc">
|
||||
<field name="active"/>
|
||||
<field name="day_open" groups="base.group_no_one"/>
|
||||
<field name="day_close" groups="base.group_no_one"/>
|
||||
<field name="referred"/>
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
<group string="References">
|
||||
<field name="ref"/>
|
||||
<field name="ref2"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Fund Raising" groups="crm.group_fund_raising">
|
||||
<group>
|
||||
<field name="payment_mode" widget="selection"/>
|
||||
<field name="planned_cost"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Opportunities Tree View -->
|
||||
<record model="ir.ui.view" id="crm_case_tree_view_oppor">
|
||||
|
@ -596,48 +575,48 @@
|
|||
</record>
|
||||
|
||||
|
||||
<!-- Opportunities Search View -->
|
||||
<record id="view_crm_case_opportunities_filter" model="ir.ui.view">
|
||||
<field name="name">CRM - Opportunities Search</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Opportunities">
|
||||
<field name="name" string="Opportunity / Customer"
|
||||
filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
|
||||
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike', self)]" />
|
||||
<filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
|
||||
<separator/>
|
||||
<filter icon="terp-check" string="New" help="New Opportunities" name="new" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test" string="Open" help="Open Opportunities" name="open" domain="[('state','=','open')]"/>
|
||||
<separator/>
|
||||
<filter string="Unassigned Opportunities" icon="terp-personal-" domain="[('user_id','=', False)]" help="Unassigned Opportunities" />
|
||||
<separator/>
|
||||
<filter string="Opportunities Assigned to Me or My Team(s)" icon="terp-personal+"
|
||||
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]" context="{'invisible_section': False}"
|
||||
help="Opportunities that are assigned to either me or one of the sale teams I manage" />
|
||||
<field name="user_id"/>
|
||||
<field name="country_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="section_id" context="{'invisible_section': False, 'default_section_id': self}"/>
|
||||
<group expand="0" string="Group By..." colspan="16">
|
||||
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Team" help="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Customer" help="Partner" icon="terp-personal+" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" />
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Creation" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
|
||||
<filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}" />
|
||||
</group>
|
||||
<group string="Display">
|
||||
<filter string="Show Sales Team" icon="terp-personal+" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<!-- Opportunities Search View -->
|
||||
<record id="view_crm_case_opportunities_filter" model="ir.ui.view">
|
||||
<field name="name">CRM - Opportunities Search</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Opportunities">
|
||||
<field name="name" string="Opportunity / Customer"
|
||||
filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
|
||||
<field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike', self)]" />
|
||||
<filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
|
||||
<separator/>
|
||||
<filter icon="terp-check" string="New" help="New Opportunities" name="new" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test" string="Open" help="Open Opportunities" name="open" domain="[('state','=','open')]"/>
|
||||
<separator/>
|
||||
<filter string="Unassigned Opportunities" icon="terp-personal-" domain="[('user_id','=', False)]" help="Unassigned Opportunities" />
|
||||
<separator/>
|
||||
<filter string="Opportunities Assigned to Me or My Team(s)" icon="terp-personal+"
|
||||
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]" context="{'invisible_section': False}"
|
||||
help="Opportunities that are assigned to either me or one of the sale teams I manage" />
|
||||
<field name="user_id"/>
|
||||
<field name="country_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="section_id" context="{'invisible_section': False, 'default_section_id': self}"/>
|
||||
<group expand="0" string="Group By..." colspan="16">
|
||||
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Team" help="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Customer" help="Partner" icon="terp-personal+" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" />
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<filter string="Creation" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
|
||||
<filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}" />
|
||||
</group>
|
||||
<group string="Display">
|
||||
<filter string="Show Sales Team" icon="terp-personal+" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -4,91 +4,80 @@
|
|||
<!--
|
||||
((((((((((( Demo Cases )))))))))))
|
||||
-->
|
||||
<record id="crm_case_phone01" model="crm.phonecall">
|
||||
<record id="crm_phonecall_1" model="crm.phonecall">
|
||||
<field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_11"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field eval="'3'" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Left the message"" name="name"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="name">Left the message</field>
|
||||
<field name="state">done</field>
|
||||
<field name="partner_phone">+34 934 340 230</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval=""(726) 782-0636"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field eval=""(769) 703-274"" name="partner_phone"/>
|
||||
<field eval="2.3" name="duration"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
</record>
|
||||
<record id="crm_case_phone02" model="crm.phonecall">
|
||||
<record id="crm_phonecall_2" model="crm.phonecall">
|
||||
<field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_6"/>
|
||||
<field eval=""4"" name="priority"/>
|
||||
<field name="partner_id" ref="base.res_partner_7"/>
|
||||
<field eval="'4'" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Get More information on the proposed deal"" name="name"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval=""(392) 895-7917"" name="partner_mobile"/>
|
||||
<field name="name">Need more information on the proposed deal</field>
|
||||
<field name="state">done</field>
|
||||
<field name="partner_phone">+44 121 690 4596</field>
|
||||
<field name="section_id" ref="crm.crm_case_section_1"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field eval=""(956) 293-2595"" name="partner_phone"/>
|
||||
<field eval="1.5" name="duration"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
</record>
|
||||
<record id="crm_case_phone03" model="crm.phonecall">
|
||||
<record id="crm_phonecall_3" model="crm.phonecall">
|
||||
<field eval="time.strftime('%Y-%m-15 17:44:12')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_10"/>
|
||||
<field eval=""2"" name="priority"/>
|
||||
<field eval="'2'" name="priority"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field eval=""Bad time, will call back"" name="name"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval=""(820) 167-3208"" name="partner_mobile"/>
|
||||
<field name="name">Ask for convenient time of meeting</field>
|
||||
<field name="state">open</field>
|
||||
<field name="partner_phone">+1 786 525 0724</field>
|
||||
<field name="section_id" ref="crm.crm_case_section_3"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field eval="5.0" name="duration"/>
|
||||
</record>
|
||||
<record id="crm_phonecall_4" model="crm.phonecall">
|
||||
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
|
||||
<field eval="'3'" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="name">Wanted information about pricing of Laptops</field>
|
||||
<field name="state">done</field>
|
||||
<field name="partner_phone">(077) 582-4035</field>
|
||||
<field name="partner_mobile">(077) 341-3591</field>
|
||||
<field name="section_id" ref="crm.crm_case_section_4"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field eval=""(079) 681-2139"" name="partner_phone"/>
|
||||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
<field eval="5.0" name="duration"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
<field eval="5.45" name="duration"/>
|
||||
</record>
|
||||
<record id="crm_case_phone04" model="crm.phonecall">
|
||||
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_tinyatwork"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Discuss Review Process"" name="name"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval=""(077) 582-4035"" name="partner_mobile"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field eval=""(514) 698-4118"" name="partner_phone"/>
|
||||
<field eval="3.45" name="duration"/>
|
||||
</record>
|
||||
<record id="crm_case_phone05" model="crm.phonecall">
|
||||
<record id="crm_phonecall_5" model="crm.phonecall">
|
||||
<field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_5"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field eval="'3'" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""More information on the proposed deal"" name="name"/>
|
||||
<field eval=""pending"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval=""(333) 715-1450"" name="partner_mobile"/>
|
||||
<field name="name">More information on the proposed deal</field>
|
||||
<field name="state">pending</field>
|
||||
<field name="partner_phone">+1 312 349 2324</field>
|
||||
<field name="section_id" ref="crm.crm_case_section_1"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field eval=""(855) 924-4364"" name="partner_phone"/>
|
||||
<field name="categ_id" ref="crm.categ_phone1"/>
|
||||
<field eval="2.08" name="duration"/>
|
||||
</record>
|
||||
<record id="crm_case_phone06" model="crm.phonecall">
|
||||
<field eval=""3"" name="priority"/>
|
||||
<record id="crm_phonecall_6" model="crm.phonecall">
|
||||
<field eval="'3'" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Bad time"" name="name"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval=""(468) 017-2684"" name="partner_mobile"/>
|
||||
<field name="name">Proposal for discount offer</field>
|
||||
<field name="state">open</field>
|
||||
<field name="partner_phone">+34 230 953 485</field>
|
||||
<field name="section_id" ref="crm.crm_case_section_3"/>
|
||||
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
|
||||
<field name="categ_id" ref="crm.categ_phone2"/>
|
||||
<field eval=""(373) 907-1009"" name="partner_phone"/>
|
||||
<field eval=""info@opensides.be"" name="email_from"/>
|
||||
<field eval="8.56" name="duration"/>
|
||||
</record>
|
||||
</data>
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
<record id="action_crm_phonecall_unread" model="ir.values">
|
||||
<field name="name">action_crm_phonecall_unread</field>
|
||||
<field name="action_id" ref="actions_server_crm_phonecall_unread"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_unread'))" />
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_unread'))"/>
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_crm_phonecall" />
|
||||
<field name="model_id" ref="model_crm_phonecall"/>
|
||||
<field name="model">crm.phonecall</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
@ -32,9 +32,9 @@
|
|||
<record id="action_crm_phonecall_read" model="ir.values">
|
||||
<field name="name">action_crm_phonecall_read</field>
|
||||
<field name="action_id" ref="actions_server_crm_phonecall_read"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_read'))" />
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_read'))"/>
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_crm_phonecall" />
|
||||
<field name="model_id" ref="model_crm_phonecall"/>
|
||||
<field name="model">crm.phonecall</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
@ -82,10 +82,10 @@
|
|||
name="%(phonecall2opportunity_act)d"
|
||||
states="open,pending"
|
||||
icon="gtk-index"
|
||||
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
|
||||
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
|
||||
<button string="Meeting"
|
||||
states="open,pending" icon="gtk-redo"
|
||||
name="action_make_meeting" type="object" />
|
||||
name="action_make_meeting" type="object"/>
|
||||
<field name="state"/>
|
||||
<button name="case_open" string="Confirm" type="object"
|
||||
states="draft,pending" icon="gtk-go-forward"/>
|
||||
|
@ -115,14 +115,14 @@
|
|||
<button string="Convert to Opportunity"
|
||||
name="%(phonecall2opportunity_act)d"
|
||||
type="action"
|
||||
attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'open')]}" />
|
||||
attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'open')]}"/>
|
||||
<button string="Convert to Opportunity" class="oe_highlight"
|
||||
name="%(phonecall2opportunity_act)d"
|
||||
type="action"
|
||||
attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'done')]}" />
|
||||
attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state','!=', 'done')]}"/>
|
||||
<button string="Schedule Other Call"
|
||||
name="%(phonecall_to_phonecall_act)d"
|
||||
type="action" />
|
||||
type="action"/>
|
||||
<button string="Schedule a Meeting" name="action_make_meeting" type="object"/>
|
||||
<button name="case_cancel" string="Cancel" type="object"
|
||||
states="draft,open,pending"/>
|
||||
|
@ -131,28 +131,28 @@
|
|||
<sheet string="Phone Call">
|
||||
<div class="oe_title">
|
||||
<div class="oe_edit_only">
|
||||
<label for="name" string="Title"/>
|
||||
<label for="name" string="Title"/>
|
||||
</div>
|
||||
<h1><field name="name" required="1"/></h1>
|
||||
<div class="oe_edit_only">
|
||||
<label for="partner_phone" string="Phone" />
|
||||
<label for="partner_phone" string="Phone"/>
|
||||
</div>
|
||||
<h2><field name="partner_phone"/></h2>
|
||||
</div>
|
||||
<group col="4">
|
||||
<field name="date" />
|
||||
<field name="user_id" />
|
||||
<field name="duration" widget="float_time" />
|
||||
<field name="section_id" colspan="1" widget="selection" />
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="duration" widget="float_time"/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="categ_id" widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<field name="partner_mobile" />
|
||||
<field name="partner_mobile"/>
|
||||
<field name="priority"/>
|
||||
<field name="opportunity_id"/>
|
||||
</group>
|
||||
|
||||
<field name="description" placeholder="Description..." />
|
||||
<field name="description" placeholder="Description..."/>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
|
@ -186,15 +186,15 @@
|
|||
<button string="Schedule Other Call"
|
||||
icon="terp-call-start"
|
||||
name="%(phonecall_to_phonecall_act)d"
|
||||
type="action" />
|
||||
type="action"/>
|
||||
<button string="Meeting"
|
||||
icon="gtk-redo"
|
||||
name="action_make_meeting" type="object" />
|
||||
name="action_make_meeting" type="object"/>
|
||||
<button string="Convert to Opportunity"
|
||||
name="%(phonecall2opportunity_act)d"
|
||||
states="open,pending"
|
||||
icon="gtk-index"
|
||||
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
|
||||
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -230,15 +230,15 @@
|
|||
<filter string="Unassigned Phonecalls" icon="terp-personal-" domain="[('user_id','=',False)]" help="Unassigned Phonecalls"/>
|
||||
<separator/>
|
||||
<filter string="Phone Calls Assigned to Me or My Team(s)" icon="terp-personal+" domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
help="Phone Calls that are assigned to me or to my team(s)" />
|
||||
help="Phone Calls that are assigned to me or to my team(s)"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" string="Sales Team"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Creation" icon="terp-go-month" help="Creation Date" domain="[]" context="{'group_by':'create_date'}" />
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Date of Call" />
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Creation" icon="terp-go-month" help="Creation Date" domain="[]" context="{'group_by':'create_date'}"/>
|
||||
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Date of Call"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
@ -7,14 +7,15 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 6.0dev\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
|
||||
"PO-Revision-Date: 2011-01-23 16:46+0000\n"
|
||||
"Last-Translator: Davide Corio - agilebg.com <davide.corio@agilebg.com>\n"
|
||||
"PO-Revision-Date: 2012-08-10 16:25+0000\n"
|
||||
"Last-Translator: Leonardo Pistone - Agile BG - Domsense "
|
||||
"<leonardo.pistone@domsense.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-07 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15745)\n"
|
||||
"X-Launchpad-Export-Date: 2012-08-11 05:45+0000\n"
|
||||
"X-Generator: Launchpad (build 15780)\n"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.lead.report:0
|
||||
|
@ -213,7 +214,7 @@ msgstr "Telefonata"
|
|||
#. module: crm
|
||||
#: field:crm.lead,optout:0
|
||||
msgid "Opt-Out"
|
||||
msgstr "Opz-out"
|
||||
msgstr "Opt-Out"
|
||||
|
||||
#. module: crm
|
||||
#: field:crm.meeting,end_type:0
|
||||
|
@ -308,8 +309,8 @@ msgid ""
|
|||
"If opt-out is checked, this contact has refused to receive emails or "
|
||||
"unsubscribed to a campaign."
|
||||
msgstr ""
|
||||
"Se il campo opt.out è selezionato allora il conttatto ha rifiutato di "
|
||||
"ricevere email o si è cancellato da una campagna."
|
||||
"L'Opt-Out indica che il contatto ha rifiutato di ricevere email o si è "
|
||||
"disiscritto da una campagna."
|
||||
|
||||
#. module: crm
|
||||
#: model:process.transition,name:crm.process_transition_leadpartner0
|
||||
|
@ -984,7 +985,7 @@ msgstr "Riferimento"
|
|||
#. module: crm
|
||||
#: field:crm.lead,optin:0
|
||||
msgid "Opt-In"
|
||||
msgstr "Opz-in"
|
||||
msgstr "Opt-In"
|
||||
|
||||
#. module: crm
|
||||
#: code:addons/crm/crm_lead.py:814 code:addons/crm/crm_phonecall.py:296
|
||||
|
@ -2184,7 +2185,7 @@ msgstr ""
|
|||
#. module: crm
|
||||
#: help:crm.lead,optin:0
|
||||
msgid "If opt-in is checked, this contact has accepted to receive emails."
|
||||
msgstr "Se opz-in è spuntato, il contatto ha accettato di ricevere email."
|
||||
msgstr "L'Opt-In indica che il contatto ha accettato di ricevere email."
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.meeting:0
|
||||
|
|
|
@ -38,9 +38,6 @@ class crm_configuration(osv.osv_memory):
|
|||
'module_import_google': fields.boolean("Google (Contacts and Calendar)",
|
||||
help="""Import google contact in partner address and add google calendar events details in Meeting.
|
||||
This installs the module import_google."""),
|
||||
'module_wiki_sale_faq': fields.boolean("share information with sales FAQ",
|
||||
help="""This provides demo data, thereby creating a Wiki Group and a Wiki Page for Wiki Sale FAQ.
|
||||
This installs the module wiki_sale_faq."""),
|
||||
'module_google_map': fields.boolean("add google maps on customer",
|
||||
help="""Locate customers on Google Map.
|
||||
This installs the module google_map."""),
|
||||
|
|
|
@ -39,12 +39,6 @@
|
|||
<label for="module_google_map"/>
|
||||
</div>
|
||||
</div>
|
||||
<div name="Sale Features" position="inside">
|
||||
<div>
|
||||
<field name="module_wiki_sale_faq"/>
|
||||
<label for="module_wiki_sale_faq"/>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
!python {model: base.action.rule}: |
|
||||
model_ids = self.pool.get("ir.model").search(cr, uid, [('model', '=', 'crm.lead')])
|
||||
from datetime import datetime
|
||||
new_id = self.create(cr, uid, {'name': 'New Rule', 'model_id': model_ids[0], 'trg_user_id': ref('base.user_root'), 'trg_partner_id': ref('base.res_partner_asus'), 'act_user_id': ref('base.user_demo') })
|
||||
new_id = self.create(cr, uid, {'name': 'New Rule', 'model_id': model_ids[0], 'trg_user_id': ref('base.user_root'), 'trg_partner_id': ref('base.res_partner_1'), 'act_user_id': ref('base.user_demo') })
|
||||
self._check(cr, uid)
|
||||
-
|
||||
I create new lead to check record rule.
|
||||
-
|
||||
!record {model: crm.lead, id: crm_lead_test_rules_id}:
|
||||
name: 'Test lead rules'
|
||||
partner_id: base.res_partner_asus
|
||||
partner_id: base.res_partner_1
|
||||
-
|
||||
I check record rule is apply and responsible is changed.
|
||||
-
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
I cancel unqualified lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_cancel(cr, uid, [ref("crm_case_itisatelesalescampaign0")])
|
||||
self.case_cancel(cr, uid, [ref("crm_case_1")])
|
||||
-
|
||||
I check cancelled lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm_case_itisatelesalescampaign0'))
|
||||
lead = self.browse(cr, uid, ref('crm_case_1'))
|
||||
assert lead.stage_id.id == ref('crm.stage_lead7'), "Stage should be 'Dead' and is %s." % (lead.stage_id.name)
|
||||
assert lead.state == 'cancel', "Opportunity is not in 'cancel' state."
|
||||
assert lead.probability == 0.0, 'Opportunity probability is wrong and should be 0.0.'
|
||||
|
@ -15,31 +15,31 @@
|
|||
I reset cancelled lead into unqualified lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_reset(cr, uid, [ref("crm_case_itisatelesalescampaign0")])
|
||||
self.case_reset(cr, uid, [ref("crm_case_1")])
|
||||
-
|
||||
I check unqualified lead after reset.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Lead is in draft state}:
|
||||
!assert {model: crm.lead, id: crm.crm_case_1, string: Lead is in draft state}:
|
||||
- state == "draft"
|
||||
-
|
||||
I re-open the lead
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_open(cr, uid, [ref("crm_case_itisatelesalescampaign0")])
|
||||
self.case_open(cr, uid, [ref("crm_case_1")])
|
||||
-
|
||||
I check stage and state of the re-opened lead
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm.crm_case_itisatelesalescampaign0'))
|
||||
lead = self.browse(cr, uid, ref('crm.crm_case_1'))
|
||||
assert lead.stage_id.id == ref('crm.stage_lead2'), "Opportunity stage should be 'Qualification'."
|
||||
assert lead.state == 'open', "Opportunity should be in 'open' state."
|
||||
-
|
||||
I escalate the lead to parent team.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_escalate(cr, uid, [ref("crm_case_itisatelesalescampaign0")])
|
||||
self.case_escalate(cr, uid, [ref("crm_case_1")])
|
||||
-
|
||||
I check the lead is correctly escalated to the parent team.
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_itisatelesalescampaign0, string: Escalate lead to parent team}:
|
||||
- section_id.name == "Sales Department"
|
||||
!assert {model: crm.lead, id: crm.crm_case_1, string: Escalate lead to parent team}:
|
||||
- section_id.name == "Support Department"
|
||||
|
|
|
@ -44,15 +44,15 @@
|
|||
I convert one phonecall request as a customer and put into regular customer list.
|
||||
-
|
||||
!python {model: crm.phonecall2partner}: |
|
||||
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_case_phone06")], 'active_id': ref("crm.crm_case_phone06")})
|
||||
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_phonecall_4")], 'active_id': ref("crm.crm_phonecall_4")})
|
||||
new_id = self.create(cr, uid, {}, context=context)
|
||||
self.make_partner(cr, uid, [new_id], context=context)
|
||||
-
|
||||
I check converted phonecall to partner.
|
||||
-
|
||||
!python {model: res.partner}: |
|
||||
partner_id = self.search(cr, uid, [('phonecall_ids', '=', ref('crm.crm_case_phone06'))])
|
||||
partner_id = self.search(cr, uid, [('phonecall_ids', '=', ref('crm.crm_phonecall_4'))])
|
||||
assert partner_id, "Customer is not found in regular customer list."
|
||||
data = self.browse(cr, uid, partner_id, context=context)[0]
|
||||
assert data.user_id.id == ref("base.user_root"), "User not assign properly"
|
||||
assert data.name == "Bad time", "Bad partner name"
|
||||
assert data.name == "Wanted information about pricing of Laptops", "Bad partner name"
|
||||
|
|
|
@ -4,39 +4,39 @@
|
|||
I open customer lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_open(cr, uid, [ref("crm_case_qrecorp0")])
|
||||
self.case_open(cr, uid, [ref("crm_case_4")])
|
||||
-
|
||||
I check lead state is "Open".
|
||||
-
|
||||
!assert {model: crm.lead, id: crm.crm_case_qrecorp0, string: Lead in open state}:
|
||||
!assert {model: crm.lead, id: crm.crm_case_4, string: Lead in open state}:
|
||||
- state == "open"
|
||||
-
|
||||
I create partner from lead.
|
||||
-
|
||||
!record {model: crm.lead2partner, id: crm_lead2partner_id1, context: '{"active_model": "crm.lead", "active_ids": [ref("crm_case_qrecorp0")]}'}:
|
||||
!record {model: crm.lead2partner, id: crm_lead2partner_id1, context: '{"active_model": "crm.lead", "active_ids": [ref("crm_case_4")]}'}:
|
||||
-
|
||||
!python {model: crm.lead2partner}: |
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_qrecorp0')], 'active_id': ref('crm_case_qrecorp0')})
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_4')], 'active_id': ref('crm_case_4')})
|
||||
self.make_partner(cr, uid ,[ref("crm_lead2partner_id1")], context=context)
|
||||
-
|
||||
I convert lead into opportunity for exiting customer.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.convert_opportunity(cr, uid ,[ref("crm_case_qrecorp0")], ref("base.res_partner_agrolait"))
|
||||
self.convert_opportunity(cr, uid ,[ref("crm_case_4")], ref("base.res_partner_2"))
|
||||
-
|
||||
I check details of converted opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm_case_qrecorp0'))
|
||||
lead = self.browse(cr, uid, ref('crm_case_4'))
|
||||
assert lead.type == 'opportunity', 'Lead is not converted to opportunity!'
|
||||
assert lead.partner_id.id == ref("base.res_partner_agrolait"), 'Partner missmatch!'
|
||||
assert lead.partner_id.id == ref("base.res_partner_2"), 'Partner mismatch!'
|
||||
assert lead.stage_id.id == ref("stage_lead1"), 'Stage of opportunity is incorrect!'
|
||||
-
|
||||
Now I begin communication and schedule a phone call with the customer.
|
||||
-
|
||||
!python {model: crm.opportunity2phonecall}: |
|
||||
import time
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_qrecorp0')]})
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref('crm_case_4')]})
|
||||
call_id = self.create(cr, uid, {'date': time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'name': "Bonjour M. Jean, Comment êtes-vous? J'ai obtenu votre demande. peut-on parler au sujet de ce pour quelques minutes?"}, context=context)
|
||||
self.action_schedule(cr, uid, [call_id], context=context)
|
||||
|
@ -44,28 +44,28 @@
|
|||
I check that phonecall is scheduled for that opportunity.
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
ids = self.search(cr, uid, [('opportunity_id', '=', ref('crm_case_qrecorp0'))])
|
||||
ids = self.search(cr, uid, [('opportunity_id', '=', ref('crm_case_4'))])
|
||||
assert len(ids), 'phonecall is not scheduled'
|
||||
-
|
||||
Now I schedule meeting with customer.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.action_makeMeeting(cr, uid, [ref('crm_case_qrecorp0')])
|
||||
self.action_makeMeeting(cr, uid, [ref('crm_case_4')])
|
||||
-
|
||||
After communicated with customer, I put some notes with contract details.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.message_append_note(cr, uid, [ref('crm_case_qrecorp0')], subject='Test note', body='ces détails envoyés par le client sur le FAX pour la qualité')
|
||||
self.message_append_note(cr, uid, [ref('crm_case_4')], subject='Test note', body='ces détails envoyés par le client sur le FAX pour la qualité')
|
||||
-
|
||||
I win this opportunity
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_mark_won(cr, uid, [ref("crm_case_qrecorp0")])
|
||||
self.case_mark_won(cr, uid, [ref("crm_case_4")])
|
||||
-
|
||||
I check details of the opportunity after having won the opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm_case_qrecorp0'))
|
||||
lead = self.browse(cr, uid, ref('crm_case_4'))
|
||||
assert lead.stage_id.id == ref('crm.stage_lead6'), "Opportunity stage should be 'Won'."
|
||||
assert lead.state == 'done', "Opportunity is not in 'done' state!"
|
||||
assert lead.probability == 100.0, "Revenue probability should be 100.0!"
|
||||
|
@ -73,36 +73,36 @@
|
|||
I convert mass lead into opportunity customer.
|
||||
-
|
||||
!python {model: crm.lead2opportunity.partner.mass}: |
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref("crm_case_employee0"), ref("crm_case_electonicgoodsdealer0")], 'active_id': ref("crm_case_qrecorp0")})
|
||||
context.update({'active_model': 'crm.lead', 'active_ids': [ref("crm_case_11"), ref("crm_case_2")], 'active_id': ref("crm_case_4")})
|
||||
id = self.create(cr, uid, {'user_ids': [ref('base.user_root')], 'section_id': ref('crm.section_sales_department')}, context=context)
|
||||
self.mass_convert(cr, uid, [id], context=context)
|
||||
-
|
||||
Now I check first lead converted on opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
opp = self.browse(cr, uid, ref('crm_case_employee0'))
|
||||
assert opp.name == "Need Info about Onsite Intervention", "Opportunity name not correct"
|
||||
opp = self.browse(cr, uid, ref('crm_case_11'))
|
||||
assert opp.name == "Need estimated cost for new project", "Opportunity name not correct"
|
||||
assert opp.type == 'opportunity', 'Lead is not converted to opportunity!'
|
||||
assert opp.partner_id.name == "Agrolait", 'Partner missmatch!'
|
||||
assert opp.partner_id.name == "Thomas Passot", 'Partner mismatch!'
|
||||
assert opp.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'
|
||||
-
|
||||
Then check for second lead converted on opportunity.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
opp = self.browse(cr, uid, ref('crm_case_electonicgoodsdealer0'))
|
||||
assert opp.name == "Interest in Your New Product", "Opportunity name not correct"
|
||||
opp = self.browse(cr, uid, ref('crm_case_2'))
|
||||
assert opp.name == "Interest in Your New Software", "Opportunity name not correct"
|
||||
assert opp.type == 'opportunity', 'Lead is not converted to opportunity!'
|
||||
assert opp.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'
|
||||
-
|
||||
I loose the second opportunity
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.case_mark_lost(cr, uid, [ref("crm_case_electonicgoodsdealer0")])
|
||||
self.case_mark_lost(cr, uid, [ref("crm_case_2")])
|
||||
-
|
||||
I check details of the opportunity after the loose
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
lead = self.browse(cr, uid, ref('crm_case_electonicgoodsdealer0'))
|
||||
lead = self.browse(cr, uid, ref('crm_case_2'))
|
||||
assert lead.stage_id.id == ref('crm.stage_lead8'), "Opportunity stage should be 'Lost'."
|
||||
assert lead.state == 'cancel', "Lost opportunity is not in 'cancel' state!"
|
||||
assert lead.probability == 0.0, "Revenue probability should be 0.0!"
|
||||
|
@ -111,7 +111,7 @@
|
|||
-
|
||||
!python {model: crm.meeting}: |
|
||||
context.update({'active_model': 'crm.meeting'})
|
||||
self.case_open(cr, uid, [ref('base_calendar.crm_case_reviewneeds0')])
|
||||
self.case_open(cr, uid, [ref('base_calendar.crm_meeting_4')])
|
||||
-
|
||||
I invite a user for meeting.
|
||||
-
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
I make another opportunity from phonecall for same customer.
|
||||
-
|
||||
!python {model: crm.phonecall2opportunity}: |
|
||||
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_case_phone06")]})
|
||||
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_phonecall_6")]})
|
||||
res_id = self.create(cr, uid, {'name': "Quoi de prix de votre autre service?", 'partner_id': ref("base.res_partner_9")}, context=context)
|
||||
self.make_opportunity(cr, uid, [res_id], context=context)
|
||||
-
|
||||
|
@ -36,51 +36,51 @@
|
|||
Now I schedule another phonecall to customer after merged.
|
||||
-
|
||||
!python {model: crm.phonecall2phonecall}: |
|
||||
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_case_phone06")], 'active_id': ref("crm.crm_case_phone06")})
|
||||
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_phonecall_6")], 'active_id': ref("crm.crm_phonecall_6")})
|
||||
res_id = self.create(cr, uid, {'name': "vos chances sont fusionnés en un seul"}, context=context)
|
||||
self.action_schedule(cr, uid, [res_id], context=context)
|
||||
-
|
||||
I schedule meeting on this phonecall.
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
self.action_make_meeting(cr, uid, [ref("crm.crm_case_phone06")])
|
||||
self.action_make_meeting(cr, uid, [ref("crm.crm_phonecall_6")])
|
||||
-
|
||||
I set phone call to not held.
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
self.case_pending(cr, uid, [ref("crm.crm_case_phone06")])
|
||||
self.case_pending(cr, uid, [ref("crm.crm_phonecall_6")])
|
||||
-
|
||||
I check that the phone call is in 'Not Held' state.
|
||||
-
|
||||
!assert {model: crm.phonecall, id: crm.crm_case_phone06, string: Phone call held.}:
|
||||
!assert {model: crm.phonecall, id: crm.crm_phonecall_6, string: Phone call held.}:
|
||||
- state == "pending"
|
||||
-
|
||||
I cancelled the phone call.
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
self.case_cancel(cr, uid, [ref("crm.crm_case_phone06")])
|
||||
self.case_cancel(cr, uid, [ref("crm.crm_phonecall_6")])
|
||||
-
|
||||
I check that the phone call is in 'Cancelled' state.
|
||||
-
|
||||
!assert {model: crm.phonecall, id: crm.crm_case_phone06, string: Phone call is not cancelled.}:
|
||||
!assert {model: crm.phonecall, id: crm.crm_phonecall_6, string: Phone call is not cancelled.}:
|
||||
- state == "cancel"
|
||||
-
|
||||
I reset the phone call.
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
self.case_reset(cr, uid, [ref("crm.crm_case_phone06")])
|
||||
self.case_reset(cr, uid, [ref("crm.crm_phonecall_6")])
|
||||
-
|
||||
I check that the phone call is reset or not.
|
||||
-
|
||||
!assert {model: crm.phonecall, id: crm.crm_case_phone06, string: Phone call is not reset.}:
|
||||
!assert {model: crm.phonecall, id: crm.crm_phonecall_6, string: Phone call is not reset.}:
|
||||
- state == "open"
|
||||
-
|
||||
I set phone call to held (done).
|
||||
-
|
||||
!python {model: crm.phonecall}: |
|
||||
self.case_close(cr, uid, [ref("crm.crm_case_phone06")])
|
||||
self.case_close(cr, uid, [ref("crm.crm_phonecall_6")])
|
||||
-
|
||||
I check that the phone call is in 'Held' state.
|
||||
-
|
||||
!assert {model: crm.phonecall, id: crm.crm_case_phone06, string: Phone call is not held.}:
|
||||
!assert {model: crm.phonecall, id: crm.crm_phonecall_6, string: Phone call is not held.}:
|
||||
- state == "done"
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
-
|
||||
I create lead record to call of partner onchange, stage onchange and Mailing opt-in onchange method.
|
||||
-
|
||||
!record {model: crm.lead, id: crm_case_shelvehouse}:
|
||||
!record {model: crm.lead, id: crm_case_25}:
|
||||
name: 'Need more info about your pc2'
|
||||
partner_id: base.res_partner_theshelvehouse0
|
||||
partner_id: base.res_partner_2
|
||||
type: opportunity
|
||||
stage_id: crm.stage_lead1
|
||||
state: draft
|
||||
-
|
||||
I create lead record to call Mailing opt-out onchange method.
|
||||
-
|
||||
!record {model: crm.lead, id: crm_case_mediapoleunits0}:
|
||||
!record {model: crm.lead, id: crm_case_18}:
|
||||
name: 'Need 20 Days of Consultancy'
|
||||
type: opportunity
|
||||
state: draft
|
||||
|
@ -18,11 +18,11 @@
|
|||
-
|
||||
I create phonecall record to call partner onchange method.
|
||||
-
|
||||
!record {model: crm.phonecall, id: crm_case_phone05}:
|
||||
!record {model: crm.phonecall, id: crm_phonecall_5}:
|
||||
name: 'Bad time'
|
||||
partner_id: base.res_partner_5
|
||||
-
|
||||
I setting next stage "New" for the lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.stage_next(cr, uid, [ref("crm_case_qrecorp0")], context={'stage_type': 'lead'})
|
||||
self.stage_next(cr, uid, [ref("crm_case_4")], context={'stage_type': 'lead'})
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
I Unlink the Lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.unlink(cr, uid, [ref("crm_case_qrecorp0")])
|
||||
self.unlink(cr, uid, [ref("crm_case_4")])
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
I make duplicate the Lead.
|
||||
-
|
||||
!python {model: crm.lead}: |
|
||||
self.copy(cr, uid, ref("crm_case_qrecorp0"))
|
||||
self.copy(cr, uid, ref("crm_case_4"))
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_crm_lead2opportunity_partner" model="ir.ui.view">
|
||||
<field name="name">crm.lead2opportunity.partner.form</field>
|
||||
<field name="model">crm.lead2opportunity.partner</field>
|
||||
|
@ -16,20 +18,20 @@
|
|||
<separator string="Select Opportunities" attrs="{'invisible': [('name', '=', 'convert')]}"/>
|
||||
<field name="opportunity_ids" attrs="{'invisible': [('name', '=', 'convert')]}">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="user_id" />
|
||||
<field name="section_id" />
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
<footer>
|
||||
<button name="action_apply" string="Create Opportunity" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="view_crm_lead2opportunity_partner_mass" model="ir.ui.view">
|
||||
<field name="name">crm.lead2opportunity.partner.mass.form</field>
|
||||
|
@ -40,18 +42,18 @@
|
|||
<field name="action"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<group string="Assigned Opportunities to">
|
||||
<field name="section_id" />
|
||||
<field name="section_id"/>
|
||||
</group>
|
||||
<separator string="Select Salesman"/>
|
||||
<field name="user_ids">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
<footer>
|
||||
<button name="mass_convert" string="Convert into Opportunities" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -65,13 +67,13 @@
|
|||
<field name="view_id" ref="view_crm_lead2opportunity_partner"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<act_window id="action_crm_send_mass_convert"
|
||||
|
||||
<act_window id="action_crm_send_mass_convert"
|
||||
multi="True"
|
||||
key2="client_action_multi" name="Convert opportunities"
|
||||
res_model="crm.lead2opportunity.partner.mass" src_model="crm.lead"
|
||||
view_mode="form" target="new" view_type="form"
|
||||
context="{'mass_convert' : True}"
|
||||
view_id="view_crm_lead2opportunity_partner_mass"/>
|
||||
view_id="view_crm_lead2opportunity_partner_mass"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -13,16 +13,16 @@
|
|||
<separator string="Select Opportunities"/>
|
||||
<field name="opportunity_ids">
|
||||
<tree>
|
||||
<field name="name" />
|
||||
<field name="partner_id" />
|
||||
<field name="user_id" />
|
||||
<field name="section_id" />
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
<footer>
|
||||
<button name="action_merge" type="object" string="_Merge" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -43,7 +43,7 @@
|
|||
multi="True"
|
||||
key2="client_action_multi" name="Merge Opportunities"
|
||||
res_model="crm.merge.opportunity" src_model="crm.lead"
|
||||
view_mode="form" target="new" view_type="form" />
|
||||
view_mode="form" target="new" view_type="form"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<field name="name"/>
|
||||
<field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
|
||||
<field name="partner_id" readonly="True"/>
|
||||
<field name="user_id" />
|
||||
<field name="user_id"/>
|
||||
<field name="section_id"/>
|
||||
</group>
|
||||
<footer>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
((((((((((( Demo Cases )))))))))))
|
||||
-->
|
||||
|
||||
<record id="crm_case_claim01" model="crm.claim">
|
||||
<record id="crm_claim_1" model="crm.claim">
|
||||
<field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_11"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<field eval=""(769) 703-274"" name="partner_phone"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_claim02" model="crm.claim">
|
||||
<record id="crm_claim_2" model="crm.claim">
|
||||
<field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_6"/>
|
||||
<field eval=""4"" name="priority"/>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<field eval=""(956) 293-2595"" name="partner_phone"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_claim03" model="crm.claim">
|
||||
<record id="crm_claim_3" model="crm.claim">
|
||||
<field eval="time.strftime('%Y-%m-15 17:44:12')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_10"/>
|
||||
<field eval=""2"" name="priority"/>
|
||||
|
@ -43,9 +43,9 @@
|
|||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_claim04" model="crm.claim">
|
||||
<record id="crm_claim_4" model="crm.claim">
|
||||
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_tinyatwork"/>
|
||||
<field name="partner_id" ref="base.res_partner_18"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Product quality not maintained"" name="name"/>
|
||||
|
@ -55,7 +55,7 @@
|
|||
<field eval=""(514) 698-4118"" name="partner_phone"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_claim05" model="crm.claim">
|
||||
<record id="crm_claim_5" model="crm.claim">
|
||||
<field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
|
||||
<field name="partner_id" ref="base.res_partner_5"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
|
@ -67,7 +67,7 @@
|
|||
<field eval=""(855) 924-4364"" name="partner_phone"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_claim06" model="crm.claim">
|
||||
<record id="crm_claim_6" model="crm.claim">
|
||||
<field name="partner_id" ref="base.res_partner_9"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
|
@ -80,8 +80,8 @@
|
|||
<field eval=""info@opensides.be"" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_claims07" model="crm.claim">
|
||||
<field name="partner_id" ref="base.res_partner_seagate"/>
|
||||
<record id="crm_claim_7" model="crm.claim">
|
||||
<field name="partner_id" ref="base.res_partner_19"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field eval=""Documents unclear"" name="name"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
-
|
||||
I create claim record to call of partner onchange method.
|
||||
-
|
||||
!record {model: crm.claim, id: crm_case_claim04}:
|
||||
!record {model: crm.claim, id: crm_claim_4}:
|
||||
name: 'Damaged Product'
|
||||
partner_id: base.res_partner_6
|
||||
-
|
||||
|
@ -9,7 +9,7 @@
|
|||
-
|
||||
!python {model: crm.claim}: |
|
||||
try:
|
||||
self.message_update(cr, uid,[ref('crm_case_claim04')], {'subject': 'Claim Update record','body_text': 'first training session completed',})
|
||||
self.message_update(cr, uid,[ref('crm_claim_4')], {'subject': 'Claim Update record','body_text': 'first training session completed',})
|
||||
except:
|
||||
pass
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="crm_helpdesk_wheretodownloadopenerp0" model="crm.helpdesk">
|
||||
<record id="crm_helpdesk_1" model="crm.helpdesk">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
|
@ -13,7 +13,7 @@
|
|||
<field eval=""Is there any link to download old versions of OpenERP?"" name="description"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_helpdesk_cannotabletoconnecttoserver0" model="crm.helpdesk">
|
||||
<record id="crm_helpdesk_2" model="crm.helpdesk">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<field eval=""I am not able to connect Server, Can anyone help?"" name="description"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_helpdesk_documentationforcrm0" model="crm.helpdesk">
|
||||
<record id="crm_helpdesk_3" model="crm.helpdesk">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<field eval=""Can anyone give link of document for CRM"" name="description"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_helpdesk_howtocreateanewmodule0" model="crm.helpdesk">
|
||||
<record id="crm_helpdesk_4" model="crm.helpdesk">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
|
|
|
@ -49,7 +49,7 @@ You can also use the geolocalization without using the GPS coordinates.
|
|||
'report/crm_partner_report_view.xml',
|
||||
],
|
||||
'test': [
|
||||
'test/process/partner_assign.yml',
|
||||
'test/partner_assign.yml'
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<field name="name">First</field>
|
||||
<field name="sequence">1</field>
|
||||
</record>
|
||||
<record id="base.res_partner_ericdubois0" model="res.partner">
|
||||
<record id="base.res_partner_15" model="res.partner">
|
||||
<field name="grade_id" ref="res_partner_grade_first"/>
|
||||
<field name="partner_weight">10</field>
|
||||
</record>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue