From 189fd8e390b270cf418dee2890ff4fdb09fac901 Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Tue, 19 Jun 2012 12:46:24 +0530 Subject: [PATCH 001/226] [IMP]: (Work in progress)* Changed demo references according to changes in server, Aim is to add more common names and easy demo. * Improved xml_id of demo like res_partner_1 instead of specific record name like res_partner_asus so in future we can change that record value easily avoiding confusions in names bzr revid: rpa@tinyerp.com-20120619071624-3d9mcl9m76gp2s0c --- addons/account/account_unit_test.xml | 2 +- .../account/project/analytic_account_demo.xml | 13 ++--- addons/account/test/account_report.yml | 4 +- addons/account/test/test_edi_invoice.yml | 2 +- .../account_payment/account_payment_demo.xml | 2 +- .../test/account_payment_demo.yml | 2 +- addons/crm/test/process/action_rule.yml | 4 +- .../crm/test/process/lead2opportunity2win.yml | 4 +- addons/crm_profiling/crm_profiling_demo.xml | 10 ++-- addons/edi/test/edi_partner_test.yml | 8 +-- addons/event/event_demo.xml | 18 ++----- addons/event/test/ui/demo_data.yml | 2 +- addons/event_sale/test/confirm.yml | 2 +- .../hr_timesheet_invoice_demo.xml | 4 +- .../test/test_hr_timesheet_invoice.yml | 14 ++--- .../test/test_hr_timesheet_sheet.yml | 4 +- addons/l10n_be/account_demo.xml | 8 +-- addons/l10n_ch/demo/dta_demo.xml | 4 +- addons/l10n_ch/test/l10n_ch_dta.yml | 4 +- addons/l10n_ch/test/l10n_ch_v11.yml | 2 +- addons/l10n_ch/test/l10n_ch_v11_part.yml | 2 +- .../test/marketing_campaign.yml | 4 +- addons/membership/membership_demo.xml | 6 +-- addons/mrp/mrp_demo.xml | 8 +-- addons/multi_company/multi_company_demo.xml | 10 ++-- addons/point_of_sale/point_of_sale_demo.xml | 8 +-- .../test/02_order_to_invoice.yml | 2 +- addons/product/product_demo.xml | 4 +- addons/project/test/project_demo.yml | 2 +- addons/project_issue/project_issue_demo.xml | 4 +- addons/purchase/purchase_demo.xml | 2 +- addons/purchase/purchase_order_demo.yml | 4 +- .../test/process/edi_purchase_order.yml | 2 +- .../test/report_intrastat_report.yml | 2 +- addons/sale/sale_demo.xml | 4 +- addons/sale/test/edi_sale_order.yml | 2 +- addons/sale/test/sale_order_demo.yml | 2 +- addons/sale_mrp/test/sale_mrp.yml | 2 +- addons/stock/stock_demo.xml | 52 +++++++++++-------- .../stock_location_demo_cpu1.xml | 8 +-- addons/stock_planning/test/stock_planning.yml | 6 +-- 41 files changed, 124 insertions(+), 125 deletions(-) diff --git a/addons/account/account_unit_test.xml b/addons/account/account_unit_test.xml index ad4540b9806..7795c2700cc 100644 --- a/addons/account/account_unit_test.xml +++ b/addons/account/account_unit_test.xml @@ -5,7 +5,7 @@ - + draft out_invoice diff --git a/addons/account/project/analytic_account_demo.xml b/addons/account/project/analytic_account_demo.xml index ec89d280774..ce85c869121 100644 --- a/addons/account/project/analytic_account_demo.xml +++ b/addons/account/project/analytic_account_demo.xml @@ -126,7 +126,7 @@ - + open @@ -134,14 +134,14 @@ 3 normal - + Asustek 4 normal - + DistriPC @@ -150,7 +150,8 @@ normal - + + Thymbra 3 @@ -202,7 +203,7 @@ normal - + open diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 7ce1843bfa3..64f8ccf838f 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -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) - diff --git a/addons/account/test/test_edi_invoice.yml b/addons/account/test/test_edi_invoice.yml index 9460bbcf085..f94d1896810 100644 --- a/addons/account/test/test_edi_invoice.yml +++ b/addons/account/test/test_edi_invoice.yml @@ -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 diff --git a/addons/account_payment/account_payment_demo.xml b/addons/account_payment/account_payment_demo.xml index 02170c38fea..c222e00b947 100644 --- a/addons/account_payment/account_payment_demo.xml +++ b/addons/account_payment/account_payment_demo.xml @@ -4,7 +4,7 @@ Reserve Bank 00987654321 - + bank diff --git a/addons/account_payment/test/account_payment_demo.yml b/addons/account_payment/test/account_payment_demo.yml index 14add1475c7..27b81e9f0f6 100644 --- a/addons/account_payment/test/account_payment_demo.yml +++ b/addons/account_payment/test/account_payment_demo.yml @@ -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 diff --git a/addons/crm/test/process/action_rule.yml b/addons/crm/test/process/action_rule.yml index b13c9b086cc..1818278a82e 100644 --- a/addons/crm/test/process/action_rule.yml +++ b/addons/crm/test/process/action_rule.yml @@ -4,7 +4,7 @@ !python {model: base.action.rule}: | modle_id = self.pool.get("ir.model").search(cr, uid, [('name', '=', 'crm.lead')]) from datetime import datetime - new_id = self.create(cr, uid, {'name': 'New Rule', 'model_id': modle_id[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': modle_id[0], 'trg_user_id': ref('base.user_root'), 'trg_partner_id': ref('base.res_partner_1'), 'act_user_id': ref('base.user_demo') }) lead_obj = self.pool.get("crm.lead") self._check(cr, uid) - @@ -12,7 +12,7 @@ - !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. - diff --git a/addons/crm/test/process/lead2opportunity2win.yml b/addons/crm/test/process/lead2opportunity2win.yml index c1caf394c2e..bbaaff7e362 100644 --- a/addons/crm/test/process/lead2opportunity2win.yml +++ b/addons/crm/test/process/lead2opportunity2win.yml @@ -22,14 +22,14 @@ 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_qrecorp0")], ref("base.res_partner_2")) - I check details of converted opportunity. - !python {model: crm.lead}: | lead = self.browse(cr, uid, ref('crm_case_qrecorp0')) 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 missmatch!' 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. diff --git a/addons/crm_profiling/crm_profiling_demo.xml b/addons/crm_profiling/crm_profiling_demo.xml index 6a0ca130ec3..0995d286d93 100644 --- a/addons/crm_profiling/crm_profiling_demo.xml +++ b/addons/crm_profiling/crm_profiling_demo.xml @@ -153,22 +153,22 @@ Partners --> - + - + - + - + diff --git a/addons/edi/test/edi_partner_test.yml b/addons/edi/test/edi_partner_test.yml index cca39417927..9fc523bf84f 100644 --- a/addons/edi/test/edi_partner_test.yml +++ b/addons/edi/test/edi_partner_test.yml @@ -9,12 +9,12 @@ !python {model: edi.document}: | import json partner_obj = self.pool.get('res.partner') - tokens = self.export_edi(cr, uid, [partner_obj.browse(cr, uid, ref('base.res_partner_agrolait'))]) + tokens = self.export_edi(cr, uid, [partner_obj.browse(cr, uid, ref('base.res_partner_2'))]) doc = self.get_document(cr, uid, tokens[0], context=context) edi_doc, = json.loads(doc) # check content of the document - assert edi_doc.get('__id').endswith('.res_partner_agrolait'), 'Incorrect external ID' + assert edi_doc.get('__id').endswith('.res_partner_2'), 'Incorrect external ID' assert edi_doc.get('__model') == 'res.partner', 'Incorrect/Missing __model' assert edi_doc.get('__module') == 'base', 'Incorrect/Missing __module' assert edi_doc.get('__last_update'), 'Missing __last_update' @@ -32,8 +32,8 @@ edi_doc['__attachments'] = [attachment] doc = json.dumps([edi_doc]) result, = self.import_edi(cr, uid, edi_document=doc) - assert result[0] == 'res.partner' and result[1] > ref('base.res_partner_agrolait'),\ - "Expected (%r,> %r) after import 1, got %r" % ('res.partner', ref('base.res_partner_agrolait'), result) + assert result[0] == 'res.partner' and result[1] > ref('base.res_partner_2'),\ + "Expected (%r,> %r) after import 1, got %r" % ('res.partner', ref('base.res_partner_2'), result) # export the same partner we just created, and see if the output matches the input tokens = self.export_edi(cr, uid, [partner_obj.browse(cr, uid, result[1])]) diff --git a/addons/event/event_demo.xml b/addons/event/event_demo.xml index 81dad07b5e4..91a3f695216 100644 --- a/addons/event/event_demo.xml +++ b/addons/event/event_demo.xml @@ -60,7 +60,7 @@ s.l@agrolait.be 003281588558 - + 5 @@ -68,29 +68,17 @@ ASUStek info@asustek.com + 1 64 61 04 01 - + 10 - - - Syleam - contact@syleam.fr - +33 (0) 2 33 31 22 10 - - - 6 - - - - Camptocamp openerp@camptocamp.com +41 21 619 10 04 - + 5 diff --git a/addons/event/test/ui/demo_data.yml b/addons/event/test/ui/demo_data.yml index 0fbb2bfa676..fd237eeda0e 100644 --- a/addons/event/test/ui/demo_data.yml +++ b/addons/event/test/ui/demo_data.yml @@ -3,7 +3,7 @@ - !record {model: event.registration, id: reg_0_1}: event_id: event_0 - partner_id: base.res_partner_asus + partner_id: base.res_partner_1 name: 'Ticket for Concert' - I create event record to call product onchange and team onchange. diff --git a/addons/event_sale/test/confirm.yml b/addons/event_sale/test/confirm.yml index 53bc7b8b0a1..a58978d8b01 100644 --- a/addons/event_sale/test/confirm.yml +++ b/addons/event_sale/test/confirm.yml @@ -20,7 +20,7 @@ I create a sale order - !record {model: sale.order, id: order}: - partner_id: base.res_partner_agrolait + partner_id: base.res_partner_2 note: Invoice after delivery payment_term: account.account_payment_term - diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_demo.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_demo.xml index ee6bdf23538..ebd6f2f0fe9 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_demo.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_demo.xml @@ -11,9 +11,9 @@ Offered developments 100.0 - + diff --git a/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml b/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml index 334a80fde9c..9da5e1d06af 100644 --- a/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml +++ b/addons/hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml @@ -4,7 +4,7 @@ I create an account analytic line. - !record {model: account.analytic.line, id: account_analytic_line_developyamlforhrmodule0 }: - account_id: account.analytic_sednacom + account_id: account.analytic_agrolait amount: -1.0 general_account_id: account.a_expense journal_id: hr_timesheet.analytic_journal @@ -16,20 +16,20 @@ - Assign partner name and price list in analytic account. - - !record {model: account.analytic.account, id: account.analytic_sednacom}: - partner_id: base.res_partner_desertic_hispafuentes + !record {model: account.analytic.account, id: account.analytic_agrolait}: + partner_id: base.res_partner_2 pricelist_id: product.list0 - I open this account and make the state as pending. - !python {model: account.analytic.account}: | - self.set_open(cr, uid, [ref('account.analytic_sednacom')], None) - self.set_pending(cr, uid, [ref('account.analytic_sednacom')], None) + self.set_open(cr, uid, [ref('account.analytic_agrolait')], None) + self.set_pending(cr, uid, [ref('account.analytic_agrolait')], None) - I assign account on analytic account line. - !python {model: hr.analytic.timesheet}: | - self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule0')], ref('account.analytic_sednacom')) + self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule0')], ref('account.analytic_agrolait')) - I create invoice on analytic Line using "Invoice analytic Line" wizard. - @@ -83,4 +83,4 @@ !python {model: hr.timesheet.invoice.create.final}: | import netsvc wkf_service = netsvc.LocalService("workflow") - res = self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_final_0")], {"active_ids": [ref("account.analytic_sednacom")]}) + res = self.do_create(cr, uid, [ref("hr_timesheet_invoice_create_final_0")], {"active_ids": [ref("account.analytic_agrolait")]}) diff --git a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml index e38ad31ea12..43b330ac114 100644 --- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml +++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml @@ -66,7 +66,7 @@ - !record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}: timesheet_ids: - - account_id: account.analytic_sednacom + - account_id: account.analytic_agrolait date: !eval time.strftime('%Y-%m-%d') name: 'Develop yaml for hr module' user_id: base.user_qdp @@ -93,7 +93,7 @@ - !record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}: timesheet_ids: - - account_id: account.analytic_sednacom + - account_id: account.analytic_agrolait date: !eval time.strftime('%Y-%m-%d') name: 'Develop yaml for hr module' unit_amount: 2.00 diff --git a/addons/l10n_be/account_demo.xml b/addons/l10n_be/account_demo.xml index 88a59c75ab3..c91585a807e 100644 --- a/addons/l10n_be/account_demo.xml +++ b/addons/l10n_be/account_demo.xml @@ -6,7 +6,7 @@ - + draft out_invoice @@ -31,7 +31,7 @@ - + draft out_invoice @@ -58,7 +58,7 @@ - + draft out_invoice @@ -85,7 +85,7 @@ - + draft out_invoice diff --git a/addons/l10n_ch/demo/dta_demo.xml b/addons/l10n_ch/demo/dta_demo.xml index 5aa00b9c505..bbbc1e8687c 100644 --- a/addons/l10n_ch/demo/dta_demo.xml +++ b/addons/l10n_ch/demo/dta_demo.xml @@ -10,7 +10,7 @@ Fortis account 123456 - + bvrbank 01-23456-5 @@ -32,7 +32,7 @@ V11 invoice 54150 1 - + diff --git a/addons/l10n_ch/test/l10n_ch_dta.yml b/addons/l10n_ch/test/l10n_ch_dta.yml index c79ec55adb8..7ef00493c4b 100644 --- a/addons/l10n_ch/test/l10n_ch_dta.yml +++ b/addons/l10n_ch/test/l10n_ch_dta.yml @@ -12,7 +12,7 @@ currency_id: base.EUR account_id: account.a_pay type : in_invoice - partner_id: base.res_partner_agrolait + partner_id: base.res_partner_2 reference_type: bvr reference: 11111111111111111111 date_invoice: !eval "'%s-01-01' %(datetime.now().year)" @@ -77,7 +77,7 @@ move_line_id: !ref {model: account.move.line, search: "[('ref','=','11111111111111111111')]"} #name (reference) order_id: dta_payment_order - partner_id: base.res_partner_agrolait + partner_id: base.res_partner_2 state: normal - diff --git a/addons/l10n_ch/test/l10n_ch_v11.yml b/addons/l10n_ch/test/l10n_ch_v11.yml index 4bc7ce1097b..7db3a16d6c3 100644 --- a/addons/l10n_ch/test/l10n_ch_v11.yml +++ b/addons/l10n_ch/test/l10n_ch_v11.yml @@ -12,7 +12,7 @@ currency_id: base.EUR account_id: account.a_recv type : out_invoice - partner_id: base.res_partner_agrolait + partner_id: base.res_partner_2 reference_type: bvr reference: 12345676 date_invoice: !eval "'%s-01-01' %(datetime.now().year)" diff --git a/addons/l10n_ch/test/l10n_ch_v11_part.yml b/addons/l10n_ch/test/l10n_ch_v11_part.yml index 71b16455f81..94edef860f5 100644 --- a/addons/l10n_ch/test/l10n_ch_v11_part.yml +++ b/addons/l10n_ch/test/l10n_ch_v11_part.yml @@ -13,7 +13,7 @@ currency_id: base.EUR account_id: account.a_recv type : out_invoice - partner_id: base.res_partner_agrolait + partner_id: base.res_partner_2 reference_type: bvr reference: 20009997 date_invoice: !eval "'%s-01-01' %(datetime.now().year)" diff --git a/addons/marketing_campaign/test/marketing_campaign.yml b/addons/marketing_campaign/test/marketing_campaign.yml index 1b7a7fa2ae3..358df9c0ede 100644 --- a/addons/marketing_campaign/test/marketing_campaign.yml +++ b/addons/marketing_campaign/test/marketing_campaign.yml @@ -70,7 +70,7 @@ Now I increase credit limit of customer - !python {model: res.partner}: | - self.write(cr, uid, [ref("base.res_partner_agrolait")], {'credit_limit':41000}, context=context) + self.write(cr, uid, [ref("base.res_partner_2")], {'credit_limit':41000}, context=context) - I process followup of second activity after set draft. - @@ -92,7 +92,7 @@ Now I increase credit limit of customer - !python {model: res.partner}: | - self.write(cr, uid, [ref("base.res_partner_agrolait")], {'credit_limit':151000}, context=context) + self.write(cr, uid, [ref("base.res_partner_2")], {'credit_limit':151000}, context=context) - I process followup of third activity after set draft. - diff --git a/addons/membership/membership_demo.xml b/addons/membership/membership_demo.xml index 9479543305a..48a8260b0a4 100644 --- a/addons/membership/membership_demo.xml +++ b/addons/membership/membership_demo.xml @@ -32,7 +32,7 @@ - + @@ -41,10 +41,10 @@ - + - + diff --git a/addons/mrp/mrp_demo.xml b/addons/mrp/mrp_demo.xml index 6a581d7fc37..f8454634923 100644 --- a/addons/mrp/mrp_demo.xml +++ b/addons/mrp/mrp_demo.xml @@ -63,7 +63,7 @@ - + - + - + - + - + diff --git a/addons/point_of_sale/point_of_sale_demo.xml b/addons/point_of_sale/point_of_sale_demo.xml index 8d5fdc67d63..d4056da1296 100644 --- a/addons/point_of_sale/point_of_sale_demo.xml +++ b/addons/point_of_sale/point_of_sale_demo.xml @@ -46,7 +46,7 @@ - + Invoice from POS: POS/019 @@ -59,7 +59,7 @@ - + @@ -80,7 +80,7 @@ - + @@ -100,7 +100,7 @@ - + general diff --git a/addons/point_of_sale/test/02_order_to_invoice.yml b/addons/point_of_sale/test/02_order_to_invoice.yml index fb570a61a75..95eec81831c 100644 --- a/addons/point_of_sale/test/02_order_to_invoice.yml +++ b/addons/point_of_sale/test/02_order_to_invoice.yml @@ -3,7 +3,7 @@ - !record {model: pos.order, id: pos_order_pos1}: company_id: base.main_company - partner_id: base.res_partner_asus + partner_id: base.res_partner_1 lines: - name: OL/0001 product_id: product.product_product_pc1 diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index a331d5c8b6b..22cd4b074c3 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -690,14 +690,14 @@ --> - + 10 1 5 - + 10 1 diff --git a/addons/project/test/project_demo.yml b/addons/project/test/project_demo.yml index 3bcae52e238..bc09fc0ba83 100644 --- a/addons/project/test/project_demo.yml +++ b/addons/project/test/project_demo.yml @@ -1,6 +1,6 @@ - !record {model: project.project, id: project_integrate_openerp, view: False}: - partner_id: base.res_partner_agrolait + partner_id: base.res_partner_2 - !record {model: project.task, id: project_task_1, view: False}: remaining_hours: 10.00 diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml index a213cb02c2e..3b96abd4b8e 100644 --- a/addons/project_issue/project_issue_demo.xml +++ b/addons/project_issue/project_issue_demo.xml @@ -6,7 +6,7 @@ - + @@ -21,7 +21,7 @@ - + diff --git a/addons/purchase/purchase_demo.xml b/addons/purchase/purchase_demo.xml index 6999f85b076..1016ddb2381 100644 --- a/addons/purchase/purchase_demo.xml +++ b/addons/purchase/purchase_demo.xml @@ -9,7 +9,7 @@ - + diff --git a/addons/purchase/purchase_order_demo.yml b/addons/purchase/purchase_order_demo.yml index 4ff5b377662..51b6d7939ae 100644 --- a/addons/purchase/purchase_order_demo.yml +++ b/addons/purchase/purchase_order_demo.yml @@ -1,6 +1,6 @@ - !record {model: purchase.order, id: order_purchase1}: - partner_id: base.res_partner_asus + partner_id: base.res_partner_1 invoice_method: order order_line: - product_id: product.product_product_pc2 @@ -79,7 +79,7 @@ uom_id: product.product_uom_gram - !record {model: purchase.order, id: order_purchase_icecream}: - partner_id: base.res_partner_asus + partner_id: base.res_partner_1 order_line: - product_id: stock.product_icecream diff --git a/addons/purchase/test/process/edi_purchase_order.yml b/addons/purchase/test/process/edi_purchase_order.yml index 661536dd5ce..6649807f077 100644 --- a/addons/purchase/test/process/edi_purchase_order.yml +++ b/addons/purchase/test/process/edi_purchase_order.yml @@ -2,7 +2,7 @@ I create a draft Purchase Order - !record {model: purchase.order, id: purchase_order_edi_1}: - partner_id: base.res_partner_agrolait + partner_id: base.res_partner_2 location_id: stock.stock_location_3 pricelist_id: 1 order_line: diff --git a/addons/report_intrastat/test/report_intrastat_report.yml b/addons/report_intrastat/test/report_intrastat_report.yml index e049c0ffcb8..626f2fde186 100644 --- a/addons/report_intrastat/test/report_intrastat_report.yml +++ b/addons/report_intrastat/test/report_intrastat_report.yml @@ -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 diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index d9946c812c7..98025c1e22c 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -8,7 +8,7 @@ - + picking @@ -99,7 +99,7 @@ - + prepaid diff --git a/addons/sale/test/edi_sale_order.yml b/addons/sale/test/edi_sale_order.yml index af9a9b3aad6..58ccfb2e42d 100644 --- a/addons/sale/test/edi_sale_order.yml +++ b/addons/sale/test/edi_sale_order.yml @@ -2,7 +2,7 @@ I create a draft Sale Order - !record {model: sale.order, id: sale_order_edi_1}: - partner_id: base.res_partner_agrolait + partner_id: base.res_partner_2 partner_invoice_id: base.res_partner_address_8invoice partner_shipping_id: base.res_partner_address_8invoice pricelist_id: 1 diff --git a/addons/sale/test/sale_order_demo.yml b/addons/sale/test/sale_order_demo.yml index 0864b949690..d61361754ee 100644 --- a/addons/sale/test/sale_order_demo.yml +++ b/addons/sale/test/sale_order_demo.yml @@ -2,7 +2,7 @@ In order to test process of the Sale Order, I create sale order - !record {model: sale.order, id: order}: - partner_id: base.res_partner_agrolait + partner_id: base.res_partner_2 note: Invoice after delivery payment_term: account.account_payment_term - diff --git a/addons/sale_mrp/test/sale_mrp.yml b/addons/sale_mrp/test/sale_mrp.yml index a29c2c10d01..6aafce4a71d 100644 --- a/addons/sale_mrp/test/sale_mrp.yml +++ b/addons/sale_mrp/test/sale_mrp.yml @@ -38,7 +38,7 @@ seller_delay: '1' seller_ids: - delay: 1 - name: base.res_partner_agrolait + name: base.res_partner_2 min_qty: 2.0 qty: 5.0 standard_price: 189.0 diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index ec0860f62c7..28b2b28ec71 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -180,61 +180,71 @@ - - - + + + + 1 - + Computech Systems + + - + - + + - + - + Computech Systems - + + + - + 1 - + SoftSys Technologies + + - + - + + - + - + SoftSys Technologies + - + - + Computech Systems - + - + SoftSys Technologies @@ -248,7 +258,7 @@ - + @@ -256,7 +266,7 @@ Shop 2 - + diff --git a/addons/stock_location/stock_location_demo_cpu1.xml b/addons/stock_location/stock_location_demo_cpu1.xml index 028c71bd188..79e379f7fda 100644 --- a/addons/stock_location/stock_location_demo_cpu1.xml +++ b/addons/stock_location/stock_location_demo_cpu1.xml @@ -46,7 +46,7 @@ none - + move make_to_order @@ -70,7 +70,7 @@ 20.0 10.0 - + @@ -79,13 +79,13 @@ Shop 1 - + Shop 2 - + diff --git a/addons/stock_planning/test/stock_planning.yml b/addons/stock_planning/test/stock_planning.yml index 2b75f5a5d94..d6b6d9e9f44 100644 --- a/addons/stock_planning/test/stock_planning.yml +++ b/addons/stock_planning/test/stock_planning.yml @@ -191,7 +191,7 @@ self.product_amt_change(cr, uid, forecast_ids, 5.0, ref('product.product_uom_unit'), ref('product.product_product_20')) self.product_amt_change(cr, uid, forecast_ids, 5.0, ref('product.product_uom_unit'), ref('product.product_product_20')) self._to_default_uom_factor(cr, uid, ref('product.product_product_20'), ref('product.product_uom_unit'), {}) - self.onchange_company(cr, uid, forecast_ids, ref('stock.res_company_tinyshop0')) + self.onchange_company(cr, uid, forecast_ids, ref('stock.res_partner_2')) - I create Master procurement schedule for the third week of July. @@ -216,7 +216,7 @@ Performing an osv_memory action create_planning on module stock.planning.createlines - !python {model: stock.planning.createlines}: | - self.onchange_company(cr, uid, ref("stock_planning_createlines_0"), ref('stock.res_company_tinyshop0')) + self.onchange_company(cr, uid, ref("stock_planning_createlines_0"), ref('stock.res_partner_2')) self.create_planning(cr, uid, [ref("stock_planning_createlines_0")], {"lang": "en_US", "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("stock_planning.menu_stock_planning_createlines")], "active_id": ref("stock_planning.menu_stock_planning_createlines"), "department_id": @@ -227,7 +227,7 @@ !python {model: stock.planning}: | planning_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_pc1')),('period_id','=',ref('stock_period_03'))]) self.write(cr, uid, planning_ids, {'to_procure': 30.0,'planned_outgoing': 40.0,'supply_warehouse_id': ref("stock_warehouse_0")}) - self.onchange_company(cr, uid, planning_ids, ref('stock.res_company_tinyshop0')) + self.onchange_company(cr, uid, planning_ids, ref('stock.res_partner_2')) self.onchange_uom(cr, uid, planning_ids, ref('product.product_uom_unit'), ref('product.product_product_pc1'),ref('product.product_uom_unit'), False, False) self.product_id_change(cr, uid, planning_ids, ref('product.product_product_20')) context = {"lang": "en_US", "tz": False, "active_model": "ir.ui.menu", From ebf13837858f3572f0d4959d639a4f47d32935ba Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Tue, 19 Jun 2012 12:14:25 +0200 Subject: [PATCH 002/226] ir.ui.view: type field can be a functional field. bzr revid: vmt@openerp.com-20120619101425-u73r47zdhsg7ecma --- openerp/addons/base/ir/ir_ui_view.py | 15 ++++++++++++--- openerp/addons/base/module/module.py | 9 ++++++--- openerp/tools/convert.py | 5 +++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/openerp/addons/base/ir/ir_ui_view.py b/openerp/addons/base/ir/ir_ui_view.py index ac3644a28f7..d3b090c45d4 100644 --- a/openerp/addons/base/ir/ir_ui_view.py +++ b/openerp/addons/base/ir/ir_ui_view.py @@ -47,11 +47,20 @@ view_custom() class view(osv.osv): _name = 'ir.ui.view' + + def _type_field(self, cr, uid, ids, name, args, context=None): + records = self.browse(cr, uid, ids, context) + result = dict((r.id, etree.fromstring(r.arch.encode('utf8')).tag) for r in records) + return result + + def _set_type_field(self, cr, uid, ids, name, value, args, context=None): + print "ignoring", value + _columns = { 'name': fields.char('View Name',size=64, required=True), 'model': fields.char('Object', size=64, required=True, select=True), 'priority': fields.integer('Sequence', required=True), - 'type': fields.selection(( + 'type': fields.function(_type_field, fnct_inv=_set_type_field, type='selection', selection=[ ('tree','Tree'), ('form','Form'), ('mdx','mdx'), @@ -60,7 +69,7 @@ class view(osv.osv): ('diagram','Diagram'), ('gantt', 'Gantt'), ('kanban', 'Kanban'), - ('search','Search')), 'View Type', required=True, select=True), + ('search','Search')], string='View Type', required=True, select=True, store=True), 'arch': fields.text('View Architecture', required=True), 'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade', select=True), 'field_parent': fields.char('Child Field',size=64), @@ -133,7 +142,7 @@ class view(osv.osv): super(view, self)._auto_init(cr, context) cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'ir_ui_view_model_type_inherit_id\'') if not cr.fetchone(): - cr.execute('CREATE INDEX ir_ui_view_model_type_inherit_id ON ir_ui_view (model, type, inherit_id)') + cr.execute('CREATE INDEX ir_ui_view_model_type_inherit_id ON ir_ui_view (model, inherit_id)') def get_inheriting_views_arch(self, cr, uid, view_id, model, context=None): """Retrieves the architecture of views that inherit from the given view, from the sets of diff --git a/openerp/addons/base/module/module.py b/openerp/addons/base/module/module.py index d75f330afa2..1a7b5a9f9ae 100644 --- a/openerp/addons/base/module/module.py +++ b/openerp/addons/base/module/module.py @@ -138,14 +138,17 @@ class module(osv.osv): # We use try except, because views or menus may not exist. try: res_mod_dic = res[module_rec.id] - for v in view_obj.browse(cr, uid, imd_models.get('ir.ui.view', []), context=context): + view_ids = filter(None, imd_models.get('ir.ui.view', [])) + for v in view_obj.browse(cr, uid, view_ids, context=context): aa = v.inherit_id and '* INHERIT ' or '' res_mod_dic['views_by_module'].append(aa + v.name + '('+v.type+')') - for rx in report_obj.browse(cr, uid, imd_models.get('ir.actions.report.xml', []), context=context): + report_ids = imd_models.get('ir.actions.report.xml', []) + for rx in report_obj.browse(cr, uid, filter(None, report_ids), context=context): res_mod_dic['reports_by_module'].append(rx.name) - for um in menu_obj.browse(cr, uid, imd_models.get('ir.ui.menu', []), context=context): + menu_ids = imd_models.get('ir.ui.menu', []) + for um in menu_obj.browse(cr, uid, filter(None, menu_ids), context=context): res_mod_dic['menus_by_module'].append(um.complete_name) except KeyError, e: _logger.warning( diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py index c2c610c16af..a46a6663217 100644 --- a/openerp/tools/convert.py +++ b/openerp/tools/convert.py @@ -605,8 +605,9 @@ form: module.record_id""" % (xml_id,) "Verify that this is a window action or add a type argument." % (a_action,) action_type,action_mode,action_name,view_id,target = rrres if view_id: - cr.execute('SELECT type FROM ir_ui_view WHERE id=%s', (int(view_id),)) - action_mode, = cr.fetchone() + cr.execute('SELECT arch FROM ir_ui_view WHERE id=%s', (int(view_id),)) + arch, = cr.fetchone() + action_mode = etree.fromstring(arch.encode('utf8')).tag cr.execute('SELECT view_mode FROM ir_act_window_view WHERE act_window_id=%s ORDER BY sequence LIMIT 1', (int(a_id),)) if cr.rowcount: action_mode, = cr.fetchone() From 0aaef8a06ee3ff507370d40647e0ba130da10e1c Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Wed, 20 Jun 2012 17:33:05 +0530 Subject: [PATCH 003/226] [IMP]: Improved partner demo xml_id referenced based on changes in server bzr revid: rpa@tinyerp.com-20120620120305-g88c9cp55csnsvoc --- addons/account/demo/account_invoice_demo.xml | 6 +-- .../account/project/analytic_account_demo.xml | 23 +++++----- .../account/test/account_change_currency.yml | 2 +- addons/account/test/account_invoice_state.yml | 2 +- .../account/test/account_supplier_invoice.yml | 2 +- .../test/account_validate_account_move.yml | 8 ++-- .../test/account_followup.yml | 2 +- .../account_voucher/test/account_voucher.yml | 4 +- addons/account_voucher/test/case1_usd_usd.yml | 24 +++++----- .../test/case2_suppl_usd_eur.yml | 28 ++++++------ .../test/case2_usd_eur_debtor_in_eur.yml | 20 ++++----- .../test/case2_usd_eur_debtor_in_usd.yml | 22 +++++----- addons/account_voucher/test/case3_eur_eur.yml | 24 +++++----- addons/account_voucher/test/case4_cad_chf.yml | 12 ++--- addons/account_voucher/test/case_eur_usd.yml | 4 +- addons/account_voucher/test/sales_payment.yml | 6 +-- addons/account_voucher/test/sales_receipt.yml | 6 +-- addons/crm/crm_lead_demo.xml | 44 +++++-------------- addons/crm/crm_meeting_demo.xml | 2 +- addons/crm/crm_phonecall_demo.xml | 2 +- addons/crm/test/ui/crm_demo.yml | 2 +- addons/crm_claim/crm_claim_demo.xml | 4 +- addons/crm_partner_assign/__openerp__.py | 2 +- .../crm_partner_assign/res_partner_demo.xml | 2 +- addons/crm_profiling/crm_profiling_demo.xml | 14 +++--- addons/event/test/ui/demo_data.yml | 2 +- addons/hr_expense/hr_expense_demo.xml | 4 +- .../test/hr_payroll_account.yml | 2 +- .../hr_timesheet/test/test_hr_timesheet.yml | 4 +- .../hr_timesheet_invoice_demo.xml | 6 +-- addons/membership/membership_demo.xml | 2 +- addons/membership/test/test_membership.yml | 20 ++++----- addons/mrp/mrp_demo.xml | 4 +- addons/multi_company/multi_company_demo.xml | 17 +++---- addons/product/product_demo.xml | 22 +++++----- addons/project_issue/project_issue_demo.xml | 4 +- addons/purchase/purchase_order_demo.yml | 8 ++-- .../test/purchase_double_validation_demo.yml | 4 +- .../purchase_requisition_demo.xml | 2 +- .../test/purchase_requisition.yml | 4 +- addons/sale/sale_demo.xml | 8 ++-- addons/stock/stock_demo.xml | 2 +- addons/stock_planning/test/stock_planning.yml | 2 +- 43 files changed, 177 insertions(+), 207 deletions(-) diff --git a/addons/account/demo/account_invoice_demo.xml b/addons/account/demo/account_invoice_demo.xml index 44e22ce4681..7c4ae29498b 100644 --- a/addons/account/demo/account_invoice_demo.xml +++ b/addons/account/demo/account_invoice_demo.xml @@ -16,7 +16,7 @@ - + @@ -28,7 +28,7 @@ - + [RPAN100] Rear Panel SHE100 @@ -41,7 +41,7 @@ - + [RCK200] Rack 200cm diff --git a/addons/account/project/analytic_account_demo.xml b/addons/account/project/analytic_account_demo.xml index ce85c869121..f5bd7b5dbb0 100644 --- a/addons/account/project/analytic_account_demo.xml +++ b/addons/account/project/analytic_account_demo.xml @@ -102,7 +102,7 @@ normal open - + Seagate P2 @@ -110,7 +110,7 @@ normal open - + Magasin BML 1 @@ -150,25 +150,24 @@ normal - - - - Thymbra + + + Nebula 3 normal - + open @@ -187,14 +186,14 @@ normal - + OpenERP SA AT Work 15 normal - + Camp to Camp diff --git a/addons/account/test/account_change_currency.yml b/addons/account/test/account_change_currency.yml index dbbe3d5f676..f7969c658e0 100644 --- a/addons/account/test/account_change_currency.yml +++ b/addons/account/test/account_change_currency.yml @@ -13,7 +13,7 @@ product_id: product.product_product_pc1 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 - diff --git a/addons/account/test/account_invoice_state.yml b/addons/account/test/account_invoice_state.yml index 0825c3d2433..2281f8cf2ce 100644 --- a/addons/account/test/account_invoice_state.yml +++ b/addons/account/test/account_invoice_state.yml @@ -13,7 +13,7 @@ product_id: product.product_product_pc1 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" diff --git a/addons/account/test/account_supplier_invoice.yml b/addons/account/test/account_supplier_invoice.yml index a8898bc9764..abe618ff07e 100644 --- a/addons/account/test/account_supplier_invoice.yml +++ b/addons/account/test/account_supplier_invoice.yml @@ -36,7 +36,7 @@ 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 - diff --git a/addons/account/test/account_validate_account_move.yml b/addons/account/test/account_validate_account_move.yml index e612d7cc0f0..65ae2877125 100644 --- a/addons/account/test/account_validate_account_move.yml +++ b/addons/account/test/account_validate_account_move.yml @@ -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'], diff --git a/addons/account_followup/test/account_followup.yml b/addons/account_followup/test/account_followup.yml index 5d4a7f3bd47..e5675b47fc8 100644 --- a/addons/account_followup/test/account_followup.yml +++ b/addons/account_followup/test/account_followup.yml @@ -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 followup mail to partner. diff --git a/addons/account_voucher/test/account_voucher.yml b/addons/account_voucher/test/account_voucher.yml index 7e5482aa931..9cfb9d61229 100644 --- a/addons/account_voucher/test/account_voucher.yml +++ b/addons/account_voucher/test/account_voucher.yml @@ -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 diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml index 5ff48e7d35d..87875a4210b 100644 --- a/addons/account_voucher/test/case1_usd_usd.yml +++ b/addons/account_voucher/test/case1_usd_usd.yml @@ -85,7 +85,7 @@ product_id: product.product_product_pc1 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 @@ -118,7 +118,7 @@ product_id: product.product_product_pc1 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 @@ -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' @@ -176,7 +176,7 @@ 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" - @@ -184,14 +184,14 @@ - !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)]) @@ -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' @@ -269,7 +269,7 @@ 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" - @@ -277,14 +277,14 @@ - !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)]) diff --git a/addons/account_voucher/test/case2_suppl_usd_eur.yml b/addons/account_voucher/test/case2_suppl_usd_eur.yml index 85d710f235a..0ca70d7bf5b 100644 --- a/addons/account_voucher/test/case2_suppl_usd_eur.yml +++ b/addons/account_voucher/test/case2_suppl_usd_eur.yml @@ -56,7 +56,7 @@ product_id: product.product_product_pc1 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 - @@ -91,7 +91,7 @@ product_id: product.product_product_pc1 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)]) diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml index 150843cd250..078ab7916d1 100644 --- a/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml +++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_eur.yml @@ -91,7 +91,7 @@ product_id: product.product_product_pc1 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 @@ -124,7 +124,7 @@ product_id: product.product_product_pc1 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)]) diff --git a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml index b7c116bdc12..27357c2e65a 100644 --- a/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml +++ b/addons/account_voucher/test/case2_usd_eur_debtor_in_usd.yml @@ -91,7 +91,7 @@ product_id: product.product_product_pc1 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 @@ -124,7 +124,7 @@ product_id: product.product_product_pc1 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)]) diff --git a/addons/account_voucher/test/case3_eur_eur.yml b/addons/account_voucher/test/case3_eur_eur.yml index c99f0d968c9..8c94dde293f 100644 --- a/addons/account_voucher/test/case3_eur_eur.yml +++ b/addons/account_voucher/test/case3_eur_eur.yml @@ -45,7 +45,7 @@ product_id: product.product_product_pc1 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 @@ -78,7 +78,7 @@ product_id: product.product_product_pc1 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)]) diff --git a/addons/account_voucher/test/case4_cad_chf.yml b/addons/account_voucher/test/case4_cad_chf.yml index 9d9b4d77994..45800656b12 100644 --- a/addons/account_voucher/test/case4_cad_chf.yml +++ b/addons/account_voucher/test/case4_cad_chf.yml @@ -79,7 +79,7 @@ product_id: product.product_product_pc1 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)]) diff --git a/addons/account_voucher/test/case_eur_usd.yml b/addons/account_voucher/test/case_eur_usd.yml index 72f0d22aead..c373c24708b 100644 --- a/addons/account_voucher/test/case_eur_usd.yml +++ b/addons/account_voucher/test/case_eur_usd.yml @@ -58,7 +58,7 @@ product_id: product.product_product_pc1 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' diff --git a/addons/account_voucher/test/sales_payment.yml b/addons/account_voucher/test/sales_payment.yml index 8d861154a48..82bad9d390c 100644 --- a/addons/account_voucher/test/sales_payment.yml +++ b/addons/account_voucher/test/sales_payment.yml @@ -13,7 +13,7 @@ product_id: product.product_product_pc1 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', } diff --git a/addons/account_voucher/test/sales_receipt.yml b/addons/account_voucher/test/sales_receipt.yml index 7ea4f7d1c55..f39d784bd42 100644 --- a/addons/account_voucher/test/sales_receipt.yml +++ b/addons/account_voucher/test/sales_receipt.yml @@ -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', } diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml index 21c7f9e31ab..a2e126531c5 100644 --- a/addons/crm/crm_lead_demo.xml +++ b/addons/crm/crm_lead_demo.xml @@ -250,33 +250,11 @@ - - - opportunity - - - - - - - - - - - - - - Lucie Vonck - Chaussée de Namur - Grand-Rosière - - - opportunity - + @@ -339,7 +317,7 @@ opportunity - + @@ -351,7 +329,7 @@ - Dubois sprl + Global Solutions Avenue de la Liberté 56 Brussels @@ -361,7 +339,7 @@ opportunity - + @@ -374,7 +352,7 @@ opportunity - + @@ -387,7 +365,7 @@ opportunity - + @@ -410,7 +388,7 @@ opportunity - + @@ -431,7 +409,7 @@ opportunity - + @@ -442,7 +420,7 @@ - Eric Dubois + Epic Chaussée de Binche, 27 Mons @@ -452,7 +430,7 @@ opportunity - + @@ -463,7 +441,7 @@ opportunity - + diff --git a/addons/crm/crm_meeting_demo.xml b/addons/crm/crm_meeting_demo.xml index 7427afe1e58..96a437e6202 100644 --- a/addons/crm/crm_meeting_demo.xml +++ b/addons/crm/crm_meeting_demo.xml @@ -8,7 +8,7 @@ - + diff --git a/addons/crm/crm_phonecall_demo.xml b/addons/crm/crm_phonecall_demo.xml index 614b93f2bc1..8e40f1e2e56 100644 --- a/addons/crm/crm_phonecall_demo.xml +++ b/addons/crm/crm_phonecall_demo.xml @@ -52,7 +52,7 @@ - + diff --git a/addons/crm/test/ui/crm_demo.yml b/addons/crm/test/ui/crm_demo.yml index b5fd005126c..a48ebc3225e 100644 --- a/addons/crm/test/ui/crm_demo.yml +++ b/addons/crm/test/ui/crm_demo.yml @@ -3,7 +3,7 @@ - !record {model: crm.lead, id: crm_case_shelvehouse}: 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 diff --git a/addons/crm_claim/crm_claim_demo.xml b/addons/crm_claim/crm_claim_demo.xml index 0e368bcdffa..f3fbd814f2a 100644 --- a/addons/crm_claim/crm_claim_demo.xml +++ b/addons/crm_claim/crm_claim_demo.xml @@ -45,7 +45,7 @@ - + @@ -81,7 +81,7 @@ - + diff --git a/addons/crm_partner_assign/__openerp__.py b/addons/crm_partner_assign/__openerp__.py index f27420e54f8..aa0463334cf 100644 --- a/addons/crm_partner_assign/__openerp__.py +++ b/addons/crm_partner_assign/__openerp__.py @@ -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/process/partner_assign.yml', TODO_demo: need to change yml as demo has been changed ], 'installable': True, 'auto_install': False, diff --git a/addons/crm_partner_assign/res_partner_demo.xml b/addons/crm_partner_assign/res_partner_demo.xml index 66ee1fbd5e7..618ec0fdb76 100644 --- a/addons/crm_partner_assign/res_partner_demo.xml +++ b/addons/crm_partner_assign/res_partner_demo.xml @@ -5,7 +5,7 @@ First 1 - + 10 diff --git a/addons/crm_profiling/crm_profiling_demo.xml b/addons/crm_profiling/crm_profiling_demo.xml index 0995d286d93..e280985777a 100644 --- a/addons/crm_profiling/crm_profiling_demo.xml +++ b/addons/crm_profiling/crm_profiling_demo.xml @@ -165,19 +165,19 @@ - - + + - + - + @@ -201,10 +201,6 @@ - - - - diff --git a/addons/event/test/ui/demo_data.yml b/addons/event/test/ui/demo_data.yml index fd237eeda0e..1a6631c93a3 100644 --- a/addons/event/test/ui/demo_data.yml +++ b/addons/event/test/ui/demo_data.yml @@ -15,7 +15,7 @@ I call onchange event from event registration wizard. - !python {model: partner.event.registration}: | - context.update({'active_id': ref("base.res_partner_ericdubois0")}) + context.update({'active_id': ref("base.res_partner_5")}) self.onchange_event_id(cr, uid, 1, ref("event_1"), context=context) - I confirm event from wizard. diff --git a/addons/hr_expense/hr_expense_demo.xml b/addons/hr_expense/hr_expense_demo.xml index 8f0e2c843b2..0c0c6b8d956 100644 --- a/addons/hr_expense/hr_expense_demo.xml +++ b/addons/hr_expense/hr_expense_demo.xml @@ -66,7 +66,7 @@ Hotel Expenses - Thymbra - + @@ -77,7 +77,7 @@ Bruxelles - Paris - + diff --git a/addons/hr_payroll_account/test/hr_payroll_account.yml b/addons/hr_payroll_account/test/hr_payroll_account.yml index 31733878335..5abf7d5dffa 100644 --- a/addons/hr_payroll_account/test/hr_payroll_account.yml +++ b/addons/hr_payroll_account/test/hr_payroll_account.yml @@ -5,7 +5,7 @@ - !record {model: res.partner.bank, id: res_partner_bank_0}: acc_number: '001-9876543-21' - partner_id: base.res_partner_desertic_hispafuentes + partner_id: base.res_partner_12 state: bank bank: base.res_bank_1 - diff --git a/addons/hr_timesheet/test/test_hr_timesheet.yml b/addons/hr_timesheet/test/test_hr_timesheet.yml index 420dfc667b5..cc04bed734d 100644 --- a/addons/hr_timesheet/test/test_hr_timesheet.yml +++ b/addons/hr_timesheet/test/test_hr_timesheet.yml @@ -32,7 +32,7 @@ import time from datetime import datetime, date, timedelta uid = ref('base.user_demo') - new_id = self.create(cr, uid, {'account_id': ref('account.analytic_thymbra'),'analytic_amount': 7.0, + new_id = self.create(cr, uid, {'account_id': ref('account.analytic_nebula'),'analytic_amount': 7.0, 'date': (datetime.now()+timedelta(1)).strftime('%Y-%m-%d %H:%M:%S') , 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'), 'info': 'Create Yaml for hr module', 'name': 'Quentin Paolino', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'action'}) @@ -44,7 +44,7 @@ import time from datetime import datetime, date, timedelta uid = ref('base.user_demo') - new_id = self.create(cr, uid, {'account_id': ref('account.analytic_sednacom'), 'analytic_amount': 7.0, + new_id = self.create(cr, uid, {'account_id': ref('account.analytic_spark'), 'analytic_amount': 7.0, 'date': (datetime.now()+timedelta(2)).strftime('%Y-%m-%d %H:%M:%S'), 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'), 'info': 'Create Yaml for hr module', 'name': 'Quentin Paolino', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'absent'}) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_demo.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_demo.xml index ebd6f2f0fe9..cc531fc8f10 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_demo.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_demo.xml @@ -11,10 +11,10 @@ Offered developments 100.0 - - + + diff --git a/addons/membership/membership_demo.xml b/addons/membership/membership_demo.xml index 48a8260b0a4..8f9b45e8263 100644 --- a/addons/membership/membership_demo.xml +++ b/addons/membership/membership_demo.xml @@ -35,7 +35,7 @@ - + True diff --git a/addons/membership/test/test_membership.yml b/addons/membership/test/test_membership.yml index d182ebaf35b..c37dcb0ec66 100644 --- a/addons/membership/test/test_membership.yml +++ b/addons/membership/test/test_membership.yml @@ -15,17 +15,17 @@ - | "Seagate" want to join "Gold Membership", so I'm checking "Current Membership State" of "Seagate". It is an "Non Member" or not. - - !assert {model: res.partner, id: base.res_partner_seagate}: + !assert {model: res.partner, id: base.res_partner_19}: - membership_state == 'none', 'Member should be has "Current Membership State" in "Non Member".' - | I'm doing to make membership invoice for "Seagate" on joining "Gold Membership". - !python {model: res.partner}: | - self.create_membership_invoice(cr, uid, [ref("base.res_partner_seagate")], product_id=ref("product_product_membershipproduct0"), datas={"amount":80.00}) + self.create_membership_invoice(cr, uid, [ref("base.res_partner_19")], product_id=ref("product_product_membershipproduct0"), datas={"amount":80.00}) - | I'm checking "Current Membership State" of "Seagate". It is an "Waiting Member" or not. - - !assert {model: res.partner, id: base.res_partner_seagate}: + !assert {model: res.partner, id: base.res_partner_19}: - membership_state == 'waiting', 'Member should be has "Current Membership State" in "Waiting Member".' - | I'm Opening that Invoice which is created for "Seagate". @@ -38,7 +38,7 @@ membership_line_pool = self.pool.get('membership.membership_line') membership_pool = self.pool.get('product.product') - membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('base.res_partner_seagate'))]) + membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('base.res_partner_19'))]) membership_lines = membership_line_pool.browse(cr, uid, membership_line_ids) assert membership_lines, _('Membership is not registrated.') membership_line = membership_lines[0] @@ -47,7 +47,7 @@ - | I'm checking "Current membership state" of "Seagate". It is an "Invoiced Member" or not. - - !assert {model: res.partner, id: base.res_partner_seagate}: + !assert {model: res.partner, id: base.res_partner_19}: - membership_state == 'invoiced', 'Member should be has "Current Membership State" in "Invoiced Member".' - | @@ -73,7 +73,7 @@ I'm set "Seagate" as a associated member of "Ms. Johnson" and also set Non free member. - !python {model: res.partner}: | - self.write(cr, uid, [ref("res_partner_msjohnson0")], {'free_member': False, 'associate_member': ref("base.res_partner_seagate")}) + self.write(cr, uid, [ref("res_partner_msjohnson0")], {'free_member': False, 'associate_member': ref("base.res_partner_19")}) - | I'm checking "Current membership state" of "Ms. Johnson". It is an "Paid Member" or not. @@ -96,11 +96,11 @@ I'm making invoice of "Seagate" member on joining new membership "Regular Membership". - !python {model: res.partner}: | - self.create_membership_invoice(cr, uid, [ref("base.res_partner_seagate")], product_id=ref("product_product_membershipproduct1"), datas={"amount":50.00}) + self.create_membership_invoice(cr, uid, [ref("base.res_partner_19")], product_id=ref("product_product_membershipproduct1"), datas={"amount":50.00}) - | I'm checking "Current membership state" of "Seagate". It is an "Old Member" or not. - - !assert {model: res.partner, id: base.res_partner_seagate}: + !assert {model: res.partner, id: base.res_partner_19}: - membership_state == 'old', 'Member should be has "Current Membership State" in "Old Member".' - | I'm doing to make credit note of invoice which is paid by "Seagate" to cancel membership. @@ -113,7 +113,7 @@ membership_pool = self.pool.get('product.product') invoice_refund_pool = self.pool.get('account.invoice.refund') - membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('base.res_partner_seagate'))]) + membership_line_ids = membership_line_pool.search(cr, uid, [('membership_id','=',ref('product_product_membershipproduct0')),('partner','=',ref('base.res_partner_19'))]) membership_lines = membership_line_pool.browse(cr, uid, membership_line_ids) assert membership_lines, _('Membership is not registrated.') membership_line = membership_lines[0] @@ -122,6 +122,6 @@ - | I'm checking "Current membership state" of "Seagate". It is an "Cancelled Member" or not. - - !assert {model: res.partner, id: base.res_partner_seagate}: + !assert {model: res.partner, id: base.res_partner_19}: - membership_state == 'canceled', 'Member should be has "Current Membership State" in "Cancelled Member".' diff --git a/addons/mrp/mrp_demo.xml b/addons/mrp/mrp_demo.xml index f8454634923..e60c203889e 100644 --- a/addons/mrp/mrp_demo.xml +++ b/addons/mrp/mrp_demo.xml @@ -946,7 +946,7 @@ - + 2.0 @@ -1051,7 +1051,7 @@ - + 300.0 diff --git a/addons/multi_company/multi_company_demo.xml b/addons/multi_company/multi_company_demo.xml index aa5eaea2571..15e523b1bc0 100644 --- a/addons/multi_company/multi_company_demo.xml +++ b/addons/multi_company/multi_company_demo.xml @@ -563,16 +563,16 @@ - - + + - + - + @@ -590,10 +590,7 @@ - - - - + @@ -614,7 +611,7 @@ - + diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index 22cd4b074c3..d668085166a 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -802,7 +802,7 @@ 5 - + 10 1 5 @@ -810,7 +810,7 @@ 5 - + 10 1 5 @@ -834,7 +834,7 @@ 5 1 - + @@ -842,7 +842,7 @@ 5 1 - + @@ -850,7 +850,7 @@ 5 1 - + @@ -858,7 +858,7 @@ 5 1 - + @@ -866,7 +866,7 @@ 5 1 - + @@ -874,7 +874,7 @@ 5 1 - + @@ -882,7 +882,7 @@ 2 1 - + @@ -890,7 +890,7 @@ 5 1 - + @@ -898,7 +898,7 @@ 5 1 - + diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml index 3b96abd4b8e..7242975fdb3 100644 --- a/addons/project_issue/project_issue_demo.xml +++ b/addons/project_issue/project_issue_demo.xml @@ -62,7 +62,7 @@ - + @@ -145,7 +145,7 @@ - + diff --git a/addons/purchase/purchase_order_demo.yml b/addons/purchase/purchase_order_demo.yml index 51b6d7939ae..849186baf45 100644 --- a/addons/purchase/purchase_order_demo.yml +++ b/addons/purchase/purchase_order_demo.yml @@ -20,7 +20,7 @@ - !record {model: purchase.order, id: order_purchase3}: - partner_id: base.res_partner_desertic_hispafuentes + partner_id: base.res_partner_12 order_line: - product_id: product.product_product_0 price_unit: 900.20 @@ -45,7 +45,7 @@ - !record {model: purchase.order, id: order_purchase5}: - partner_id: base.res_partner_maxtor + partner_id: base.res_partner_19 order_line: - product_id: product.product_product_cpu1 product_qty: 3 @@ -56,7 +56,7 @@ - !record {model: purchase.order, id: order_purchase6}: - partner_id: base.res_partner_vickingdirect0 + partner_id: base.res_partner_22 order_line: - product_id: product.product_product_hdd2 product_qty: 10 @@ -67,7 +67,7 @@ - !record {model: purchase.order, id: order_purchase7}: - partner_id: base.res_partner_desertic_hispafuentes + partner_id: base.res_partner_12 order_line: - product_id: product.product_product_0 product_qty: 5 diff --git a/addons/purchase_double_validation/test/purchase_double_validation_demo.yml b/addons/purchase_double_validation/test/purchase_double_validation_demo.yml index a3143de5ee7..b951e9d669e 100644 --- a/addons/purchase_double_validation/test/purchase_double_validation_demo.yml +++ b/addons/purchase_double_validation/test/purchase_double_validation_demo.yml @@ -1,12 +1,12 @@ - !record {model: purchase.order, id: order_purchase11}: - partner_id: base.res_partner_desertic_hispafuentes + partner_id: base.res_partner_12 order_line: - product_id: product.product_product_pc4 product_qty: 10 - !record {model: purchase.order, id: order_purchase12}: - partner_id: base.res_partner_vickingdirect0 + partner_id: base.res_partner_22 order_line: - product_id: product.product_product_hdd2 product_qty: 10 diff --git a/addons/purchase_requisition/purchase_requisition_demo.xml b/addons/purchase_requisition/purchase_requisition_demo.xml index 41491cc64ca..a22993946b7 100644 --- a/addons/purchase_requisition/purchase_requisition_demo.xml +++ b/addons/purchase_requisition/purchase_requisition_demo.xml @@ -48,7 +48,7 @@ - + diff --git a/addons/purchase_requisition/test/purchase_requisition.yml b/addons/purchase_requisition/test/purchase_requisition.yml index a2e5b743965..524c1c0d7be 100644 --- a/addons/purchase_requisition/test/purchase_requisition.yml +++ b/addons/purchase_requisition/test/purchase_requisition.yml @@ -42,7 +42,7 @@ context.update({"active_model": "purchase.requisition","active_ids": [ref("requisition1")],"active_id": ref("requisition1")}) - !record {model: purchase.requisition.partner, id: requisition_partner_0}: - partner_id: base.res_partner_desertic_hispafuentes + partner_id: base.res_partner_12 - !python {model: purchase.requisition.partner}: | self.create_order(cr, uid, [ref("requisition_partner_0")], context=context) @@ -56,7 +56,7 @@ rfq = self.browse(cr, uid, purchase_ids[0], context=context) requisition = rfq.requisition_id supplier = rfq.partner_id - assert supplier.id == ref('base.res_partner_desertic_hispafuentes'), "RFQ Partner is not correspond." + assert supplier.id == ref('base.res_partner_12'), "RFQ Partner is not correspond." assert len(rfq.order_line) == len(requisition.line_ids), "Lines are not correspond." for rfq_line in rfq.order_line: for line in requisition.line_ids: diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index 98025c1e22c..c2b2bce4e4e 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -195,9 +195,9 @@ - - - + + + @@ -228,7 +228,7 @@ - + diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index 28b2b28ec71..b90c2d5b03a 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -15,7 +15,7 @@ supplier - Maxtor Suppliers + Big Suppliers supplier diff --git a/addons/stock_planning/test/stock_planning.yml b/addons/stock_planning/test/stock_planning.yml index d6b6d9e9f44..fa20240a6b0 100644 --- a/addons/stock_planning/test/stock_planning.yml +++ b/addons/stock_planning/test/stock_planning.yml @@ -155,7 +155,7 @@ th_weight: 0.0 type: make_to_stock order_policy: manual - partner_id: base.res_partner_desertic_hispafuentes + partner_id: base.res_partner_12 partner_invoice_id: base.res_partner_address_3000 partner_shipping_id: base.res_partner_address_3000 picking_policy: direct From 2666ab3fe024c162b2a9efacb540b214010fccc1 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Fri, 22 Jun 2012 15:10:04 +0200 Subject: [PATCH 004/226] [IMP] ir.ui.view: Added assertion-based checks. bzr revid: vmt@openerp.com-20120622131004-stn7tf68xph3f278 --- openerp/addons/base/ir/ir_ui_view.py | 13 +++++--- openerp/tests/__init__.py | 2 ++ openerp/tests/test_view_validation.py | 44 +++++++++++++++++++++++++++ openerp/tools/view_validation.py | 12 ++++++++ 4 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 openerp/tests/test_view_validation.py create mode 100644 openerp/tools/view_validation.py diff --git a/openerp/addons/base/ir/ir_ui_view.py b/openerp/addons/base/ir/ir_ui_view.py index d3b090c45d4..7601c4f44fc 100644 --- a/openerp/addons/base/ir/ir_ui_view.py +++ b/openerp/addons/base/ir/ir_ui_view.py @@ -24,6 +24,7 @@ from lxml import etree from tools import graph from tools.safe_eval import safe_eval as eval import tools +from tools.view_validation import valid_view import os import logging @@ -53,14 +54,11 @@ class view(osv.osv): result = dict((r.id, etree.fromstring(r.arch.encode('utf8')).tag) for r in records) return result - def _set_type_field(self, cr, uid, ids, name, value, args, context=None): - print "ignoring", value - _columns = { 'name': fields.char('View Name',size=64, required=True), 'model': fields.char('Object', size=64, required=True, select=True), 'priority': fields.integer('Sequence', required=True), - 'type': fields.function(_type_field, fnct_inv=_set_type_field, type='selection', selection=[ + 'type': fields.function(_type_field, type='selection', selection=[ ('tree','Tree'), ('form','Form'), ('mdx','mdx'), @@ -85,6 +83,11 @@ class view(osv.osv): # Holds the RNG schema _relaxng_validator = None + def create(self, cr, uid, values, context=None): + if 'type' in values: + _logger.warning("Setting the `type` field is deprecated in the `ir.ui.view` model.") + return super(osv.osv, self).create(cr, uid, values, context) + def _relaxng(self): if not self._relaxng_validator: frng = tools.file_open(os.path.join('base','rng','view.rng')) @@ -132,6 +135,8 @@ class view(osv.osv): for error in validator.error_log: _logger.error(tools.ustr(error)) return False + if not valid_view(view_arch): + return False return True _constraints = [ diff --git a/openerp/tests/__init__.py b/openerp/tests/__init__.py index 5fccb07a082..fb4b937208e 100644 --- a/openerp/tests/__init__.py +++ b/openerp/tests/__init__.py @@ -11,6 +11,7 @@ See the :ref:`test-framework` section in the :ref:`features` list. import test_expression import test_ir_sequence import test_orm +import test_view_validation fast_suite = [ test_ir_sequence, @@ -19,6 +20,7 @@ fast_suite = [ checks = [ test_expression, test_orm, + test_view_validation, ] # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp/tests/test_view_validation.py b/openerp/tests/test_view_validation.py new file mode 100644 index 00000000000..1773556d8ea --- /dev/null +++ b/openerp/tests/test_view_validation.py @@ -0,0 +1,44 @@ +# This test can be run stand-alone with something like: +# > PYTHONPATH=. python2 openerp/tests/test_view_validation.py + +from lxml import etree +from StringIO import StringIO +import unittest2 + +import openerp +from openerp.tools.view_validation import valid_page_in_book, valid_view + +invalid_page = etree.parse(StringIO('''\ +
+ +
+ + +
+
+
+''')).getroot() + +valid_page = etree.parse(StringIO('''\ +
+ +
+ + +
+
+
+''')).getroot() + +class test_view_validation(unittest2.TestCase): + """ Test the view validation code (but not the views themselves). """ + + def test_page_validation(self): + assert not valid_page_in_book(invalid_page) + assert valid_page_in_book(valid_page) + + assert not valid_view(invalid_page) + assert valid_view(valid_page) + +if __name__ == '__main__': + unittest2.main() diff --git a/openerp/tools/view_validation.py b/openerp/tools/view_validation.py new file mode 100644 index 00000000000..0f1609b8376 --- /dev/null +++ b/openerp/tools/view_validation.py @@ -0,0 +1,12 @@ +""" View validation code (using assertions, not the RNG schema). """ + +def valid_page_in_book(arch): + """A `page` node must be below a `book` node.""" + return not arch.xpath('//page[not(ancestor::notebook)]') + +def valid_view(arch): + if arch.tag == 'form': + for pred in [valid_page_in_book]: + if not pred(arch): + return False + return True From e7dc59c238e2a2be15300d5cb2f145fbe5d811ce Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Mon, 25 Jun 2012 12:24:32 +0530 Subject: [PATCH 005/226] [IMP]: Improved references of demo data based on changes of server to improve demo bzr revid: rpa@tinyerp.com-20120625065432-jsv90srvwuky0ali --- addons/hr_expense/hr_expense_demo.xml | 2 +- addons/sale/sale_demo.xml | 26 +++++++++---------- addons/sale/test/edi_sale_order.yml | 4 +-- .../test/stock_invoice_directly.yml | 2 +- addons/stock_planning/test/stock_planning.yml | 4 +-- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/addons/hr_expense/hr_expense_demo.xml b/addons/hr_expense/hr_expense_demo.xml index 0c0c6b8d956..027c741e899 100644 --- a/addons/hr_expense/hr_expense_demo.xml +++ b/addons/hr_expense/hr_expense_demo.xml @@ -3,7 +3,7 @@ - + diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index c2b2bce4e4e..2132964fbab 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -9,8 +9,8 @@ - - + + picking procurement Invoice after delivery @@ -65,8 +65,8 @@ - - + + order prepaid @@ -99,9 +99,9 @@ - - - + + + prepaid @@ -164,8 +164,8 @@ - - + + @@ -196,8 +196,8 @@ - - + + @@ -229,8 +229,8 @@ - - + + diff --git a/addons/sale/test/edi_sale_order.yml b/addons/sale/test/edi_sale_order.yml index 58ccfb2e42d..554be1eee23 100644 --- a/addons/sale/test/edi_sale_order.yml +++ b/addons/sale/test/edi_sale_order.yml @@ -3,8 +3,8 @@ - !record {model: sale.order, id: sale_order_edi_1}: partner_id: base.res_partner_2 - partner_invoice_id: base.res_partner_address_8invoice - partner_shipping_id: base.res_partner_address_8invoice + partner_invoice_id: base.res_partner_address_3 + partner_shipping_id: base.res_partner_address_3 pricelist_id: 1 order_line: - product_id: product.product_product_pc1 diff --git a/addons/stock_invoice_directly/test/stock_invoice_directly.yml b/addons/stock_invoice_directly/test/stock_invoice_directly.yml index b0cd831ec8d..f5fd9011898 100644 --- a/addons/stock_invoice_directly/test/stock_invoice_directly.yml +++ b/addons/stock_invoice_directly/test/stock_invoice_directly.yml @@ -5,7 +5,7 @@ I create an Outgoing Picking order. - !record {model: stock.picking, id: stock_picking_out0}: - partner_id: base.res_partner_address_3000 + partner_id: base.res_partner_address_22 invoice_state: 2binvoiced move_lines: - company_id: base.main_company diff --git a/addons/stock_planning/test/stock_planning.yml b/addons/stock_planning/test/stock_planning.yml index fa20240a6b0..f08b423215e 100644 --- a/addons/stock_planning/test/stock_planning.yml +++ b/addons/stock_planning/test/stock_planning.yml @@ -156,8 +156,8 @@ type: make_to_stock order_policy: manual partner_id: base.res_partner_12 - partner_invoice_id: base.res_partner_address_3000 - partner_shipping_id: base.res_partner_address_3000 + partner_invoice_id: base.res_partner_address_22 + partner_shipping_id: base.res_partner_address_22 picking_policy: direct pricelist_id: product.list0 shop_id: sale.shop From 4796ca2d2022071ac2fd87cba6a015786c5e9ad7 Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Mon, 25 Jun 2012 15:31:44 +0530 Subject: [PATCH 006/226] [IMP]: stock: Improved demo partner name and its reference for partners of child company bzr revid: rpa@tinyerp.com-20120625100144-a7k1bvl8os0ngdow --- addons/stock/stock_demo.xml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index b90c2d5b03a..c466d0a995d 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -189,12 +189,10 @@ Computech Systems - - - + + Steven Hamilton - @@ -213,12 +211,10 @@ SoftSys Technologies - - - + + Donald Thompson - @@ -257,7 +253,7 @@ - + @@ -265,7 +261,7 @@ Shop 2 - + From 212138bc56837eb762e9b532a87151286aadf787 Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Mon, 25 Jun 2012 15:32:54 +0530 Subject: [PATCH 007/226] [FIX]: hr_expense: Fixed broken xml bzr revid: rpa@tinyerp.com-20120625100254-leojfnflhl2daijn --- addons/hr_expense/hr_expense_demo.xml | 2 +- addons/stock_location/stock_location_demo_cpu1.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_expense/hr_expense_demo.xml b/addons/hr_expense/hr_expense_demo.xml index 027c741e899..50d8bee7708 100644 --- a/addons/hr_expense/hr_expense_demo.xml +++ b/addons/hr_expense/hr_expense_demo.xml @@ -77,7 +77,7 @@ Bruxelles - Paris - diff --git a/addons/stock_location/stock_location_demo_cpu1.xml b/addons/stock_location/stock_location_demo_cpu1.xml index 79e379f7fda..9e6b6e7d860 100644 --- a/addons/stock_location/stock_location_demo_cpu1.xml +++ b/addons/stock_location/stock_location_demo_cpu1.xml @@ -57,7 +57,7 @@ - + move none From 6702211b77f9356c2e39735a7f1e24fff304bc82 Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Wed, 27 Jun 2012 12:55:11 +0530 Subject: [PATCH 008/226] [IMP]: crm_profilling: Improved partner categ demo bzr revid: rpa@tinyerp.com-20120627072511-uyusf93035jrpgun --- addons/crm_profiling/crm_profiling_demo.xml | 44 ++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/addons/crm_profiling/crm_profiling_demo.xml b/addons/crm_profiling/crm_profiling_demo.xml index e280985777a..b67cd819fb1 100644 --- a/addons/crm_profiling/crm_profiling_demo.xml +++ b/addons/crm_profiling/crm_profiling_demo.xml @@ -84,17 +84,17 @@ Resource: res.partner.category --> - - IT sector - - - - Telecom sector - - + IT sector + + + + Telecom sector + + + HR sector - + @@ -126,20 +126,20 @@ Gold partners - + True True HR partners - + True Telecom partners - + True @@ -155,31 +155,31 @@ - + - + - + - + - + - + - + @@ -191,15 +191,15 @@ - + - + - + From 237173eeff5feee1a0f3ff3733c942dbec9796ae Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Thu, 28 Jun 2012 15:00:01 +0530 Subject: [PATCH 009/226] [IMP]: product: Improvement in product category demo, improved xml_id refereneces (work in progress) bzr revid: rpa@tinyerp.com-20120628093001-k113siqn5sbp3xf2 --- addons/delivery/delivery_demo.xml | 2 +- addons/event_sale/event_demo.xml | 2 +- addons/hr_expense/hr_expense_data.xml | 2 +- addons/membership/membership_demo.xml | 6 +- addons/membership/test/test_membership.yml | 4 +- addons/mrp/mrp_demo.xml | 20 +-- addons/multi_company/multi_company_demo.xml | 2 +- addons/point_of_sale/point_of_sale_demo.xml | 2 +- addons/product/__openerp__.py | 2 +- addons/product/i18n/product.pot | 12 +- addons/product/product.py | 2 +- addons/product/product_data.xml | 4 +- addons/product/product_demo.xml | 154 ++++++++---------- addons/product/product_pricelist_demo.yml | 2 +- .../worktask_entry_to_timesheetline_entry.yml | 2 +- addons/sale/sale_demo.xml | 2 +- addons/sale_mrp/test/sale_mrp.yml | 2 +- addons/stock/stock_demo.yml | 2 +- .../test/stock_no_autopicking.yml | 8 +- addons/stock_planning/test/stock_planning.yml | 4 +- 20 files changed, 108 insertions(+), 128 deletions(-) diff --git a/addons/delivery/delivery_demo.xml b/addons/delivery/delivery_demo.xml index a5db7ff042c..dac3d47c778 100644 --- a/addons/delivery/delivery_demo.xml +++ b/addons/delivery/delivery_demo.xml @@ -13,7 +13,7 @@ Delivery by Poste Delivery service - +
diff --git a/addons/event_sale/event_demo.xml b/addons/event_sale/event_demo.xml index 6dd696225a3..3acd3c81f57 100644 --- a/addons/event_sale/event_demo.xml +++ b/addons/event_sale/event_demo.xml @@ -13,7 +13,7 @@ Technical Training True - + service 2500.0 1000.0 diff --git a/addons/hr_expense/hr_expense_data.xml b/addons/hr_expense/hr_expense_data.xml index 0e940c74cc0..ff1e6994d69 100644 --- a/addons/hr_expense/hr_expense_data.xml +++ b/addons/hr_expense/hr_expense_data.xml @@ -5,7 +5,7 @@ Resource: product.uom.categ --> - + Expenses diff --git a/addons/membership/membership_demo.xml b/addons/membership/membership_demo.xml index 8f9b45e8263..0fd28701cf9 100644 --- a/addons/membership/membership_demo.xml +++ b/addons/membership/membership_demo.xml @@ -9,7 +9,7 @@ Golden Membership 180 - + service
@@ -17,7 +17,7 @@ Silver Membership - + 80 service @@ -26,7 +26,7 @@ Basic Membership - + 40 service
diff --git a/addons/membership/test/test_membership.yml b/addons/membership/test/test_membership.yml index c37dcb0ec66..357fcbcfc3e 100644 --- a/addons/membership/test/test_membership.yml +++ b/addons/membership/test/test_membership.yml @@ -4,7 +4,7 @@ I'm creating "Gold Membership" which has Membership fee 80 EURO and It's started from 1st June to 31st Dec. - !record {model: product.product, id: product_product_membershipproduct0}: - categ_id: product.cat1 + categ_id: product.product_category_1 membership: 1 membership_date_from: !eval datetime.today().strftime("%Y-%m-%d") membership_date_to: !eval "(datetime.now() + timedelta(6*31)).strftime('%Y-%m-%d')" @@ -85,7 +85,7 @@ I'm creating new "Regular Membership" which has Membership fee 50 EURO and It's started from 1st June to 31st Dec. - !record {model: product.product, id: product_product_membershipproduct1}: - categ_id: product.cat1 + categ_id: product.product_category_1 membership: 1 membership_date_from: !eval datetime.today().strftime("%Y-%m-%d") membership_date_to: !eval "(datetime.now() + timedelta(6*31)).strftime('%Y-%m-%d')" diff --git a/addons/mrp/mrp_demo.xml b/addons/mrp/mrp_demo.xml index e60c203889e..7cc37310930 100644 --- a/addons/mrp/mrp_demo.xml +++ b/addons/mrp/mrp_demo.xml @@ -18,8 +18,8 @@ Costing Account For Cycle of Assembly.
- - + + Assembly Service @@ -29,7 +29,7 @@ service Assembly Service Cost - + @@ -912,7 +912,7 @@ 1.0
- + Orange Juice make_to_order produce @@ -921,7 +921,7 @@ - + Orange make_to_stock buy @@ -936,7 +936,7 @@ - + Sugar make_to_stock buy @@ -951,7 +951,7 @@ 2.0 - + Water make_to_order buy @@ -1032,7 +1032,7 @@ - + Shirt make_to_stock produce @@ -1041,7 +1041,7 @@ - + Cloth make_to_order buy @@ -1056,7 +1056,7 @@ 300.0 - + Shirt Buttons make_to_stock buy diff --git a/addons/multi_company/multi_company_demo.xml b/addons/multi_company/multi_company_demo.xml index 15e523b1bc0..ce752b7ddc2 100644 --- a/addons/multi_company/multi_company_demo.xml +++ b/addons/multi_company/multi_company_demo.xml @@ -187,7 +187,7 @@ - + Odoo Offers diff --git a/addons/point_of_sale/point_of_sale_demo.xml b/addons/point_of_sale/point_of_sale_demo.xml index d4056da1296..87d29b8a2d5 100644 --- a/addons/point_of_sale/point_of_sale_demo.xml +++ b/addons/point_of_sale/point_of_sale_demo.xml @@ -321,7 +321,7 @@ 0.51 Coca-Cola Light 33cl - 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_category_2Yxmkltrk2jD7TtVgyHAkGe2c4JwR7Gm22tBRpwhNOW35f1v5nNLY6dqT3F2yuhQ4kjVgk0YHUkAYP5dupPFYcsZXZ6cq1aiowXye6fbzN1rjTdO0+ytTcbIJSqxOxOG6Hlug61ukuVJHlVKknVlKS1Na1ZMyBG3fvGJ4xg9f5EVRgMiI/4SmxGeTBMf8A0D/GmgJtRlhOveTk+cLZWx2KlmH8x+tDBEV9Zpf2b27sV3YKuOqsOhH41Mo8ysa0KzpTUkYqajK8Vxps/l2uq4GH+6txg8Yb3HH4/lkpPVPc75YeKcakbyh99vl5GdNZWuseY81rMs8H+tilOJQvqrfxfjn8KlxU+hpGrVw9kpKz2a2+a6fL8Se9uk03T47SOOCSxmCLbyXSFocHHLke+eD6jHQitopKOh5leU5VJOW99SbSFlsE+yraR2SljLiGXzFbdgDB9DtbA9AKozNuHB8XWA7i1uD+sdMQarGy+MIZPNO2SwKmPtlX4P8A48aGCJZnDKYlP7w4IHqM0mXBWd+hz0x0rUFuLK7gkSVp5GgYt975sHy2PuCdvrWHuSumepH6xS5Zxaa5Vf7uq/UgXRNaaLZZ675lq4IBkB3AdCO5H5ij2c+khyxeGTvOlaXlsaV3atZeGBb207bYAqvKIhJ8oPzEp3HXI9M1tFWjY8yvUdSq5NWuyj4dntzO0BtYfJkbEc9oxMLsuSeP4OGHHTPvTM2btuc+NbMelhMf/H46Yg1twni6xB6tZyAf99KaGCJVz9uGMH93z7c1PU0/5d/M529SS6lu5LewaeDefPtXPDMCRuQj7r8Zx3BB5rCWt7I9WlJQUFKdnbR/o+68zPsdQex8P6pcQNdAmRREZ+27jIPr/gKUZ8sG9TWtQVXE04y5dtbeRcmuzFDbSXM01rbeUptrpMrsBC5B7ZyOjDkdD2roi9EePXi1Vkn3Zs6EqvZvvuYLxo7hissSKFGQDxjPJByfcmmZMsWhB8bW3tp0p/8AIiU+wu5R8X3P2Xxdo0pPylGjYf7xA/nimBcup5ILuAwQLLI6NkFsFgCOB2zgk8+lZybTVjpowjOD5nZJ/wCf/DGNfXF2NSN1pxign3OlxGWLKwU4BdQOO3PuOayk3zXR3UoU/ZctS7Wln69n19Aa0v7vSb46lDFFG8iTJHGwYAAgse/Bxn8TT5ZOLuSqtKnWh7NtuzV3+H3HTKiNHsZQUIwVI4xW55T3IxDbabZOIY0hijDOQqgAdz0oSBmfoqmLxlawP9+PRyW+pkXP6in2AzPiYxj1XTJVyCqMQe2QymgOhoeYmu6NHcWMwWdCJIm/uSDqD+o/Gs6kW1ob4atGnP3ldPR+hTjm/teY3Flcf2drEQ2TwuOHx6juPftWafNqtGd0o/V48s1zU3s+xa0i01CO1uotVMISRiUWM8KD976D/wCvVQUrO5z4qpSc4unfTuaOkz/adLtps7i8Skn1OOauDvFHPiIclWS8ynrGoQyXUGjRyBri6cB0ByVjHLE+mQMfjV2MhmjF5/iXeuASlvpqxk9gWcMP60PcXQ6XWNFstctPs17HuCncjqcMh9QaGhp2POtY8HazoLvPpuokQv1KSGM/j2/HNK7Q7JnH6i+oeeLi5luHuF6So2/p7iolTUtTqw+MnRXLuuwx/GGvGBraW9nkiYYIKHJH1xmp5JtWubLF4eL5lT1NOHxLreo20NpBvtIIgFURAxZA6ZYnP61qlZWRwTm5ycn1Z13gXwzcJPPqNxtMsox5hbfgHk4I69u9CdyXod5ZadbWDTPCmJJ2DSuerkDAz9BxTQi0aGAhAIwRkGgDNu/Dei32Tc6ZbuT1OzB/SlZDuzOPw98Kl9x0lPp5r4/nRyj5i/Z+GNDsCDbaXboR0JTcf1oshXZqABQAAAB0ApiFFCAAAP/Z 0.53 diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py index 9b4d2cadee1..664a6ab85d7 100644 --- a/addons/product/__openerp__.py +++ b/addons/product/__openerp__.py @@ -25,7 +25,7 @@ "version" : "1.1", "author" : "OpenERP SA", 'category': 'Sales Management', - "depends" : ["base", "process", "decimal_precision"], + "depends" : ["base", "mail", "process", "decimal_precision"], "init_xml" : [], "demo_xml" : ["product_demo.xml"], "description": """ diff --git a/addons/product/i18n/product.pot b/addons/product/i18n/product.pot index f48eda55081..8d5ec26afe1 100644 --- a/addons/product/i18n/product.pot +++ b/addons/product/i18n/product.pot @@ -45,7 +45,7 @@ msgid "Forecast quantity (computed as Quantity On Hand - Outgoing + Incoming)\n" msgstr "" #. module: product -#: model:product.category,name:product.cat1 +#: model:product.category,name:product.product_category_1 msgid "Sellable" msgstr "" @@ -428,7 +428,7 @@ msgid "Ending date for this pricelist version to be valid." msgstr "" #. module: product -#: model:product.category,name:product.cat0 +#: model:product.category,name:product.product_category_0 msgid "All products" msgstr "" @@ -691,7 +691,7 @@ msgid "This price will be considered as a price for the supplier UoM if any or t msgstr "" #. module: product -#: model:product.category,name:product.product_category_accessories +#: model:product.category,name:product.product_category_5 msgid "Accessories" msgstr "" @@ -1137,7 +1137,7 @@ msgid "Main Supplier who has highest priority in Supplier List." msgstr "" #. module: product -#: model:product.category,name:product.product_category_services +#: model:product.category,name:product.product_category_6 #: view:product.product:0 msgid "Services" msgstr "" @@ -1221,7 +1221,7 @@ msgid "Minimal Quantity" msgstr "" #. module: product -#: model:product.category,name:product.product_category_pc +#: model:product.category,name:product.product_category_9 msgid "PC" msgstr "" @@ -2164,7 +2164,7 @@ msgid "Category Type" msgstr "" #. module: product -#: model:product.category,name:product.cat2 +#: model:product.category,name:product.product_category_2 msgid "Private" msgstr "" diff --git a/addons/product/product.py b/addons/product/product.py index f81378be04e..a1fd582bc7a 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -344,7 +344,7 @@ class product_template(osv.osv): md = self.pool.get('ir.model.data') res = False try: - res = md.get_object_reference(cr, uid, 'product', 'cat0')[1] + res = md.get_object_reference(cr, uid, 'product', 'product_category_0')[1] except ValueError: res = False return res diff --git a/addons/product/product_data.xml b/addons/product/product_data.xml index 223b6bc368e..592cfd00272 100644 --- a/addons/product/product_data.xml +++ b/addons/product/product_data.xml @@ -4,7 +4,7 @@ - + All products @@ -178,7 +178,7 @@ parameter) will see those record just disappear. Service on Timesheet - + service diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index d668085166a..9764f8fbbfd 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -10,87 +10,67 @@ Resource: product.category --> - - - Sellable + + + Saleable - - - Private + + + Internal - - Computer Stuff + + Other Products - - Dello Computer + + Computers - - - Accessories - - - + + Services + + + Network Components + - - Onsite Intervention + + Desktops - - Phone Help + + Laptops - - - PC + + + Accessories - - IT components + + Components + + Printer & Scanners + + + + Software + + - IT components kits + Raw Materials - - - - - Marketable Products + + Assembly Service + - - - - - Shelves + + + On site Intervention - - - Other Products - - - - - - Raw Materials - - - - - - Marketable Services - - - - - - Misc - - - Box 20x20x40 box @@ -132,7 +112,7 @@ 7.0 Basic PC product - + PC2 @@ -145,7 +125,7 @@ 18.0 Basic+ PC (assembly on order) product - + PC3 @@ -157,7 +137,7 @@ 7.0 Medium PC product - + PC4 @@ -169,7 +149,7 @@ make_to_order Customizable PC product - + end @@ -271,7 +251,7 @@ 7.0 Silent fan product - + CPU_GEN @@ -295,7 +275,7 @@ 7.0 DDR 256MB PC400 product - + RAM512 @@ -425,7 +405,7 @@ 3.0 Cabinet product - + 133 - + 1.0 RCK100 1331 - + 1.0 @@ -714,7 +714,7 @@ 1332 - + 4.0 @@ -727,14 +727,14 @@ --> 135 - + 1.0 SPAN100 1351 - + 0.083 @@ -748,7 +748,7 @@ Assembly Section 123 - + 1.0 @@ -757,7 +757,7 @@ 1231 - + 0.25 @@ -770,7 +770,7 @@ --> 131 - + 1.0 Rear panel SHE100 @@ -778,7 +778,7 @@ 1311 - + 0.25 @@ -790,7 +790,7 @@ Default BOM for Shelf of 200cm SHE200 137 - + 1.0 @@ -805,7 +805,7 @@ --> 147 - + 1.0 @@ -815,7 +815,7 @@ Assembly Section 149 - + 4.0 @@ -824,7 +824,7 @@ Side Panel 151 - + 2.0 @@ -832,7 +832,7 @@ 153 - + 3.0 @@ -842,7 +842,7 @@ Metal Cleats 155 - + 12.0 @@ -852,7 +852,7 @@ Default BOM for KIT Shelf of 100cm SHE100KIT 139 - + 1.0 phantom @@ -867,7 +867,7 @@ Assembly Section 143 - + 4.0 @@ -876,7 +876,7 @@ Side Panel 145 - + 2.0 @@ -893,7 +893,7 @@ - + 3 @@ -1115,7 +1115,7 @@ - + diff --git a/addons/mrp/test/order_demo.yml b/addons/mrp/test/order_demo.yml index 72a18572a73..9d9acf7ee5b 100644 --- a/addons/mrp/test/order_demo.yml +++ b/addons/mrp/test/order_demo.yml @@ -2,7 +2,7 @@ In order to test process of production order, I create Bill of material of Shelf 100cm. - !record {model: mrp.bom, id: mrp_bom_defaultbomforshelfofcm0}: - product_id: product.product_product_shelfofcm0 + product_id: product.product_product_29 - !record {model: mrp.bom, id: mrp_bom_assemblysection1}: routing_id: mrp.mrp_routing_0 @@ -15,7 +15,7 @@ !record {model: mrp.production, id: mrp_production_shelf100cm}: location_src_id: stock.stock_location_stock location_dest_id: stock.stock_location_output - product_id: product.product_product_shelfofcm0 + product_id: product.product_product_29 bom_id: mrp_bom_defaultbomforshelfofcm0 routing_id: mrp.mrp_routing_1 product_uom: product.product_uom_dozen diff --git a/addons/mrp/test/order_process.yml b/addons/mrp/test/order_process.yml index ee78e036d44..80eeca02516 100644 --- a/addons/mrp/test/order_process.yml +++ b/addons/mrp/test/order_process.yml @@ -17,27 +17,27 @@ woodmm10 = False metalcleats = False for line in order.product_lines: - if line.product_id.id == ref('product.product_product_sidepanel0'): #SIDEPAN 2 Unit + if line.product_id.id == ref('product.product_product_41'): #SIDEPAN 2 Unit assert not sidepanel, "Production line is already generated for SIDEPAN." assert line.product_qty == (2.0*factor), "Qty is not correspond." assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond" sidepanel = True - elif line.product_id.id == ref('product.product_product_woodlintelm0'): #LIN40 4*0.25 Meter + elif line.product_id.id == ref('product.product_product_45'): #LIN40 4*0.25 Meter assert not woodlintelm, "Production line is already generated for LIN40." assert line.product_qty == (4*0.25*factor), "Qty is not correspond." assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond" woodlintelm = True - elif line.product_id.id == ref('product.product_product_woodmm0'): #WOOD002 0.25 m + elif line.product_id.id == ref('product.product_product_32'): #WOOD002 0.25 m assert not woodmm0, "Production line is already generated for WOOD002." assert line.product_qty == (0.25*factor), "Qty is not correspond." assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond" woodmm0 = True - elif line.product_id.id == ref('product.product_product_metalcleats0'): #METC000 4*3 Unit + elif line.product_id.id == ref('product.product_product_46'): #METC000 4*3 Unit assert not metalcleats, "Production line is already generated for METC000." assert line.product_qty == (4*3*factor), "Qty is not correspond." assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond" metalcleats = True - elif line.product_id.id == ref('product.product_product_woodmm10'): #WOOD010 0.083*3 m + elif line.product_id.id == ref('product.product_product_34'): #WOOD010 0.083*3 m assert not woodmm10, "Production line is already generated for WOOD010." assert line.product_qty == (0.083*3*factor), "Qty is not correspond." assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond" @@ -223,7 +223,7 @@ order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) for move in order.move_lines: move.action_consume(move.product_qty) - if move.product_id.id == ref("product.product_product_metalcleats0"): + if move.product_id.id == ref("product.product_product_46"): move.action_scrap(5.0, scrap_location_id) - I produce product. diff --git a/addons/mrp_jit/test/mrp_jit.yml b/addons/mrp_jit/test/mrp_jit.yml index 922dc3611bd..7a7a73dfe95 100644 --- a/addons/mrp_jit/test/mrp_jit.yml +++ b/addons/mrp_jit/test/mrp_jit.yml @@ -7,7 +7,7 @@ date_planned: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S") location_id: stock.stock_location_stock name: PROC/TEST/0001 - product_id: product.product_product_pc2 + product_id: product.product_product_4 product_qty: 10.0 product_uom: product.product_uom_unit product_uos_qty: 0.0 diff --git a/addons/mrp_operations/mrp_operations_demo.yml b/addons/mrp_operations/mrp_operations_demo.yml index 7bfef8a4c7b..3bb440be1aa 100644 --- a/addons/mrp_operations/mrp_operations_demo.yml +++ b/addons/mrp_operations/mrp_operations_demo.yml @@ -1,13 +1,13 @@ - !record {model: mrp.production, id: mrp_production_op}: location_src_id: stock.stock_location_stock - product_id: product.product_product_cpu3 + product_id: product.product_product_10 product_qty: 5.0 allow_reorder: True - !record {model: mrp.production, id: mrp_production_op1}: location_src_id: stock.stock_location_stock - product_id: product.product_product_cpu3 + product_id: product.product_product_10 product_qty: 2.0 - !function {model: mrp.production, name: action_compute, id: mrp_production_op1}: @@ -18,7 +18,7 @@ - !record {model: mrp.production, id: mrp_production_mo1}: location_src_id: stock.stock_location_stock - product_id: product.product_product_cpu_gen + product_id: product.product_product_16 product_qty: 5.0 - !workflow {model: mrp.production, action: button_confirm, ref: mrp_production_mo1} diff --git a/addons/mrp_repair/mrp_repair_demo.yml b/addons/mrp_repair/mrp_repair_demo.yml index 56aad9ae16d..5421b376348 100644 --- a/addons/mrp_repair/mrp_repair_demo.yml +++ b/addons/mrp_repair/mrp_repair_demo.yml @@ -6,7 +6,7 @@ location_dest_id: stock.stock_location_14 location_id: stock.stock_location_stock name: '[PC1] Basic PC' - product_id: product.product_product_pc1 + product_id: product.product_product_3 product_qty: 1.0 product_uom: product.product_uom_unit product_uos_qty: 1.0 @@ -25,7 +25,7 @@ location_id: stock.stock_location_stock name: '[HDD1] HDD Seagate 7200.8 80GB' price_unit: 50.0 - product_id: product.product_product_hdd1 + product_id: product.product_product_11 product_uom: product.product_uom_unit product_uom_qty: 1.0 state: draft @@ -33,12 +33,12 @@ type: add fees_lines: - name: 'HDD1 Seagate repair fees' - product_id: product.product_product_hdd1 + product_id: product.product_product_11 product_uom_qty: 1.0 product_uom: product.product_uom_unit price_unit: 50.0 partner_id: base.res_partner_9 - product_id: product.product_product_pc1 + product_id: product.product_product_3 - !record {model: stock.move, id: stock.stock_move_stockmvmrp1}: company_id: base.main_company @@ -47,7 +47,7 @@ location_dest_id: stock.stock_location_14 location_id: stock.stock_location_stock name: '[PC3] Medium PC' - product_id: product.product_product_pc3 + product_id: product.product_product_5 product_qty: 1.0 product_uom: product.product_uom_unit product_uos_qty: 1.0 @@ -66,7 +66,7 @@ location_id: stock.stock_location_stock name: '[HDD2] HDD Seagate 7200.8 120GB' price_unit: 50.0 - product_id: product.product_product_hdd2 + product_id: product.product_product_12 product_uom: product.product_uom_unit product_uom_qty: 1.0 state: draft @@ -74,12 +74,12 @@ type: add fees_lines: - name: 'HDD2 Seagate repair fees' - product_id: product.product_product_hdd2 + product_id: product.product_product_12 product_uom_qty: 1.0 product_uom: product.product_uom_unit price_unit: 50.0 partner_id: base.res_partner_9 - product_id: product.product_product_pc3 + product_id: product.product_product_5 - !record {model: stock.move, id: stock.stock_move_stockmvmrp2}: company_id: base.main_company @@ -88,7 +88,7 @@ location_dest_id: stock.stock_location_14 location_id: stock.stock_location_stock name: '[PC4] Customizable PC' - product_id: product.product_product_pc4 + product_id: product.product_product_6 product_qty: 1.0 product_uom: product.product_uom_unit product_uos_qty: 1.0 @@ -107,7 +107,7 @@ location_id: stock.stock_location_stock name: '[HDD3] HDD Seagate 7200.8 160GB' price_unit: 50.0 - product_id: product.product_product_hdd3 + product_id: product.product_product_13 product_uom: product.product_uom_unit product_uom_qty: 1.0 state: draft @@ -115,9 +115,9 @@ type: add fees_lines: - name: 'HDD3 Seagate repair fees' - product_id: product.product_product_hdd3 + product_id: product.product_product_13 product_uom_qty: 1.0 product_uom: product.product_uom_unit price_unit: 50.0 partner_id: base.res_partner_9 - product_id: product.product_product_pc4 + product_id: product.product_product_6 diff --git a/addons/mrp_subproduct/test/mrp_subproduct.yml b/addons/mrp_subproduct/test/mrp_subproduct.yml index 608bfd72db6..9e7c6c371a5 100644 --- a/addons/mrp_subproduct/test/mrp_subproduct.yml +++ b/addons/mrp_subproduct/test/mrp_subproduct.yml @@ -5,11 +5,11 @@ I add a sub product in Bill of material for product Cabinet. - !record {model: mrp.bom, id: mrp_bom_arm1}: - product_id: product.product_product_arm + product_id: product.product_product_28 name: ARM100 + Subproduct product_uom: product.product_uom_unit sub_products: - - product_id: product.product_product_woodentable0 + - product_id: product.product_product_33 product_uom: product.product_uom_unit product_qty: 2.0 subproduct_type: fixed @@ -17,7 +17,7 @@ I create a production order for Cabinet. - !record {model: mrp.production, id: mrp_production_mo0}: - product_id: product.product_product_arm + product_id: product.product_product_28 product_qty: 10.0 product_uom: product.product_uom_unit bom_id: mrp_bom_arm1 @@ -42,7 +42,7 @@ This move is created automatically when I confirmed the production order. - !python {model: stock.move}: | - move_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_woodentable0'))]) + move_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_33'))]) assert move_ids, 'No moves are created !' - I want to start the production so I force the reservation of products. @@ -70,6 +70,6 @@ I see that stock moves of Cabinet including Wooden Table are done now. - !python {model: stock.move}: | - move_ids = self.search(cr, uid, [('product_id','in',[ref("product.product_product_arm"),ref("product.product_product_sidepanel0")])]) + move_ids = self.search(cr, uid, [('product_id','in',[ref("product.product_product_28"),ref("product.product_product_41")])]) moves = self.browse(cr, uid, move_ids) assert all(move.state == 'done' for move in moves), 'Moves are not done!' diff --git a/addons/multi_company/multi_company_demo.xml b/addons/multi_company/multi_company_demo.xml index ce752b7ddc2..e4940930423 100644 --- a/addons/multi_company/multi_company_demo.xml +++ b/addons/multi_company/multi_company_demo.xml @@ -105,64 +105,64 @@ Resource: product.product --> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/addons/point_of_sale/point_of_sale_demo.xml b/addons/point_of_sale/point_of_sale_demo.xml index 87d29b8a2d5..6cad701a08f 100644 --- a/addons/point_of_sale/point_of_sale_demo.xml +++ b/addons/point_of_sale/point_of_sale_demo.xml @@ -60,7 +60,7 @@ - + POS/019 @@ -130,13 +130,13 @@ Stock move (POS 12) - + No Discount - + @@ -165,7 +165,7 @@ [PC3] Medium PC - + 450 2 @@ -175,7 +175,7 @@ [PC2] Basic+ PC (assembly on order) - + 450 2 @@ -185,7 +185,7 @@ [PC1] Basic PC - + 450 5 diff --git a/addons/point_of_sale/test/01_order_to_payment.yml b/addons/point_of_sale/test/01_order_to_payment.yml index 7c6b4817666..40960d805af 100644 --- a/addons/point_of_sale/test/01_order_to_payment.yml +++ b/addons/point_of_sale/test/01_order_to_payment.yml @@ -14,7 +14,7 @@ - I assign this 10 percent tax on the PC1 product as a sale tax - - !record {model: product.product, id: product.product_product_pc1}: + !record {model: product.product, id: product.product_product_3}: taxes_id: [account_tax_10_incl] - | I create a VAT tax of 5%, which is added to the public price @@ -29,7 +29,7 @@ - I assign this 5 percent tax on the PC2 product as a sale tax - - !record {model: product.product, id: product.product_product_pc2}: + !record {model: product.product, id: product.product_product_4}: taxes_id: [account_tax_05_incl] - I create a PoS order with 2 units of PC1 at 450 EUR (Tax Incl) and 3 units of PC2 at 300 EUR. (Tax Excl) @@ -38,12 +38,12 @@ company_id: base.main_company lines: - name: OL/0001 - product_id: product.product_product_pc1 + product_id: product.product_product_3 price_unit: 450 discount: 0.0 qty: 2.0 - name: OL/0002 - product_id: product.product_product_pc2 + product_id: product.product_product_4 price_unit: 300 discount: 0.0 qty: 3.0 diff --git a/addons/point_of_sale/test/02_order_to_invoice.yml b/addons/point_of_sale/test/02_order_to_invoice.yml index 95eec81831c..2280f15ca48 100644 --- a/addons/point_of_sale/test/02_order_to_invoice.yml +++ b/addons/point_of_sale/test/02_order_to_invoice.yml @@ -6,12 +6,12 @@ partner_id: base.res_partner_1 lines: - name: OL/0001 - product_id: product.product_product_pc1 + product_id: product.product_product_3 price_unit: 450 discount: 5.0 qty: 2.0 - name: OL/0002 - product_id: product.product_product_pc2 + product_id: product.product_product_4 price_unit: 300 discount: 5.0 qty: 3.0 diff --git a/addons/procurement/stock_orderpoint.xml b/addons/procurement/stock_orderpoint.xml index a8df2e0b142..fdad7477fe5 100644 --- a/addons/procurement/stock_orderpoint.xml +++ b/addons/procurement/stock_orderpoint.xml @@ -9,7 +9,7 @@ 5.0 - + @@ -17,7 +17,7 @@ 10.0 - + @@ -25,7 +25,7 @@ 10.0 - + @@ -33,7 +33,7 @@ 10.0 - + @@ -41,7 +41,7 @@ 3.0 - + @@ -49,7 +49,7 @@ 10.0 - + diff --git a/addons/procurement/test/procurement.yml b/addons/procurement/test/procurement.yml index f769715e572..2f9dd286a2a 100644 --- a/addons/procurement/test/procurement.yml +++ b/addons/procurement/test/procurement.yml @@ -8,7 +8,7 @@ location_id: stock.stock_location_stock logic: max name: OP/00008 - product_id: product.product_product_cpu2 + product_id: product.product_product_19 product_max_qty: 15.0 product_min_qty: 5.0 product_uom: product.product_uom_kgm @@ -18,7 +18,7 @@ Check product quantity and update it, if needed for apply a minimum stock rule. - !python {model: product.product}: | - product = self.browse(cr, uid, ref('product.product_product_cpu2')) + product = self.browse(cr, uid, ref('product.product_product_19')) if product.virtual_available < 5.0: change_qty = self.pool.get('stock.change.product.qty') id = change_qty.create(cr, uid, {'location_id' : ref('stock.stock_location_stock'), 'new_quantity': 4, 'product_id': product.id}) @@ -34,7 +34,7 @@ I check that procurement order is based on minimum stock rule. - !python {model: procurement.order}: | - proc_ids = self.search(cr, uid, [('product_id','=', ref('product.product_product_cpu2'))]) + proc_ids = self.search(cr, uid, [('product_id','=', ref('product.product_product_19'))]) assert proc_ids, 'No Procurement created.' proc_order = self.browse(cr, uid, proc_ids)[0] assert proc_order.product_qty == 11.0,"Procurement product quantity is not corresponded." @@ -42,7 +42,7 @@ I check product quantity. - !python {model: product.product}: | - product = self.browse(cr, uid, ref('product.product_product_cpu2')) + product = self.browse(cr, uid, ref('product.product_product_19')) assert product.virtual_available == 15.0,"After run the scheduler product's virtual stock is not updated." - For test the Procurement Request wizard, Again I have to update product quantity. @@ -50,9 +50,9 @@ !python {model: product.product}: | mk_procure = self.pool.get('make.procurement') procur_order = self.pool.get('procurement.order') - product = self.browse(cr, uid, ref('product.product_product_cpu2')) + product = self.browse(cr, uid, ref('product.product_product_19')) - context.update({'active_model': 'product.product','active_id':ref('product.product_product_cpu2')}) + context.update({'active_model': 'product.product','active_id':ref('product.product_product_19')}) values = {'warehouse_id': ref('base.main_company'), 'uom_id': ref('product.product_uom_unit'), 'qty': 5} id = mk_procure.create(cr, uid, values, context) procurement = mk_procure.make_procurement(cr, uid, [id], context) @@ -62,7 +62,7 @@ for procurement in procur_order.browse(cr, uid, [proc_id]): if procurement.state == 'confirmed': assert procurement.state == 'confirmed',"Procurement state should be 'Confirmed'." - assert procurement.product_id.id == ref('product.product_product_cpu2'),"Product is not correspond." + assert procurement.product_id.id == ref('product.product_product_19'),"Product is not correspond." assert procurement.product_qty == 5,"Product Quantity is not correspond." assert procurement.product_uom.id == ref('product.product_uom_unit'),"Product's UOM is not correspond." context.update({'proc': proc_id}) diff --git a/addons/product/product_demo.xml b/addons/product/product_demo.xml index 9764f8fbbfd..90da9837db8 100644 --- a/addons/product/product_demo.xml +++ b/addons/product/product_demo.xml @@ -84,15 +84,6 @@ Resource: product.product --> - - 38.25 - 25.5 - - - service - Onsite Senior Intervention - - 30.75 20.5 @@ -102,7 +93,16 @@ Onsite Intervention - + + 38.25 + 25.5 + + + service + Onsite Senior Intervention + + + PC1 produce 450.0 @@ -114,7 +114,7 @@ product - + PC2 produce 750.0 @@ -127,7 +127,7 @@ product - + PC3 produce 900.0 @@ -139,7 +139,7 @@ product - + PC4 produce 1200.0 @@ -152,7 +152,7 @@ end - + MB1 88.0 54.0 @@ -163,7 +163,7 @@ product - + MB2 270.0 180.0 @@ -175,7 +175,7 @@ draft - + CPU1 75.0 50.0 @@ -186,7 +186,7 @@ product - + CPU3 150.0 100.0 @@ -197,7 +197,7 @@ product - + HDD1 50.0 40.0 @@ -208,7 +208,7 @@ product - + HDD2 75.0 60.0 @@ -219,7 +219,7 @@ product - + HDD3 95.0 80.0 @@ -231,7 +231,7 @@ product - + FAN 8.0 5.0 @@ -242,7 +242,7 @@ product - + FAN2 18.5 10.0 @@ -253,7 +253,7 @@ product - + CPU_GEN produce 300.0 @@ -266,7 +266,7 @@ product - + RAM 60.0 40.0 @@ -277,7 +277,7 @@ product - + RAM512 90.0 60.0 @@ -288,7 +288,7 @@ product - + CPU2 produce 450.0 @@ -301,18 +301,6 @@ product - - - TOW1 - 37.5 - 25.0 - - - 7.0 - ATX Mid-size Tower - product - - HDD_GEN produce @@ -394,7 +382,18 @@ product - + + TOW1 + 37.5 + 25.0 + + + 7.0 + ATX Mid-size Tower + product + + + ARM100 produce 450.0 @@ -407,11 +406,8 @@ product - - + SHE100 produce 130.0 @@ -423,7 +419,7 @@ - + SHE200 produce @@ -435,7 +431,7 @@ product - + SPAN100 produce @@ -445,7 +441,7 @@ product - + WOOD002 buy 5.0 @@ -457,7 +453,7 @@ product - + WOODTAB produce @@ -471,7 +467,7 @@ - + WOOD010 buy 7.0 @@ -484,7 +480,7 @@ - + PROJ produce @@ -497,7 +493,7 @@ - + EMPL produce @@ -510,7 +506,7 @@ - + REST produce @@ -522,7 +518,7 @@ - + WORK produce service @@ -536,7 +532,7 @@ - + RPAN100 produce 10.0 @@ -549,7 +545,7 @@ - + RPAN200 buy 13.0 @@ -562,7 +558,7 @@ - + SIDEPAN buy 3.0 @@ -575,7 +571,7 @@ - + RCK100 produce 5.0 @@ -588,7 +584,7 @@ - + RCK200 buy 4.0 @@ -601,8 +597,7 @@ - - + PROFIL produce 1.0 @@ -614,7 +609,7 @@ - + LIN40 buy 8.0 @@ -627,7 +622,7 @@ - + METC000 buy @@ -639,7 +634,7 @@ - + HOT produce @@ -651,7 +646,7 @@ - + SHE100KIT produce @@ -673,91 +668,91 @@ 10 1 - + 5 10 1 - + 5 1 1 - + 1 1 1 - + 1 1 1 - + 2 1 1 - + 2 1 1 - + 2 1 1 - + 1 1 1 - + 1 1 1 - + 1 1 1 - + 1 1 1 - + 1 1 1 - + 1 @@ -786,7 +781,7 @@ 10 1 5 - + 5 @@ -794,7 +789,7 @@ 10 1 5 - + 5 @@ -802,7 +797,7 @@ 10 1 5 - + 5 @@ -811,7 +806,7 @@ --> - + 5 1 @@ -819,7 +814,7 @@ - + 5 1 @@ -827,7 +822,7 @@ - + 5 1 @@ -835,7 +830,7 @@ - + 5 1 @@ -843,7 +838,7 @@ - + 5 1 @@ -851,7 +846,7 @@ - + 5 1 @@ -859,7 +854,7 @@ - + 2 1 @@ -867,7 +862,7 @@ - + 5 1 @@ -875,7 +870,7 @@ - + 5 1 diff --git a/addons/product/product_pricelist_demo.yml b/addons/product/product_pricelist_demo.yml index 682bf9234e6..09d5e9d3699 100644 --- a/addons/product/product_pricelist_demo.yml +++ b/addons/product/product_pricelist_demo.yml @@ -1,5 +1,5 @@ - - !record {model: product.product, id: product_product_pc2}: + !record {model: product.product, id: product_product_4}: uom_id: product_uom_unit categ_id: product_category_9 - @@ -15,12 +15,12 @@ base_pricelist_id: list0 - name: 10% Discount on PC2 sequence: 1 - product_id: product_product_pc2 + product_id: product_product_4 base: !eval (ref('product.list_price')) price_discount: -0.10 - name: 1 surchange on PC3 sequence: 1 - product_id: product_product_pc3 + product_id: product_product_5 base: !eval (ref('product.list_price')) price_surcharge: 1 - name: 5% Discount on all IT components @@ -48,7 +48,7 @@ sequence: 1 price_min_margin: 2 price_max_margin: -5 - product_id: product_product_pc2 + product_id: product_product_4 base: -2 - !record {model: pricelist.partnerinfo, id: supplier_pricelist0_product_pc2}: diff --git a/addons/product/test/product_pricelist.yml b/addons/product/test/product_pricelist.yml index 58003f6a566..4fbd0d2b731 100644 --- a/addons/product/test/product_pricelist.yml +++ b/addons/product/test/product_pricelist.yml @@ -5,19 +5,19 @@ - !python {model: product.product}: | context.update({'pricelist': ref("customer_pricelist"), 'quantity':1}) - product = self.browse(cr, uid, ref("product_product_pc2"), context=context) + product = self.browse(cr, uid, ref("product_product_4"), context=context) assert product.price == product.lst_price-product.lst_price*(0.10), "Sell price is not correspond." - I check sale price of PC3. - !python {model: product.product}: | - product = self.browse(cr, uid, ref("product_product_pc3"), context=context) + product = self.browse(cr, uid, ref("product_product_5"), context=context) assert product.price == product.lst_price + 1, "Sell price is not correspond." - I check sale price of IT componet. - !python {model: product.product}: | - product = self.browse(cr, uid, ref("product_product_mb1"), context=context) + product = self.browse(cr, uid, ref("product_product_7"), context=context) assert product.price == product.lst_price, "Sell price is not correspond." - @@ -25,14 +25,14 @@ - !python {model: product.product}: | context.update({'quantity':5}) - product = self.browse(cr, uid, ref("product_product_mb1"), context=context) + product = self.browse(cr, uid, ref("product_product_7"), context=context) assert product.price == product.lst_price-product.lst_price*(0.05), "Sell price is not correspond." - I check sale price of PC4. - !python {model: product.product}: | context.update({'quantity':1}) - product = self.browse(cr, uid, ref("product_product_pc4"), context=context) + product = self.browse(cr, uid, ref("product_product_6"), context=context) assert product.price == product.lst_price, "Sell price is not correspond." - @@ -40,7 +40,7 @@ - !python {model: product.product}: | context.update({'quantity':1, 'date': '2011-12-31'}) - product = self.browse(cr, uid, ref("product_product_pc4"), context=context) + product = self.browse(cr, uid, ref("product_product_6"), context=context) assert product.price == product.lst_price-product.lst_price*(0.30), "Sell price is not correspond." - @@ -48,21 +48,21 @@ - !python {model: product.product}: | context.update({'quantity':1, 'date': False, 'partner': ref('base.res_partner_4'), 'pricelist': ref("supplier_pricelist")}) - product = self.browse(cr, uid, ref("product_product_pc2"), context=context) + product = self.browse(cr, uid, ref("product_product_4"), context=context) assert product.price == 450, "cost price is not correspond." - I check cost price of PC2 if more than 3 Unit. - !python {model: product.product}: | context.update({'quantity':3}) - product = self.browse(cr, uid, ref("product_product_pc2"), context=context) + product = self.browse(cr, uid, ref("product_product_4"), context=context) assert product.price == 400, "cost price is not correspond." - I print the sale prices report. - !python {model: product.product}: | - ctx = {'model': 'product.product', 'date': '2011-12-30', 'active_ids': [ref('product.product_product_pc1'), ref('product.product_product_pc2'), ref('product.product_product_pc3'), ref('product.product_product_pc4')]} + ctx = {'model': 'product.product', 'date': '2011-12-30', 'active_ids': [ref('product.product_product_3'), ref('product.product_product_4'), ref('product.product_product_5'), ref('product.product_product_6')]} data_dict = { 'qty1': 1, 'qty2': 5, diff --git a/addons/product_margin/test/product_margin.yml b/addons/product_margin/test/product_margin.yml index fa8241ab206..b1dee4a423d 100644 --- a/addons/product_margin/test/product_margin.yml +++ b/addons/product_margin/test/product_margin.yml @@ -11,7 +11,7 @@ !python {model: product.margin}: | self.action_open_window(cr, uid, [ref("product_margin_wiz0")], {"lang": 'en_US', "search_default_filter_to_sell": "1", "tz": False, "active_model": "product.product", "disable_log": True, - "active_ids": [ref("product.product_product_pc3")], "active_id": ref("product.product_product_pc3")}) + "active_ids": [ref("product.product_product_5")], "active_id": ref("product.product_product_5")}) - I read the fields of the product. - @@ -20,6 +20,6 @@ 'total_margin', 'sales_gap', 'purchase_num_invoiced', 'expected_margin', 'turnover'] self.read(cr, uid, [ref("product_margin_wiz0")], fields, {"lang": 'en_US', "search_default_filter_to_sell": "1", "tz": False, "active_model": "product.product", - "bin_size": True, "active_ids": [ref("product.product_product_pc3")], - "active_id": ref("product.product_product_pc3")}) + "bin_size": True, "active_ids": [ref("product.product_product_5")], + "active_id": ref("product.product_product_5")}) diff --git a/addons/purchase/purchase_order_demo.yml b/addons/purchase/purchase_order_demo.yml index 849186baf45..59a18ef7c40 100644 --- a/addons/purchase/purchase_order_demo.yml +++ b/addons/purchase/purchase_order_demo.yml @@ -3,10 +3,10 @@ partner_id: base.res_partner_1 invoice_method: order order_line: - - product_id: product.product_product_pc2 + - product_id: product.product_product_4 price_unit: 150.50 product_qty: 5.0 - - product_id: product.product_product_pc1 + - product_id: product.product_product_3 price_unit: 450.20 product_qty: 2.0 @@ -15,14 +15,14 @@ partner_id: base.res_partner_3 invoice_method: picking order_line: - - product_id: product.product_product_pc3 + - product_id: product.product_product_5 price_unit: 900 - !record {model: purchase.order, id: order_purchase3}: partner_id: base.res_partner_12 order_line: - - product_id: product.product_product_0 + - product_id: product.product_product_2 price_unit: 900.20 product_qty: 10.0 - product_id: product.product_product_1 @@ -33,13 +33,13 @@ !record {model: purchase.order, id: order_purchase4}: partner_id: base.res_partner_4 order_line: - - product_id: product.product_product_pc2 + - product_id: product.product_product_4 price_unit: 40 product_qty: 5 - - product_id: product.product_product_mb1 + - product_id: product.product_product_7 price_unit: 45 product_qty: 15.0 - - product_id: product.product_product_mb2 + - product_id: product.product_product_6 price_unit: 45 product_qty: 15 @@ -47,29 +47,29 @@ !record {model: purchase.order, id: order_purchase5}: partner_id: base.res_partner_19 order_line: - - product_id: product.product_product_cpu1 + - product_id: product.product_product_9 product_qty: 3 - - product_id: product.product_product_cpu3 + - product_id: product.product_product_10 product_qty: 13 - - product_id: product.product_product_hdd1 + - product_id: product.product_product_11 product_qty: 10 - !record {model: purchase.order, id: order_purchase6}: partner_id: base.res_partner_22 order_line: - - product_id: product.product_product_hdd2 + - product_id: product.product_product_12 product_qty: 10 - - product_id: product.product_product_ram + - product_id: product.product_product_17 product_qty: 10 - - product_id: product.product_product_ram512 + - product_id: product_product_18 product_qty: 10 - !record {model: purchase.order, id: order_purchase7}: partner_id: base.res_partner_12 order_line: - - product_id: product.product_product_0 + - product_id: product.product_product_2 product_qty: 5 - product_id: product.product_product_1 product_qty: 15 diff --git a/addons/purchase/test/process/edi_purchase_order.yml b/addons/purchase/test/process/edi_purchase_order.yml index 6649807f077..2d11ced77eb 100644 --- a/addons/purchase/test/process/edi_purchase_order.yml +++ b/addons/purchase/test/process/edi_purchase_order.yml @@ -6,14 +6,14 @@ location_id: stock.stock_location_3 pricelist_id: 1 order_line: - - product_id: product.product_product_pc1 + - product_id: product.product_product_3 product_qty: 1.0 product_uom: 1 price_unit: 150.0 name: 'Basic PC' date_planned: '2011-08-31' order_line: - - product_id: product.product_product_pc3 + - product_id: product.product_product_5 product_qty: 10.0 product_uom: 1 price_unit: 20.0 @@ -92,7 +92,7 @@ "date_planned": "2011-09-30", "sequence": 10, "price_unit": 150.0, - "product_id": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_product_pc1", "[PC1] Basic PC"], + "product_id": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_product_3", "[PC1] Basic PC"], }, { "__id": "sale:724f93ec-ddd0-11e0-88ec-701a04e25543.sale_order_line-LXEqeadasdad", @@ -106,7 +106,7 @@ "sequence": 11, "date_planned": "2011-09-15", "price_unit": 20.0, - "product_id": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_product_pc3", "[PC3] Medium PC"], + "product_id": ["product:724f93ec-ddd0-11e0-88ec-701a04e25543.product_product_5", "[PC3] Medium PC"], }], } new_purchase_order_id = purchase_order_pool.edi_import(cr, uid, edi_document, context=context) diff --git a/addons/purchase/test/process/run_scheduler.yml b/addons/purchase/test/process/run_scheduler.yml index c0a6fe57d9b..b8c4019ed1a 100644 --- a/addons/purchase/test/process/run_scheduler.yml +++ b/addons/purchase/test/process/run_scheduler.yml @@ -7,7 +7,7 @@ location_id: stock.stock_location_stock name: Test scheduler for RFQ procure_method: make_to_order - product_id: product.product_product_woodlintelm0 + product_id: product.product_product_45 product_qty: 15.0 - I confirm on procurement order. diff --git a/addons/purchase_double_validation/test/purchase_double_validation_demo.yml b/addons/purchase_double_validation/test/purchase_double_validation_demo.yml index b951e9d669e..e0369e3fda7 100644 --- a/addons/purchase_double_validation/test/purchase_double_validation_demo.yml +++ b/addons/purchase_double_validation/test/purchase_double_validation_demo.yml @@ -2,12 +2,12 @@ !record {model: purchase.order, id: order_purchase11}: partner_id: base.res_partner_12 order_line: - - product_id: product.product_product_pc4 + - product_id: product.product_product_6 product_qty: 10 - !record {model: purchase.order, id: order_purchase12}: partner_id: base.res_partner_22 order_line: - - product_id: product.product_product_hdd2 + - product_id: product.product_product_12 product_qty: 10 diff --git a/addons/purchase_requisition/purchase_requisition_demo.xml b/addons/purchase_requisition/purchase_requisition_demo.xml index 80337a29eed..87cb93b7644 100644 --- a/addons/purchase_requisition/purchase_requisition_demo.xml +++ b/addons/purchase_requisition/purchase_requisition_demo.xml @@ -6,7 +6,7 @@ - + @@ -21,7 +21,7 @@ - + 5 @@ -39,7 +39,7 @@ [HDD3] HDD Seagate 7200.8 160GB - + 60 5 @@ -56,7 +56,7 @@ [HDD3] HDD Seagate 7200.8 160GB - + 50 3 diff --git a/addons/purchase_requisition/test/purchase_requisition.yml b/addons/purchase_requisition/test/purchase_requisition.yml index 524c1c0d7be..38e66788dcf 100644 --- a/addons/purchase_requisition/test/purchase_requisition.yml +++ b/addons/purchase_requisition/test/purchase_requisition.yml @@ -2,10 +2,10 @@ I create the procurement order and run that procurement. - !python {model: make.procurement}: | - context.update({'active_model':'product.product', 'active_ids': [ref('product.product_product_hdd3')], 'active_id': ref('product.product_product_hdd3')}) + context.update({'active_model':'product.product', 'active_ids': [ref('product.product_product_13')], 'active_id': ref('product.product_product_13')}) - !record {model: make.procurement, id: procurement_product_hdd3}: - product_id: product.product_product_hdd3 + product_id: product.product_product_13 qty: 15 uom_id: product.product_uom_unit warehouse_id: stock.stock_warehouse_shop0 diff --git a/addons/purchase_requisition/test/purchase_requisition_demo.yml b/addons/purchase_requisition/test/purchase_requisition_demo.yml index 42913f3e96e..5e441f26ea3 100755 --- a/addons/purchase_requisition/test/purchase_requisition_demo.yml +++ b/addons/purchase_requisition/test/purchase_requisition_demo.yml @@ -4,7 +4,7 @@ !record {model: purchase.requisition, id: requisition1}: exclusive: exclusive line_ids: - - product_id: product.product_product_cpu1 + - product_id: product.product_product_9 product_qty: 10.0 product_uom_id: product.product_uom_unit diff --git a/addons/sale/sale_demo.xml b/addons/sale/sale_demo.xml index c65790cf3fa..7e4ef57acc0 100644 --- a/addons/sale/sale_demo.xml +++ b/addons/sale/sale_demo.xml @@ -21,7 +21,7 @@ New server config + material - + 123.20 make_to_stock @@ -30,7 +30,7 @@ [PC1] Basic PC - + 450.50 3 @@ -40,7 +40,7 @@ [PC3] Medium PC - + 900 5 @@ -50,7 +50,7 @@ [MB1] Mainboard ASUStek A7N8X - + 88 5 @@ -77,7 +77,7 @@ [PC2] Computer assembled on demand - + 540 make_to_order @@ -85,7 +85,7 @@ [MB1] Mainboard ASUStek (purchased on order) - + 88 8 @@ -107,7 +107,7 @@ [PC1] Basic PC - + 3 450 @@ -117,7 +117,7 @@ [PC2] Basic+ PC (assembly on order) - + 750 3 @@ -138,7 +138,7 @@ [PC1] Basic PC - + 2 450 @@ -148,7 +148,7 @@ [PC3] Medium PC - + 900 5 @@ -170,7 +170,7 @@ [PC2] Basic+ PC (assembly on order) - + 4 750 @@ -180,7 +180,7 @@ [CPU1] Processor AMD Athlon XP 1800+ - + 75 3 @@ -202,7 +202,7 @@ Onsite Senior Intervention - + 4 250 @@ -235,7 +235,7 @@ [MB1] Mainboard ASUStek A7N8X - + 15 250 @@ -245,7 +245,7 @@ [MB2] Mainboard ASUStek A7V8X-X - + 5 500 diff --git a/addons/sale/sale_unit_test.xml b/addons/sale/sale_unit_test.xml index 5ce1156a206..3db5f729b41 100644 --- a/addons/sale/sale_unit_test.xml +++ b/addons/sale/sale_unit_test.xml @@ -14,7 +14,7 @@ [PC1] Basic PC - + 450 2 @@ -24,7 +24,7 @@ [RAM512] DDR 512MB PC400 - + 90 3 diff --git a/addons/sale/test/edi_sale_order.yml b/addons/sale/test/edi_sale_order.yml index 554be1eee23..148eed4f18f 100644 --- a/addons/sale/test/edi_sale_order.yml +++ b/addons/sale/test/edi_sale_order.yml @@ -7,13 +7,13 @@ partner_shipping_id: base.res_partner_address_3 pricelist_id: 1 order_line: - - product_id: product.product_product_pc1 + - product_id: product.product_product_3 product_uom_qty: 1.0 product_uom: 1 price_unit: 150.0 name: 'Basic pc' order_line: - - product_id: product.product_product_pc3 + - product_id: product.product_product_5 product_uom_qty: 10.0 product_uom: 1 price_unit: 200.0 @@ -75,7 +75,7 @@ "name": "Basic PC", "date_planned": "2011-09-30", "price_unit": 150.0, - "product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_pc1", "[PC1] Basic PC"], + "product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_3", "[PC1] Basic PC"], "product_qty": 1.0, "product_uom": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_uom_unit", "Unit"], }, @@ -88,7 +88,7 @@ "name": "Medium PC", "date_planned": "2011-09-15", "price_unit": 100.0, - "product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_pc3", "[PC3] Medium PC"], + "product_id": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_product_5", "[PC3] Medium PC"], "product_qty": 2.0, "product_uom": ["product:5af1272e-dd26-11e0-b65e-701a04e25543.product_uom_unit", "Unit"], }], diff --git a/addons/sale/test/sale_order_demo.yml b/addons/sale/test/sale_order_demo.yml index d61361754ee..1c810521a3d 100644 --- a/addons/sale/test/sale_order_demo.yml +++ b/addons/sale/test/sale_order_demo.yml @@ -7,7 +7,7 @@ payment_term: account.account_payment_term - !record {model: sale.order.line, id: line}: - product_id: product.product_product_mb1 + product_id: product.product_product_7 price_unit: 190.50 product_uom_qty: 8 diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index c466d0a995d..57cc23fa030 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -56,7 +56,7 @@ --> - + 14.0 @@ -78,91 +78,91 @@ - + 8.0 - + 18.0 - + 10.0 - + 22.0 - + 8.0 - + 26.0 - + 32.0 - + 37.0 - + 39.0 - + 45.0 - + 10.0 - + 2.0 - + 80.0 diff --git a/addons/stock_invoice_directly/test/stock_invoice_directly.yml b/addons/stock_invoice_directly/test/stock_invoice_directly.yml index f5fd9011898..7ea2f3dba5e 100644 --- a/addons/stock_invoice_directly/test/stock_invoice_directly.yml +++ b/addons/stock_invoice_directly/test/stock_invoice_directly.yml @@ -10,7 +10,7 @@ move_lines: - company_id: base.main_company location_id: stock.stock_location_stock - product_id: product.product_product_pc1 + product_id: product.product_product_3 product_qty: 3.0 product_uom: product.product_uom_unit location_dest_id: stock.stock_location_customers diff --git a/addons/stock_location/stock_location_demo_cpu1.xml b/addons/stock_location/stock_location_demo_cpu1.xml index 9e6b6e7d860..7028a232a34 100644 --- a/addons/stock_location/stock_location_demo_cpu1.xml +++ b/addons/stock_location/stock_location_demo_cpu1.xml @@ -1,7 +1,7 @@ - + This product is configured with example of push/pull flows @@ -19,7 +19,7 @@ - + transparent none @@ -30,7 +30,7 @@ - + manual none @@ -41,7 +41,7 @@ - + @@ -54,7 +54,7 @@ Receive from Warehouse - + @@ -73,7 +73,7 @@ - + diff --git a/addons/stock_location/stock_location_demo_cpu3.yml b/addons/stock_location/stock_location_demo_cpu3.yml index 74c9998b1b6..8bb27c9be43 100644 --- a/addons/stock_location/stock_location_demo_cpu3.yml +++ b/addons/stock_location/stock_location_demo_cpu3.yml @@ -47,7 +47,7 @@ - !record {model: stock.location.path, id: push_pick}: name: Pick List - product_id: product.product_product_cpu3 + product_id: product.product_product_10 journal_id: journal_pick location_from_id: stock.stock_location_output location_dest_id: location_pack_zone diff --git a/addons/stock_planning/test/stock_planning.yml b/addons/stock_planning/test/stock_planning.yml index fec5bfaf2cd..b10bb7c0990 100644 --- a/addons/stock_planning/test/stock_planning.yml +++ b/addons/stock_planning/test/stock_planning.yml @@ -140,7 +140,7 @@ product_uom_qty: 13.0 state: draft delay: 2.0 - product_id: product.product_product_pc1 + product_id: product.product_product_3 product_uos_qty: 13.0 th_weight: 0.0 type: make_to_stock @@ -150,7 +150,7 @@ product_uom_qty: 5.0 state: draft delay: 3.0 - product_id: product.product_product_pc3 + product_id: product.product_product_5 product_uos_qty: 5.0 th_weight: 0.0 type: make_to_stock @@ -165,7 +165,7 @@ Now I want to calculate sales history for both the products PC1-Basic PC and PC3-Medium PC and forecast the quantity. - !python {model: stock.sale.forecast}: | - forecast_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_pc1'))]) + forecast_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_3'))]) write_dict = {'product_qty': 30.0, 'analyzed_period1_id': ref("stock_period_03"), 'analyzed_user_id': ref("base.user_root"), @@ -181,7 +181,7 @@ Now I applying onchange and unlink forecast record for the product PC3 - !python {model: stock.sale.forecast}: | - forecast_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_pc3'))]) + forecast_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_5'))]) self.unlink(cr, uid, forecast_ids, {"lang": "en_US", "tz": False, "search_default_create_uid": 1, "active_model": "ir.ui.menu", "department_id": False, "active_ids": [ref("stock_planning.menu_stock_sale_forecast_all")], "active_id": @@ -225,10 +225,10 @@ I calculate the planning in master procurement schedule. - !python {model: stock.planning}: | - planning_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_pc1')),('period_id','=',ref('stock_period_03'))]) + planning_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_3')),('period_id','=',ref('stock_period_03'))]) self.write(cr, uid, planning_ids, {'to_procure': 30.0,'planned_outgoing': 40.0,'supply_warehouse_id': ref("stock_warehouse_0")}) self.onchange_company(cr, uid, planning_ids, ref('stock.res_partner_2')) - self.onchange_uom(cr, uid, planning_ids, ref('product.product_uom_unit'), ref('product.product_product_pc1'),ref('product.product_uom_unit'), False, False) + self.onchange_uom(cr, uid, planning_ids, ref('product.product_uom_unit'), ref('product.product_product_3'),ref('product.product_uom_unit'), False, False) self.product_id_change(cr, uid, planning_ids, ref('product.product_product_20')) context = {"lang": "en_US", "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("stock_planning.menu_stock_planning")], @@ -241,7 +241,7 @@ I create a procurement order for the incoming products left. - !python {model: stock.planning}: | - planning_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_pc1')),('period_id','=',ref('stock_period_03'))]) + planning_ids = self.search(cr, uid, [('product_id','=',ref('product.product_product_3')),('period_id','=',ref('stock_period_03'))]) plann = self.browse(cr, uid, planning_ids) assert plann[0].incoming_left, 'Incoming Left must be greater than 0 !' self.procure_incomming_left(cr, uid, planning_ids, {"lang": 'en_US', "tz": @@ -253,5 +253,5 @@ - !python {model: procurement.order}: | import datetime - proc_ids = self.search(cr, uid, [('origin','=','MPS(admin) %s, week 29' % (datetime.datetime.now().year)),('product_id','=',ref("product.product_product_pc1"))]) + proc_ids = self.search(cr, uid, [('origin','=','MPS(admin) %s, week 29' % (datetime.datetime.now().year)),('product_id','=',ref("product.product_product_3"))]) assert proc_ids,'No Procurements!' From e55ede0f241a3694a3956115a8e6c925a09a38be Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Fri, 29 Jun 2012 17:09:12 +0530 Subject: [PATCH 011/226] [FIX]: purchase: Fixed wrong product reference bzr revid: rpa@tinyerp.com-20120629113912-1g7npvjdjik9p8mn --- addons/purchase/purchase_order_demo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase_order_demo.yml b/addons/purchase/purchase_order_demo.yml index 59a18ef7c40..9f9050ee1e7 100644 --- a/addons/purchase/purchase_order_demo.yml +++ b/addons/purchase/purchase_order_demo.yml @@ -62,7 +62,7 @@ product_qty: 10 - product_id: product.product_product_17 product_qty: 10 - - product_id: product_product_18 + - product_id: product.product_product_18 product_qty: 10 - From 78ba98baa0dec11cd0514abd27140f27acb8b352 Mon Sep 17 00:00:00 2001 From: "ajay javiya (OpenERP)" Date: Tue, 3 Jul 2012 11:37:37 +0530 Subject: [PATCH 012/226] [ADD]: Add validation for view bzr revid: aja@tinyerp.com-20120703060737-cnnuzzfc8yfa8rcd --- openerp/tests/test_view_validation.py | 163 +++++++++++++++++++++++--- openerp/tools/view_validation.py | 92 +++++++++++++++ 2 files changed, 238 insertions(+), 17 deletions(-) diff --git a/openerp/tests/test_view_validation.py b/openerp/tests/test_view_validation.py index 1773556d8ea..a9b6683492e 100644 --- a/openerp/tests/test_view_validation.py +++ b/openerp/tests/test_view_validation.py @@ -6,39 +6,168 @@ from StringIO import StringIO import unittest2 import openerp -from openerp.tools.view_validation import valid_page_in_book, valid_view +from openerp.tools.view_validation import * -invalid_page = etree.parse(StringIO('''\ -
+invalid_form = etree.parse(StringIO('''\ + +
diff --git a/addons/project_long_term/test/phase_process.yml b/addons/project_long_term/test/phase_process.yml index 725c5b2a97d..8738834b103 100644 --- a/addons/project_long_term/test/phase_process.yml +++ b/addons/project_long_term/test/phase_process.yml @@ -5,7 +5,7 @@ - !record {model: project.compute.phases, id: project_compute_phases01}: target_project: 'one' - project_id: project.project_integrate_openerp + project_id: project.project_project_1 - I schedule the phases. - @@ -15,7 +15,7 @@ I check the starting date and ending date on the phases after scheduling. - !python {model: project.project}: | - project = self.browse(cr, uid, ref("project.project_integrate_openerp"), context=context) + project = self.browse(cr, uid, ref("project.project_project_1"), context=context) def _convert(date): import time return time.strptime(date, '%Y-%m-%d %H:%M:%S') diff --git a/addons/project_long_term/test/task_process.yml b/addons/project_long_term/test/task_process.yml index 64ecef73476..a7065de315f 100644 --- a/addons/project_long_term/test/task_process.yml +++ b/addons/project_long_term/test/task_process.yml @@ -2,7 +2,7 @@ I create a record to compute the tasks of project. - !record {model: project.compute.tasks, id: project_compute_tasks0}: - project_id: project.project_integrate_openerp + project_id: project.project_project_1 - I compute and shedule the tasks. - @@ -12,7 +12,7 @@ Check if tasks scheduled, check that either of task's start_date, end_date and user_id is not null - !python {model: project.project}: | - prj = self.browse(cr, uid, [ref("project.project_integrate_openerp")])[0] + prj = self.browse(cr, uid, [ref("project.project_project_1")])[0] for task in prj.tasks: if task.state in ('done','cancelled'): continue From 628626fd8533ff0a6511038669869f4ac2faa1db Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Tue, 7 Aug 2012 14:53:30 +0530 Subject: [PATCH 135/226] [IMP]: project*: Improved xml_id of demo tasks bzr revid: rpa@tinyerp.com-20120807092330-df2ax9e3q4qpc3go --- addons/crm_todo/crm_todo_demo.xml | 6 ++--- addons/multi_company/multi_company_demo.xml | 16 ++++++------- addons/project/project_demo.xml | 26 ++++++++++----------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/addons/crm_todo/crm_todo_demo.xml b/addons/crm_todo/crm_todo_demo.xml index cec45141efb..9c016f5d0c9 100644 --- a/addons/crm_todo/crm_todo_demo.xml +++ b/addons/crm_todo/crm_todo_demo.xml @@ -2,13 +2,13 @@ - + - + - + diff --git a/addons/multi_company/multi_company_demo.xml b/addons/multi_company/multi_company_demo.xml index 8e9b2be3ed7..462a355e789 100644 --- a/addons/multi_company/multi_company_demo.xml +++ b/addons/multi_company/multi_company_demo.xml @@ -517,28 +517,28 @@ - + - + - + - + - + - + - + - + diff --git a/addons/project/project_demo.xml b/addons/project/project_demo.xml index 1f9d0e6356a..3c73608f68e 100644 --- a/addons/project/project_demo.xml +++ b/addons/project/project_demo.xml @@ -320,7 +320,7 @@ - + 38.0 38.0 @@ -329,9 +329,9 @@ BoM, After sales returns, interventions. Traceability. Specific adaptation to MRP - + - + 16.0 16.0 @@ -339,9 +339,9 @@ Data importation + Doc - + - + 16.0 16.0 @@ -349,9 +349,9 @@ Modifications asked by the customer. - + - + 16.0 16.0 @@ -361,7 +361,7 @@ Customer analysis + Architecture 7 - + 15 8.0 8.0 @@ -371,7 +371,7 @@ Internal testing + Software Install 8 - + 17 16.0 16.0 @@ -381,9 +381,9 @@ Analysis, Data Importation - + - + 20 16.0 16.0 @@ -392,9 +392,9 @@ Parameters - + - + 20 32.0 32.0 From 4c1baa3e9bd77cbd1785dd39622ae3d73d1342af Mon Sep 17 00:00:00 2001 From: Vishmita Date: Tue, 7 Aug 2012 15:10:55 +0530 Subject: [PATCH 136/226] [FIX]Improve code bzr revid: vja@tinyerp.com-20120807094055-31ybiab12idv3o62 --- addons/web/static/src/js/chrome.js | 12 +++++++----- addons/web/static/src/xml/base.xml | 10 +++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 5dab5c81d18..ca0051a4d82 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -292,7 +292,6 @@ instance.web.Loading = instance.web.Widget.extend({ instance.web.DatabaseManager = instance.web.Widget.extend({ init: function(parent) { this._super(parent); - self.$('.oe_topbar,.oe_leftbar').show(); this.unblockUIFunction = instance.web.unblockUI; $.validator.addMethod('matches', function (s, _, re) { return new RegExp(re).test(s); @@ -315,9 +314,10 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ }, do_render: function() { var self = this; + $('.oe_topbar,.oe_leftbar').show(); self.$element.html(QWeb.render("DatabaseManager",{ widget : self })); - $('.oe_secondary_menus_container').replaceWith($('.datamanager_menu')); - $('.oe_user_menu_placeholder').replaceWith($('.oe_user_menu')); + $('.oe_secondary_menus_container').append($('.datamanager_menu')); + $('.oe_user_menu_placeholder').append($('.oe_user_menu')); $('ul.oe_secondary_submenu > li').bind('click', function (event) { $(this).addClass('oe_active').siblings().removeClass('oe_active'); var $new = $(this); @@ -496,8 +496,10 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ }); }, do_exit: function () { - this.do_action('reload'); - //this.do_action('login'); + this.$element.remove(); + $('.oe_secondary_menus_container,.oe_user_menu_placeholder').empty(); + $('.oe_topbar,.oe_leftbar').hide(); + this.do_action('login'); } }); instance.web.client_actions.add("database_manager", "instance.web.DatabaseManager"); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index dc900d2c0c0..88f7adfafb8 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -131,11 +131,11 @@
Database Management
From 729570b06ed098ac85bc229c133df5933247b9c4 Mon Sep 17 00:00:00 2001 From: Vishmita Date: Tue, 7 Aug 2012 17:03:43 +0530 Subject: [PATCH 137/226] [FIX]changes in title bzr revid: vja@tinyerp.com-20120807113343-dy3s17gsn0qwfc2a --- addons/web/static/src/css/base.css | 4 ++++ addons/web/static/src/js/chrome.js | 2 +- addons/web/static/src/xml/base.xml | 10 +++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 029b3ef4f10..39382f1abce 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -976,6 +976,10 @@ color: black; text-align: left; } +.openerp .db_option_table{ + position: relative; + top: 10px; +} .openerp .oe_database_manager .oe_database_manager_menu { color: black; } diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index ca0051a4d82..a2e5763c700 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -430,7 +430,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ return; } self.do_notify("Dropping database", "The database '" + db + "' has been dropped"); - self.start(); + self.unblockUI(); }); }, do_backup: function(form) { diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 88f7adfafb8..a5f309b625b 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -146,7 +146,7 @@

- CREATE DATABASE + Create Database

@@ -227,7 +227,7 @@

- DROP DATABASE + Drop Database

@@ -273,7 +273,7 @@

- BACKUP DATABASE + Backup Database

@@ -320,7 +320,7 @@

- RESTORE DATABASE + Restore Database

@@ -367,7 +367,7 @@

- CHANGE MASTER PASSWORD + Change Master Password

From 1cb816c8a8b92f0ed080dc8976200d43249a7084 Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Tue, 7 Aug 2012 17:18:30 +0530 Subject: [PATCH 138/226] [FIX] Removed the unused test case to avoid the runtime mutiple execuation bzr revid: jam@tinyerp.com-20120807114830-gu6j6hbb6zf30i97 --- openerp/tests/test_view_validation.py | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/openerp/tests/test_view_validation.py b/openerp/tests/test_view_validation.py index c79bb367426..9c19e7b41d2 100644 --- a/openerp/tests/test_view_validation.py +++ b/openerp/tests/test_view_validation.py @@ -33,8 +33,9 @@ invalid_form = etree.parse(StringIO('''\ valid_form = etree.parse(StringIO('''\ + + - @@ -109,19 +110,11 @@ class test_view_validation(unittest2.TestCase): assert not valid_att_in_form(invalid_form) assert valid_att_in_form(valid_form) - def test_graph_field_validation(self): + def test_graph_validation(self): assert not valid_field_in_graph(invalid_graph) assert valid_field_in_graph(valid_graph) - def test_graph_string_validation(self): - assert not valid_field_in_graph(invalid_graph) - assert valid_field_in_graph(valid_graph) - - def test_tree_field_validation(self): - assert not valid_field_in_tree(invalid_tree) - assert valid_field_in_tree(valid_tree) - - def test_tree_string_validation(self): + def test_tree_validation(self): assert not valid_field_in_tree(invalid_tree) assert valid_field_in_tree(valid_tree) @@ -133,18 +126,6 @@ class test_view_validation(unittest2.TestCase): assert not valid_type_in_col(invalid_form) assert valid_type_in_col(valid_form) - def test_form_view(self): - assert not valid_view(invalid_form) - assert valid_view(valid_form) - - def test_tree_view(self): - assert not valid_view(invalid_tree) - assert valid_view(valid_tree) - - def test_graph_view(self): - assert not valid_view(invalid_graph) - assert valid_view(valid_graph) - if __name__ == '__main__': unittest2.main() From e29d386dcb0b26821efb923c5b5184d92efca0d3 Mon Sep 17 00:00:00 2001 From: Vishmita Date: Tue, 7 Aug 2012 17:52:28 +0530 Subject: [PATCH 139/226] [FIX]unblockUI for change password bzr revid: vja@tinyerp.com-20120807122228-7ilrywn74w845p69 --- addons/web/static/src/js/chrome.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index a2e5763c700..6ced07d0694 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -492,6 +492,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ self.display_error(result); return; } + self.unblockUI(); self.do_notify("Changed Password", "Password has been changed successfully"); }); }, From 652a741e40dbcf458bc038e6826d59dcc5332a35 Mon Sep 17 00:00:00 2001 From: Vishmita Date: Tue, 7 Aug 2012 18:20:37 +0530 Subject: [PATCH 140/226] [FIX]Minor chnages bzr revid: vja@tinyerp.com-20120807125037-jzfy3g5n36xde6px --- addons/web/static/src/js/chrome.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 6ced07d0694..a5f9c249f74 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -289,6 +289,7 @@ instance.web.Loading = instance.web.Widget.extend({ } } }); + instance.web.DatabaseManager = instance.web.Widget.extend({ init: function(parent) { this._super(parent); @@ -299,6 +300,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ }, start: function() { var self = this; + $('.oe_secondary_menus_container,.oe_user_menu_placeholder').empty(); var fetch_db = this.rpc("/web/database/get_list", {}).pipe( function(result) { self.db_list = result.db_list; @@ -430,7 +432,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ return; } self.do_notify("Dropping database", "The database '" + db + "' has been dropped"); - self.unblockUI(); + self.start(); }); }, do_backup: function(form) { @@ -498,7 +500,6 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ }, do_exit: function () { this.$element.remove(); - $('.oe_secondary_menus_container,.oe_user_menu_placeholder').empty(); $('.oe_topbar,.oe_leftbar').hide(); this.do_action('login'); } From 71f568e7ad2170b529b38444a94d714d877fc1c2 Mon Sep 17 00:00:00 2001 From: "Twinkle Christian (OpenERP)" Date: Tue, 7 Aug 2012 18:21:38 +0530 Subject: [PATCH 141/226] [IMP]Remove type field from the view bzr revid: tch@tinyerp.com-20120807125138-conczgzpufza5co7 --- openerp/addons/base/base_data.xml | 1 - openerp/addons/base/base_demo.xml | 1 - openerp/addons/base/ir/ir.xml | 72 ------------------- .../base/ir/ir_config_parameter_view.xml | 3 - openerp/addons/base/ir/ir_filters.xml | 3 - .../base/ir/wizard/wizard_menu_view.xml | 1 - .../addons/base/ir/workflow/workflow_view.xml | 16 ----- openerp/addons/base/module/module_view.xml | 6 -- .../wizard/base_export_language_view.xml | 1 - .../wizard/base_import_language_view.xml | 1 - .../wizard/base_language_install_view.xml | 1 - .../wizard/base_module_configuration_view.xml | 1 - .../module/wizard/base_module_import_view.xml | 1 - .../module/wizard/base_module_scan_view.xml | 1 - .../module/wizard/base_module_update_view.xml | 1 - .../wizard/base_module_upgrade_view.xml | 2 - .../wizard/base_update_translations_view.xml | 1 - .../publisher_warranty_view.xml | 5 -- openerp/addons/base/res/ir_property_view.xml | 3 - openerp/addons/base/res/res_bank_view.xml | 7 -- openerp/addons/base/res/res_company_view.xml | 5 -- openerp/addons/base/res/res_config.xml | 3 - openerp/addons/base/res/res_country_view.xml | 4 -- openerp/addons/base/res/res_currency_view.xml | 4 -- openerp/addons/base/res/res_lang_view.xml | 3 - openerp/addons/base/res/res_partner_demo.xml | 8 --- openerp/addons/base/res/res_partner_view.xml | 10 --- openerp/addons/base/res/res_request_view.xml | 3 - openerp/addons/base/res/res_users_view.xml | 6 -- openerp/addons/base/res/res_widget_view.xml | 6 -- 30 files changed, 180 deletions(-) diff --git a/openerp/addons/base/base_data.xml b/openerp/addons/base/base_data.xml index 7f5b4dec109..03e3b43cd78 100644 --- a/openerp/addons/base/base_data.xml +++ b/openerp/addons/base/base_data.xml @@ -4,7 +4,6 @@ ir.ui.menu.tree ir.ui.menu - tree diff --git a/openerp/addons/base/base_demo.xml b/openerp/addons/base/base_demo.xml index a0149096902..08b8c14c1ed 100644 --- a/openerp/addons/base/base_demo.xml +++ b/openerp/addons/base/base_demo.xml @@ -8,7 +8,6 @@ 1367 Gerompont (+32).81.81.37.00 - default diff --git a/openerp/addons/base/ir/ir.xml b/openerp/addons/base/ir/ir.xml index b587a846b91..fac2946e204 100644 --- a/openerp/addons/base/ir/ir.xml +++ b/openerp/addons/base/ir/ir.xml @@ -6,7 +6,6 @@ ir.values.form.action ir.values - form @@ -29,7 +28,6 @@ ir.values.form.defaults ir.values - form @@ -52,7 +50,6 @@ ir.values.tree.action ir.values - tree @@ -65,7 +62,6 @@ ir.values.search.action ir.values - search ir.sequence.form ir.sequence - form @@ -179,7 +174,6 @@ ir.sequence.tree ir.sequence - tree @@ -197,7 +191,6 @@ ir.sequence.search ir.sequence - search @@ -223,7 +216,6 @@ ir.sequence.type.form ir.sequence.type - form @@ -239,7 +231,6 @@ ir.sequence.type.tree ir.sequence.type - tree @@ -251,7 +242,6 @@ ir.sequence.type.search ir.sequence.type - search @@ -276,7 +266,6 @@ ir.actions.actions ir.actions.actions - form @@ -290,7 +279,6 @@ ir.actions.actions.tree ir.actions.actions - tree @@ -301,7 +289,6 @@ ir.actions.actions.search ir.actions.actions - search @@ -327,7 +314,6 @@ ir.actions.report.xml ir.actions.report.xml - form @@ -372,7 +358,6 @@ ir.actions.report.xml.tree ir.actions.report.xml - tree @@ -387,7 +372,6 @@ ir.actions.report.xml.search ir.actions.report.xml - search ir.actions.windows.tree ir.actions.act_window - tree @@ -428,7 +411,6 @@ ir.actions.windows.form ir.actions.act_window - form @@ -491,7 +473,6 @@ ir.actions.windows.search ir.actions.act_window - search @@ -527,7 +508,6 @@ ir.actions.wizard.tree ir.actions.wizard - tree @@ -540,7 +520,6 @@ ir.actions.wizard ir.actions.wizard - form @@ -558,7 +537,6 @@ ir.actions.wizard.search ir.actions.wizard - search ir.needaction_users_rel.tree ir.needaction_users_rel - tree 10 @@ -607,7 +584,6 @@ ir.ui.view ir.ui.view - form @@ -633,7 +609,6 @@ ir.ui.view.tree ir.ui.view - tree @@ -649,7 +624,6 @@ ir.ui.view.search ir.ui.view - search @@ -686,7 +660,6 @@ ir.ui.view.custom.search ir.ui.view.custom - search @@ -697,7 +670,6 @@ ir.ui.view.custom.form ir.ui.view.custom - form @@ -713,7 +685,6 @@ ir.ui.view.custom.tree ir.ui.view.custom - tree @@ -734,7 +705,6 @@ ir.attachment.view ir.attachment - form @@ -773,7 +743,6 @@ ir.attachment.view.tree ir.attachment - tree @@ -788,7 +757,6 @@ ir.attachment.search ir.attachment - search @@ -831,7 +799,6 @@ ir.model.form ir.model - form @@ -921,7 +888,6 @@ ir.model.tree ir.model - tree @@ -935,7 +901,6 @@ ir.model.search ir.model - search @@ -957,7 +922,6 @@ ir.model.fields.form ir.model.fields - form @@ -1000,7 +964,6 @@ ir.model.fields.tree ir.model.fields - tree @@ -1015,7 +978,6 @@ ir.model.fields.search ir.model.fields - search @@ -1044,7 +1006,6 @@ ir.model.data.form ir.model.data - form @@ -1071,7 +1032,6 @@ ir.model.data.list ir.model.data - tree @@ -1084,7 +1044,6 @@ ir.model.data.search ir.model.data - search ir.model.constraint.form ir.model.constraint - form @@ -1123,7 +1081,6 @@ ir.model.constraint.list ir.model.constraint - tree @@ -1137,7 +1094,6 @@ ir.model.relation.form ir.model.relation - form @@ -1153,7 +1109,6 @@ ir.model.relation.list ir.model.relation - tree @@ -1214,7 +1169,6 @@ Translations ir.translation - search Translations ir.translation - form @@ -1257,7 +1210,6 @@ Translations ir.translation - tree @@ -1286,7 +1238,6 @@ ir.ui.view_sc ir.ui.view_sc - form @@ -1299,7 +1250,6 @@ ir.ui.view_sc ir.ui.view_sc - tree @@ -1311,7 +1261,6 @@ ir.ui.menu.tree ir.ui.menu - tree @@ -1324,7 +1273,6 @@ ir.ui.menu.form2 ir.ui.menu - form @@ -1364,7 +1312,6 @@ ir.ui.menu.search ir.ui.menu - search @@ -1389,7 +1336,6 @@ ir.cron.tree ir.cron - tree @@ -1406,7 +1352,6 @@ ir.cron.form ir.cron - form @@ -1444,7 +1389,6 @@ ir.cron.search ir.cron - search @@ -1463,7 +1407,6 @@ ir.cron.calendar ir.cron - calendar @@ -1490,7 +1433,6 @@ ir.model.access.tree ir.model.access - tree @@ -1506,7 +1448,6 @@ ir.model.access.form ir.model.access - form @@ -1528,7 +1469,6 @@ ir.model.access.search ir.model.access - search @@ -1561,7 +1501,6 @@ Record rules ir.rule - form @@ -1604,7 +1543,6 @@ Record rules ir.rule - tree @@ -1621,7 +1559,6 @@ Record rules ir.rule - search @@ -1657,7 +1594,6 @@ Server Action ir.actions.server - form @@ -1747,7 +1683,6 @@ Server Actions ir.actions.server - tree @@ -1761,7 +1696,6 @@ ir.actions.server.search ir.actions.server - search @@ -1791,7 +1725,6 @@ ir.actions.todo Config Wizard Steps - tree @@ -1809,7 +1742,6 @@ ir.actions.todo Config Wizard Steps - form
@@ -1839,7 +1771,6 @@ ir.actions.todo ir.actions.todo.select - search @@ -1875,7 +1806,6 @@ ir.mail.server.form ir.mail_server - form @@ -1902,7 +1832,6 @@ ir.mail.server.list ir.mail_server - tree @@ -1917,7 +1846,6 @@ ir.mail.server.search ir.mail_server - search ir.config_parameter.search ir.config_parameter - search @@ -16,7 +15,6 @@ ir.config_parameter.list ir.config_parameter - tree @@ -27,7 +25,6 @@ ir.config_parameter.form ir.config_parameter - form diff --git a/openerp/addons/base/ir/ir_filters.xml b/openerp/addons/base/ir/ir_filters.xml index fec6b0a604e..e4b10d41a03 100644 --- a/openerp/addons/base/ir/ir_filters.xml +++ b/openerp/addons/base/ir/ir_filters.xml @@ -14,7 +14,6 @@ ir.filters.form ir.filters - form @@ -35,7 +34,6 @@ ir.filters.tree ir.filters - tree @@ -50,7 +48,6 @@ ir.filters.search ir.filters - search diff --git a/openerp/addons/base/ir/wizard/wizard_menu_view.xml b/openerp/addons/base/ir/wizard/wizard_menu_view.xml index 9f5d912ed1a..7fd32b256e2 100644 --- a/openerp/addons/base/ir/wizard/wizard_menu_view.xml +++ b/openerp/addons/base/ir/wizard/wizard_menu_view.xml @@ -4,7 +4,6 @@ Create Menu wizard.ir.model.menu.create - form diff --git a/openerp/addons/base/ir/workflow/workflow_view.xml b/openerp/addons/base/ir/workflow/workflow_view.xml index c20eeaed085..44dbc54c718 100644 --- a/openerp/addons/base/ir/workflow/workflow_view.xml +++ b/openerp/addons/base/ir/workflow/workflow_view.xml @@ -12,7 +12,6 @@ workflow.form workflow - form @@ -28,7 +27,6 @@ workflow.search workflow - search @@ -39,7 +37,6 @@ workflow.diagram workflow - diagram @@ -61,7 +58,6 @@ workflow.tree workflow - tree @@ -89,7 +85,6 @@ workflow.activity.form workflow.activity - form @@ -145,7 +140,6 @@ workflow.activity.tree workflow.activity - tree @@ -160,7 +154,6 @@ workflow.activity.search workflow.activity - search @@ -197,7 +190,6 @@ workflow.transition.form workflow.transition - form @@ -221,7 +213,6 @@ workflow.transition.tree workflow.transition - tree @@ -235,7 +226,6 @@ workflow.transition.search workflow.transition - search @@ -263,7 +253,6 @@ workflow.instance.form workflow.instance - form @@ -280,7 +269,6 @@ workflow.instance.tree workflow.instance - tree @@ -293,7 +281,6 @@ workflow.instance.search workflow.instance - search @@ -324,7 +311,6 @@ workflow.workitem.form workflow.workitem - form @@ -342,7 +328,6 @@ workflow.workitem.tree workflow.workitem - tree @@ -356,7 +341,6 @@ workflow.workitem.search workflow.workitem - search diff --git a/openerp/addons/base/module/module_view.xml b/openerp/addons/base/module/module_view.xml index 3eddea86e1f..7252f09db05 100644 --- a/openerp/addons/base/module/module_view.xml +++ b/openerp/addons/base/module/module_view.xml @@ -7,7 +7,6 @@ ir.module.category.form ir.module.category - form @@ -23,7 +22,6 @@ ir.module.category.tree ir.module.category - tree child_ids @@ -38,7 +36,6 @@ ir.module.module.list.select ir.module.module - search Modules Kanban ir.module.module - kanban @@ -108,7 +104,6 @@ ir.module.module.form ir.module.module - form @@ -170,7 +165,6 @@ ir.module.module.tree ir.module.module - tree diff --git a/openerp/addons/base/module/wizard/base_export_language_view.xml b/openerp/addons/base/module/wizard/base_export_language_view.xml index 9927a647c1b..88e411845c3 100644 --- a/openerp/addons/base/module/wizard/base_export_language_view.xml +++ b/openerp/addons/base/module/wizard/base_export_language_view.xml @@ -5,7 +5,6 @@ Export Translations base.language.export - form diff --git a/openerp/addons/base/module/wizard/base_import_language_view.xml b/openerp/addons/base/module/wizard/base_import_language_view.xml index 1d62c74b781..935a244238b 100644 --- a/openerp/addons/base/module/wizard/base_import_language_view.xml +++ b/openerp/addons/base/module/wizard/base_import_language_view.xml @@ -5,7 +5,6 @@ Import Translation base.language.import - form diff --git a/openerp/addons/base/module/wizard/base_language_install_view.xml b/openerp/addons/base/module/wizard/base_language_install_view.xml index d31956c6a04..46870c3ff7c 100644 --- a/openerp/addons/base/module/wizard/base_language_install_view.xml +++ b/openerp/addons/base/module/wizard/base_language_install_view.xml @@ -5,7 +5,6 @@ Load a Translation base.language.install - form diff --git a/openerp/addons/base/module/wizard/base_module_configuration_view.xml b/openerp/addons/base/module/wizard/base_module_configuration_view.xml index 61f920b4333..909a655f1ef 100644 --- a/openerp/addons/base/module/wizard/base_module_configuration_view.xml +++ b/openerp/addons/base/module/wizard/base_module_configuration_view.xml @@ -5,7 +5,6 @@ Module Configuration base.module.configuration - form
- +
+ +
diff --git a/addons/document_page/static/src/css/document_page.css b/addons/document_page/static/src/css/document_page.css index e932039bed6..5522e05efcf 100644 --- a/addons/document_page/static/src/css/document_page.css +++ b/addons/document_page/static/src/css/document_page.css @@ -2,4 +2,9 @@ display: none; } +.oe_document_page li { + padding: 2px 0 2px 4px; + list-style-type: circle; +} + From d8e8f22b3fc1bb763ad908e432d1130530513e55 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sat, 11 Aug 2012 01:35:34 +0200 Subject: [PATCH 173/226] fix css bzr revid: al@openerp.com-20120810233534-dqcuim7ip990gj6c --- addons/document_page/static/src/css/document_page.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/document_page/static/src/css/document_page.css b/addons/document_page/static/src/css/document_page.css index 5522e05efcf..e1229802f12 100644 --- a/addons/document_page/static/src/css/document_page.css +++ b/addons/document_page/static/src/css/document_page.css @@ -7,4 +7,8 @@ list-style-type: circle; } +.oe_form_editable .oe_document_page { + display: none; +} + From d2a01d78a4b21a0b37a5decacee3d5443a91d9d6 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sat, 11 Aug 2012 20:34:44 +0200 Subject: [PATCH 174/226] fixes css, demo, js bzr revid: al@openerp.com-20120811183444-0wwagnum2tm964i6 --- addons/document_page/document_page_demo.xml | 40 +++-- addons/document_page/document_page_view.xml | 11 +- .../static/src/css/document_page.css | 5 +- .../static/src/js/document_page.js | 10 +- .../static/src/lib/wiky/autogit.sh | 6 - .../static/src/lib/wiky/jquery-1.4.2.min.js | 170 ------------------ .../wizard/document_page_create_menu.py | 8 +- 7 files changed, 46 insertions(+), 204 deletions(-) delete mode 100755 addons/document_page/static/src/lib/wiky/autogit.sh delete mode 100755 addons/document_page/static/src/lib/wiky/jquery-1.4.2.min.js diff --git a/addons/document_page/document_page_demo.xml b/addons/document_page/document_page_demo.xml index 8d7b4cc4eb4..a7b5989427f 100644 --- a/addons/document_page/document_page_demo.xml +++ b/addons/document_page/document_page_demo.xml @@ -4,11 +4,27 @@ + + OpenERP Features + 10 + category + +Summary of the feature + +Long explanation + +Conclusion + +Additional ressources + + + + OpenERP 6.1. Functional Demo - 6 - ==OpenERP 6.1. Functional Demo== - + + + The news is out, OpenERP's latest version 6.1. is here. It's more user-friendly, even more business oriented and efficient to manage your company @@ -25,12 +41,12 @@ We have also put together a functional demo that presents 6.1. Watch this video [[Video:http://www.youtube.com/embed/7jES2jxKMso ]] - +
Personalise Dashboards - 7 - ==Personalise your OpenERP dashboards== + + You like OpenERP, but feel like you want to personalise it more? Now, OpenERP goes a step further and lets you customize your dashboard. How? you will ask. Thanks to a new feature that allows you to customize your dashboard by adding new boards of any search view. @@ -57,12 +73,12 @@ In less than a minute, the search view is visible on the dashboard Of course, you are free to delete what you don't need or like, but just in case you change your mind there is a reset button to return to the default view. - +
Touchscreen Point of Sale - ==The new OpenERP touchscreen Point of Sale== - + + The brand new OpenERP touchscreen point of sale available with 6.1 allows you to manage your shop sales very easily. It's fully web based so that you don't have to install or deploy any software and all the sales shops can be easily consolidated. It works in connected and disconnected modes so that you can continue to sell if you lose your internet connection. @@ -90,8 +106,8 @@ You have different options to select your products. You can do it through the ba If you need to use the POS for your restaurant, for example, your employees can record at the same time multiple tickets without having to wait to do one transaction at a time. Along, to facilitate payment, the application allows multiple payment methods. The POS application is so simple and accessible to use that your shop or restaurant will never need any other tool to manage orders. Due to its smart and user-friendly interface you don't need any training to learn how to use it. Think of it as an out-of-the-box solution to boost your business' productivity. - - - +
+
+ diff --git a/addons/document_page/document_page_view.xml b/addons/document_page/document_page_view.xml index fe890c0c6b8..c54be43d226 100644 --- a/addons/document_page/document_page_view.xml +++ b/addons/document_page/document_page_view.xml @@ -40,11 +40,8 @@ form
-
-
+ +

@@ -57,11 +54,11 @@
- +
diff --git a/addons/document_page/static/src/css/document_page.css b/addons/document_page/static/src/css/document_page.css index e1229802f12..723ff8d9b11 100644 --- a/addons/document_page/static/src/css/document_page.css +++ b/addons/document_page/static/src/css/document_page.css @@ -2,8 +2,9 @@ display: none; } -.oe_document_page li { - padding: 2px 0 2px 4px; +.oe_document_page ul, .oe_document_page li { + padding: 2px 8px; + margin: 2px 8px; list-style-type: circle; } diff --git a/addons/document_page/static/src/js/document_page.js b/addons/document_page/static/src/js/document_page.js index bb98fbcd031..555a39d7796 100644 --- a/addons/document_page/static/src/js/document_page.js +++ b/addons/document_page/static/src/js/document_page.js @@ -1,7 +1,7 @@ openerp.document_page = function (openerp) { - openerp.web.form.widgets.add( 'text_wiki', 'openerp.web.form.FieldText'); - - openerp.web.form.FieldText = openerp.web.form.FieldText.extend({ + openerp.web.form.widgets.add('text_wiki', 'openerp.web.form.FieldTextWiki'); + + openerp.web.form.FieldTextWiki = openerp.web.form.FieldText.extend({ render_value: function() { var show_value = openerp.web.format_value(this.get('value'), this, ''); if (!this.get("effective_readonly")) { @@ -9,8 +9,8 @@ openerp.document_page = function (openerp) { if (show_value && this.view.options.resize_textareas) { this.do_resize(this.view.options.resize_textareas); } - }else{ - var wiki_value = wiky.process(show_value || ''); + } else { + var wiki_value = wiky.process(show_value || ''); this.$element.html(wiki_value); } }, diff --git a/addons/document_page/static/src/lib/wiky/autogit.sh b/addons/document_page/static/src/lib/wiky/autogit.sh deleted file mode 100755 index 79f59a51a8f..00000000000 --- a/addons/document_page/static/src/lib/wiky/autogit.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -git add --all -git commit -a -m "prototype changed" -git pull -git mergetool -git push diff --git a/addons/document_page/static/src/lib/wiky/jquery-1.4.2.min.js b/addons/document_page/static/src/lib/wiky/jquery-1.4.2.min.js deleted file mode 100755 index 8060d0e5041..00000000000 --- a/addons/document_page/static/src/lib/wiky/jquery-1.4.2.min.js +++ /dev/null @@ -1,170 +0,0 @@ -/*! - * jQuery JavaScript Library v1.4.2 - * http://jquery.com/ - * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Sat Feb 13 22:33:48 2010 -0500 - */ -(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, -Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& -(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, -a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== -"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, -function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; -var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, -parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= -false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= -s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, -applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; -else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, -a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== -w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, -cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= -c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); -a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, -function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); -k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), -C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= -e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& -f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; -if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", -e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, -"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, -d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, -e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); -t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| -g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, -CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, -g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, -text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, -setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= -h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== -"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, -h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& -q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; -if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); -(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: -function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= -{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== -"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", -d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? -a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== -1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= -c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, -wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, -prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, -this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); -return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, -""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); -return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", -""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= -c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? -c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= -function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= -Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, -"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= -a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= -a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== -"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, -serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), -function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, -global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& -e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? -"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== -false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= -false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", -c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| -d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); -g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== -1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== -"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; -if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== -"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| -c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; -this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= -this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, -e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; -a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); -c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, -d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- -f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": -"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in -e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); - -// jquery.escape 1.0 - escape strings for use in jQuery selectors -// http://ianloic.com/tag/jquery.escape -// Copyright 2009 Ian McKellar -// Just like jQuery you can use it under either the MIT license or the GPL -// (see: http://docs.jquery.com/License) -(function() { -escape_re = /[#;&,\.\+\*~':"!\^\$\[\]\(\)=>|\/\\]/; -jQuery.escape = function jQuery$escape(s) { - var left = s.split(escape_re, 1)[0]; - if (left == s) return s; - return left + '\\' + - s.substr(left.length, 1) + - jQuery.escape(s.substr(left.length+1)); -} -})(); diff --git a/addons/document_page/wizard/document_page_create_menu.py b/addons/document_page/wizard/document_page_create_menu.py index 591cc845a93..68697233f84 100644 --- a/addons/document_page/wizard/document_page_create_menu.py +++ b/addons/document_page/wizard/document_page_create_menu.py @@ -64,7 +64,7 @@ class document_page_create_menu(osv.osv_memory): 'res_model': 'document.page', 'view_id': False, 'type': 'ir.actions.act_window', - 'target': 'inline', + 'target': 'inlineview', 'nodestroy': True, } value['domain'] = "[('parent_id','=',%d)]" % (page.id) @@ -78,6 +78,10 @@ class document_page_create_menu(osv.osv_memory): 'action': 'ir.actions.act_window,'+ str(action_id), }, context) obj_page.write(cr, uid, [page_id], {'menu_id':menu_id}) - return {'type': 'ir.actions.act_window_close'} + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From ddfd83d9ff3b83f99839536392237462f5dc68b5 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sat, 11 Aug 2012 20:56:10 +0200 Subject: [PATCH 175/226] fixes test bzr revid: al@openerp.com-20120811185610-o95wfdvtwfg4f4g6 --- addons/document_page/document_page_demo.xml | 74 +++++++++++-------- .../test/document_page_test00.yml | 55 +++++--------- 2 files changed, 61 insertions(+), 68 deletions(-) diff --git a/addons/document_page/document_page_demo.xml b/addons/document_page/document_page_demo.xml index a7b5989427f..96984fe2e0b 100644 --- a/addons/document_page/document_page_demo.xml +++ b/addons/document_page/document_page_demo.xml @@ -20,13 +20,13 @@ Additional ressources
- + OpenERP 6.1. Functional Demo -The news is out, OpenERP's latest version 6.1. is here. -It's more user-friendly, even more business oriented and efficient to manage your company +The news is out, OpenERP's latest version 6.1. is here. It's more +user-friendly, even more business oriented and efficient to manage your company How to discover the latest version 6.1.? @@ -34,7 +34,9 @@ Demo : [http://demo.openerp.com] Online: [http://openerp.com/online] Download: [http://openerp.com/downloads] -We have also put together a functional demo that presents 6.1. Watch this video to learn directly from us what OpenERP 6.1. can do for you. Share it in your company, with your clients and implement it now for your business. +We have also put together a functional demo that presents 6.1. Watch this video +to learn directly from us what OpenERP 6.1. can do for you. Share it in your +company, with your clients and implement it now for your business. ==Watch on Youtube!== @@ -43,27 +45,30 @@ We have also put together a functional demo that presents 6.1. Watch this video - + Personalise Dashboards -You like OpenERP, but feel like you want to personalise it more? Now, OpenERP goes a step further and lets you customize your dashboard. -How? you will ask. Thanks to a new feature that allows you to customize your dashboard by adding new boards of any search view. - -Let's say you are not a big fan of the default dashboard and you feel like the view provided are not the most relevant to you. So, now you can remove the board you find useless and customize your own one. +You like OpenERP, but feel like you want to personalise it more? Now, OpenERP +goes a step further and lets you customize your dashboard. Thanks to a new +feature that allows you to customize your dashboard by adding new boards of any +search view. ==How is it done?== Step 1: access one search view -Step 2: apply the filter you want to see at each connection to the application (eg. on sales, manufacturing, etc) +Step 2: apply the filter you want to see at each connection to the application +(eg. on sales, manufacturing, etc) Step 3: add it into the dashboard in the same space where you can save the filter Step 4: choose the application you want it visible on and the name of the array -Look at this simple example below from Purchase, where I want to put on the application's dashboard "Purchases to Approve". After I access the search view and apply the filter for "Purchases to Approve", I can add it immediately to my Purchase dashboard. - +Look at this simple example below from Purchase, where I want to put on the +application's dashboard "Purchases to Approve". After I access the search view +and apply the filter for "Purchases to Approve", I can add it immediately to my +Purchase dashboard. [[File:http://www.openerp.com/sites/default/files/fileattach/dashboard2_1(1).png ]] @@ -71,17 +76,21 @@ In less than a minute, the search view is visible on the dashboard [[File:http://www.openerp.com/sites/default/files/fileattach/dashboard2_2.png ]] -Of course, you are free to delete what you don't need or like, but just in case you change your mind there is a reset button to return to the default view. +Of course, you are free to delete what you don't need or like, but just in case +you change your mind there is a reset button to return to the default view. + - + Touchscreen Point of Sale -The brand new OpenERP touchscreen point of sale available with 6.1 allows you to manage your shop sales very easily. -It's fully web based so that you don't have to install or deploy any software and all the sales shops can be easily consolidated. -It works in connected and disconnected modes so that you can continue to sell if you lose your internet connection. +The brand new OpenERP touchscreen point of sale available with 6.1 allows you +to manage your shop sales very easily. It's fully web based so that you don't +have to install or deploy any software and all the sales shops can be easily +consolidated. It works in connected and disconnected modes so that you can +continue to sell if you lose your internet connection. [[File:http://www.openerp.com/sites/default/files/fileattach/POS(2).png ]] @@ -89,23 +98,24 @@ It works in connected and disconnected modes so that you can continue to sell if 100% WEB based -available for any touchscreen device (ipod, ipad, any tablet)mobile (with portable devices) +* available for any touchscreen device (ipod, ipad, any tablet)mobile (with portable devices) +* no installation required +* no synchronization needed, completely integrated +* continue working even when your connection is down if you close your browser, data won't be lost +* fully web based with a clean interface smart interface -no installation required -Packed as a standard OpenERP module +You have different options to select your products. You can do it through the +barcode reader, just browse through the categories you have put in place (ie. +drinks, snacks, meals, etc.), or text search in case neither of the other +options work for you. If you need to use the POS for your restaurant, for +example, your employees can record at the same time multiple tickets without +having to wait to do one transaction at a time. Along, to facilitate payment, +the application allows multiple payment methods. -no synchronization needed, completely integrated -all OpenERP available, use OpenERP for backend consolidate shops almost in real time -Work offline, with no server connection - -continue working even when your connection is down -if you close your browser, data won't be lost - -fully web based with a clean interface smart interface -You have different options to select your products. You can do it through the barcode reader, just browse through the categories you have put in place (ie. drinks, snacks, meals, etc.), or text search in case neither of the other options work for you. -If you need to use the POS for your restaurant, for example, your employees can record at the same time multiple tickets without having to wait to do one transaction at a time. Along, to facilitate payment, the application allows multiple payment methods. - -The POS application is so simple and accessible to use that your shop or restaurant will never need any other tool to manage orders. Due to its smart and user-friendly interface you don't need any training to learn how to use it. Think of it as an out-of-the-box solution to boost your business' productivity. +The POS application is so simple and accessible to use that your shop or +restaurant will never need any other tool to manage orders. Due to its smart +and user-friendly interface you don't need any training to learn how to use it. +Think of it as an out-of-the-box solution to boost your business' productivity. diff --git a/addons/document_page/test/document_page_test00.yml b/addons/document_page/test/document_page_test00.yml index d0cefbed855..3c8dba80294 100644 --- a/addons/document_page/test/document_page_test00.yml +++ b/addons/document_page/test/document_page_test00.yml @@ -1,16 +1,10 @@ - - In order to test the document_page in OpenERP, I create a new document page type on Select Display Method Tree + In order to test the document_page in OpenERP, I create a new page to category demo_category1 - - !record {model: document.page.type, id: wiki_groups_wikigrouptest0}: - method: tree - name: Wiki Group Test - notes: I can Generate New Group for Select Display method = Tree. -- - Now I will create new Doucment page and assign Group test to this page -- - !record {model: document.page, id: wiki_wiki_openerpwikiediting0}: - name: OpenERP Wiki Test - content: '=The Open ERP wiki= + !record {model: document.page, id: test_page0}: + name: Test Page0 + parent_id: demo_category1 + content: 'Test content The Open ERP wiki allows you to manage your enterprise contents using wiki @@ -19,17 +13,21 @@ FAQs, quality manuals, technical references, etc.' - - Now I will update the wikipage with other text + I check the category index contains my page. - - !record {model: document.page, id: wiki_wiki_openerpwikiediting0}: - content: '=The Open ERP wiki= + !python {model: document.page}: | + res = self.read(cr, uid, [ref('demo_category1')], ['display_content']) + assert res[0]['display_content'].find('Test Page') > 1 +- + !record {model: document.page, id: test_page0}: + content: 'Test updated content The Open ERP wiki allows you to manage your enterprise contents using wiki restructured texts. This module provides a collaborative way to manage internal FAQs, quality manuals, technical references, etc. - + Wiki text can easily be edited ' - @@ -37,35 +35,20 @@ - !python {model: wizard.document.page.history.show_diff}: | hist_obj = model.pool.get('document.page.history') - ids = hist_obj.search(cr, uid, [('document_id', '=', ref("wiki_wiki_openerpwikiediting0"))]) + ids = hist_obj.search(cr, uid, [('page_id', '=', ref("test_page0"))]) model.get_diff(cr, uid, {'active_ids': ids[:] }) - - I create a new Document page type on the Given Home Page + I click the "create menu" link and i fill the form. - - !record {model: document.page.type, id: wiki_groups_wikigroupediting0}: - name: Wiki Group Editing - home: document_page.wiki_wiki_quickstart0 -- - I Open the page for click on "Open Document Page" button. -- - !python {model: document.page.type}: | - self.open_document_page(cr, uid, [ref("wiki_groups_wikigroupediting0")], context) -- - In order to create a menu I will create wizard data -- - !record {model: document.page.type, id: document_page.wiki_groups_wikiformatting0}: - home: document_page.wiki_wiki_main -- - I create a Menu by clicking on "create menu" button. -- - !record {model: document.page.create.menu, id: wiki_create_menu_0}: + !record {model: document.page.create.menu, id: test_create_menu0}: menu_name: Wiki Test menu menu_parent_id: base.menu_base_partner - - I fill in the form and create the menu + I create a Menu by clicking on "create menu" - !python {model: document.page.create.menu}: | - ids = self.search(cr, uid, []) + ids = [ref("test_create_menu0")] + context['active_id'] = ref('test_page0') self.document_page_menu_create(cr, uid, ids, context) From d7fc09e8ab6fe1ace9c15208592e7077f7cc9626 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sun, 12 Aug 2012 01:43:27 +0200 Subject: [PATCH 176/226] fix config wizard bzr revid: al@openerp.com-20120811234327-5dy2khgh7ldiqvnr --- addons/knowledge/res_config.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/knowledge/res_config.py b/addons/knowledge/res_config.py index 39ead94d89b..7d9f161701b 100644 --- a/addons/knowledge/res_config.py +++ b/addons/knowledge/res_config.py @@ -25,10 +25,8 @@ class knowledge_config_settings(osv.osv_memory): _name = 'knowledge.config.settings' _inherit = 'res.config.settings' _columns = { - 'module_wiki_faq': fields.boolean('manage internal FAQ as a wiki', - help="""This installs the module wiki_faq."""), - 'module_wiki_quality_manual': fields.boolean('use quality manual as a wiki', - help="""This installs the module wiki_quality_manual."""), + 'module_document_page': fields.boolean('create static web pages', + help="""This installs the module document_page."""), 'module_document': fields.boolean('manage documents', help="""This is a complete document management system, with: user authentication, full document search (but pptx and docx are not supported), and a document dashboard. From ecbc9a4446b5ea4c60da59f70d33a902a25e1fa6 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sun, 12 Aug 2012 15:05:27 +0200 Subject: [PATCH 177/226] fix config wizard bzr revid: al@openerp.com-20120812130527-6ffgm7vxjbm2vlft --- addons/knowledge/res_config_view.xml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/addons/knowledge/res_config_view.xml b/addons/knowledge/res_config_view.xml index 33c9c15ae63..b1b76dd1d0b 100644 --- a/addons/knowledge/res_config_view.xml +++ b/addons/knowledge/res_config_view.xml @@ -29,18 +29,9 @@ From 6a78b5dbd9ccb4b9b736e66ce496c7def44d72d3 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sun, 12 Aug 2012 17:15:32 +0200 Subject: [PATCH 180/226] [FIX] authenticate optional env bzr revid: al@openerp.com-20120812151532-gqt8dcqo6f5t2szb --- addons/web/common/session.py | 2 +- addons/web/controllers/main.py | 44 ++++++++++++++++------------------ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/addons/web/common/session.py b/addons/web/common/session.py index ab486f08e90..4abc611e3f4 100644 --- a/addons/web/common/session.py +++ b/addons/web/common/session.py @@ -68,7 +68,7 @@ class OpenERPSession(object): self._login = login self._password = password - def authenticate(self, db, login, password, env): + def authenticate(self, db, login, password, env=None): # TODO use the openerplib API once it exposes authenticate() uid = self.proxy('common').authenticate(db, login, password, env) self.bind(db, uid, login, password) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 7aa71ef31a4..9239dae3f4c 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -34,7 +34,6 @@ openerpweb = common.http # OpenERP Web web Controllers #---------------------------------------------------------- - def concat_xml(file_list): """Concatenate xml files @@ -63,7 +62,6 @@ def concat_xml(file_list): root.append(child) return ElementTree.tostring(root, 'utf-8'), checksum.hexdigest() - def concat_files(file_list, reader=None, intersperse=""): """ Concatenates contents of all provided files @@ -91,27 +89,6 @@ def concat_files(file_list, reader=None, intersperse=""): files_concat = intersperse.join(files_content) return files_concat, checksum.hexdigest() -html_template = """ - - - - - OpenERP - - - %(css)s - %(js)s - - - - -""" - def sass2scss(src): # Validated by diff -u of sass2scss against: # sass-convert -F sass -T scss openerp.sass openerp.scss @@ -237,6 +214,27 @@ def make_conditional(req, response, last_modified=None, etag=None): response.set_etag(etag) return response.make_conditional(req.httprequest) +html_template = """ + + + + + OpenERP + + + %(css)s + %(js)s + + + + +""" + class Home(openerpweb.Controller): _cp_path = '/' From aa93e7186d560122ba8be7465fb806a123a6c840 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sun, 12 Aug 2012 23:48:27 +0200 Subject: [PATCH 181/226] [IMP] web controller helpers - move helpers on top - move some code from controllers to helpers - deprecate module dependecy processing in standalone client bzr revid: al@openerp.com-20120812214827-m1wrv7y1jvnro9ew --- addons/web/controllers/main.py | 589 +++++++++++++++++---------------- 1 file changed, 297 insertions(+), 292 deletions(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 9239dae3f4c..a90d231e471 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -31,9 +31,138 @@ from .. import common openerpweb = common.http #---------------------------------------------------------- -# OpenERP Web web Controllers +# OpenERP Web helpers #---------------------------------------------------------- +def sass2scss(src): + # Validated by diff -u of sass2scss against: + # sass-convert -F sass -T scss openerp.sass openerp.scss + block = [] + sass = ('', block) + reComment = re.compile(r'//.*$') + reIndent = re.compile(r'^\s+') + reIgnore = re.compile(r'^\s*(//.*)?$') + reFixes = { re.compile(r'\(\((.*)\)\)') : r'(\1)', } + lastLevel = 0 + prevBlocks = {} + for l in src.split('\n'): + l = l.rstrip() + if reIgnore.search(l): continue + l = reComment.sub('', l) + l = l.rstrip() + indent = reIndent.match(l) + level = indent.end() if indent else 0 + l = l[level:] + if level>lastLevel: + prevBlocks[lastLevel] = block + newBlock = [] + block[-1] = (block[-1], newBlock) + block = newBlock + elif level=0: + out += indent+sass[0]+" {\n" + for e in sass[1]: + out += write(e, level+1) + if level>=0: + out = out.rstrip(" \n") + out += ' }\n' + if level==0: + out += "\n" + else: + out += indent+sass+";\n" + return out + return write(sass) + +def db_list(req): + proxy = req.session.proxy("db") + dbs = proxy.list() + h = req.httprequest.environ['HTTP_HOST'].split(':')[0] + d = h.split('.')[0] + r = req.config.dbfilter.replace('%h', h).replace('%d', d) + dbs = [i for i in dbs if re.match(r, i)] + return dbs + +def module_topological_sort(modules): + """ Return a list of module names sorted so that their dependencies of the + modules are listed before the module itself + + modules is a dict of {module_name: dependencies} + + :param modules: modules to sort + :type modules: dict + :returns: list(str) + """ + + dependencies = set(itertools.chain.from_iterable(modules.itervalues())) + # incoming edge: dependency on other module (if a depends on b, a has an + # incoming edge from b, aka there's an edge from b to a) + # outgoing edge: other module depending on this one + + # [Tarjan 1976], http://en.wikipedia.org/wiki/Topological_sorting#Algorithms + #L ← Empty list that will contain the sorted nodes + L = [] + #S ← Set of all nodes with no outgoing edges (modules on which no other + # module depends) + S = set(module for module in modules if module not in dependencies) + + visited = set() + #function visit(node n) + def visit(n): + #if n has not been visited yet then + if n not in visited: + #mark n as visited + visited.add(n) + #change: n not web module, can not be resolved, ignore + if n not in modules: return + #for each node m with an edge from m to n do (dependencies of n) + for m in modules[n]: + #visit(m) + visit(m) + #add n to L + L.append(n) + #for each node n in S do + for n in S: + #visit(n) + visit(n) + return L + +def module_installed(req): + # Candidates module the current heuristic is the /static dir + loadable = openerpweb.addons_manifest.keys() + modules = {} + # Retrieve database installed modules + Modules = req.session.model('ir.module.module') + domain = [('state','=','installed'), ('name','in', loadable)] + for module in Modules.search_read(domain, ['name', 'dependencies_id']): + modules[module['name']] = [] + deps = module.get('dependencies_id') + if deps: + deps_read = req.session.model('ir.module.module.dependency').read(deps, ['name']) + dependencies = [i['name'] for i in deps_read] + modules[module['name']] = dependencies + + sorted_modules = module_topological_sort(modules) + return sorted_modules + +def module_boot(req): + addons = [] + for i in req.config.server_wide_modules: + if i in openerpweb.addons_manifest: + addons.append(i) + return addons + def concat_xml(file_list): """Concatenate xml files @@ -89,64 +218,9 @@ def concat_files(file_list, reader=None, intersperse=""): files_concat = intersperse.join(files_content) return files_concat, checksum.hexdigest() -def sass2scss(src): - # Validated by diff -u of sass2scss against: - # sass-convert -F sass -T scss openerp.sass openerp.scss - block = [] - sass = ('', block) - reComment = re.compile(r'//.*$') - reIndent = re.compile(r'^\s+') - reIgnore = re.compile(r'^\s*(//.*)?$') - reFixes = { re.compile(r'\(\((.*)\)\)') : r'(\1)', } - lastLevel = 0 - prevBlocks = {} - for l in src.split('\n'): - l = l.rstrip() - if reIgnore.search(l): continue - l = reComment.sub('', l) - l = l.rstrip() - indent = reIndent.match(l) - level = indent.end() if indent else 0 - l = l[level:] - if level>lastLevel: - prevBlocks[lastLevel] = block - newBlock = [] - block[-1] = (block[-1], newBlock) - block = newBlock - elif level=0: - out += indent+sass[0]+" {\n" - for e in sass[1]: - out += write(e, level+1) - if level>=0: - out = out.rstrip(" \n") - out += ' }\n' - if level==0: - out += "\n" - else: - out += indent+sass+";\n" - return out - return write(sass) - -def server_wide_modules(req): - addons = [i for i in req.config.server_wide_modules if i in openerpweb.addons_manifest] - return addons - def manifest_glob(req, addons, key): if addons is None: - addons = server_wide_modules(req) + addons = module_boot(req) else: addons = addons.split(',') r = [] @@ -214,6 +288,164 @@ def make_conditional(req, response, last_modified=None, etag=None): response.set_etag(etag) return response.make_conditional(req.httprequest) +def login_and_redirect(req, db, login, key, redirect_url='/'): + req.session.authenticate(db, login, key, {}) + redirect = werkzeug.utils.redirect(redirect_url, 303) + cookie_val = urllib2.quote(simplejson.dumps(req.session_id)) + redirect.set_cookie('instance0|session_id', cookie_val) + return redirect + +def eval_context_and_domain(session, context, domain=None): + e_context = session.eval_context(context) + # should we give the evaluated context as an evaluation context to the domain? + e_domain = session.eval_domain(domain or []) + + return e_context, e_domain + +def load_actions_from_ir_values(req, key, key2, models, meta): + context = req.session.eval_context(req.context) + Values = req.session.model('ir.values') + actions = Values.get(key, key2, models, meta, context) + + return [(id, name, clean_action(req, action)) + for id, name, action in actions] + +def clean_action(req, action, do_not_eval=False): + action.setdefault('flags', {}) + + context = req.session.eval_context(req.context) + eval_ctx = req.session.evaluation_context(context) + + if not do_not_eval: + # values come from the server, we can just eval them + if action.get('context') and isinstance(action.get('context'), basestring): + action['context'] = eval( action['context'], eval_ctx ) or {} + + if action.get('domain') and isinstance(action.get('domain'), basestring): + action['domain'] = eval( action['domain'], eval_ctx ) or [] + else: + if 'context' in action: + action['context'] = parse_context(action['context'], req.session) + if 'domain' in action: + action['domain'] = parse_domain(action['domain'], req.session) + + action_type = action.setdefault('type', 'ir.actions.act_window_close') + if action_type == 'ir.actions.act_window': + return fix_view_modes(action) + return action + +# I think generate_views,fix_view_modes should go into js ActionManager +def generate_views(action): + """ + While the server generates a sequence called "views" computing dependencies + between a bunch of stuff for views coming directly from the database + (the ``ir.actions.act_window model``), it's also possible for e.g. buttons + to return custom view dictionaries generated on the fly. + + In that case, there is no ``views`` key available on the action. + + Since the web client relies on ``action['views']``, generate it here from + ``view_mode`` and ``view_id``. + + Currently handles two different cases: + + * no view_id, multiple view_mode + * single view_id, single view_mode + + :param dict action: action descriptor dictionary to generate a views key for + """ + view_id = action.get('view_id') or False + if isinstance(view_id, (list, tuple)): + view_id = view_id[0] + + # providing at least one view mode is a requirement, not an option + view_modes = action['view_mode'].split(',') + + if len(view_modes) > 1: + if view_id: + raise ValueError('Non-db action dictionaries should provide ' + 'either multiple view modes or a single view ' + 'mode and an optional view id.\n\n Got view ' + 'modes %r and view id %r for action %r' % ( + view_modes, view_id, action)) + action['views'] = [(False, mode) for mode in view_modes] + return + action['views'] = [(view_id, view_modes[0])] + +def fix_view_modes(action): + """ For historical reasons, OpenERP has weird dealings in relation to + view_mode and the view_type attribute (on window actions): + + * one of the view modes is ``tree``, which stands for both list views + and tree views + * the choice is made by checking ``view_type``, which is either + ``form`` for a list view or ``tree`` for an actual tree view + + This methods simply folds the view_type into view_mode by adding a + new view mode ``list`` which is the result of the ``tree`` view_mode + in conjunction with the ``form`` view_type. + + TODO: this should go into the doc, some kind of "peculiarities" section + + :param dict action: an action descriptor + :returns: nothing, the action is modified in place + """ + if not action.get('views'): + generate_views(action) + + id_form = None + for index, (id, mode) in enumerate(action['views']): + if mode == 'form': + id_form = id + break + + if action.pop('view_type', 'form') != 'form': + return action + + action['views'] = [ + [id, mode if mode != 'tree' else 'list'] + for id, mode in action['views'] + ] + + return action + +def parse_domain(domain, session): + """ Parses an arbitrary string containing a domain, transforms it + to either a literal domain or a :class:`common.nonliterals.Domain` + + :param domain: the domain to parse, if the domain is not a string it + is assumed to be a literal domain and is returned as-is + :param session: Current OpenERP session + :type session: openerpweb.openerpweb.OpenERPSession + """ + if not isinstance(domain, basestring): + return domain + try: + return ast.literal_eval(domain) + except ValueError: + # not a literal + return common.nonliterals.Domain(session, domain) + +def parse_context(context, session): + """ Parses an arbitrary string containing a context, transforms it + to either a literal context or a :class:`common.nonliterals.Context` + + :param context: the context to parse, if the context is not a string it + is assumed to be a literal domain and is returned as-is + :param session: Current OpenERP session + :type session: openerpweb.openerpweb.OpenERPSession + """ + if not isinstance(context, basestring): + return context + try: + return ast.literal_eval(context) + except ValueError: + return common.nonliterals.Context(session, context) + +#---------------------------------------------------------- +# OpenERP Web web Controllers +#---------------------------------------------------------- + html_template = """ @@ -246,21 +478,14 @@ class Home(openerpweb.Controller): r = html_template % { 'js': js, 'css': css, - 'modules': simplejson.dumps(server_wide_modules(req)), + 'modules': simplejson.dumps(module_boot(req)), 'init': 'var wc = new s.web.WebClient();wc.appendTo($(document.body));' } return r @openerpweb.httprequest def login(self, req, db, login, key): - return self._login(req, db, login, key) - - def _login(self, req, db, login, key, redirect_url='/'): - req.session.authenticate(db, login, key, {}) - redirect = werkzeug.utils.redirect(redirect_url, 303) - cookie_val = urllib2.quote(simplejson.dumps(req.session_id)) - redirect.set_cookie('instance0|session_id', cookie_val) - return redirect + return login_and_redirect(req, db, login, key) class WebClient(openerpweb.Controller): _cp_path = "/web/webclient" @@ -410,12 +635,7 @@ class Database(openerpweb.Controller): @openerpweb.jsonrequest def get_list(self, req): - proxy = req.session.proxy("db") - dbs = proxy.list() - h = req.httprequest.environ['HTTP_HOST'].split(':')[0] - d = h.split('.')[0] - r = req.config.dbfilter.replace('%h', h).replace('%d', d) - dbs = [i for i in dbs if re.match(r, i)] + dbs = db_list(req) return {"db_list": dbs} @openerpweb.jsonrequest @@ -484,50 +704,6 @@ class Database(openerpweb.Controller): return {'error': e.faultCode, 'title': 'Change Password'} return {'error': 'Error, password not changed !', 'title': 'Change Password'} -def topological_sort(modules): - """ Return a list of module names sorted so that their dependencies of the - modules are listed before the module itself - - modules is a dict of {module_name: dependencies} - - :param modules: modules to sort - :type modules: dict - :returns: list(str) - """ - - dependencies = set(itertools.chain.from_iterable(modules.itervalues())) - # incoming edge: dependency on other module (if a depends on b, a has an - # incoming edge from b, aka there's an edge from b to a) - # outgoing edge: other module depending on this one - - # [Tarjan 1976], http://en.wikipedia.org/wiki/Topological_sorting#Algorithms - #L ← Empty list that will contain the sorted nodes - L = [] - #S ← Set of all nodes with no outgoing edges (modules on which no other - # module depends) - S = set(module for module in modules if module not in dependencies) - - visited = set() - #function visit(node n) - def visit(n): - #if n has not been visited yet then - if n not in visited: - #mark n as visited - visited.add(n) - #change: n not web module, can not be resolved, ignore - if n not in modules: return - #for each node m with an edge from m to n do (dependencies of n) - for m in modules[n]: - #visit(m) - visit(m) - #add n to L - L.append(n) - #for each node n in S do - for n in S: - #visit(n) - visit(n) - return L - class Session(openerpweb.Controller): _cp_path = "/web/session" @@ -593,34 +769,9 @@ class Session(openerpweb.Controller): @openerpweb.jsonrequest def modules(self, req): - # Compute available candidates module - loadable = openerpweb.addons_manifest - loaded = set(req.config.server_wide_modules) - candidates = [mod for mod in loadable if mod not in loaded] - - # already installed modules have no dependencies - modules = dict.fromkeys(loaded, []) - - # Compute auto_install modules that might be on the web side only - modules.update((name, openerpweb.addons_manifest[name].get('depends', [])) - for name in candidates - if openerpweb.addons_manifest[name].get('auto_install')) - - # Retrieve database installed modules - Modules = req.session.model('ir.module.module') - for module in Modules.search_read( - [('state','=','installed'), ('name','in', candidates)], - ['name', 'dependencies_id']): - deps = module.get('dependencies_id') - if deps: - dependencies = map( - operator.itemgetter('name'), - req.session.model('ir.module.module.dependency').read(deps, ['name'])) - modules[module['name']] = list( - set(modules.get(module['name'], []) + dependencies)) - - sorted_modules = topological_sort(modules) - return [module for module in sorted_modules if module not in loaded] + loaded = module_boot(req) + modules = module_installed(req) + return [module for module in modules if module not in loaded] @openerpweb.jsonrequest def eval_domain_and_context(self, req, contexts, domains, @@ -724,120 +875,6 @@ class Session(openerpweb.Controller): def destroy(self, req): req.session._suicide = True -def eval_context_and_domain(session, context, domain=None): - e_context = session.eval_context(context) - # should we give the evaluated context as an evaluation context to the domain? - e_domain = session.eval_domain(domain or []) - - return e_context, e_domain - -def load_actions_from_ir_values(req, key, key2, models, meta): - context = req.session.eval_context(req.context) - Values = req.session.model('ir.values') - actions = Values.get(key, key2, models, meta, context) - - return [(id, name, clean_action(req, action)) - for id, name, action in actions] - -def clean_action(req, action, do_not_eval=False): - action.setdefault('flags', {}) - - context = req.session.eval_context(req.context) - eval_ctx = req.session.evaluation_context(context) - - if not do_not_eval: - # values come from the server, we can just eval them - if action.get('context') and isinstance(action.get('context'), basestring): - action['context'] = eval( action['context'], eval_ctx ) or {} - - if action.get('domain') and isinstance(action.get('domain'), basestring): - action['domain'] = eval( action['domain'], eval_ctx ) or [] - else: - if 'context' in action: - action['context'] = parse_context(action['context'], req.session) - if 'domain' in action: - action['domain'] = parse_domain(action['domain'], req.session) - - action_type = action.setdefault('type', 'ir.actions.act_window_close') - if action_type == 'ir.actions.act_window': - return fix_view_modes(action) - return action - -# I think generate_views,fix_view_modes should go into js ActionManager -def generate_views(action): - """ - While the server generates a sequence called "views" computing dependencies - between a bunch of stuff for views coming directly from the database - (the ``ir.actions.act_window model``), it's also possible for e.g. buttons - to return custom view dictionaries generated on the fly. - - In that case, there is no ``views`` key available on the action. - - Since the web client relies on ``action['views']``, generate it here from - ``view_mode`` and ``view_id``. - - Currently handles two different cases: - - * no view_id, multiple view_mode - * single view_id, single view_mode - - :param dict action: action descriptor dictionary to generate a views key for - """ - view_id = action.get('view_id') or False - if isinstance(view_id, (list, tuple)): - view_id = view_id[0] - - # providing at least one view mode is a requirement, not an option - view_modes = action['view_mode'].split(',') - - if len(view_modes) > 1: - if view_id: - raise ValueError('Non-db action dictionaries should provide ' - 'either multiple view modes or a single view ' - 'mode and an optional view id.\n\n Got view ' - 'modes %r and view id %r for action %r' % ( - view_modes, view_id, action)) - action['views'] = [(False, mode) for mode in view_modes] - return - action['views'] = [(view_id, view_modes[0])] - -def fix_view_modes(action): - """ For historical reasons, OpenERP has weird dealings in relation to - view_mode and the view_type attribute (on window actions): - - * one of the view modes is ``tree``, which stands for both list views - and tree views - * the choice is made by checking ``view_type``, which is either - ``form`` for a list view or ``tree`` for an actual tree view - - This methods simply folds the view_type into view_mode by adding a - new view mode ``list`` which is the result of the ``tree`` view_mode - in conjunction with the ``form`` view_type. - - TODO: this should go into the doc, some kind of "peculiarities" section - - :param dict action: an action descriptor - :returns: nothing, the action is modified in place - """ - if not action.get('views'): - generate_views(action) - - id_form = None - for index, (id, mode) in enumerate(action['views']): - if mode == 'form': - id_form = id - break - - if action.pop('view_type', 'form') != 'form': - return action - - action['views'] = [ - [id, mode if mode != 'tree' else 'list'] - for id, mode in action['views'] - ] - - return action - class Menu(openerpweb.Controller): _cp_path = "/web/menu" @@ -1202,39 +1239,6 @@ class View(openerpweb.Controller): def load(self, req, model, view_id, view_type, toolbar=False): return self.fields_view_get(req, model, view_id, view_type, toolbar=toolbar) -def parse_domain(domain, session): - """ Parses an arbitrary string containing a domain, transforms it - to either a literal domain or a :class:`common.nonliterals.Domain` - - :param domain: the domain to parse, if the domain is not a string it - is assumed to be a literal domain and is returned as-is - :param session: Current OpenERP session - :type session: openerpweb.openerpweb.OpenERPSession - """ - if not isinstance(domain, basestring): - return domain - try: - return ast.literal_eval(domain) - except ValueError: - # not a literal - return common.nonliterals.Domain(session, domain) - -def parse_context(context, session): - """ Parses an arbitrary string containing a context, transforms it - to either a literal context or a :class:`common.nonliterals.Context` - - :param context: the context to parse, if the context is not a string it - is assumed to be a literal domain and is returned as-is - :param session: Current OpenERP session - :type session: openerpweb.openerpweb.OpenERPSession - """ - if not isinstance(context, basestring): - return context - try: - return ast.literal_eval(context) - except ValueError: - return common.nonliterals.Context(session, context) - class ListView(View): _cp_path = "/web/listview" @@ -1308,7 +1312,6 @@ class SearchView(View): del filter['context'] del filter['domain'] return filters - class Binary(openerpweb.Controller): _cp_path = "/web/binary" @@ -1955,3 +1958,5 @@ class Import(View): message, record) return '' % ( jsonp, simplejson.dumps({'error': {'message':msg}})) + +# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4: From 1d0c2968ce0b5589e1774d65183bcad0e9847266 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sun, 12 Aug 2012 23:55:17 +0200 Subject: [PATCH 182/226] [FIX] standalone client bzr revid: al@openerp.com-20120812215517-qxqnd1fvc9hcxezh --- addons/web_mobile/controllers.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/addons/web_mobile/controllers.py b/addons/web_mobile/controllers.py index 2b12a178c15..225f78ee111 100644 --- a/addons/web_mobile/controllers.py +++ b/addons/web_mobile/controllers.py @@ -1,11 +1,19 @@ #!/usr/bin/env python -from openerp.addons.web.common import http as oeweb import werkzeug -class Mobile(oeweb.Controller): +try: + # embedded + import openerp.addons.web.common.http as openerpweb + from openerp.addons.web.controllers.main import View +except ImportError: + # standalone + import web.common.http as openerpweb + from web.controllers.main import View + +class Mobile(openerpweb.Controller): _cp_path = '/mobile' - @oeweb.httprequest + @openerpweb.httprequest def index(self, req): return werkzeug.utils.redirect('/web_mobile/static/src/web_mobile.html', 301) From 2a7d95ac75ccb5b8161118d4ec48b3e3102001b0 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Mon, 13 Aug 2012 00:29:01 +0200 Subject: [PATCH 183/226] [IMP] load all modules at boot in single db mode bzr revid: al@openerp.com-20120812222901-tjz9443oylidd7sy --- addons/web/controllers/main.py | 39 ++++++++++++++++++++++++++++++-- addons/web/static/src/js/boot.js | 5 +++- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index a90d231e471..84317d8a4f7 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -142,7 +142,9 @@ def module_installed(req): # Candidates module the current heuristic is the /static dir loadable = openerpweb.addons_manifest.keys() modules = {} + # Retrieve database installed modules + # TODO The following code should move to ir.module.module.list_installed_modules() Modules = req.session.model('ir.module.module') domain = [('state','=','installed'), ('name','in', loadable)] for module in Modules.search_read(domain, ['name', 'dependencies_id']): @@ -156,11 +158,44 @@ def module_installed(req): sorted_modules = module_topological_sort(modules) return sorted_modules +def module_installed_bypass_session(dbname): + loadable = openerpweb.addons_manifest.keys() + modules = {} + try: + import openerp.modules.registry + registry = openerp.modules.registry.RegistryManager.get(dbname) + cr = registry.db.cursor() + try: + m = registry.get('ir.module.module') + # TODO The following code should move to ir.module.module.list_installed_modules() + domain = [('state','=','installed'), ('name','in', loadable)] + ids = m.search(cr, 1, [('state','=','installed'), ('name','in', loadable)]) + for module in m.read(cr, 1, ids, ['name', 'dependencies_id']): + modules[module['name']] = [] + deps = module.get('dependencies_id') + if deps: + deps_read = registry.get('ir.module.module.dependency').read(cr, 1, deps, ['name']) + dependencies = [i['name'] for i in deps_read] + modules[module['name']] = dependencies + finally: + cr.close() + except Exception,e: + pass + sorted_modules = module_topological_sort(modules) + return sorted_modules + def module_boot(req): - addons = [] + dbs = db_list(req) + serverside = [] + dbside = [] for i in req.config.server_wide_modules: if i in openerpweb.addons_manifest: - addons.append(i) + serverside.append(i) + if len(dbs) == 1: + # if only one db load every module at boot + dbside = module_installed_bypass_session(dbs[0]) + dbside = [i for i in dbside if i not in serverside] + addons = serverside + dbside return addons def concat_xml(file_list): diff --git a/addons/web/static/src/js/boot.js b/addons/web/static/src/js/boot.js index 844dd88a0ac..05ce709e80a 100644 --- a/addons/web/static/src/js/boot.js +++ b/addons/web/static/src/js/boot.js @@ -37,7 +37,10 @@ }; openerp.instances[new_instance._session_id] = new_instance; for(var i=0; i < modules.length; i++) { - openerp[modules[i]](new_instance,new_instance[modules[i]]); + new_instance[modules[i]] = {}; + if (openerp[modules[i]]) { + openerp[modules[i]](new_instance,new_instance[modules[i]]); + } } return new_instance; } From 2d105770009ffd5cbd5a69346cbb4ac529d6d7e7 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Mon, 13 Aug 2012 05:25:37 +0000 Subject: [PATCH 184/226] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20120813052537-ans6r1oi6i0xrzyy --- addons/pad_project/i18n/pt_BR.po | 38 +++++++ addons/project_issue_sheet/i18n/pt_BR.po | 16 +-- addons/project_mrp/i18n/nb.po | 127 +++++++++++++++++++++++ 3 files changed, 174 insertions(+), 7 deletions(-) create mode 100644 addons/pad_project/i18n/pt_BR.po create mode 100644 addons/project_mrp/i18n/nb.po diff --git a/addons/pad_project/i18n/pt_BR.po b/addons/pad_project/i18n/pt_BR.po new file mode 100644 index 00000000000..9d803b9c8d6 --- /dev/null +++ b/addons/pad_project/i18n/pt_BR.po @@ -0,0 +1,38 @@ +# Brazilian Portuguese 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 , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-02-08 00:36+0000\n" +"PO-Revision-Date: 2012-08-13 03:40+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Brazilian Portuguese \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-13 05:25+0000\n" +"X-Generator: Launchpad (build 15791)\n" + +#. module: pad_project +#: constraint:project.task:0 +msgid "Error ! Task end-date must be greater then task start-date" +msgstr "Erro ! A data final deve ser maior do que a data inicial" + +#. module: pad_project +#: model:ir.model,name:pad_project.model_project_task +msgid "Task" +msgstr "Tarefa" + +#. module: pad_project +#: view:project.task:0 +msgid "Pad" +msgstr "Pad" + +#. module: pad_project +#: constraint:project.task:0 +msgid "Error ! You cannot create recursive tasks." +msgstr "Erro! Você não pode criar tarefas recursivas." diff --git a/addons/project_issue_sheet/i18n/pt_BR.po b/addons/project_issue_sheet/i18n/pt_BR.po index 3126bea6e51..d3a44c56b48 100644 --- a/addons/project_issue_sheet/i18n/pt_BR.po +++ b/addons/project_issue_sheet/i18n/pt_BR.po @@ -8,14 +8,15 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-02-08 00:37+0000\n" -"PO-Revision-Date: 2011-01-29 13:06+0000\n" -"Last-Translator: Adriano Prado \n" +"PO-Revision-Date: 2012-08-13 03:17+0000\n" +"Last-Translator: Fábio Martinelli - http://zupy.com.br " +"\n" "Language-Team: Brazilian Portuguese \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-09 04:57+0000\n" -"X-Generator: Launchpad (build 15761)\n" +"X-Launchpad-Export-Date: 2012-08-13 05:25+0000\n" +"X-Generator: Launchpad (build 15791)\n" #. module: project_issue_sheet #: model:ir.model,name:project_issue_sheet.model_account_analytic_line @@ -26,12 +27,12 @@ msgstr "Linha Analítica" #: code:addons/project_issue_sheet/project_issue_sheet.py:57 #, python-format msgid "The Analytic Account is in pending !" -msgstr "" +msgstr "A Conta Analítica está pendente!" #. module: project_issue_sheet #: model:ir.model,name:project_issue_sheet.model_project_issue msgid "Project Issue" -msgstr "Problema do Projeto" +msgstr "Questões do Projeto" #. module: project_issue_sheet #: model:ir.model,name:project_issue_sheet.model_hr_analytic_timesheet @@ -65,6 +66,7 @@ msgstr "Planilhas de Horas" #: constraint:hr.analytic.timesheet:0 msgid "You cannot modify an entry in a Confirmed/Done timesheet !." msgstr "" +"Você não pode modificar uma entrada que está como Confirmada/Concluída" #. module: project_issue_sheet #: field:hr.analytic.timesheet,issue_id:0 @@ -74,7 +76,7 @@ msgstr "Problema" #. module: project_issue_sheet #: constraint:account.analytic.line:0 msgid "You can not create analytic line on view account." -msgstr "" +msgstr "Você não pode criar uma linha analítica em conta de visualização" #~ msgid "Add the Timesheet support for Issue Management in Project Management" #~ msgstr "" diff --git a/addons/project_mrp/i18n/nb.po b/addons/project_mrp/i18n/nb.po new file mode 100644 index 00000000000..294f813998b --- /dev/null +++ b/addons/project_mrp/i18n/nb.po @@ -0,0 +1,127 @@ +# Norwegian Bokmal 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 , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-02-08 00:37+0000\n" +"PO-Revision-Date: 2012-08-12 17:15+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Norwegian Bokmal \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-13 05:25+0000\n" +"X-Generator: Launchpad (build 15791)\n" + +#. module: project_mrp +#: sql_constraint:sale.order:0 +msgid "Order Reference must be unique per Company!" +msgstr "Ordrereferanse må være unik pr. firma!" + +#. module: project_mrp +#: model:process.node,note:project_mrp.process_node_procuretasktask0 +msgid "For each product, on type service and on order" +msgstr "For hvert produkt, type service og ordre" + +#. module: project_mrp +#: model:process.transition,name:project_mrp.process_transition_procuretask0 +msgid "Procurement Task" +msgstr "Innkjøps oppgave" + +#. module: project_mrp +#: model:ir.model,name:project_mrp.model_sale_order +msgid "Sales Order" +msgstr "Salgsordre" + +#. module: project_mrp +#: field:procurement.order,sale_line_id:0 +msgid "Sale order line" +msgstr "Salgs ordre linje" + +#. module: project_mrp +#: model:process.transition,note:project_mrp.process_transition_createtask0 +msgid "Product type is service, then its creates the task." +msgstr "" + +#. module: project_mrp +#: model:process.transition,note:project_mrp.process_transition_procuretask0 +msgid "if product type is 'service' then it creates the task." +msgstr "" + +#. module: project_mrp +#: constraint:project.task:0 +msgid "Error ! Task end-date must be greater then task start-date" +msgstr "" + +#. module: project_mrp +#: model:process.node,name:project_mrp.process_node_saleordertask0 +msgid "Sale Order Task" +msgstr "Salgs ordre oppgave" + +#. module: project_mrp +#: model:ir.model,name:project_mrp.model_product_product +msgid "Product" +msgstr "Produkt" + +#. module: project_mrp +#: constraint:product.product:0 +msgid "Error: Invalid ean code" +msgstr "Feil: Ugyldig ean kode" + +#. module: project_mrp +#: field:product.product,project_id:0 +msgid "Project" +msgstr "Prosjekt" + +#. module: project_mrp +#: model:ir.model,name:project_mrp.model_procurement_order +#: field:project.task,procurement_id:0 +msgid "Procurement" +msgstr "Innkjøp" + +#. module: project_mrp +#: model:ir.model,name:project_mrp.model_project_task +#: model:process.node,name:project_mrp.process_node_mrptask0 +#: model:process.node,name:project_mrp.process_node_procuretasktask0 +#: field:procurement.order,task_id:0 +msgid "Task" +msgstr "Oppgave" + +#. module: project_mrp +#: model:process.node,note:project_mrp.process_node_mrptask0 +msgid "A task is created to provide the service." +msgstr "" + +#. module: project_mrp +#: model:process.transition,name:project_mrp.process_transition_ordertask0 +msgid "Order Task" +msgstr "Ordre oppgave" + +#. module: project_mrp +#: constraint:project.task:0 +msgid "Error ! You cannot create recursive tasks." +msgstr "" + +#. module: project_mrp +#: model:process.transition,name:project_mrp.process_transition_createtask0 +msgid "Create Task" +msgstr "Lag oppgave" + +#. module: project_mrp +#: model:process.transition,note:project_mrp.process_transition_ordertask0 +msgid "If procurement method is Make to order and supply method is produce" +msgstr "" + +#. module: project_mrp +#: model:process.node,note:project_mrp.process_node_saleordertask0 +msgid "In case you sell services on sale order" +msgstr "" + +#. module: project_mrp +#: field:project.task,sale_line_id:0 +msgid "Sale Order Line" +msgstr "" From 98e591c2a741279a14121680281d2a564610e18d Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Mon, 13 Aug 2012 12:47:20 +0530 Subject: [PATCH 185/226] [IMP]: point_of_sale: Improved remaining product name translation bzr revid: rpa@tinyerp.com-20120813071720-kcsjouksbz4v0act --- addons/point_of_sale/point_of_sale_demo.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale_demo.xml b/addons/point_of_sale/point_of_sale_demo.xml index c134bb140cb..6836d0e7c4d 100644 --- a/addons/point_of_sale/point_of_sale_demo.xml +++ b/addons/point_of_sale/point_of_sale_demo.xml @@ -237,7 +237,7 @@ 5.70 - Nectarine + Peach True From 5fd7ad04c16ef6eda76b35d66206bfc838d76d43 Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Mon, 13 Aug 2012 12:57:38 +0530 Subject: [PATCH 186/226] [REM]: hr: Removed duplicate employee and department from demo bzr revid: rpa@tinyerp.com-20120813072738-temucs10vhcubepv --- addons/hr/hr_demo.xml | 6 +----- addons/project_timesheet/project_timesheet_demo.xml | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/addons/hr/hr_demo.xml b/addons/hr/hr_demo.xml index 811416b8bbe..20d3e093505 100644 --- a/addons/hr/hr_demo.xml +++ b/addons/hr/hr_demo.xml @@ -139,11 +139,6 @@ - - Human Ressources Manager - - - Consultant @@ -156,6 +151,7 @@ Human Resources Manager + diff --git a/addons/project_timesheet/project_timesheet_demo.xml b/addons/project_timesheet/project_timesheet_demo.xml index 66caf4bc70b..6d3dfb23767 100644 --- a/addons/project_timesheet/project_timesheet_demo.xml +++ b/addons/project_timesheet/project_timesheet_demo.xml @@ -48,11 +48,8 @@ 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 - - Fabian + - - From fd471af0d8c76b9695beca87f8ccdecd64491ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 13 Aug 2012 11:06:41 +0200 Subject: [PATCH 187/226] [IMP] mail_thread: replaced hasattr by check in columns. bzr revid: tde@openerp.com-20120813090641-n8o08be2ecfxxtdz --- addons/mail/mail_thread.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index f0dd023bf06..a79b5a6475a 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -189,7 +189,7 @@ class mail_thread(osv.Model): notif_user_ids += self.message_parse_users(cr, uid, body, context=context) # add users requested to perform an action (need_action mechanism) - if hasattr(self, 'get_needaction_user_ids'): + if self._columns.get('user_id'): user_ids_dict = self.get_needaction_user_ids(cr, uid, thread_ids, context=context) for id, user_ids in user_ids_dict.iteritems(): notif_user_ids += user_ids @@ -805,7 +805,7 @@ class mail_thread(osv.Model): forward_to = [i for i in message_followers_emails if (i and (i not in message_recipients))] if forward_to: # TODO: we need an interface for this for all types of objects, not just leads - if hasattr(res, 'section_id'): + if model_pool._columns.get('section_id'): del msg['reply-to'] msg['reply-to'] = res.section_id.reply_to @@ -1047,14 +1047,14 @@ class mail_thread(osv.Model): """ When creating a new message, set as unread if uid is not the object responsible. """ for obj in self.browse(cr, uid, ids, context=context): - if obj.message_state and hasattr(obj, 'user_id') and (not obj.user_id or obj.user_id.id != uid): + if obj.message_state and self._columns.get('user_id') and (not obj.user_id or obj.user_id.id != uid): self.message_mark_as_unread(cr, uid, [obj.id], context=context) def message_check_and_set_unread(self, cr, uid, ids, context=None): """ Set unread if uid is the object responsible or if the object has no responsible. """ for obj in self.browse(cr, uid, ids, context=context): - if obj.message_state and hasattr(obj, 'user_id') and (not obj.user_id or obj.user_id.id == uid): + if obj.message_state and self._columns.get('user_id') and (not obj.user_id or obj.user_id.id == uid): self.message_mark_as_unread(cr, uid, [obj.id], context=context) def message_mark_as_unread(self, cr, uid, ids, context=None): @@ -1064,7 +1064,7 @@ class mail_thread(osv.Model): def message_check_and_set_read(self, cr, uid, ids, context=None): """ Set read if uid is the object responsible. """ for obj in self.browse(cr, uid, ids, context=context): - if not obj.message_state and hasattr(obj, 'user_id') and obj.user_id and obj.user_id.id == uid: + if not obj.message_state and self._columns.get('user_id') and obj.user_id and obj.user_id.id == uid: self.message_mark_as_read(cr, uid, [obj.id], context=context) def message_mark_as_read(self, cr, uid, ids, context=None): From b479fbf64acbf507565b51e91ae828efb4e2ae28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 13 Aug 2012 12:30:38 +0200 Subject: [PATCH 188/226] [IMP] mail_thread: continuing to translate hasattr to something else. bzr revid: tde@openerp.com-20120813103038-4o1xwtsmjnvjj0b4 --- addons/mail/mail_thread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index a79b5a6475a..ea426327e10 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -330,7 +330,7 @@ class mail_thread(osv.Model): data = { 'subject': subject, - 'body_text': body_text or (hasattr(thread, 'description') and thread.description or ''), + 'body_text': body_text or thread._model._columns.get('description') and thread.description or ''), 'body_html': body_html or '', 'parent_id': parent_id, 'date': email_date or fields.datetime.now(), @@ -353,7 +353,7 @@ class mail_thread(osv.Model): data.update({ 'email_to': email_to, 'email_from': email_from or \ - (hasattr(thread, 'user_id') and thread.user_id and thread.user_id.user_email), + thread._model._columns.get('user_id') and thread.user_id and thread.user_id.user_email), 'email_cc': email_cc, 'email_bcc': email_bcc, 'references': references, From b50dfe4f8f6aee5733e1088182ea28601667fab7 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 13 Aug 2012 12:32:56 +0200 Subject: [PATCH 189/226] [IMP] Adapt openerp.web.Dialog's position and maxHeight to the new jquery bootstrap theme. bzr revid: fme@openerp.com-20120813103256-zhw7od30g9j406uv --- addons/web/static/src/js/chrome.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 4b2e0751e8d..43747d8e3cf 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -66,9 +66,9 @@ instance.web.Dialog = instance.web.Widget.extend({ max_width: '95%', height: 'auto', min_height: 0, - max_height: this.get_height('100%') - 140, + max_height: this.get_height('100%') - 200, autoOpen: false, - position: [false, 50], + position: [false, 40], buttons: {}, beforeClose: function () { self.on_close(); }, resizeStop: this.on_resized From 540a3c2b0a8c9f69b82d6294f9cdfe8c69af3f2d Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 13 Aug 2012 13:51:54 +0200 Subject: [PATCH 190/226] [IMP] removing structure bzr revid: fp@tinyerp.com-20120813115154-1ppf7mmaolbywku1 --- openerp/addons/base/res/res_partner_demo.xml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/openerp/addons/base/res/res_partner_demo.xml b/openerp/addons/base/res/res_partner_demo.xml index fece3c480aa..68d291077c4 100644 --- a/openerp/addons/base/res/res_partner_demo.xml +++ b/openerp/addons/base/res/res_partner_demo.xml @@ -18,52 +18,43 @@ Employee - Gold Partner + Gold - Silver Partner + Silver - Bronze Partner + Bronze IT Services - Consultancy Services - Components Buyer - Services - Office Supplies - Distributor - Manufacturer - Wholesaler - Retailer - Company Contact From 2a22a88230bb560741991bff2a230ade2289cc20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 13 Aug 2012 14:30:51 +0200 Subject: [PATCH 191/226] [FIX] mail_thread: fixed some forgotten \). bzr revid: tde@openerp.com-20120813123051-5lxzx5011j2skrk8 --- addons/mail/mail_thread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index ea426327e10..f448ddd6df8 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -330,7 +330,7 @@ class mail_thread(osv.Model): data = { 'subject': subject, - 'body_text': body_text or thread._model._columns.get('description') and thread.description or ''), + 'body_text': body_text or thread._model._columns.get('description') and thread.description or '', 'body_html': body_html or '', 'parent_id': parent_id, 'date': email_date or fields.datetime.now(), @@ -353,7 +353,7 @@ class mail_thread(osv.Model): data.update({ 'email_to': email_to, 'email_from': email_from or \ - thread._model._columns.get('user_id') and thread.user_id and thread.user_id.user_email), + thread._model._columns.get('user_id') and thread.user_id and thread.user_id.user_email, 'email_cc': email_cc, 'email_bcc': email_bcc, 'references': references, From 9558419498cd2afd8cffa5d4519816258eb45105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 13 Aug 2012 14:31:11 +0200 Subject: [PATCH 192/226] [IMP] base_calendar: removed annoying spaces in debug for tests. bzr revid: tde@openerp.com-20120813123111-i224x123n2a1r8fx --- .../base_calendar/test/base_calendar_test.yml | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/addons/base_calendar/test/base_calendar_test.yml b/addons/base_calendar/test/base_calendar_test.yml index e9a0f21e26e..2f5ff7945ee 100644 --- a/addons/base_calendar/test/base_calendar_test.yml +++ b/addons/base_calendar/test/base_calendar_test.yml @@ -1,5 +1,5 @@ -- | - In Order to test base_calendar, I will first create One Simple Event with real data +- + In Order to test base_calendar, I will first create One Simple Event with real data - !record {model: calendar.event, id: calendar_event_technicalpresentation0}: class: private @@ -11,27 +11,25 @@ location: OpenERP S.A. name: Technical Presentation rrule_type: none -- | - Now I will set recurrence for this event to occur monday and friday of week +- + Now I will set recurrence for this event to occur monday and friday of week - !python {model: calendar.event}: | data = {'fr': 1, 'mo': 1, 'interval': 1, 'rrule_type': 'weekly', 'end_type': 'end_date', 'end_date': '2011-05-31 00:00:00', 'recurrency' : True} self.write(cr, uid, [ref("calendar_event_technicalpresentation0")], data) -- | - In order to check that recurrent events are views successfully in calendar view, - I will open calendar view of events +- + In order to check that recurrent events are views successfully in calendar view, I will open calendar view of events - !python {model: calendar.event}: | self.fields_view_get(cr, uid, False, 'calendar', context) -- | - In order to check that recurrent events are views successfully in calendar view, - I will search for one of the recurrent event and count the number of events +- + In order to check that recurrent events are views successfully in calendar view, I will search for one of the recurrent event and count the number of events - !python {model: calendar.event}: | ids = self.search(cr, uid, [('date', '>=', '2011-04-30 16:00:00'), ('date', '<=', '2011-05-31 00:00:00')], context={'virtual_id': True} ) assert len(ids) == 9 -- | - Now I will make All day event and test it +- + Now I will make All day event and test it - !record {model: calendar.event, id: calendar_event_alldaytestevent0}: allday: 1 @@ -42,8 +40,8 @@ location: School name: All day test event rrule_type: none -- | - In order to check reminder I will first create reminder +- + In order to check reminder I will first create reminder - !record {model: res.alarm, id: res_alarm_daybeforeeventstarts0}: name: 1 Day before event starts @@ -51,13 +49,13 @@ trigger_interval: days trigger_occurs: before trigger_related: start -- | - Now I will assign this reminder to all day event +- + Now I will assign this reminder to all day event - !python {model: calendar.event}: | self.write(cr, uid, [ref("calendar_event_alldaytestevent0")], {'alarm_id': ref("res_alarm_daybeforeeventstarts0")}) -- | - In order to assign attendee I will invite Demo user +- + In order to assign attendee I will invite Demo user - !record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}: type: internal @@ -65,13 +63,13 @@ partner_id: base.res_partner_9 # Put bcz of problem in read user_ids: - base.user_demo -- | - Then I click on Invite Button +- + Then I click on Invite Button - !python {model: base_calendar.invite.attendee}: | self.do_invite(cr, uid, [ref("base_calendar_invite_attendee_0")], {'active_id': ref("calendar_event_alldaytestevent0"), 'model' : 'calendar.event', 'attendee_field':'attendee_ids'}) -- | - Now I will Accept this invitation +- + Now I will Accept this invitation - !python {model: calendar.attendee}: | ids = self.search(cr, uid, [('ref', '=', 'calendar.event' + ',' + str(ref("calendar_event_alldaytestevent0")))]) From ba61f0733a81dd1d75cda49f16a249997c948f21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 13 Aug 2012 14:47:04 +0200 Subject: [PATCH 193/226] [IMP] base_calendar: removed email_from from demo data, because this field does not exist; updated used categories, because some were not defined. bzr revid: tde@openerp.com-20120813124704-qa70aa3aevh4s0qv --- addons/base_calendar/crm_meeting_demo.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/base_calendar/crm_meeting_demo.xml b/addons/base_calendar/crm_meeting_demo.xml index abba52ee8fe..221653e5fc3 100644 --- a/addons/base_calendar/crm_meeting_demo.xml +++ b/addons/base_calendar/crm_meeting_demo.xml @@ -24,7 +24,6 @@ Initial discussion Discussion with partner for product. - @@ -36,7 +35,7 @@ Pricing Discussion Internal meeting for discussion for new pricing for product and services. - + @@ -58,8 +57,7 @@ Changes in Designing - info@opensides.be - + @@ -70,7 +68,7 @@ Presentation for new Services - + From 9db0a94280e3d2daa48bee4d2e1261afc1c9a4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 13 Aug 2012 14:58:03 +0200 Subject: [PATCH 194/226] [IMP] CRM demo data: subtype -> content_subtype. Please check your logs before merging ... bzr revid: tde@openerp.com-20120813125803-sodjl70yrnk3i2v0 --- addons/crm/crm_lead_demo.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml index ea26a24cad8..ed51c525335 100644 --- a/addons/crm/crm_lead_demo.xml +++ b/addons/crm/crm_lead_demo.xml @@ -553,7 +553,7 @@ Andrew Kitchen design crm.lead - html + html email sent @@ -563,7 +563,7 @@ Andrew Reply crm.lead - html + html comment @@ -572,7 +572,7 @@ Andrew Reply crm.lead - html + html comment @@ -582,7 +582,7 @@ Andrew Reply crm.lead - html + html comment @@ -592,7 +592,7 @@ Andrew Your inquiry crm.lead - html + html email received From ae6d1fe900f310aca29be7d0827e199cf1d197a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 13 Aug 2012 14:58:22 +0200 Subject: [PATCH 195/226] [FIX] crm_lead: categ_id -> now categ_ids. bzr revid: tde@openerp.com-20120813125822-1knqrg2adg90xxpy --- addons/crm/crm_lead.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 29d3eefec70..6e1d3a7755b 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -479,7 +479,7 @@ class crm_lead(base_stage, osv.osv): details = [] merge_message = _('Merged opportunities') subject = [merge_message] - fields = ['name', 'partner_id', 'stage_id', 'section_id', 'user_id', 'categ_id', 'channel_id', 'company_id', 'contact_name', + fields = ['name', 'partner_id', 'stage_id', 'section_id', 'user_id', 'categ_ids', 'channel_id', 'company_id', 'contact_name', 'email_from', 'phone', 'fax', 'mobile', 'state_id', 'description', 'probability', 'planned_revenue', 'country_id', 'city', 'street', 'street2', 'zip'] for opportunity in opportunities: @@ -550,7 +550,7 @@ class crm_lead(base_stage, osv.osv): first_opportunity = opportunities_list[0] tail_opportunities = opportunities_list[1:] - fields = ['partner_id', 'title', 'name', 'categ_id', 'channel_id', 'city', 'company_id', 'contact_name', 'country_id', 'type_id', 'user_id', 'section_id', 'state_id', 'description', 'email', 'fax', 'mobile', + fields = ['partner_id', 'title', 'name', 'categ_ids', 'channel_id', 'city', 'company_id', 'contact_name', 'country_id', 'type_id', 'user_id', 'section_id', 'state_id', 'description', 'email', 'fax', 'mobile', 'partner_name', 'phone', 'probability', 'planned_revenue', 'street', 'street2', 'zip', 'create_date', 'date_action_last', 'date_action_next', 'email_from', 'email_cc', 'partner_name'] From e543552dbd72292f0eb1567402db32370adf0023 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 13 Aug 2012 15:09:55 +0200 Subject: [PATCH 196/226] [FIX] do not mess up the headers in the DisableCacheMiddleware bzr revid: chs@openerp.com-20120813130955-1fwkyahlceotln5o --- addons/web/common/http.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/addons/web/common/http.py b/addons/web/common/http.py index 6b1a28e5803..6c71e4696b5 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -382,7 +382,7 @@ def session_context(request, storage_path, session_cookie='sessionid'): # note that domains_store and contexts_store are append-only (we # only ever add items to them), so we can just update one with the # other to get the right result, if we want to merge the - # ``context`` dict we'll need something smarter + # ``context`` dict we'll need something smarter in_store = session_store.get(sid) for k, v in request.session.iteritems(): stored = in_store.get(k) @@ -426,13 +426,18 @@ class DisableCacheMiddleware(object): referer = environ.get('HTTP_REFERER', '') parsed = urlparse.urlparse(referer) debug = parsed.query.count('debug') >= 1 - nh = dict(headers) - if 'Last-Modified' in nh: del nh['Last-Modified'] + + new_headers = [] + unwanted_keys = ['Last-Modified'] if debug: - if 'Expires' in nh: del nh['Expires'] - if 'Etag' in nh: del nh['Etag'] - nh['Cache-Control'] = 'no-cache' - start_response(status, nh.items()) + new_headers = [('Cache-Control', 'no-cache')] + unwanted_keys += ['Expires', 'Etag', 'Cache-Control'] + + for k, v in headers: + if k not in unwanted_keys: + new_headers.append((k, v)) + + start_response(status, new_headers) return self.app(environ, start_wrapped) class Root(object): From 9a3deaf3da2906341176359d504ccf407511c97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 13 Aug 2012 15:12:07 +0200 Subject: [PATCH 197/226] [IMP] crm: fixed some categ_id remaining. bzr revid: tde@openerp.com-20120813131207-lu1c271q5dh27vlr --- addons/crm/res_partner.py | 2 +- addons/crm/wizard/crm_opportunity_to_phonecall.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/res_partner.py b/addons/crm/res_partner.py index 31c45969f8e..55cc0c95b2c 100644 --- a/addons/crm/res_partner.py +++ b/addons/crm/res_partner.py @@ -82,7 +82,7 @@ class res_partner(osv.osv): 'planned_revenue' : planned_revenue, 'probability' : probability, 'partner_id' : partner_id, - 'categ_id' : categ_ids and categ_ids[0] or '', + 'categ_ids' : categ_ids and categ_ids[0:1] or [], 'state' :'draft', 'type': 'opportunity' }, context=context) diff --git a/addons/crm/wizard/crm_opportunity_to_phonecall.py b/addons/crm/wizard/crm_opportunity_to_phonecall.py index 873dd6ab36e..92996d2e7eb 100644 --- a/addons/crm/wizard/crm_opportunity_to_phonecall.py +++ b/addons/crm/wizard/crm_opportunity_to_phonecall.py @@ -71,7 +71,7 @@ class crm_opportunity2phonecall(osv.osv_memory): call_ids = opportunity.schedule_phonecall(cr, uid, opportunity_ids, data.date, data.name, \ data.note, data.phone, data.contact_name, data.user_id and data.user_id.id or False, \ data.section_id and data.section_id.id or False, \ - data.categ_id and data.categ_id.id or False, \ + data.categ_ids and data.categ_ids[0].id or False, \ action=data.action, context=context) return {'type': 'ir.actions.act_window_close'} From b8ba2d279b5b6573e10e923e2ba0d041c2778b31 Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Mon, 13 Aug 2012 15:38:27 +0200 Subject: [PATCH 198/226] [IMP] portal's jobs are now a mail group (no more relation with hr_recruitment) bzr revid: abo@openerp.com-20120813133827-ta4zh1s2gbl4a4ib --- addons/portal/portal_data.xml | 13 ++++++ addons/portal/portal_view.xml | 5 ++- addons/portal_hr_recruitment/__init__.py | 21 ---------- addons/portal_hr_recruitment/__openerp__.py | 41 ------------------- .../portal_jobs_view.xml | 10 ----- .../security/ir.model.access.csv | 3 -- 6 files changed, 17 insertions(+), 76 deletions(-) delete mode 100644 addons/portal_hr_recruitment/__init__.py delete mode 100644 addons/portal_hr_recruitment/__openerp__.py delete mode 100644 addons/portal_hr_recruitment/portal_jobs_view.xml delete mode 100644 addons/portal_hr_recruitment/security/ir.model.access.csv diff --git a/addons/portal/portal_data.xml b/addons/portal/portal_data.xml index 5245c99eed2..d14bd823e5e 100644 --- a/addons/portal/portal_data.xml +++ b/addons/portal/portal_data.xml @@ -20,6 +20,18 @@ form + + + Company's jobs feed + + + + Jobs + mail.group + + form + + + Portal Form @@ -47,6 +48,7 @@ + Portals @@ -57,7 +59,7 @@ {'form_view_ref': 'portal.portal_form_view'}

- Click to create a new portal. + Click to create a new portal.

A portal helps defining specific views and rules for a group of users (the portal group). A portal menu, widgets and specific @@ -65,6 +67,7 @@

+ diff --git a/addons/portal_hr_recruitment/__init__.py b/addons/portal_hr_recruitment/__init__.py deleted file mode 100644 index 26c654db9dd..00000000000 --- a/addons/portal_hr_recruitment/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 . -# -############################################################################## - diff --git a/addons/portal_hr_recruitment/__openerp__.py b/addons/portal_hr_recruitment/__openerp__.py deleted file mode 100644 index 0b7fb78b7f0..00000000000 --- a/addons/portal_hr_recruitment/__openerp__.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 . -# -############################################################################## - - -{ - 'name': 'Portal HR recruitment', - 'version': '0.1', - 'category': 'Tools', - 'complexity': "easy", - 'description': """ -This module adds a jobs page to your portal if hr and portal are installed. - """, - 'author': 'OpenERP SA', - 'depends': ['hr','portal'], - 'data': [ - 'portal_jobs_view.xml', - 'security/ir.model.access.csv', - ], - 'installable': True, - 'auto_install':True, - 'category':'Hidden', -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal_hr_recruitment/portal_jobs_view.xml b/addons/portal_hr_recruitment/portal_jobs_view.xml deleted file mode 100644 index e3e9cffb063..00000000000 --- a/addons/portal_hr_recruitment/portal_jobs_view.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/addons/portal_hr_recruitment/security/ir.model.access.csv b/addons/portal_hr_recruitment/security/ir.model.access.csv deleted file mode 100644 index 0725d1e41eb..00000000000 --- a/addons/portal_hr_recruitment/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_job,job,hr.model_hr_job,portal.group_portal_member,1,0,0,0 -access_hr_department_employee,hr_department_employee,hr.model_hr_department,portal.group_portal_member,1,0,0,0 From 41791f7e2f2514897335b353088f81b9ceb33634 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Mon, 13 Aug 2012 15:56:53 +0200 Subject: [PATCH 199/226] [FIX] Fix bug in binary/image controller bzr revid: fme@openerp.com-20120813135653-zvk21ch7dc9rs66w --- addons/web/controllers/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 84317d8a4f7..7abec04a372 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1359,19 +1359,19 @@ class Binary(openerpweb.Controller): headers = [('Content-Type', 'image/png')] etag = req.httprequest.headers.get('If-None-Match') hashed_session = hashlib.md5(req.session_id).hexdigest() + id = None if not id else simplejson.loads(id) + if type(id) is list: + id = id[0] # m2o if etag: if not id and hashed_session == etag: return werkzeug.wrappers.Response(status=304) else: - date = Model.read([int(id)], [last_update], context)[0].get(last_update) + date = Model.read([id], [last_update], context)[0].get(last_update) if hashlib.md5(date).hexdigest() == etag: return werkzeug.wrappers.Response(status=304) retag = hashed_session try: - id = None if not id else simplejson.loads(id) - if type(id) is list: - id = id[0] # m2o if not id: res = Model.default_get([field], context).get(field) image_data = base64.b64decode(res) From 0f1aa3300dd671e7513c960f6f09fc030511d147 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 13 Aug 2012 15:59:27 +0200 Subject: [PATCH 200/226] [FIX] do not autocorrect location header in redirects bzr revid: chs@openerp.com-20120813135927-k32eih6tg6y28ivl --- addons/web/controllers/main.py | 1 + addons/web_mobile/controllers.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 7abec04a372..01eb397f00f 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -326,6 +326,7 @@ def make_conditional(req, response, last_modified=None, etag=None): def login_and_redirect(req, db, login, key, redirect_url='/'): req.session.authenticate(db, login, key, {}) redirect = werkzeug.utils.redirect(redirect_url, 303) + redirect.autocorrect_location_header = False cookie_val = urllib2.quote(simplejson.dumps(req.session_id)) redirect.set_cookie('instance0|session_id', cookie_val) return redirect diff --git a/addons/web_mobile/controllers.py b/addons/web_mobile/controllers.py index 225f78ee111..ae05056bdc3 100644 --- a/addons/web_mobile/controllers.py +++ b/addons/web_mobile/controllers.py @@ -16,4 +16,6 @@ class Mobile(openerpweb.Controller): @openerpweb.httprequest def index(self, req): - return werkzeug.utils.redirect('/web_mobile/static/src/web_mobile.html', 301) + r = werkzeug.utils.redirect('/web_mobile/static/src/web_mobile.html', 301) + r.autocorrect_location_header = False + return r From 6ce8b7cf04d7b12ebb32830c9e5065171ce29277 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 13 Aug 2012 16:04:02 +0200 Subject: [PATCH 201/226] [IMP] this is version 7 bzr revid: chs@openerp.com-20120813140402-x67r7rk7tr6718jb --- openerp/release.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openerp/release.py b/openerp/release.py index f0f1f049cb6..a151e939d20 100644 --- a/openerp/release.py +++ b/openerp/release.py @@ -30,9 +30,9 @@ RELEASE_LEVELS_DISPLAY = {ALPHA: ALPHA, # properly comparable using normal operarors, for example: # (6,1,0,'beta',0) < (6,1,0,'candidate',1) < (6,1,0,'candidate',2) # (6,1,0,'candidate',2) < (6,1,0,'final',0) < (6,1,2,'final',0) -version_info = (6,2,0,ALPHA,0) -version = '.'.join(map(str,version_info[:2])) + RELEASE_LEVELS_DISPLAY[version_info[3]] + str(version_info[4] or '') -major_version = '.'.join(map(str,version_info[:2])) +version_info = (7, 0, 0, ALPHA, 0) +version = '.'.join(map(str, version_info[:2])) + RELEASE_LEVELS_DISPLAY[version_info[3]] + str(version_info[4] or '') +serie = major_version = '.'.join(map(str, version_info[:2])) description = 'OpenERP Server' long_desc = '''OpenERP is a complete ERP and CRM. The main features are accounting (analytic From e94136a6d8cc53328472c3bb1eb720e92edc95ee Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 13 Aug 2012 16:11:01 +0200 Subject: [PATCH 202/226] [IMP] uncommit hyearchical categories bzr revid: fp@tinyerp.com-20120813141101-sd95pzkc1qsy9lox --- openerp/addons/base/res/res_partner_demo.xml | 15 ++++++++++++--- openerp/addons/base/res/res_partner_view.xml | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/openerp/addons/base/res/res_partner_demo.xml b/openerp/addons/base/res/res_partner_demo.xml index 68d291077c4..fece3c480aa 100644 --- a/openerp/addons/base/res/res_partner_demo.xml +++ b/openerp/addons/base/res/res_partner_demo.xml @@ -18,43 +18,52 @@ Employee
- Gold + Gold Partner - Silver + Silver Partner - Bronze + Bronze Partner IT Services + Consultancy Services + Components Buyer + Services + Office Supplies + Distributor + Manufacturer + Wholesaler + Retailer + Company Contact diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index b5bfda2f0a0..468540e1263 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -119,8 +119,8 @@ -