From 683cf35070c9723099fe3b90ddcbe7de2e0a57c9 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 14 Sep 2010 13:36:35 +0000 Subject: [PATCH 001/681] openerp local commit bzr revid: al@openerp.com-20100914133635-9yuqmkxqdkmde2ql --- .../report/account_aged_partner_balance.rml | 2 +- addons/account/report/invoice.rml | 2 -- .../account_report_aged_partner_balance.py | 6 +++--- addons/base_action_rule/base_action_rule.py | 19 +++++++++++++++---- .../base_action_rule_view.xml | 1 + addons/crm/report/crm_lead_report.py | 8 ++++---- addons/crm/wizard/crm_forward_to_partner.py | 16 ++++++++++++++-- addons/document/document.py | 1 + .../security/email_template_security.xml | 2 -- addons/mrp/mrp_view.xml | 2 +- addons/sale/report/sale_order.rml | 10 +++++----- 11 files changed, 45 insertions(+), 24 deletions(-) diff --git a/addons/account/report/account_aged_partner_balance.rml b/addons/account/report/account_aged_partner_balance.rml index bd52f9be4f5..5a74e46a115 100644 --- a/addons/account/report/account_aged_partner_balance.rml +++ b/addons/account/report/account_aged_partner_balance.rml @@ -168,7 +168,7 @@ Partners - [[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]] [[ formatLang(data['form']['date1'],date=True) ]] + [[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not Due' ]] [[ data['form']['4']['name'] ]] diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index f05198876b9..59342941829 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -239,8 +239,6 @@ - Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]] - Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]] VAT : [[ o.partner_id.vat or removeParentNode('para') ]] diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py index 29867f04d5b..0431bafacb2 100644 --- a/addons/account/wizard/account_report_aged_partner_balance.py +++ b/addons/account/wizard/account_report_aged_partner_balance.py @@ -75,9 +75,9 @@ class account_aged_trial_balance(osv.osv_memory): for i in range(5)[::-1]: stop = start - RelativeDateTime(days=period_length) res[str(i)] = { - 'name' : str((5-(i+1)) * period_length) + '-' + str((5-i) * period_length), + 'name' : (i!=0 and (str((5-(i+1)) * period_length) + '-' + str((5-i) * period_length)) or ('+'+str(4 * period_length))), 'stop': start.strftime('%Y-%m-%d'), - 'start' : stop.strftime('%Y-%m-%d'), + 'start' : (i!=0 and stop.strftime('%Y-%m-%d') or time.strftime('01-01-1900')), } start = stop - RelativeDateTime(days=1) else: @@ -99,4 +99,4 @@ class account_aged_trial_balance(osv.osv_memory): account_aged_trial_balance() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index ff6321e599f..b4cd4f8ec00 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -113,6 +113,8 @@ the rule to mark CC(mail to any other person defined in actions)."), 'filter_id':fields.many2one('ir.filters', 'Filter', required=False), 'act_email_from' : fields.char('Email From', size=64, required=False, help="Use a python expression to specify the right field on which one than we will use for the 'From' field of the header"), + 'act_email_to' : fields.char('Email To', size=64, required=False, + help="Use a python expression to specify the right field on which one than we will use for the 'To' field of the header"), } _defaults = { @@ -356,13 +358,22 @@ the rule to mark CC(mail to any other person defined in actions)."), emails += (action.act_email_cc or '').split(',') if action.act_mail_to_email: emails += (action.act_mail_to_email or '').split(',') + import pdb + #pdb.set_trace() + + locals_for_emails = { + 'user' : self.pool.get('res.users').browse(cr, uid, uid, context=context), + 'obj' : obj, + } + + if action.act_email_to: + emails.append(safe_eval(action.act_email_to, {}, locals_for_emails)) + emails = filter(None, emails) + if len(emails) and action.act_mail_body: emails = list(set(emails)) - email_from = safe_eval(action.act_email_from, {}, { - 'user' : self.pool.get('res.users').browse(cr, uid, uid, context=context), - 'obj' : obj, - }) + email_from = safe_eval(action.act_email_from, {}, locals_for_emails) self.email_send(cr, uid, obj, emails, action.act_mail_body, emailfrom=email_from) return True diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml index 526fe55f4a3..76620f26fe1 100644 --- a/addons/base_action_rule/base_action_rule_view.xml +++ b/addons/base_action_rule/base_action_rule_view.xml @@ -65,6 +65,7 @@ + diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py index 4f6f39e0690..09a80519cdb 100644 --- a/addons/crm/report/crm_lead_report.py +++ b/addons/crm/report/crm_lead_report.py @@ -127,9 +127,9 @@ class crm_lead_report(osv.osv): CREATE OR REPLACE VIEW crm_lead_report AS ( SELECT id, - to_char(c.create_date, 'YYYY') as name, - to_char(c.create_date, 'MM') as month, - to_char(c.create_date, 'YYYY-MM-DD') as day, + to_char(c.date_deadline, 'YYYY') as name, + to_char(c.date_deadline, 'MM') as month, + to_char(c.date_deadline, 'YYYY-MM-DD') as day, to_char(c.create_date, 'YYYY-MM-DD') as creation_date, to_char(c.date_open, 'YYYY-MM-DD') as opening_date, to_char(c.date_closed, 'YYYY-mm-dd') as date_closed, @@ -145,7 +145,7 @@ class crm_lead_report(osv.osv): c.partner_id, c.country_id, c.planned_revenue, - c.planned_revenue*(c.probability/100) as probable_revenue, + c.planned_revenue*(c.probability/100) as probable_revenue, 1 as nbr, 0 as avg_answers, 0.0 as perc_done, diff --git a/addons/crm/wizard/crm_forward_to_partner.py b/addons/crm/wizard/crm_forward_to_partner.py index aaa26c438b6..8f2d778c973 100644 --- a/addons/crm/wizard/crm_forward_to_partner.py +++ b/addons/crm/wizard/crm_forward_to_partner.py @@ -27,6 +27,18 @@ from osv import osv, fields import tools from tools.translate import _ +FWD_TEMPLATE="""Hello, + +OpenERP Leads are now forwarded to our trusted partners, through the CRM, we hope that they provide you with interesting projects, we know that they have shown keen interest in our software. +Below is an interesting lead for you. + +Please let us know about the advancements of this lead or if you are not able to answer to its requests by replying to this email. This way, we can keep track of closed leads or forward them to other partners. +Don't forget to propose our maintenance at the beginning of your implementation projects, together with your services quotation. The maintenance provides unlimited bugfixing that will avoid you waste time on bugs detected during the implementation. It also provides free migration services for the current stable version at the time of signature; otherwise if we released a new version during your implementation, the customer would not always be able to easily migrate to newer versions. + +Kind regards, OpenERP Team + +""" + class crm_lead_forward_to_partner(osv.osv_memory): """Forwards lead history""" _name = 'crm.lead.forward.to.partner' @@ -110,7 +122,7 @@ class crm_lead_forward_to_partner(osv.osv_memory): res_id = context.get('active_id') msg_val = self._get_case_history(cr, uid, history_type, res_id, context=context) if msg_val: - res = {'value': {'body' : '\n\n' + msg_val}} + res = {'value': {'body' : FWD_TEMPLATE + '\n\n' + msg_val}} return res def _get_case_history(self, cr, uid, history_type, res_id, context=None): @@ -268,7 +280,7 @@ class crm_lead_forward_to_partner(osv.osv_memory): body = self._get_case_history(cr, uid, defaults.get('history', 'latest'), lead.id, context=context) defaults.update({ 'subject' : '%s: %s' % (_('Fwd'), lead.name), - 'body' : body, + 'body' : FWD_TEMPLATE + '\n\n' + body, }) return defaults diff --git a/addons/document/document.py b/addons/document/document.py index 46cf6d189c1..f60531f40ef 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -144,6 +144,7 @@ class document_file(osv.osv): return super(document_file, self).copy(cr, uid, id, default, context) def write(self, cr, uid, ids, vals, context=None): + result = False if not isinstance(ids, list): ids = [ids] res = self.search(cr, uid, [('id', 'in', ids)]) diff --git a/addons/email_template/security/email_template_security.xml b/addons/email_template/security/email_template_security.xml index 7e6c1f4b560..9fcf47d94d8 100755 --- a/addons/email_template/security/email_template_security.xml +++ b/addons/email_template/security/email_template_security.xml @@ -1,10 +1,8 @@ - Marketing / User - diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 4504de8a2cf..402d352c174 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -6,7 +6,7 @@ groups="group_mrp_user,group_mrp_manager,base.group_system" sequence="8"/> - + Shipping address : - [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]] - [[ o.partner_shipping_id.title or '' ]] [[ o.partner_shipping_id.name ]] + [[ o.partner_id.title.name or '' ]] [[ o.partner_id.name ]] + [[ o.partner_shipping_id.title.name or '' ]] [[ o.partner_shipping_id.name ]] [[ o.partner_shipping_id.street ]] [[ o.partner_shipping_id.street2 or '' ]] [[ o.partner_shipping_id.zip or '' ]] [[ o.partner_shipping_id.city or '' ]] @@ -145,7 +145,7 @@ Invoice address : - [[ o.partner_invoice_id.title or '' ]] [[ o.partner_invoice_id.name or '' ]] + [[ o.partner_invoice_id.title.name or '' ]] [[ o.partner_invoice_id.name or '' ]] [[ o.partner_invoice_id.street ]] [[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]] [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.state_id and o.partner_invoice_id.state_id.name or '' ]][[ o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '' ]] @@ -156,8 +156,8 @@ - [[ o.partner_id.title or '' ]] [[ o.partner_id.name ]] - [[ o.partner_order_id.title or '' ]] [[ o.partner_order_id.name ]] + [[ o.partner_id.title.name or '' ]] [[ o.partner_id.name ]] + [[ o.partner_order_id.title.name or '' ]] [[ o.partner_order_id.name ]] [[ o.partner_order_id.street ]] [[ o.partner_order_id.street2 or '' ]] [[ o.partner_order_id.zip or '' ]] [[ o.partner_order_id.city or '' ]] From bc92ebcf26a89f234e81899e80b5b8482639451b Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Tue, 18 Jan 2011 15:55:01 +0530 Subject: [PATCH 002/681] [FIX]: solve in procurement groupby "reason" bzr revid: ksa@tinyerp.co.in-20110118102501-xni9nk8x8bm2rlzx --- addons/procurement/procurement_view.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index 9c8ad70fe63..02cfae811eb 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -28,6 +28,7 @@ procurement.order.tree.board procurement.order tree + @@ -246,8 +247,8 @@ From 954b00ab6c8cac5052b9af0cbeb152997190039a Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 20 Jan 2011 15:36:59 +0530 Subject: [PATCH 003/681] [IMP]: Procurement yml bzr revid: ksa@tinyerp.co.in-20110120100659-pnjeuf2105l7768h --- addons/procurement/__openerp__.py | 1 + addons/procurement/test/procurement_test.yml | 60 ++++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 addons/procurement/test/procurement_test.yml diff --git a/addons/procurement/__openerp__.py b/addons/procurement/__openerp__.py index d30128041f3..bc17969efaa 100644 --- a/addons/procurement/__openerp__.py +++ b/addons/procurement/__openerp__.py @@ -46,6 +46,7 @@ 'board_mrp_procurement_view.xml', ], 'demo_xml': ['stock_orderpoint.xml'], + 'test': ['test/procurement_test.yml'], 'installable': True, 'active': False, 'certificate': '00954248826881074509', diff --git a/addons/procurement/test/procurement_test.yml b/addons/procurement/test/procurement_test.yml new file mode 100644 index 00000000000..50cb7276d69 --- /dev/null +++ b/addons/procurement/test/procurement_test.yml @@ -0,0 +1,60 @@ +- + In order to test the Procurement flow,I start by creating a new product 'Apple' +- + !record {model: product.product, id: product_product_apple0}: + categ_id: product.cat1 + name: Apple + procure_method: make_to_stock + seller_ids: + - delay: 1 + name: base.res_partner_asus + min_qty: 1.0 + product_uom: product.product_uom_kgm + supply_method: buy + type: product + uom_id: product.product_uom_kgm + uom_po_id: product.product_uom_kgm + property_stock_inventory: stock.location_inventory + property_stock_procurement: stock.location_procurement + property_stock_production: stock.location_production +- + I define Minimum stock rules for my stockable product "Apple". +- + !record {model: stock.warehouse.orderpoint, id: stock_warehouse_orderpoint_op0}: + company_id: base.main_company + location_id: stock.stock_location_stock + logic: max + name: OP/00002 + product_id: product_product_apple0 + product_max_qty: 10.0 + product_min_qty: 5.0 + product_uom: product.product_uom_kgm + qty_multiple: 1 + warehouse_id: stock.warehouse0 +- + The scheduler runs. +- + !function {model: procurement.order, name: run_scheduler}: + - model: procurement.order + search: "[]" +- + I also check that there are procurement order for Apple or not. +- + !python {model: procurement.order}: | + proc_ids = self.search(cr, uid, [('product_id','in',[ref('product_product_apple0')])]) + assert proc_ids, 'No Procurements.' +- + Apply Request for Procurement clicking on "Procurement Request" From Product. +- + !record {model: make.procurement, id: procurement_order_apple0}: + product_id: product_product_apple0 + qty: 10.0 + date_planned: '2010-04-20' + uom_id: product.product_uom_kgm + warehouse_id: stock.warehouse0 +- + Create procurement order for selected product. +- + !python {model: make.procurement}: | + self.make_procurement(cr, uid, [ref('procurement_order_apple0')], context={'active_id': ref('product_product_apple0')}) + From 7f0ee9e69be351cae5996ff54663d790ad2e2940 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 20 Jan 2011 18:45:02 +0530 Subject: [PATCH 004/681] [FIX]: solve buildbot prolbem for stock bzr revid: ksa@tinyerp.co.in-20110120131502-tb0n02veboma0gg3 --- addons/stock/stock.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index b2fc42c298d..36dac0d0181 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1853,11 +1853,6 @@ class stock_move(osv.osv): """ moves = self.browse(cr, uid, ids, context=context) self.write(cr, uid, ids, {'state': 'confirmed'}) - res_obj = self.pool.get('res.company') - location_obj = self.pool.get('stock.location') - move_obj = self.pool.get('stock.move') - wf_service = netsvc.LocalService("workflow") - self.create_chained_picking(cr, uid, moves, context) return [] From 7418c760b017c35fba25728fabb015bac55b09d8 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Mon, 31 Jan 2011 15:40:31 +0530 Subject: [PATCH 005/681] [FIx]:purchase: Try to select partner address which has no partner on it lp bug: https://launchpad.net/bugs/710516 fixed bzr revid: ksa@tinyerp.co.in-20110131101031-1z1v15pg2f20hmxx --- addons/purchase/purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 2d8eaac1d84..c6cf0470fc1 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -170,7 +170,7 @@ class purchase_order(osv.osv): 'partner_id':fields.many2one('res.partner', 'Supplier', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, change_default=True), 'partner_address_id':fields.many2one('res.partner.address', 'Address', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]},domain="[('partner_id', '=', partner_id)]"), - 'dest_address_id':fields.many2one('res.partner.address', 'Destination Address', + 'dest_address_id':fields.many2one('res.partner.address', 'Destination Address',domain="[('partner_id', '<>', partner_id)]", states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, help="Put an address if you want to deliver directly from the supplier to the customer." \ "In this case, it will remove the warehouse link and set the customer location." From f27ca382ffdef16816a156f24039ed572f6dd733 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Fri, 31 Dec 2010 17:37:39 +0530 Subject: [PATCH 006/681] [IMP]: improve yml for adding month and wrong month problem bzr revid: ksa@tinyerp.co.in-20101231120739-epsnsevk90rhey6a --- addons/membership/test/test_membership.yml | 20 +++- .../test/point_of_sale_report.yml | 5 +- .../point_of_sale/test/point_of_sale_test.yml | 99 ++++++++++--------- .../project_planning/test/planning_states.yml | 53 +++++----- 4 files changed, 98 insertions(+), 79 deletions(-) diff --git a/addons/membership/test/test_membership.yml b/addons/membership/test/test_membership.yml index 195fbd15b01..b58faaa43bb 100644 --- a/addons/membership/test/test_membership.yml +++ b/addons/membership/test/test_membership.yml @@ -6,12 +6,16 @@ !record {model: product.product, id: product_product_membershipproduct0}: categ_id: product.cat1 membership: 1 - membership_date_from: !eval datetime.today().strftime("%Y-%m-%d") - membership_date_to: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month+6,datetime.now().day)" + membership_date_from: !eval time.strftime('%Y-%m-%d') + membership_date_to: !eval time.strftime('%Y-%m-%d') name: Golden Membership type: service list_price: 80.00 - +- + !python {model: product.product}: | + from datetime import datetime + from dateutil.relativedelta import * + self.write(cr, uid, [ref("product_product_membershipproduct0")], {'membership_date_to': datetime.now() + relativedelta(months=3)}) - | "Mark Johnson" want to join "Golden Membership". - | @@ -102,13 +106,19 @@ !record {model: product.product, id: product_product_membershipproduct1}: categ_id: product.cat1 membership: 1 - membership_date_from: !eval datetime.today().strftime("%Y-%m-%d") - membership_date_to: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month+6,datetime.now().day)" + membership_date_from: !eval time.strftime('%Y-%m-%d') + membership_date_to: !eval time.strftime('%Y-%m-%d') name: Silver Membership type: service list_price: 50.00 - | I'm making invoice of "Mark Johnson" member on joining new membership "Silver Membership". +- +- + !python {model: product.product}: | + from datetime import datetime + from dateutil.relativedelta import * + self.write(cr, uid, [ref("product_product_membershipproduct1")], {'membership_date_to': datetime.now() + relativedelta(months=3)}) - !python {model: res.partner}: | self.create_membership_invoice(cr, uid, [ref("res_partner_markjohnson0")], product_id=ref("product_product_membershipproduct1"), datas={"amount":50.00}) diff --git a/addons/point_of_sale/test/point_of_sale_report.yml b/addons/point_of_sale/test/point_of_sale_report.yml index 323d227f7d2..7ab44c8a98f 100644 --- a/addons/point_of_sale/test/point_of_sale_report.yml +++ b/addons/point_of_sale/test/point_of_sale_report.yml @@ -93,7 +93,7 @@ journal_id: account_journal_cash0 line_ids: - name: statement - date: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month+5,datetime.now().day)" + date: !eval time.strftime('%Y-%m-%d') type: customer account_id: account_pos_account_sales amount: 100 @@ -105,9 +105,12 @@ - !python {model: account.bank.statement}: | import netsvc, tools, os, time + from datetime import datetime + from dateutil.relativedelta import * (data, format) = netsvc.LocalService('report.account.statement').create(cr, uid, [ref('point_of_sale.account_bank_statement_st0')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'point_of_sale-account_statement_report'+format), 'wb+').write(data) + self.write(cr, uid, [ref("account_bank_statement_st0")], {'date': datetime.now() + relativedelta(months=3)}) - In order to test the PDF reports defined on a Point Of Sale, we will print a POS User Product Report - diff --git a/addons/point_of_sale/test/point_of_sale_test.yml b/addons/point_of_sale/test/point_of_sale_test.yml index c8ed72e386f..140ac3c0a04 100644 --- a/addons/point_of_sale/test/point_of_sale_test.yml +++ b/addons/point_of_sale/test/point_of_sale_test.yml @@ -271,7 +271,7 @@ categ_id: product_category_computer0 cost_method: standard mes_type: fixed - list_price: 1000.0 + list_price: 1000.0 name: HP Pavilion Desktop PCs procure_method: make_to_stock seller_ids: @@ -290,7 +290,7 @@ !record {model: pos.order, id: pos_order_pos0}: company_id: base.main_company date_order: !eval time.strftime('%Y-%m-%d %H:%M:%S') - date_validity: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month+6,datetime.now().day)" + date_validity: !eval time.strftime('%Y-%m-%d %H:%M:%S') lines: - company_id: base.main_company name: Order Line/01 @@ -305,27 +305,32 @@ sale_journal: account.sales_journal shop_id: sale.shop user_salesman_id: base.user_root -- - I add discount. -- +- + !python {model: pos.order}: | + from datetime import datetime + from dateutil.relativedelta import * + self.write(cr, uid, [ref("pos_order_pos0")], {'date_validity': datetime.now() + relativedelta(months=3)}) +- + I add discount. +- !record {model: pos.discount, id: pos_discount_0}: discount: 5.0 discount_notes: More then 5 product -- - I Apply the discount. -- +- + I Apply the discount. +- !python {model: pos.discount}: | self.apply_discount(cr, uid, [ref("pos_discount_0")], {"lang": "en_US", "active_model": "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"), }) -- +- I open the register. -- +- !record {model: pos.open.statement, id: pos_open_statement_0}: {} -- +- I open the statement. -- +- !python {model: pos.open.statement}: | jou_obj = self.pool.get('account.journal') statement_obj = self.pool.get('account.bank.statement') @@ -339,8 +344,8 @@ "ir.ui.menu", "active_ids": [ref("point_of_sale.menu_open_statement")], "tz": False, "active_id": ref("point_of_sale.menu_open_statement"), }) - - I click on the "Make Payment" wizard. -- + I click on the "Make Payment" wizard. +- !record {model: pos.make.payment, id: pos_make_payment_0}: amount: 1615.0 journal: 7 @@ -349,9 +354,9 @@ product_id: product_product_hppaviliondesktoppcs0 pricelist_id: product.list0 partner_id: base.res_partner_agrolait -- +- I make the payment. -- +- !python {model: pos.make.payment}: | self.check(cr, uid, [ref("pos_make_payment_0")], {"lang": "en_US", "active_model": "pos.order", "active_ids": [ref("point_of_sale.pos_order_pos0")], "tz": @@ -361,48 +366,48 @@ - !python {model: pos.order}: | order=self.browse(cr,uid,ref("pos_order_pos0")) - assert(order.statement_ids!=[]), "Statement lines not created" + assert(order.statement_ids!=[]), "Statement lines not created" - When I click on Return picking button , I get three option. - 1. Cancel 2.Return Goods and Exchange 3.Return without Refund - - When I click on Return Goods and Exchange. -- - Then it allows me to define the quantity of products, which will return to the stock. -- + When I click on Return Goods and Exchange. +- + Then it allows me to define the quantity of products, which will return to the stock. +- I click on Return Picking button. -- +- !record {model: pos.return, id: pos_return_0}: {} -- +- I Return the product. -- +- !python {model: pos.return}: | self.create_returns(cr, uid, [ref("pos_return_0")], {"lang": "en_US", "active_model": "pos.order", "active_ids": [ref("point_of_sale.pos_order_pos0")], "tz": False, "active_id": ref("point_of_sale.pos_order_pos0"), }) -- +- Then it allows me to define the quantity of products, which will return to the stock. - - I select the HP Pavilion Desktop PCs for exchange. -- + I select the HP Pavilion Desktop PCs for exchange. +- !record {model: pos.add.product, id: pos_add_product_0}: product_id: product_product_hppaviliondesktoppcs0 quantity: 5.0 -- +- I click on close button. -- +- !python {model: pos.add.product}: | return_obj = self.pool.get('pos.return') - context['active_ids'] = [ref("pos_order_pos0")] + context['active_ids'] = [ref("pos_order_pos0")] return_obj.view_init(cr, uid, [],context=context) self.close_action(cr, uid, [ref("pos_add_product_0")], {"lang": "en_US", "active_model": "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"), }) -- +- I create payment. -- +- !record {model: pos.make.payment, id: pos_make_payment_1}: amount: 680.0 journal: 7 @@ -411,40 +416,40 @@ product_id: product_product_hppaviliondesktoppcs0 pricelist_id: product.list0 partner_id: base.res_partner_agrolait -- - For payment, I click on Make Payment. -- +- + For payment, I click on Make Payment. +- !python {model: pos.make.payment}: | self.check(cr, uid, [ref("pos_make_payment_1")], {"lang": "en_US", "active_model": "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": - False, "active_id": ref("pos_order_pos0"), }) -- + False, "active_id": ref("pos_order_pos0"), }) +- To check the Return without Refund . I click button "Return without Refund ". -- +- !record {model: pos.return, id: pos_return_0}: {} - The quantity which is selected in Return lines wizard is refunded. -- +- !python {model: pos.return}: | self.create_returns2(cr, uid, [ref("pos_return_0")], {"lang": "en_US", "active_model": "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"), }) -- +- To Close order, I use the wizard "Sale Confirm". -- +- !record {model: pos.confirm, id: pos_confirm_0}: {} -- +- I close this order. -- +- !python {model: pos.confirm}: | self.action_confirm(cr, uid, [ref("pos_confirm_0")], {"lang": "en_US", "active_model": "pos.order", "active_ids": [ref("pos_order_pos0")], "tz": False, "active_id": ref("pos_order_pos0"), }) -- +- I check order state is done. -- +- !python {model: pos.order}: | - order=self.browse(cr,uid,ref("pos_order_pos0")) - assert(order.state=='done'), "Order is not done" + order=self.browse(cr,uid,ref("pos_order_pos0")) + assert(order.state=='done'), "Order is not done" diff --git a/addons/project_planning/test/planning_states.yml b/addons/project_planning/test/planning_states.yml index 5d40a199280..ddc8941c1f9 100644 --- a/addons/project_planning/test/planning_states.yml +++ b/addons/project_planning/test/planning_states.yml @@ -1,33 +1,34 @@ -- +- Create a analytic planning 'Project Planning' -- +- !record {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0}: business_days: 20 date_from: !eval time.strftime('%Y-%m-%d') - date_to: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month+1,datetime.now().day)" + date_to: !eval time.strftime('%Y-%m-%d') name: Project Planning state: draft user_id: base.user_demo - - -- +- Open the planning -- +- !python {model: report_account_analytic.planning}: | + from datetime import datetime + from dateutil.relativedelta import * self.action_open(cr, uid, [ref("report_account_analytic_planning_projectplanning0")], {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")], "tz": False, "active_model": "ir.ui.menu", "section_id": False, "active_id": ref("project_planning.menu_report_account_analytic_planning"), "search_default_user_id": 1, "project_id": False, "department_id": False, }) + self.write(cr, uid, [ref("report_account_analytic_planning_projectplanning0")], {'date_to': datetime.now() + relativedelta(months=3)}) - Check if planning in open state - - !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}: + !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}: - state == "open" -- +- Cancel the planning -- +- !python {model: report_account_analytic.planning}: | self.action_cancel(cr, uid, [ref("report_account_analytic_planning_projectplanning0")], {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")], @@ -37,12 +38,12 @@ - Check if planning in cancel state - - !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in cancel state}: - - state == "cancel" - -- + !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in cancel state}: + - state == "cancel" + +- Reopen the planning -- +- !python {model: report_account_analytic.planning}: | self.action_draft(cr, uid, [ref("report_account_analytic_planning_projectplanning0")], {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")], @@ -52,12 +53,12 @@ - Check if planning in draft state - - !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in draft state}: - - state == "draft" - -- + !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in draft state}: + - state == "draft" + +- Open the planning -- +- !python {model: report_account_analytic.planning}: | self.action_open(cr, uid, [ref("report_account_analytic_planning_projectplanning0")], {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")], @@ -67,12 +68,12 @@ - Check if planning in open state - - !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}: - - state == "open" - -- + !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in open state}: + - state == "open" + +- Close the planning -- +- !python {model: report_account_analytic.planning}: | self.action_done(cr, uid, [ref("report_account_analytic_planning_projectplanning0")], {"lang": "en_US", "active_ids": [ref("project_planning.menu_report_account_analytic_planning")], @@ -82,5 +83,5 @@ - Check if planning in done state - - !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in done state}: + !assert {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0, string: Planning in done state}: - state == "done" \ No newline at end of file From 4bac6d8969d3b9ae2905b566618007c81f13598a Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Thu, 27 Jan 2011 15:19:39 +0530 Subject: [PATCH 007/681] [FIX] all: Fixed incomplete behavior of act_window. lp bug: https://launchpad.net/bugs/708467 fixed bzr revid: uco@tinyerp.com-20110127094939-v8gugx666pakihva --- addons/account/account_invoice_view.xml | 4 ++-- addons/account/account_view.xml | 14 +++++++------- addons/account/partner_view.xml | 2 +- addons/account/project/project_view.xml | 2 +- .../account_analytic_default_view.xml | 8 ++++---- .../account_analytic_plans_view.xml | 4 ++-- addons/account_budget/account_budget_view.xml | 2 +- addons/account_voucher/account_voucher_view.xml | 2 +- addons/auction/auction_view.xml | 6 +++--- addons/base_contact/base_contact_view.xml | 2 +- addons/crm/crm_phonecall_menu.xml | 2 +- addons/crm_claim/crm_claim_view.xml | 2 +- addons/event/event_view.xml | 4 ++-- addons/event_project/event_project_view.xml | 2 +- addons/fetchmail/fetchmail_view.xml | 3 +-- addons/hr_contract/hr_contract_view.xml | 2 +- addons/hr_evaluation/hr_evaluation_view.xml | 2 +- addons/hr_holidays/hr_holidays_view.xml | 2 +- addons/hr_payroll/hr_payroll_view.xml | 1 + .../report/report_analytic_view.xml | 2 +- .../hr_timesheet_sheet/hr_timesheet_sheet_view.xml | 8 ++++---- .../marketing_campaign/marketing_campaign_view.xml | 6 +++--- addons/procurement/procurement_view.xml | 8 +++----- addons/project/project_view.xml | 8 ++++---- addons/project_issue/project_issue_menu.xml | 2 +- addons/project_messages/project_messages_view.xml | 2 +- addons/project_scrum/project_scrum_view.xml | 4 ++-- addons/purchase/purchase_view.xml | 4 ++-- addons/sale/sale_view.xml | 4 ++-- addons/stock/stock_view.xml | 4 ++-- addons/survey/survey_view.xml | 6 +++--- addons/wiki/wiki_view.xml | 4 ++-- 32 files changed, 63 insertions(+), 65 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 6fa3b8c09d2..9cb4314ddeb 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -506,12 +506,12 @@ - + diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 1812e800880..2ef68a6efa8 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1496,7 +1496,7 @@ @@ -1538,7 +1538,7 @@ @@ -1546,7 +1546,7 @@ id="act_account_acount_move_line_open_unreconciled" name="Unreconciled Entries" res_model="account.move.line" - context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1,}" + context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1, 'default_account_id': active_id}" src_model="account.account"/> @@ -1991,20 +1991,20 @@ - + - + Create Account diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index 890e477a726..1bf75b5c347 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -131,7 +131,7 @@ id="action_analytic_open" name="Analytic Accounts" res_model="account.analytic.account" - context="{'search_default_partner_id':[active_id]}" + context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}" src_model="res.partner" view_type="form" view_mode="tree,form,graph,calendar" diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index 46867c8bf23..db079cc74ce 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -445,7 +445,7 @@ diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml index 676949fd420..8282461e512 100644 --- a/addons/account_analytic_plans/account_analytic_plans_view.xml +++ b/addons/account_analytic_plans/account_analytic_plans_view.xml @@ -154,8 +154,8 @@ diff --git a/addons/account_budget/account_budget_view.xml b/addons/account_budget/account_budget_view.xml index 8ddcf5cdc0a..321014ea859 100644 --- a/addons/account_budget/account_budget_view.xml +++ b/addons/account_budget/account_budget_view.xml @@ -250,7 +250,7 @@ diff --git a/addons/account_voucher/account_voucher_view.xml b/addons/account_voucher/account_voucher_view.xml index 745e7ab1078..b1f5f11cc35 100644 --- a/addons/account_voucher/account_voucher_view.xml +++ b/addons/account_voucher/account_voucher_view.xml @@ -189,7 +189,7 @@ diff --git a/addons/auction/auction_view.xml b/addons/auction/auction_view.xml index e55938d2ecd..6e457f06db3 100644 --- a/addons/auction/auction_view.xml +++ b/addons/auction/auction_view.xml @@ -254,7 +254,7 @@ @@ -499,7 +499,7 @@ @@ -769,7 +769,7 @@ diff --git a/addons/base_contact/base_contact_view.xml b/addons/base_contact/base_contact_view.xml index 59894ab55d0..659307e289c 100644 --- a/addons/base_contact/base_contact_view.xml +++ b/addons/base_contact/base_contact_view.xml @@ -410,7 +410,7 @@ diff --git a/addons/crm/crm_phonecall_menu.xml b/addons/crm/crm_phonecall_menu.xml index f223ee16be9..41975d9ced4 100644 --- a/addons/crm/crm_phonecall_menu.xml +++ b/addons/crm/crm_phonecall_menu.xml @@ -8,7 +8,7 @@ res_model="crm.phonecall" src_model="res.partner" view_mode="calendar,tree,form" - context="{'search_default_partner_id': [active_id], 'default_duration': 1.0}" + context="{'search_default_partner_id': [active_id], 'default_duration': 1.0, 'default_partner_id': active_id}" groups="base.group_extended" /> diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml index 696c8ed3a84..ab36a713792 100644 --- a/addons/crm_claim/crm_claim_view.xml +++ b/addons/crm_claim/crm_claim_view.xml @@ -290,7 +290,7 @@ diff --git a/addons/event_project/event_project_view.xml b/addons/event_project/event_project_view.xml index 7793d4fbcf7..35bc1b40b81 100644 --- a/addons/event_project/event_project_view.xml +++ b/addons/event_project/event_project_view.xml @@ -36,7 +36,7 @@ res_model="project.task" src_model="event.event" view_mode="tree,form,calendar,graph" - context="{'search_default_project_id': project_id}" + context="{'search_default_project_id': project_id, 'default_project_id': project_id}" view_type="form"/> diff --git a/addons/fetchmail/fetchmail_view.xml b/addons/fetchmail/fetchmail_view.xml index 7d55f9f5a7a..096a83bfa4e 100644 --- a/addons/fetchmail/fetchmail_view.xml +++ b/addons/fetchmail/fetchmail_view.xml @@ -150,8 +150,7 @@ parent="base.menu_mail_gateway" action="action_view_mail_message_emails" /> diff --git a/addons/hr_contract/hr_contract_view.xml b/addons/hr_contract/hr_contract_view.xml index cae7885a754..67607af8146 100644 --- a/addons/hr_contract/hr_contract_view.xml +++ b/addons/hr_contract/hr_contract_view.xml @@ -271,7 +271,7 @@ diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml index 89b459b8896..ce3936337ff 100644 --- a/addons/marketing_campaign/marketing_campaign_view.xml +++ b/addons/marketing_campaign/marketing_campaign_view.xml @@ -446,12 +446,12 @@ view_type="form" view_mode="tree,form" id="act_marketing_campaing_segment_opened" - context="{'search_default_campaign_id': [active_id]}" + context="{'search_default_campaign_id': [active_id], 'default_campaign_id': active_id}" /> - + - - + + diff --git a/addons/project_issue/project_issue_menu.xml b/addons/project_issue/project_issue_menu.xml index e1341ded00d..18c8779704f 100644 --- a/addons/project_issue/project_issue_menu.xml +++ b/addons/project_issue/project_issue_menu.xml @@ -40,7 +40,7 @@ An in-project messaging system allows for an efficient and trackable communication between project members. The messages are stored in the system and can be used for post analysis. - + diff --git a/addons/project_scrum/project_scrum_view.xml b/addons/project_scrum/project_scrum_view.xml index 32ed240cba6..950cf0f41cf 100644 --- a/addons/project_scrum/project_scrum_view.xml +++ b/addons/project_scrum/project_scrum_view.xml @@ -593,7 +593,7 @@ Date: Fri, 28 Jan 2011 16:28:18 +0530 Subject: [PATCH 008/681] [IMP, ADD] account:Improve the logic to create period so it can create one more period and add two journals for opening entries bzr revid: psi@tinyerp.co.in-20110128105818-ptd5vk4xsaowmnec --- addons/account/account.py | 45 ++++++++++++++++--- addons/account/account_view.xml | 2 + addons/account/configurable_account_chart.xml | 17 +++++++ addons/account/demo/account_minimal.xml | 9 ++++ addons/account/installer.py | 24 ++++++++++ 5 files changed, 90 insertions(+), 7 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 3abbe4cef2e..ada9a12cb4a 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -805,19 +805,28 @@ class account_fiscalyear(osv.osv): (_check_fiscal_year, 'Error! You cannot define overlapping fiscal years',['date_start', 'date_stop']) ] - def create_period3(self,cr, uid, ids, context=None): + def create_period3(self, cr, uid, ids, context=None): return self.create_period(cr, uid, ids, context, 3) - def create_period(self,cr, uid, ids, context=None, interval=1): + def create_period(self, cr, uid, ids, context=None, interval=1): + period_obj = self.pool.get('account.period') for fy in self.browse(cr, uid, ids, context=context): ds = datetime.strptime(fy.date_start, '%Y-%m-%d') - while ds.strftime('%Y-%m-%d')fy.date_stop: + if de.strftime('%Y-%m-%d') > fy.date_stop: de = datetime.strptime(fy.date_stop, '%Y-%m-%d') - self.pool.get('account.period').create(cr, uid, { + period_obj.create(cr, uid, { 'name': ds.strftime('%m/%Y'), 'code': ds.strftime('%m/%Y'), 'date_start': ds.strftime('%Y-%m-%d'), @@ -2449,6 +2458,8 @@ class account_chart_template(osv.osv): 'property_account_expense': fields.many2one('account.account.template','Expense Account on Product Template'), 'property_account_income': fields.many2one('account.account.template','Income Account on Product Template'), 'property_reserve_and_surplus_account': fields.many2one('account.account.template', 'Reserve and Profit/Loss Account', domain=[('type', '=', 'payable')], help='This Account is used for transferring Profit/Loss(If It is Profit: Amount will be added, Loss: Amount will be deducted.), Which is calculated from Profilt & Loss Report'), + 'property_account_income_opening': fields.many2one('account.account.template','Opening Entries Income Account'), + 'property_account_expense_opening': fields.many2one('account.account.template','Opening Entries Expense Account'), } account_chart_template() @@ -2681,6 +2692,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): obj_data = self.pool.get('ir.model.data') analytic_journal_obj = self.pool.get('account.analytic.journal') obj_tax_code = self.pool.get('account.tax.code') + obj_tax_code_template = self.pool.get('account.tax.code.template') # Creating Account obj_acc_root = obj_multi.chart_template_id.account_root_id tax_code_root_id = obj_multi.chart_template_id.tax_code_root_id.id @@ -2693,9 +2705,9 @@ class wizard_multi_charts_accounts(osv.osv_memory): todo_dict = {} #create all the tax code - children_tax_code_template = self.pool.get('account.tax.code.template').search(cr, uid, [('parent_id','child_of',[tax_code_root_id])], order='id') + children_tax_code_template = obj_tax_code_template.search(cr, uid, [('parent_id','child_of',[tax_code_root_id])], order='id') children_tax_code_template.sort() - for tax_code_template in self.pool.get('account.tax.code.template').browse(cr, uid, children_tax_code_template, context=context): + for tax_code_template in obj_tax_code_template.browse(cr, uid, children_tax_code_template, context=context): vals={ 'name': (tax_code_root_id == tax_code_template.id) and obj_multi.company_id.name or tax_code_template.name, 'code': tax_code_template.code, @@ -2806,11 +2818,15 @@ class wizard_multi_charts_accounts(osv.osv_memory): seq_id_purchase_refund = obj_sequence.search(cr, uid, [('name','=','Purchase Refund Journal')]) if seq_id_purchase_refund: seq_id_purchase_refund = seq_id_purchase_refund[0] + seq_id_opening = obj_sequence.search(cr, uid, [('name','=','Opening Entries Journal')]) + if seq_id_opening: + seq_id_opening = seq_id_opening[0] else: seq_id_sale = seq_id seq_id_purchase = seq_id seq_id_sale_refund = seq_id seq_id_purchase_refund = seq_id + seq_id_opening = seq_id vals_journal['view_id'] = view_id @@ -2903,6 +2919,21 @@ class wizard_multi_charts_accounts(osv.osv_memory): # }) obj_journal.create(cr, uid, vals_journal, context=context) + # Opening Entries Journal + if obj_multi.chart_template_id.property_account_income_opening and obj_multi.chart_template_id.property_account_expense_opening: + vals_journal = { + 'view_id': view_id, + 'name': _('Opening Entries Journal'), + 'type': 'situation', + 'code': _('TOEJ'), + 'sequence_id': seq_id_opening, + 'analytic_journal_id': analitical_journal_purchase, + 'company_id': company_id, + 'default_credit_account_id': acc_template_ref[obj_multi.chart_template_id.property_account_income_opening.id], + 'default_debit_account_id': acc_template_ref[obj_multi.chart_template_id.property_account_expense_opening.id] + } + obj_journal.create(cr, uid, vals_journal, context=context) + # Bank Journals data_id = obj_data.search(cr, uid, [('model','=','account.journal.view'), ('name','=','account_journal_bank_view')]) data = obj_data.browse(cr, uid, data_id[0], context=context) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 1812e800880..cafc99b51de 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -2150,6 +2150,8 @@ + + diff --git a/addons/account/configurable_account_chart.xml b/addons/account/configurable_account_chart.xml index dd9c01142c3..4734e030113 100644 --- a/addons/account/configurable_account_chart.xml +++ b/addons/account/configurable_account_chart.xml @@ -191,6 +191,14 @@ + + 1106 + Opening Income Account + + closed + + + 111 Current Liabilities @@ -225,6 +233,13 @@ + + 1114 + Opening Expense Account + + closed + + @@ -431,6 +446,8 @@ + + diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index 65184b3d130..6ae6188ec62 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -421,6 +421,15 @@ + + Miscellaneous Journal - (test) + TMIS + general + + + + + @@ -430,7 +446,18 @@ - + + Opening Entries Journal - (test) + TOEJ + situation + + + + + + + + diff --git a/addons/account/installer.py b/addons/account/installer.py index 4a4d945f72b..65d8d7fa99f 100644 --- a/addons/account/installer.py +++ b/addons/account/installer.py @@ -424,13 +424,21 @@ class account_installer(osv.osv_memory): 'company_id': company_id.id } seq_id_opening = obj_sequence.create(cr, uid, seq_opening_journal, context=context) + seq_miscellaneous_journal = { + 'name': 'Miscellaneous Journal', + 'code': 'account.journal', + 'prefix': 'MISC/%(year)s/', + 'padding': 3, + 'company_id': company_id.id + } + seq_id_miscellaneous = obj_sequence.create(cr, uid, seq_opening_journal, context=context) else: seq_id_sale = seq_id seq_id_purchase = seq_id seq_id_sale_refund = seq_id seq_id_purchase_refund = seq_id seq_id_opening = seq_id - + seq_id_miscellaneous = seq_id vals_journal['view_id'] = view_id #Sales Journal @@ -517,16 +525,31 @@ class account_installer(osv.osv_memory): }) obj_journal.create(cr, uid, vals_journal, context=context) + # Miscellaneous Journal + vals_journal = { + 'view_id': view_id, + 'name': _('Miscellaneous Journal'), + 'type': 'general', + 'refund_journal': True, + 'code': _('MISC'), + 'sequence_id': seq_id_miscellaneous, + 'analytic_journal_id': analitical_journal_purchase, + 'company_id': company_id.id + } + + obj_journal.create(cr, uid, vals_journal, context=context) + # Opening Entries Journal if obj_multi.property_account_income_opening and obj_multi.property_account_expense_opening: vals_journal = { 'view_id': view_id, 'name': _('Opening Entries Journal'), 'type': 'situation', - 'code': _('TOEJ'), + 'code': _('OPEJ'), 'sequence_id': seq_id_opening, 'analytic_journal_id': analitical_journal_purchase, 'company_id': company_id.id, + 'centralisation': True, 'default_credit_account_id': acc_template_ref[obj_multi.property_account_income_opening.id], 'default_debit_account_id': acc_template_ref[obj_multi.property_account_expense_opening.id] } From f76e0fc097531b414fd1d7dd5cf13c6ef29ebfa3 Mon Sep 17 00:00:00 2001 From: "rha@tinyerp.com" <> Date: Tue, 1 Feb 2011 18:57:50 +0530 Subject: [PATCH 011/681] [Fix]: product: Pricelist with base price set to 0 lp bug: https://launchpad.net/bugs/710521 fixed bzr revid: rha@tinyerp.com-20110201132750-lvp43mmvs0kxqwif --- addons/product/pricelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 6899b673c70..9413ceebbe2 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -264,7 +264,7 @@ class product_pricelist(osv.osv): product_obj.price_get(cr, uid, [product_id], price_type.field)[product_id], round=False, context=context) - if price: + if price or price == 0.0: price_limit = price price = price * (1.0+(res['price_discount'] or 0.0)) From 3f96ef97a7406df2b839c1e532234f316fc66086 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 1 Feb 2011 22:08:39 +0100 Subject: [PATCH 012/681] [WIP] all: (work in progress) changing wizards to avoid using read() or at least take proper care of m2o fields This is in preparation of the fix for m2o.get() on osv_memory objects, to make it consistent with the regular read on osv objects. Previously on osv_memory objects it was only returned the id, instead of the pair (id, name) as is appropriate to avoid an additional name_get RPC call after each read. Unfortunately many wizards were using direct read() instead of browse() and relying on the fact that the returned dict contained a bare id value for many2one fields. bzr revid: odo@openerp.com-20110201210839-hwmk60ygksm805c4 --- .../wizard/account_automatic_reconcile.py | 5 ++++- .../account/wizard/account_change_currency.py | 6 +++--- addons/account/wizard/account_chart.py | 14 ++++++------- .../wizard/account_fiscalyear_close.py | 5 ++++- .../wizard/account_fiscalyear_close_state.py | 6 +++--- .../account/wizard/account_invoice_refund.py | 6 +++++- .../wizard/account_move_bank_reconcile.py | 8 ++++---- .../account_move_line_reconcile_select.py | 6 +++--- .../account_move_line_unreconcile_select.py | 6 +++--- addons/account/wizard/account_reconcile.py | 16 +++++++-------- addons/account/wizard/account_tax_chart.py | 18 ++++++++--------- .../wizard/account_crossovered_analytic.py | 4 +++- .../wizard/account_coda_import.py | 20 +++++++++---------- .../wizard/account_followup_print.py | 4 ++-- .../report/special_message_invoice.py | 5 ++++- .../wizard/hr_recruitment_phonecall.py | 10 +++++----- .../wizard/hr_timesheet_invoice_create.py | 18 ++++++++--------- addons/lunch/wizard/lunch_order_confirm.py | 4 ++-- addons/point_of_sale/wizard/pos_payment.py | 3 +++ addons/point_of_sale/wizard/pos_return.py | 4 ++-- addons/product/wizard/product_price.py | 2 ++ .../project/wizard/project_task_delegate.py | 2 ++ addons/project_gtd/wizard/project_gtd_fill.py | 6 +++--- .../wizard/project_compute_phases.py | 10 +++++----- .../wizard/project_compute_tasks.py | 4 ++-- addons/stock/wizard/stock_move.py | 8 ++++---- 26 files changed, 111 insertions(+), 89 deletions(-) diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py index 432a430868c..13fef1fde0d 100644 --- a/addons/account/wizard/account_automatic_reconcile.py +++ b/addons/account/wizard/account_automatic_reconcile.py @@ -144,6 +144,9 @@ class account_automatic_reconcile(osv.osv_memory): if context is None: context = {} form = self.read(cr, uid, ids, [])[0] + for m2o_field in ['journal_id','period_id','writeoff_acc_id']: + if form[m2o_field] and isinstance(form[m2o_field], tuple): + form[m2o_field] = form[m2o_field][0] max_amount = form.get('max_amount', False) and form.get('max_amount') or 0.0 power = form['power'] allow_write_off = form['allow_write_off'] @@ -252,4 +255,4 @@ class account_automatic_reconcile(osv.osv_memory): account_automatic_reconcile() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_change_currency.py b/addons/account/wizard/account_change_currency.py index d915a1cd34b..223ba327343 100644 --- a/addons/account/wizard/account_change_currency.py +++ b/addons/account/wizard/account_change_currency.py @@ -45,8 +45,8 @@ class account_change_currency(osv.osv_memory): obj_currency = self.pool.get('res.currency') if context is None: context = {} - data = self.read(cr, uid, ids)[0] - new_currency = data['currency_id'] + data = self.browse(cr, uid, ids)[0] + new_currency = data.currency_id.id invoice = obj_inv.browse(cr, uid, context['active_id'], context=context) if invoice.currency_id.id == new_currency: @@ -76,4 +76,4 @@ class account_change_currency(osv.osv_memory): account_change_currency() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_chart.py b/addons/account/wizard/account_chart.py index e8f0e432d69..58526b30b0a 100644 --- a/addons/account/wizard/account_chart.py +++ b/addons/account/wizard/account_chart.py @@ -79,17 +79,17 @@ class account_chart(osv.osv_memory): fy_obj = self.pool.get('account.fiscalyear') if context is None: context = {} - data = self.read(cr, uid, ids, [], context=context)[0] + data = self.browse(cr, uid, ids, context=context)[0] result = mod_obj.get_object_reference(cr, uid, 'account', 'action_account_tree') id = result and result[1] or False result = act_obj.read(cr, uid, [id], context=context)[0] result['periods'] = [] - if data['period_from'] and data['period_to']: - result['periods'] = period_obj.build_ctx_periods(cr, uid, data['period_from'], data['period_to']) - result['context'] = str({'fiscalyear': data['fiscalyear'], 'periods': result['periods'], \ - 'state': data['target_move']}) - if data['fiscalyear']: - result['name'] += ':' + fy_obj.read(cr, uid, [data['fiscalyear']], context=context)[0]['code'] + if data.period_from and data.period_to: + result['periods'] = period_obj.build_ctx_periods(cr, uid, data.period_from.id, data.period_to.id) + result['context'] = str({'fiscalyear': data.fiscalyear.id, 'periods': result['periods'], \ + 'state': data.target_move}) + if data.fiscalyear: + result['name'] += ':' + fy_obj.read(cr, uid, [data.fiscalyear.id], context=context)[0]['code'] return result _defaults = { diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py index 6190f792c7f..bd635839afb 100644 --- a/addons/account/wizard/account_fiscalyear_close.py +++ b/addons/account/wizard/account_fiscalyear_close.py @@ -56,7 +56,10 @@ class account_fiscalyear_close(osv.osv_memory): obj_acc_account = self.pool.get('account.account') obj_acc_journal_period = self.pool.get('account.journal.period') - data = self.read(cr, uid, ids, context=context) + data = self.read(cr, uid, ids, context=context) + for m2o_field in ['fy_id','fy2_id','journal_id','period_id']: + if isinstance(data[0][m2o_field], tuple): + data[0][m2o_field] = data[0][m2o_field][0] if context is None: context = {} diff --git a/addons/account/wizard/account_fiscalyear_close_state.py b/addons/account/wizard/account_fiscalyear_close_state.py index abf054746ce..30edce42077 100644 --- a/addons/account/wizard/account_fiscalyear_close_state.py +++ b/addons/account/wizard/account_fiscalyear_close_state.py @@ -40,8 +40,8 @@ class account_fiscalyear_close_state(osv.osv_memory): @param ids: List of Account fiscalyear close state’s IDs """ - for data in self.read(cr, uid, ids, context=context): - fy_id = data['fy_id'] + for data in self.browse(cr, uid, ids, context=context): + fy_id = data.fy_id.id cr.execute('UPDATE account_journal_period ' \ 'SET state = %s ' \ @@ -61,4 +61,4 @@ class account_fiscalyear_close_state(osv.osv_memory): account_fiscalyear_close_state() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index 672e2a28fba..edc2b1d99c9 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -95,6 +95,8 @@ class account_invoice_refund(osv.osv_memory): description = False company = res_users_obj.browse(cr, uid, uid, context=context).company_id journal_id = form.get('journal_id', False) + if isinstance(journal_id, tuple): + journal_id = journal_id[0] for inv in inv_obj.browse(cr, uid, context.get('active_ids'), context=context): if inv.state in ['draft', 'proforma2', 'cancel']: raise osv.except_osv(_('Error !'), _('Can not %s draft/proforma/cancel invoice.') % (mode)) @@ -102,6 +104,8 @@ class account_invoice_refund(osv.osv_memory): raise osv.except_osv(_('Error !'), _('Can not %s invoice which is already reconciled, invoice should be unreconciled first. You can only Refund this invoice') % (mode)) if form['period']: period = form['period'] + if isinstance(period, tuple): + period = period[0] else: period = inv.period_id and inv.period_id.id or False @@ -217,4 +221,4 @@ class account_invoice_refund(osv.osv_memory): account_invoice_refund() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_move_bank_reconcile.py b/addons/account/wizard/account_move_bank_reconcile.py index 9be351ed440..266c6e764b4 100644 --- a/addons/account/wizard/account_move_bank_reconcile.py +++ b/addons/account/wizard/account_move_bank_reconcile.py @@ -41,15 +41,15 @@ class account_move_bank_reconcile(osv.osv_memory): """ if context is None: context = {} - data = self.read(cr, uid, ids, context=context)[0] + data = self.browse(cr, uid, ids, context=context)[0] cr.execute('select default_credit_account_id \ - from account_journal where id=%s', (data['journal_id'],)) + from account_journal where id=%s', (data.journal_id.id,)) account_id = cr.fetchone()[0] if not account_id: raise osv.except_osv(_('Error'), _('You have to define \ the bank account\nin the journal definition for reconciliation.')) return { - 'domain': "[('journal_id','=',%d), ('account_id','=',%d), ('state','<>','draft')]" % (data['journal_id'], account_id), + 'domain': "[('journal_id','=',%d), ('account_id','=',%d), ('state','<>','draft')]" % (data.journal_id.id, account_id), 'name': _('Standard Encoding'), 'view_type': 'form', 'view_mode': 'tree,form', @@ -61,4 +61,4 @@ the bank account\nin the journal definition for reconciliation.')) account_move_bank_reconcile() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_move_line_reconcile_select.py b/addons/account/wizard/account_move_line_reconcile_select.py index 8e57c57884d..d0953bd83ba 100644 --- a/addons/account/wizard/account_move_line_reconcile_select.py +++ b/addons/account/wizard/account_move_line_reconcile_select.py @@ -39,9 +39,9 @@ class account_move_line_reconcile_select(osv.osv_memory): @return: dictionary of Open account move line window for reconcile on given account id """ - data = self.read(cr, uid, ids, context=context)[0] + data = self.browse(cr, uid, ids, context=context)[0] return { - 'domain': "[('account_id','=',%d),('reconcile_id','=',False),('state','<>','draft')]" % data['account_id'], + 'domain': "[('account_id','=',%d),('reconcile_id','=',False),('state','<>','draft')]" % data.account_id.id, 'name': _('Reconciliation'), 'view_type': 'form', 'view_mode': 'tree,form', @@ -52,4 +52,4 @@ class account_move_line_reconcile_select(osv.osv_memory): account_move_line_reconcile_select() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_move_line_unreconcile_select.py b/addons/account/wizard/account_move_line_unreconcile_select.py index ad59493503d..084b93cdaa2 100644 --- a/addons/account/wizard/account_move_line_unreconcile_select.py +++ b/addons/account/wizard/account_move_line_unreconcile_select.py @@ -28,9 +28,9 @@ class account_move_line_unreconcile_select(osv.osv_memory): 'account_id': fields.many2one('account.account','Account',required=True), } def action_open_window(self, cr, uid, ids, context=None): - data = self.read(cr, uid, ids, context=context)[0] + data = self.browse(cr, uid, ids, context=context)[0] return { - 'domain': "[('account_id','=',%d),('reconcile_id','<>',False),('state','<>','draft')]" % data['account_id'], + 'domain': "[('account_id','=',%d),('reconcile_id','<>',False),('state','<>','draft')]" % data.account_id.id, 'name': 'Unreconciliation', 'view_type': 'form', 'view_mode': 'tree,form', @@ -41,4 +41,4 @@ class account_move_line_unreconcile_select(osv.osv_memory): account_move_line_unreconcile_select() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py index 8131f6a9668..07da76733e4 100644 --- a/addons/account/wizard/account_reconcile.py +++ b/addons/account/wizard/account_reconcile.py @@ -152,13 +152,13 @@ class account_move_line_reconcile_writeoff(osv.osv_memory): period_obj = self.pool.get('account.period') if context is None: context = {} - data = self.read(cr, uid, ids,context=context)[0] - account_id = data['writeoff_acc_id'] - context['date_p'] = data['date_p'] - journal_id = data['journal_id'] - context['comment'] = data['comment'] - if data['analytic_id']: - context['analytic_id'] = data['analytic_id'] + data = self.browse(cr, uid, ids,context=context)[0] + account_id = data.writeoff_acc_id.id + context['date_p'] = data.date_p + journal_id = data.journal_id.id + context['comment'] = data.comment + if data.analytic_id: + context['analytic_id'] = data.analytic_id.id if context['date_p']: date = context['date_p'] @@ -173,4 +173,4 @@ class account_move_line_reconcile_writeoff(osv.osv_memory): account_move_line_reconcile_writeoff() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_tax_chart.py b/addons/account/wizard/account_tax_chart.py index 9e02931f34d..fd9b887ee2b 100644 --- a/addons/account/wizard/account_tax_chart.py +++ b/addons/account/wizard/account_tax_chart.py @@ -54,20 +54,20 @@ class account_tax_chart(osv.osv_memory): period_obj = self.pool.get('account.period') if context is None: context = {} - data = self.read(cr, uid, ids, [], context=context)[0] + data = self.browse(cr, uid, ids, context=context)[0] result = mod_obj.get_object_reference(cr, uid, 'account', 'action_tax_code_tree') id = result and result[1] or False result = act_obj.read(cr, uid, [id], context=context)[0] - if data['period_id']: - fiscalyear_id = period_obj.read(cr, uid, [data['period_id']], context=context)[0]['fiscalyear_id'][0] - result['context'] = str({'period_id': data['period_id'], \ + if data.period_id: + fiscalyear_id = period_obj.read(cr, uid, [data.period_id.id], context=context)[0]['fiscalyear_id'][0] + result['context'] = str({'period_id': data.period_id.id, \ 'fiscalyear_id': fiscalyear_id, \ - 'state': data['target_move']}) + 'state': data.target_move}) else: - result['context'] = str({'state': data['target_move']}) + result['context'] = str({'state': data.target_move}) - if data['period_id']: - period_code = period_obj.read(cr, uid, [data['period_id']], context=context)[0]['code'] + if data.period_id: + period_code = period_obj.read(cr, uid, [data.period_id.id], context=context)[0]['code'] result['name'] += period_code and (':' + period_code) or '' return result @@ -78,4 +78,4 @@ class account_tax_chart(osv.osv_memory): account_tax_chart() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py index 4eaca49e2ca..2974c160501 100644 --- a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py +++ b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py @@ -45,6 +45,8 @@ class account_crossovered_analytic(osv.osv_memory): acc_ids = [x[0] for x in res] data = self.read(cr, uid, ids, [], context=context)[0] + if isinstance(data['ref'],tuple): + data['ref'] = data['ref'][0] obj_acc = self.pool.get('account.analytic.account').browse(cr, uid, data['ref'], context=context) name = obj_acc.name @@ -72,4 +74,4 @@ class account_crossovered_analytic(osv.osv_memory): account_crossovered_analytic() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_coda/wizard/account_coda_import.py b/addons/account_coda/wizard/account_coda_import.py index 6d3743116db..309a647ef47 100644 --- a/addons/account_coda/wizard/account_coda_import.py +++ b/addons/account_coda/wizard/account_coda_import.py @@ -69,14 +69,14 @@ class account_coda_import(osv.osv_memory): if context is None: context = {} - data = self.read(cr, uid, ids)[0] + data = self.browse(cr, uid, ids)[0] - codafile = data['coda'] - journal_code = journal_obj.browse(cr, uid, data['journal_id'], context=context).code + codafile = data.coda + journal_code = journal_obj.browse(cr, uid, data.journal_id.id, context=context).code period = account_period_obj.find(cr, uid, context=context)[0] - def_pay_acc = data['def_payable'] - def_rec_acc = data['def_receivable'] + def_pay_acc = data.def_payable.id + def_rec_acc = data.def_receivable.id err_log = "Errors:\n------\n" nb_err=0 @@ -96,7 +96,7 @@ class account_coda_import(osv.osv_memory): bank_statement["bank_statement_line"]={} bank_statement_lines = {} bank_statement['date'] = str2date(line[5:11]) - bank_statement['journal_id']=data['journal_id'] + bank_statement['journal_id']=data.journal_id.id period_id = account_period_obj.search(cr, uid, [('date_start', '<=', time.strftime('%Y-%m-%d', time.strptime(bank_statement['date'], "%y/%m/%d"))), ('date_stop', '>=', time.strftime('%Y-%m-%d', time.strptime(bank_statement['date'], "%y/%m/%d")))]) bank_statement['period_id'] = period_id and period_id[0] or False bank_statement['state']='draft' @@ -144,7 +144,7 @@ class account_coda_import(osv.osv_memory): bank_statement["bank_statement_line"]=bank_statement_lines elif line[1] == '2': st_line_name = line[2:6] - bank_statement_lines[st_line_name].update({'account_id': data['awaiting_account']}) + bank_statement_lines[st_line_name].update({'account_id': data.awaiting_account.id}) elif line[1] == '3': # movement data record 3.1 @@ -165,7 +165,7 @@ class account_coda_import(osv.osv_memory): else: nb_err += 1 err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number, contry_name) - bank_statement_lines[st_line_name].update({'account_id': data['awaiting_account']}) + bank_statement_lines[st_line_name].update({'account_id': data.awaiting_account.id}) bank_statement["bank_statement_line"]=bank_statement_lines elif line[0]=='3': @@ -296,7 +296,7 @@ class account_coda_import(osv.osv_memory): 'name': codafile, 'statement_ids': [(6, 0, bkst_list,)], 'note': str_log1+str_not+std_log+err_log, - 'journal_id': data['journal_id'], + 'journal_id': data.journal_id.id, 'date': time.strftime("%Y-%m-%d"), 'user_id': uid, }) @@ -336,4 +336,4 @@ class account_coda_import(osv.osv_memory): account_coda_import() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py index 5d9c2da860f..e8f5e976389 100644 --- a/addons/account_followup/wizard/account_followup_print.py +++ b/addons/account_followup/wizard/account_followup_print.py @@ -48,10 +48,10 @@ class account_followup_print(osv.osv_memory): if context is None: context = {} - data = self.read(cr, uid, ids, [], context=context)[0] + data = self.browse(cr, uid, ids, context=context)[0] model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all')], context=context) resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] - context.update({'followup_id': data['followup_id'], 'date':data['date']}) + context.update({'followup_id': data.followup_id.id, 'date':data.date}) return { 'name': _('Select Partners'), 'view_type': 'form', diff --git a/addons/account_invoice_layout/report/special_message_invoice.py b/addons/account_invoice_layout/report/special_message_invoice.py index bac4a467ae1..81298bb6a06 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.py +++ b/addons/account_invoice_layout/report/special_message_invoice.py @@ -37,7 +37,10 @@ class account_invoice_with_message(report_sxw.rml_parse): self.context = context def spcl_msg(self, form): - account_msg_data = pooler.get_pool(self.cr.dbname).get('notify.message').browse(self.cr, self.uid, form['message']) + msg_id = form['message'] + if isinstance(msg_id, (tuple,list)): + msg_id = msg_id[0] + account_msg_data = pooler.get_pool(self.cr.dbname).get('notify.message').browse(self.cr, self.uid, msg_id) msg = account_msg_data.msg return msg diff --git a/addons/hr_recruitment/wizard/hr_recruitment_phonecall.py b/addons/hr_recruitment/wizard/hr_recruitment_phonecall.py index ecb6a7cb3a4..becef387151 100644 --- a/addons/hr_recruitment/wizard/hr_recruitment_phonecall.py +++ b/addons/hr_recruitment/wizard/hr_recruitment_phonecall.py @@ -69,7 +69,7 @@ class job2phonecall(osv.osv_memory): phonecall_case_obj = self.pool.get('crm.phonecall') if context is None: context = {} - form = self.read(cr, uid, ids, [], context=context)[0] + form = self.browse(cr, uid, ids, context=context)[0] result = mod_obj._get_id(cr, uid, 'crm', 'view_crm_case_phonecalls_filter') res = mod_obj.read(cr, uid, result, ['res_id'], context=context) # Select the view @@ -85,10 +85,10 @@ class job2phonecall(osv.osv_memory): #TODO: Take other info from job new_phonecall_id = phonecall_case_obj.create(cr, uid, { 'name': job.name, - 'user_id': form['user_id'], - 'categ_id': form['category_id'], - 'description': form['note'], - 'date': form['deadline'], + 'user_id': form.user_id.id, + 'categ_id': form.category_id.id, + 'description': form.note, + 'date': form.deadline, 'description': job.description, 'partner_id': job.partner_id.id, 'partner_address_id': job.partner_address_id.id, diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py index f3f720687cf..b2c0b814375 100644 --- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py +++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py @@ -63,13 +63,13 @@ class hr_timesheet_invoice_create(osv.osv_memory): if context is None: context = {} result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter') - data = self.read(cr, uid, ids, [], context=context)[0] + data = self.browse(cr, uid, ids, context=context)[0] account_ids = {} for line in self.pool.get('account.analytic.line').browse(cr, uid, context['active_ids'], context=context): account_ids[line.account_id.id] = True - account_ids = account_ids.keys() #data['accounts'] + account_ids = account_ids.keys() #data.accounts for account in analytic_account_obj.browse(cr, uid, account_ids, context=context): partner = account.partner_id if (not partner) or not (account.pricelist_id): @@ -121,17 +121,17 @@ class hr_timesheet_invoice_create(osv.osv_memory): factor_name = '' factor = invoice_factor_obj.browse(cr, uid, factor_id, context2) - if not data['product']: + if not data.product: if factor.customer_name: factor_name = product.name+' - '+factor.customer_name else: factor_name = product.name else: - factor_name = product_obj.name_get(cr, uid, [data['product']], context=context)[0][1] + factor_name = product_obj.name_get(cr, uid, [data.product.id], context=context)[0][1] if account.pricelist_id: pl = account.pricelist_id.id - price = pro_price_obj.price_get(cr,uid,[pl], data['product'] or product_id, qty or 1.0, account.partner_id.id)[pl] + price = pro_price_obj.price_get(cr,uid,[pl], data.product.id or product_id, qty or 1.0, account.partner_id.id)[pl] else: price = 0.0 @@ -145,7 +145,7 @@ class hr_timesheet_invoice_create(osv.osv_memory): 'invoice_line_tax_id': [(6,0,tax )], 'invoice_id': last_invoice, 'name': factor_name, - 'product_id': data['product'] or product_id, + 'product_id': data.product.id or product_id, 'invoice_line_tax_id': [(6,0,tax)], 'uos_id': product.uom_id.id, 'account_id': account_id, @@ -162,14 +162,14 @@ class hr_timesheet_invoice_create(osv.osv_memory): for line in line_ids: # set invoice_line_note details = [] - if data['date']: + if data.date: details.append(line['date']) - if data['time']: + if data.time: if line['product_uom_id']: details.append("%s %s" % (line['unit_amount'], product_uom_obj.browse(cr, uid, [line['product_uom_id']],context2)[0].name)) else: details.append("%s" % (line['unit_amount'], )) - if data['name']: + if data.name: details.append(line['name']) note.append(u' - '.join(map(lambda x: unicode(x) or '',details))) diff --git a/addons/lunch/wizard/lunch_order_confirm.py b/addons/lunch/wizard/lunch_order_confirm.py index 6014f14f510..3dee0c3fd0d 100644 --- a/addons/lunch/wizard/lunch_order_confirm.py +++ b/addons/lunch/wizard/lunch_order_confirm.py @@ -46,8 +46,8 @@ class lunch_order_confirm(osv.osv_memory): data = context and context.get('active_ids', []) or [] order_ref = self.pool.get('lunch.order') - for confirm_obj in self.read(cr, uid, ids): - order_ref.confirm(cr, uid, data, confirm_obj['confirm_cashbox'], context) + for confirm_obj in self.browse(cr, uid, ids): + order_ref.confirm(cr, uid, data, confirm_obj.confirm_cashbox.id, context) return {'type': 'ir.actions.act_window_close'} lunch_order_confirm() diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py index 8d8a6f8465a..6f9c2126a6d 100644 --- a/addons/point_of_sale/wizard/pos_payment.py +++ b/addons/point_of_sale/wizard/pos_payment.py @@ -148,6 +148,9 @@ class pos_make_payment(osv.osv_memory): order = order_obj.browse(cr, uid, active_id, context=context) amount = order.amount_total - order.amount_paid data = self.read(cr, uid, ids, context=context)[0] + for m2o_field in ['product_id','pricelist_id','partner_id']: + if data[m2o_field] and isinstance(data[m2o_field], (list,tuple)): + data[m2o_field] = data[m2o_field][0] if data['is_acc']: amount = self.pool.get('product.product').browse(cr, uid, data['product_id'], context=context).list_price diff --git a/addons/point_of_sale/wizard/pos_return.py b/addons/point_of_sale/wizard/pos_return.py index 810ef86ec7b..5db14e31358 100644 --- a/addons/point_of_sale/wizard/pos_return.py +++ b/addons/point_of_sale/wizard/pos_return.py @@ -353,8 +353,8 @@ class add_product(osv.osv_memory): data = return_boj.read(cr,uid,return_id,[])[0] wf_service = netsvc.LocalService("workflow") - self_data = self.read(cr, uid, ids)[0] - order_obj.add_product(cr, uid, active_ids[0], self_data['product_id'], self_data['quantity'], context=context) + self_data = self.browse(cr, uid, ids)[0] + order_obj.add_product(cr, uid, active_ids[0], self_data.product_id.id, self_data.quantity, context=context) for order_id in order_obj.browse(cr, uid, active_ids, context=context): prop_ids =property_obj.search(cr, uid, [('name', '=', 'property_stock_customer')]) diff --git a/addons/product/wizard/product_price.py b/addons/product/wizard/product_price.py index 5a5327a3f6d..c797efae937 100644 --- a/addons/product/wizard/product_price.py +++ b/addons/product/wizard/product_price.py @@ -53,6 +53,8 @@ class product_price_list(osv.osv_memory): datas = {'ids': context.get('active_ids', [])} res = self.read(cr, uid, ids, ['price_list','qty1', 'qty2','qty3','qty4','qty5'], context=context) res = res and res[0] or {} + if isinstance(res['price_list'], (tuple,list)): + res['price_list'] = res['price_list'][0] datas['form'] = res return { 'type': 'ir.actions.report.xml', diff --git a/addons/project/wizard/project_task_delegate.py b/addons/project/wizard/project_task_delegate.py index 72b32f7db68..16c3ec85653 100644 --- a/addons/project/wizard/project_task_delegate.py +++ b/addons/project/wizard/project_task_delegate.py @@ -105,6 +105,8 @@ class project_task_delegate(osv.osv_memory): task_id = context.get('active_id', False) task_pool = self.pool.get('project.task') delegate_data = self.read(cr, uid, ids, context=context)[0] + if isinstance(delegate_data['user_id'], tuple): + delegate_data['user_id'] = delegate_data['user_id'][0] delegate_data['name'] = tools.ustr(delegate_data['name']) task_pool.do_delegate(cr, uid, task_id, delegate_data, context=context) return {} diff --git a/addons/project_gtd/wizard/project_gtd_fill.py b/addons/project_gtd/wizard/project_gtd_fill.py index 7a36b3e6ead..8c607cd12f3 100644 --- a/addons/project_gtd/wizard/project_gtd_fill.py +++ b/addons/project_gtd/wizard/project_gtd_fill.py @@ -50,10 +50,10 @@ class project_timebox_fill(osv.osv_memory): def process(self, cr, uid, ids, context=None): if not ids: return {} - data = self.read(cr, uid, ids, [], context=context) - if not data[0]['task_ids']: + data = self.browse(cr, uid, ids, context=context) + if not data[0].task_ids: return {} - self.pool.get('project.task').write(cr, uid, data[0]['task_ids'], {'timebox_id':data[0]['timebox_to_id']}) + self.pool.get('project.task').write(cr, uid, [x.id for x in data[0].task_ids], {'timebox_id':data[0].timebox_to_id.id}) return {'type': 'ir.actions.act_window_close'} project_timebox_fill() diff --git a/addons/project_long_term/wizard/project_compute_phases.py b/addons/project_long_term/wizard/project_compute_phases.py index c07f1ae81be..b074f3c93e9 100644 --- a/addons/project_long_term/wizard/project_compute_phases.py +++ b/addons/project_long_term/wizard/project_compute_phases.py @@ -45,12 +45,12 @@ class project_compute_phases(osv.osv_memory): Compute the phases for scheduling. """ project_pool = self.pool.get('project.project') - data = self.read(cr, uid, ids, [], context=context)[0] - if not data['project_id'] and data['target_project'] == 'one': + data = self.browse(cr, uid, ids, context=context)[0] + if not data.project_id and data.target_project == 'one': raise osv.except_osv(_('Error!'), _('Please Specify Project to be schedule')) - if data['project_id']: # If project mentioned find its phases - project_ids = [data['project_id']] + if data.project_id: # If project mentioned find its phases + project_ids = [data.project_id.id] else: # Else take all the draft,open,pending states phases project_ids = project_pool.search(cr, uid, [], context=context) @@ -69,7 +69,7 @@ class project_compute_phases(osv.osv_memory): id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id'] result = act_obj.read(cr, uid, [id], context=context)[0] result['target'] = 'current' - result['context'] = {"search_default_project_id":data['project_id'], "default_project_id":data['project_id'], "search_default_responsible_id":uid, "search_default_current": 1} + result['context'] = {"search_default_project_id":data.project_id.id or False, "default_project_id":data.project_id.id or False, "search_default_responsible_id":uid, "search_default_current": 1} return result project_compute_phases() diff --git a/addons/project_long_term/wizard/project_compute_tasks.py b/addons/project_long_term/wizard/project_compute_tasks.py index 658350a27d2..d5cc4eb5991 100644 --- a/addons/project_long_term/wizard/project_compute_tasks.py +++ b/addons/project_long_term/wizard/project_compute_tasks.py @@ -37,8 +37,8 @@ class project_compute_tasks(osv.osv_memory): if context is None: context = {} context['compute_by'] = 'project' - data = self.read(cr, uid, ids, [])[0] - project_id = data['project_id'] + data = self.browse(cr, uid, ids)[0] + project_id = data.project_id.id project_pool.schedule_tasks(cr, uid, [project_id], context=context) return self._open_task_list(cr, uid, data, context=context) diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py index 8cfdc648349..d0bbc73863d 100644 --- a/addons/stock/wizard/stock_move.py +++ b/addons/stock/wizard/stock_move.py @@ -98,9 +98,9 @@ class stock_move_consume(osv.osv_memory): context = {} move_obj = self.pool.get('stock.move') move_ids = context['active_ids'] - for data in self.read(cr, uid, ids): + for data in self.browse(cr, uid, ids): move_obj.action_consume(cr, uid, move_ids, - data['product_qty'], data['location_id'], + data.product_qty, data.location_id.id, context=context) return {'type': 'ir.actions.act_window_close'} @@ -159,9 +159,9 @@ class stock_move_scrap(osv.osv_memory): context = {} move_obj = self.pool.get('stock.move') move_ids = context['active_ids'] - for data in self.read(cr, uid, ids): + for data in self.browse(cr, uid, ids): move_obj.action_scrap(cr, uid, move_ids, - data['product_qty'], data['location_id'], + data.product_qty, data.location_id.id, context=context) return {'type': 'ir.actions.act_window_close'} From e2afe7b13aae0281eeaf4464ba04cf6233b6116a Mon Sep 17 00:00:00 2001 From: mtr Date: Wed, 2 Feb 2011 10:50:09 +0530 Subject: [PATCH 013/681] [IMP] l10n_de,l10n_ec,l10n_gr: correct property account in account.chart.template bzr revid: mtr@mtr-20110202052009-3b1xknulownwwild --- addons/l10n_de/account_chart_template_skr04.xml | 4 ++-- addons/l10n_ec/account_chart.xml | 4 ++-- addons/l10n_gr/account_tax.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/l10n_de/account_chart_template_skr04.xml b/addons/l10n_de/account_chart_template_skr04.xml index cd7f5ca724b..c33c0d415eb 100644 --- a/addons/l10n_de/account_chart_template_skr04.xml +++ b/addons/l10n_de/account_chart_template_skr04.xml @@ -8,8 +8,8 @@ - - + + diff --git a/addons/l10n_ec/account_chart.xml b/addons/l10n_ec/account_chart.xml index b4ab542dc81..3b3be8bc2c0 100644 --- a/addons/l10n_ec/account_chart.xml +++ b/addons/l10n_ec/account_chart.xml @@ -4201,8 +4201,8 @@ - - + + diff --git a/addons/l10n_gr/account_tax.xml b/addons/l10n_gr/account_tax.xml index bd9ca16bfdd..92a2188a8cb 100644 --- a/addons/l10n_gr/account_tax.xml +++ b/addons/l10n_gr/account_tax.xml @@ -19,7 +19,7 @@ - + From e0b487ad771c44f9b642aa2ba44422b35b080f5f Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 2 Feb 2011 12:53:34 +0530 Subject: [PATCH 014/681] [REVERT] l10n_gr: revert changes for property bzr revid: mra@mra-laptop-20110202072334-givoepuyttwnk5tp --- addons/l10n_gr/account_tax.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_gr/account_tax.xml b/addons/l10n_gr/account_tax.xml index 92a2188a8cb..c3de033869b 100644 --- a/addons/l10n_gr/account_tax.xml +++ b/addons/l10n_gr/account_tax.xml @@ -3,7 +3,7 @@ - + @@ -19,7 +19,7 @@ - + From b3b7a113af5319f2b3c8bbd3af5cea1361c358e3 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 2 Feb 2011 10:15:46 +0100 Subject: [PATCH 015/681] [FIX] many2one: return (id,name) instead of only id also for osv_memory By doing this small change we save clients the trouble of explicitly having to call name_get() for each m2o field in osv_memory objects, which they cannot trivially batch and represents a large dealy for wizards with possibly large numbers of child o2m records. An example is the linked bug, where partial picking of several hundred move lines would lead to as many separate name_get RPC calls, causing a noticeable delay. lp bug: https://launchpad.net/bugs/709567 fixed bzr revid: odo@openerp.com-20110202091546-rdsxn7wuby040m3r --- bin/osv/fields.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bin/osv/fields.py b/bin/osv/fields.py index 72df0e925ad..b7874cda8e6 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -339,6 +339,20 @@ class many2one(_column): result = {} for id in ids: result[id] = obj.datas[id].get(name, False) + + # build a dictionary of the form {'id_of_distant_resource': name_of_distant_resource} + # we use uid=1 because the visibility of a many2one field value (just id and name) + # must be the access right of the parent form and not the linked object itself. + obj = obj.pool.get(self._obj) + records = dict(obj.name_get(cr, 1, + list(set([x for x in result.values() if x and isinstance(x, (int,long))])), + context=context)) + for id in ids: + if result[id] in records: + result[id] = (result[id], records[result[id]]) + else: + result[id] = False + return result def get(self, cr, obj, ids, name, user=None, context=None, values=None): From 2caa4c37b357130f6592d2c233613eab6c0a3d36 Mon Sep 17 00:00:00 2001 From: mtr Date: Wed, 2 Feb 2011 15:24:46 +0530 Subject: [PATCH 016/681] [IMP] l10n_lu,l10n_cr: correct property account in account.chart.template bzr revid: mtr@mtr-20110202095446-170cxzgzkm6eijqp --- addons/l10n_cr/data/account_chart_template.xml | 8 ++++---- addons/l10n_lu/l10n_lu_data.xml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/l10n_cr/data/account_chart_template.xml b/addons/l10n_cr/data/account_chart_template.xml index bdf09c3dab1..e84ea73fbed 100644 --- a/addons/l10n_cr/data/account_chart_template.xml +++ b/addons/l10n_cr/data/account_chart_template.xml @@ -14,8 +14,8 @@ - - + + Costa Rica - Company 1 @@ -26,8 +26,8 @@ - - + + diff --git a/addons/l10n_lu/l10n_lu_data.xml b/addons/l10n_lu/l10n_lu_data.xml index 940da2177e5..775fc72f02e 100644 --- a/addons/l10n_lu/l10n_lu_data.xml +++ b/addons/l10n_lu/l10n_lu_data.xml @@ -3783,9 +3783,9 @@ - + - + From 36c8648d41237db0f41eec61bc2337d52cff6ef8 Mon Sep 17 00:00:00 2001 From: mtr Date: Wed, 2 Feb 2011 16:10:49 +0530 Subject: [PATCH 017/681] [IMP] hr_attendance:removed print statement bzr revid: mtr@mtr-20110202104049-4g37pfocg7b4wwl8 --- addons/hr_attendance/report/attendance_by_month.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/hr_attendance/report/attendance_by_month.py b/addons/hr_attendance/report/attendance_by_month.py index c70ca8a90df..ced701ac661 100644 --- a/addons/hr_attendance/report/attendance_by_month.py +++ b/addons/hr_attendance/report/attendance_by_month.py @@ -83,9 +83,7 @@ class report_custom(report_rml): # sum up the attendances' durations ldt = None for att in attendences: - print"--att---",att dt = datetime.strptime(att['name'], '%Y-%m-%d %H:%M:%S') - print"--dt---",dt if ldt and att['action'] == 'sign_out': wh += (dt - ldt).seconds/60/60 else: From fe01aaef74566bdc377566e6f96d62ee336a51fa Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 2 Feb 2011 17:17:28 +0530 Subject: [PATCH 018/681] [REF] account bzr revid: mra@mra-laptop-20110202114728-3ifqa2gfy6ubka9g --- addons/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index 8a2cbdb8451..ca46696ad01 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1911,7 +1911,7 @@ class account_tax(osv.osv): totalex -= r.get('amount', 0.0) totlex_qty = 0.0 try: - totlex_qty=totalex/quantity + totlex_qty = totalex/quantity except: pass tex = self._compute(cr, uid, tex, totlex_qty, quantity, address_id=address_id, product=product, partner=partner) From 31552ce80de93043b63241a79385da14074a8705 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 2 Feb 2011 17:24:39 +0530 Subject: [PATCH 019/681] [REF] account bzr revid: mra@mra-laptop-20110202115439-e98y2mjze50g5luw --- addons/account/account.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index ca46696ad01..d51f6f8cdfd 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -334,7 +334,7 @@ class account_account(osv.osv): return result def _get_level(self, cr, uid, ids, field_name, arg, context=None): - res={} + res = {} accounts = self.browse(cr, uid, ids, context=context) for account in accounts: level = 0 @@ -475,7 +475,7 @@ class account_account(osv.osv): for record in reads: name = record['name'] if record['code']: - name = record['code'] + ' '+name + name = record['code'] + ' ' + name res.append((record['id'], name)) return res @@ -743,9 +743,7 @@ class account_journal(osv.osv): } res = {} - view_id = type_map.get(type, 'account_journal_view') - user = user_pool.browse(cr, uid, uid) if type in ('cash', 'bank') and currency and user.company_id.currency_id.id != currency: view_id = 'account_journal_bank_view_multi' @@ -756,7 +754,6 @@ class account_journal(osv.osv): 'centralisation':type == 'situation', 'view_id':data.res_id, }) - return { 'value':res } @@ -3052,4 +3049,4 @@ class account_bank_accounts_wizard(osv.osv_memory): account_bank_accounts_wizard() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file From a54b002a98dc50c0c5f6036606f4cb6235055583 Mon Sep 17 00:00:00 2001 From: "rha@tinyerp.com" <> Date: Wed, 2 Feb 2011 17:47:37 +0530 Subject: [PATCH 020/681] [Fix]: stock: cancelling move availability doesn't change packing lp bug: https://launchpad.net/bugs/707031 fixed bzr revid: rha@tinyerp.com-20110202121737-y0mqh83pnetbwv9f --- addons/stock/stock.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index c942818a3d4..f0d6ca83b32 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1886,6 +1886,14 @@ class stock_move(osv.osv): @return: True """ self.write(cr, uid, ids, {'state': 'confirmed'}) + + # fix for bug lp:707031 + # called write of related picking because changing move availability does + # not trigger workflow of picking in order to change the state of picking + wf_service = netsvc.LocalService('workflow') + for move in self.browse(cr, uid, ids, context): + if move.picking_id: + wf_service.trg_write(uid, 'stock.picking', move.picking_id.id, cr) return True # From e38be2c715539e56faeaf5714e2c075c7c046e73 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 2 Feb 2011 18:54:37 +0530 Subject: [PATCH 021/681] [FIX]project_mrp :Task summary is not interpretable when Tasks are created from Manufacturing Order lp bug: https://launchpad.net/bugs/711236 fixed bzr revid: ron@tinyerp.com-20110202132437-zeetkjbnoqsb896g --- addons/project_mrp/project_procurement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project_mrp/project_procurement.py b/addons/project_mrp/project_procurement.py index 7e7978eda59..0a7fa12ce6f 100644 --- a/addons/project_mrp/project_procurement.py +++ b/addons/project_mrp/project_procurement.py @@ -37,7 +37,7 @@ class procurement_order(osv.osv): self.write(cr, uid, [procurement.id], {'state': 'running'}) planned_hours = procurement.product_qty task_id = self.pool.get('project.task').create(cr, uid, { - 'name': '%s:%s' % (procurement.origin or '', procurement.name), + 'name': '%s:%s' % (procurement.origin or '', procurement.product_id.name), 'date_deadline': procurement.date_planned, 'planned_hours':planned_hours, 'remaining_hours': planned_hours, From 5e988a705726627dd868b963b06b76df64bf5736 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 3 Feb 2011 10:58:27 +0530 Subject: [PATCH 022/681] [FIX] account_analytic_analysis: last_invoice_date field does not include manual invoices => changed the help string lp bug: https://launchpad.net/bugs/711737 fixed bzr revid: mra@mra-laptop-20110203052827-pcd1qdpdwoipuiep --- addons/account_analytic_analysis/account_analytic_analysis.py | 2 +- .../i18n/account_analytic_analysis.pot | 2 +- addons/account_analytic_analysis/i18n/ar.po | 2 +- addons/account_analytic_analysis/i18n/bg.po | 4 ++-- addons/account_analytic_analysis/i18n/bs.po | 4 ++-- addons/account_analytic_analysis/i18n/ca.po | 4 ++-- addons/account_analytic_analysis/i18n/cs.po | 2 +- addons/account_analytic_analysis/i18n/da.po | 2 +- addons/account_analytic_analysis/i18n/de.po | 4 ++-- addons/account_analytic_analysis/i18n/el.po | 2 +- addons/account_analytic_analysis/i18n/es.po | 4 ++-- addons/account_analytic_analysis/i18n/es_AR.po | 4 ++-- addons/account_analytic_analysis/i18n/es_EC.po | 4 ++-- addons/account_analytic_analysis/i18n/et.po | 4 ++-- addons/account_analytic_analysis/i18n/fi.po | 4 ++-- addons/account_analytic_analysis/i18n/fr.po | 2 +- addons/account_analytic_analysis/i18n/gl.po | 4 ++-- addons/account_analytic_analysis/i18n/hr.po | 4 ++-- addons/account_analytic_analysis/i18n/hu.po | 4 ++-- addons/account_analytic_analysis/i18n/id.po | 2 +- addons/account_analytic_analysis/i18n/it.po | 4 ++-- addons/account_analytic_analysis/i18n/ko.po | 4 ++-- addons/account_analytic_analysis/i18n/lt.po | 4 ++-- addons/account_analytic_analysis/i18n/lv.po | 2 +- addons/account_analytic_analysis/i18n/mn.po | 4 ++-- addons/account_analytic_analysis/i18n/nb.po | 2 +- addons/account_analytic_analysis/i18n/nl.po | 4 ++-- addons/account_analytic_analysis/i18n/nl_BE.po | 2 +- addons/account_analytic_analysis/i18n/oc.po | 2 +- addons/account_analytic_analysis/i18n/pl.po | 4 ++-- addons/account_analytic_analysis/i18n/pt.po | 4 ++-- addons/account_analytic_analysis/i18n/pt_BR.po | 4 ++-- addons/account_analytic_analysis/i18n/ro.po | 4 ++-- addons/account_analytic_analysis/i18n/ru.po | 4 ++-- addons/account_analytic_analysis/i18n/sl.po | 4 ++-- addons/account_analytic_analysis/i18n/sq.po | 2 +- addons/account_analytic_analysis/i18n/sr.po | 4 ++-- addons/account_analytic_analysis/i18n/sr@latin.po | 4 ++-- addons/account_analytic_analysis/i18n/sv.po | 4 ++-- addons/account_analytic_analysis/i18n/tlh.po | 2 +- addons/account_analytic_analysis/i18n/tr.po | 4 ++-- addons/account_analytic_analysis/i18n/uk.po | 2 +- addons/account_analytic_analysis/i18n/vi.po | 4 ++-- addons/account_analytic_analysis/i18n/zh_CN.po | 4 ++-- addons/account_analytic_analysis/i18n/zh_TW.po | 2 +- 45 files changed, 74 insertions(+), 74 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 8c35b9924e5..11f92614b73 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -390,7 +390,7 @@ class account_analytic_account(osv.osv): 'hours_quantity': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Hours Tot', help="Number of hours you spent on the analytic account (from timesheet). It computes on all journal of type 'general'."), 'last_invoice_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Last Invoice Date', - help="Date of the last invoice created for this analytic account."), + help="If invoice from the costs, this is the date of the latest invoiced."), 'last_worked_invoiced_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Invoiced Cost', help="If invoice from the costs, this is the date of the latest work or cost that have been invoiced."), 'last_worked_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Cost/Work', diff --git a/addons/account_analytic_analysis/i18n/account_analytic_analysis.pot b/addons/account_analytic_analysis/i18n/account_analytic_analysis.pot index af5f75c85c3..cc3cf72e6fb 100644 --- a/addons/account_analytic_analysis/i18n/account_analytic_analysis.pot +++ b/addons/account_analytic_analysis/i18n/account_analytic_analysis.pot @@ -39,7 +39,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/ar.po b/addons/account_analytic_analysis/i18n/ar.po index 00aec1e027b..5fd562cb5a2 100644 --- a/addons/account_analytic_analysis/i18n/ar.po +++ b/addons/account_analytic_analysis/i18n/ar.po @@ -42,7 +42,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/bg.po b/addons/account_analytic_analysis/i18n/bg.po index 96055270a4c..9165ac48922 100644 --- a/addons/account_analytic_analysis/i18n/bg.po +++ b/addons/account_analytic_analysis/i18n/bg.po @@ -44,8 +44,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Дата на последната фактура създадена за тази аналитична сметка." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/bs.po b/addons/account_analytic_analysis/i18n/bs.po index 873bb7319c4..9a26a5fb3eb 100644 --- a/addons/account_analytic_analysis/i18n/bs.po +++ b/addons/account_analytic_analysis/i18n/bs.po @@ -45,8 +45,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Datum zadnje fakture stvorene za ovaj analitički račun." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/ca.po b/addons/account_analytic_analysis/i18n/ca.po index 3baf314e1b6..ce58c28a6fa 100644 --- a/addons/account_analytic_analysis/i18n/ca.po +++ b/addons/account_analytic_analysis/i18n/ca.po @@ -45,8 +45,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Data de l'última factura creat per a aquesta compte analític." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/cs.po b/addons/account_analytic_analysis/i18n/cs.po index 02617123dfa..8e727d7a186 100644 --- a/addons/account_analytic_analysis/i18n/cs.po +++ b/addons/account_analytic_analysis/i18n/cs.po @@ -42,7 +42,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/da.po b/addons/account_analytic_analysis/i18n/da.po index 7e3852b3010..06f6f000d5b 100644 --- a/addons/account_analytic_analysis/i18n/da.po +++ b/addons/account_analytic_analysis/i18n/da.po @@ -43,7 +43,7 @@ msgstr "Adgangsfejl" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/de.po b/addons/account_analytic_analysis/i18n/de.po index 38df8864a23..929f8d734b4 100644 --- a/addons/account_analytic_analysis/i18n/de.po +++ b/addons/account_analytic_analysis/i18n/de.po @@ -44,8 +44,8 @@ msgstr "Verbindungsfehler" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Datum der letzten Rechnungserfassung auf diesem analytischen Konto." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/el.po b/addons/account_analytic_analysis/i18n/el.po index 938c05a7565..4a0ac64e6ea 100644 --- a/addons/account_analytic_analysis/i18n/el.po +++ b/addons/account_analytic_analysis/i18n/el.po @@ -48,7 +48,7 @@ msgstr "Πρόβλημα πρόσβασης" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" "Ημερομηνία του τελευταίου τιμολογίου που δημιουργήθηκε για αυτόν τον " "λογαριασμό της αναλυτικής." diff --git a/addons/account_analytic_analysis/i18n/es.po b/addons/account_analytic_analysis/i18n/es.po index f62c01351a8..b9e35edd426 100644 --- a/addons/account_analytic_analysis/i18n/es.po +++ b/addons/account_analytic_analysis/i18n/es.po @@ -45,8 +45,8 @@ msgstr "Error de acceso" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Fecha de la última factura creada para esta cuenta analítica." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/es_AR.po b/addons/account_analytic_analysis/i18n/es_AR.po index 5d50810481f..ced28ccfb59 100644 --- a/addons/account_analytic_analysis/i18n/es_AR.po +++ b/addons/account_analytic_analysis/i18n/es_AR.po @@ -45,8 +45,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Fecha de la última factura creada para esta cuenta analítica." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/es_EC.po b/addons/account_analytic_analysis/i18n/es_EC.po index 27dfbba7567..b94a029c83b 100644 --- a/addons/account_analytic_analysis/i18n/es_EC.po +++ b/addons/account_analytic_analysis/i18n/es_EC.po @@ -45,8 +45,8 @@ msgstr "Error de acceso" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Fecha de la última factura creada para esta cuenta analítica." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/et.po b/addons/account_analytic_analysis/i18n/et.po index 32b01e96735..c91798b545f 100644 --- a/addons/account_analytic_analysis/i18n/et.po +++ b/addons/account_analytic_analysis/i18n/et.po @@ -43,8 +43,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Sellele analüütilisele kontole viimati loodud arve kuupäev." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/fi.po b/addons/account_analytic_analysis/i18n/fi.po index b942f0fd0cd..67fac264de2 100644 --- a/addons/account_analytic_analysis/i18n/fi.po +++ b/addons/account_analytic_analysis/i18n/fi.po @@ -44,8 +44,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Viimeksi luodun laskun päiväys tällä analyyttiselle tilille" +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/fr.po b/addons/account_analytic_analysis/i18n/fr.po index fa91989095b..2916347b49f 100644 --- a/addons/account_analytic_analysis/i18n/fr.po +++ b/addons/account_analytic_analysis/i18n/fr.po @@ -46,7 +46,7 @@ msgstr "Erreur d'accès" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" "Date de la dernière facture créée à partir des prestations liés à ce compte " "analytique (heures sur timesheet, facturation de notes de frais, facturation " diff --git a/addons/account_analytic_analysis/i18n/gl.po b/addons/account_analytic_analysis/i18n/gl.po index c1a54cf0f3b..9093785e033 100644 --- a/addons/account_analytic_analysis/i18n/gl.po +++ b/addons/account_analytic_analysis/i18n/gl.po @@ -46,8 +46,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Data da última factura creada para esta conta analítica." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/hr.po b/addons/account_analytic_analysis/i18n/hr.po index 1c2a880a89b..09ab8dfcb6f 100644 --- a/addons/account_analytic_analysis/i18n/hr.po +++ b/addons/account_analytic_analysis/i18n/hr.po @@ -43,8 +43,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Datum zadnje fakture kreirana za ovaj analitički račun." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/hu.po b/addons/account_analytic_analysis/i18n/hu.po index b96dc6584ff..667cb35fa25 100644 --- a/addons/account_analytic_analysis/i18n/hu.po +++ b/addons/account_analytic_analysis/i18n/hu.po @@ -44,8 +44,8 @@ msgstr "Hozzáférési hiba" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "A gyűjtőkód alapján kiállított utolsó kimenő számla dátuma." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/id.po b/addons/account_analytic_analysis/i18n/id.po index 29aa828acbc..2c8b7337ab0 100644 --- a/addons/account_analytic_analysis/i18n/id.po +++ b/addons/account_analytic_analysis/i18n/id.po @@ -42,7 +42,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/it.po b/addons/account_analytic_analysis/i18n/it.po index aebf270cb06..3a160403bc3 100644 --- a/addons/account_analytic_analysis/i18n/it.po +++ b/addons/account_analytic_analysis/i18n/it.po @@ -45,8 +45,8 @@ msgstr "Errore di Accesso" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Data dell'ultima fattura creata per questo conto analitico" +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/ko.po b/addons/account_analytic_analysis/i18n/ko.po index b9868988252..e32a29a7572 100644 --- a/addons/account_analytic_analysis/i18n/ko.po +++ b/addons/account_analytic_analysis/i18n/ko.po @@ -43,8 +43,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "이 분석 계정에서 처리한 마지막 송장 일자" +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/lt.po b/addons/account_analytic_analysis/i18n/lt.po index 14b957267cf..a2d2e2c472b 100644 --- a/addons/account_analytic_analysis/i18n/lt.po +++ b/addons/account_analytic_analysis/i18n/lt.po @@ -45,8 +45,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Paskutinės sąskaitos data šiai analitinei sąskaitai." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/lv.po b/addons/account_analytic_analysis/i18n/lv.po index 84cca4e8b1d..1a4427e518f 100644 --- a/addons/account_analytic_analysis/i18n/lv.po +++ b/addons/account_analytic_analysis/i18n/lv.po @@ -43,7 +43,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/mn.po b/addons/account_analytic_analysis/i18n/mn.po index 264e31cf53e..203180c8380 100644 --- a/addons/account_analytic_analysis/i18n/mn.po +++ b/addons/account_analytic_analysis/i18n/mn.po @@ -45,8 +45,8 @@ msgstr "ХандалтынАлдаа" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Энэ аналитик дансыг үүсэгсэн сүүлийн нэхэмжлэлийн огноо" +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/nb.po b/addons/account_analytic_analysis/i18n/nb.po index 0a6792d76ed..6e8f6d6adfd 100644 --- a/addons/account_analytic_analysis/i18n/nb.po +++ b/addons/account_analytic_analysis/i18n/nb.po @@ -43,7 +43,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/nl.po b/addons/account_analytic_analysis/i18n/nl.po index 96885382ba9..4ce9833d844 100644 --- a/addons/account_analytic_analysis/i18n/nl.po +++ b/addons/account_analytic_analysis/i18n/nl.po @@ -44,8 +44,8 @@ msgstr "Toegangsfout" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Datum van de laatst aangemaakte factuur voor deze kostenplaats" +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/nl_BE.po b/addons/account_analytic_analysis/i18n/nl_BE.po index ccc1e0e7c03..5275bc2aa7d 100644 --- a/addons/account_analytic_analysis/i18n/nl_BE.po +++ b/addons/account_analytic_analysis/i18n/nl_BE.po @@ -43,7 +43,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/oc.po b/addons/account_analytic_analysis/i18n/oc.po index aa190c8d2bf..aaae78e3e36 100644 --- a/addons/account_analytic_analysis/i18n/oc.po +++ b/addons/account_analytic_analysis/i18n/oc.po @@ -43,7 +43,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/pl.po b/addons/account_analytic_analysis/i18n/pl.po index 39be9add211..ef4c696d43c 100644 --- a/addons/account_analytic_analysis/i18n/pl.po +++ b/addons/account_analytic_analysis/i18n/pl.po @@ -44,8 +44,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Data ostatniej faktury utworzonej dla tego konta analitycznego." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/pt.po b/addons/account_analytic_analysis/i18n/pt.po index 2cca059f6f7..3c967c8cbd7 100644 --- a/addons/account_analytic_analysis/i18n/pt.po +++ b/addons/account_analytic_analysis/i18n/pt.po @@ -45,8 +45,8 @@ msgstr "Erro de acesso" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Data da última factura criada para esta conta analítica." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/pt_BR.po b/addons/account_analytic_analysis/i18n/pt_BR.po index 3869aacdcaf..6060bd7076a 100644 --- a/addons/account_analytic_analysis/i18n/pt_BR.po +++ b/addons/account_analytic_analysis/i18n/pt_BR.po @@ -43,8 +43,8 @@ msgstr "Erro de acesso" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Data da última fatura criada para esta conta analítica." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/ro.po b/addons/account_analytic_analysis/i18n/ro.po index 3e946617224..f89765dc69b 100644 --- a/addons/account_analytic_analysis/i18n/ro.po +++ b/addons/account_analytic_analysis/i18n/ro.po @@ -43,8 +43,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Data ultimei facturi create pentru acest cont analitic." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/ru.po b/addons/account_analytic_analysis/i18n/ru.po index 2023e3cbfaf..7a7ca737d2a 100644 --- a/addons/account_analytic_analysis/i18n/ru.po +++ b/addons/account_analytic_analysis/i18n/ru.po @@ -46,8 +46,8 @@ msgstr "Ошибка доступа" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Дата последнего счета, созданного для этого аналитического счета." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/sl.po b/addons/account_analytic_analysis/i18n/sl.po index fae1bf8431f..a117482b7a1 100644 --- a/addons/account_analytic_analysis/i18n/sl.po +++ b/addons/account_analytic_analysis/i18n/sl.po @@ -44,8 +44,8 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Datum izdaje zadnjega računa za ta analitični konto" +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/sq.po b/addons/account_analytic_analysis/i18n/sq.po index 8a839c85d92..da8ff612073 100644 --- a/addons/account_analytic_analysis/i18n/sq.po +++ b/addons/account_analytic_analysis/i18n/sq.po @@ -43,7 +43,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/sr.po b/addons/account_analytic_analysis/i18n/sr.po index 61a7d1a871d..5f58114a0d6 100644 --- a/addons/account_analytic_analysis/i18n/sr.po +++ b/addons/account_analytic_analysis/i18n/sr.po @@ -44,8 +44,8 @@ msgstr "Greška u pristupu" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Datum zadnje fakture kreirana za ovaj analitički račun." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/sr@latin.po b/addons/account_analytic_analysis/i18n/sr@latin.po index c76aade651c..e1a03369214 100644 --- a/addons/account_analytic_analysis/i18n/sr@latin.po +++ b/addons/account_analytic_analysis/i18n/sr@latin.po @@ -44,8 +44,8 @@ msgstr "Greška u pristupu" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Datum zadnje fakture kreirana za ovaj analitički račun." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/sv.po b/addons/account_analytic_analysis/i18n/sv.po index 9a01d7d9260..17bed46cbe7 100644 --- a/addons/account_analytic_analysis/i18n/sv.po +++ b/addons/account_analytic_analysis/i18n/sv.po @@ -44,8 +44,8 @@ msgstr "Access fel" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/tlh.po b/addons/account_analytic_analysis/i18n/tlh.po index 3d84f4fddc0..8ea31db615a 100644 --- a/addons/account_analytic_analysis/i18n/tlh.po +++ b/addons/account_analytic_analysis/i18n/tlh.po @@ -42,7 +42,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/tr.po b/addons/account_analytic_analysis/i18n/tr.po index a655c1d4a84..143bf9d50d7 100644 --- a/addons/account_analytic_analysis/i18n/tr.po +++ b/addons/account_analytic_analysis/i18n/tr.po @@ -43,8 +43,8 @@ msgstr "Erişim Hatası" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Bu analitik hesap için oluşturulan son fatura tarihi." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/uk.po b/addons/account_analytic_analysis/i18n/uk.po index b7c860a48be..6ab39d5bcd5 100644 --- a/addons/account_analytic_analysis/i18n/uk.po +++ b/addons/account_analytic_analysis/i18n/uk.po @@ -42,7 +42,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis diff --git a/addons/account_analytic_analysis/i18n/vi.po b/addons/account_analytic_analysis/i18n/vi.po index 83bee164489..1a4c0b8fd67 100644 --- a/addons/account_analytic_analysis/i18n/vi.po +++ b/addons/account_analytic_analysis/i18n/vi.po @@ -44,8 +44,8 @@ msgstr "Lỗi truy cập" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "Ngày của hóa đơn mới nhất được tạo cho tài khoản kế toán này." +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/zh_CN.po b/addons/account_analytic_analysis/i18n/zh_CN.po index aaf02e0a84c..98a4540177c 100644 --- a/addons/account_analytic_analysis/i18n/zh_CN.po +++ b/addons/account_analytic_analysis/i18n/zh_CN.po @@ -42,8 +42,8 @@ msgstr "访问错误" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." -msgstr "这辅助核算项的最近开票日期" +msgid "If invoice from the costs, this is the date of the latest invoiced." +msgstr "" #. module: account_analytic_analysis #: model:ir.module.module,description:account_analytic_analysis.module_meta_information diff --git a/addons/account_analytic_analysis/i18n/zh_TW.po b/addons/account_analytic_analysis/i18n/zh_TW.po index b9a0c6492d4..335a4de3826 100644 --- a/addons/account_analytic_analysis/i18n/zh_TW.po +++ b/addons/account_analytic_analysis/i18n/zh_TW.po @@ -42,7 +42,7 @@ msgstr "" #. module: account_analytic_analysis #: help:account.analytic.account,last_invoice_date:0 -msgid "Date of the last invoice created for this analytic account." +msgid "If invoice from the costs, this is the date of the latest invoiced." msgstr "" #. module: account_analytic_analysis From e58d1c6266c3fd99348b7b93dc641b7141767d62 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Thu, 3 Feb 2011 11:26:40 +0530 Subject: [PATCH 023/681] [FIX]:Internal Stock move have problem if wearhouse input location = Input lp bug: https://launchpad.net/bugs/710717 fixed bzr revid: ksa@tinyerp.co.in-20110203055640-cg0uasduxxgafttp --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index ee4665ceff1..5f3f3474105 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2130,7 +2130,7 @@ class stock_move(osv.osv): prodlot_id = partial_datas and partial_datas.get('move%s_prodlot_id' % (move.id), False) if prodlot_id: self.write(cr, uid, [move.id], {'prodlot_id': prodlot_id}, context=context) - if move.state not in ('confirmed','done'): + if move.state not in ('confirmed','done','assigned'): self.action_confirm(cr, uid, move_ids, context=context) self.write(cr, uid, move_ids, {'state': 'done', 'date_planned': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context) From 1837358d318d23f962ab8cb76243b0afdee53e66 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Thu, 3 Feb 2011 12:26:14 +0530 Subject: [PATCH 024/681] [IMP] crm: Rewrite merge opportunities wizard. bzr revid: uco@tinyerp.com-20110203065614-6xq0c6qctl7pem85 --- addons/crm/wizard/crm_merge_opportunities.py | 163 +++++++++--------- .../wizard/crm_merge_opportunities_view.xml | 1 - 2 files changed, 80 insertions(+), 84 deletions(-) diff --git a/addons/crm/wizard/crm_merge_opportunities.py b/addons/crm/wizard/crm_merge_opportunities.py index 661180c0874..0b19ca6066f 100644 --- a/addons/crm/wizard/crm_merge_opportunities.py +++ b/addons/crm/wizard/crm_merge_opportunities.py @@ -18,7 +18,6 @@ # along with this program. If not, see . # ############################################################################## -from crm import crm from osv import osv, fields from tools.translate import _ @@ -28,35 +27,9 @@ class crm_merge_opportunity(osv.osv_memory): _name = 'crm.merge.opportunity' _description = 'Merge two Opportunities' - def view_init(self, cr, uid, fields, context=None): - """ - This function checks for precondition before wizard executes - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param fields: List of fields for default value - @param context: A standard dictionary for contextual values - - """ - record_id = context and context.get('active_id', False) or False - if record_id: - opp_obj = self.pool.get('crm.lead') - opp = opp_obj.browse(cr, uid, record_id, context=context) - if not opp.partner_id: - raise osv.except_osv(_('Warning!'), _('Opportunity must have Partner assigned before merging with other Opportunity.')) - #Search for Opportunity for the same partner - opp_ids = opp_obj.search(cr, uid, [('partner_id', '=', opp.partner_id.id), ('type', '=', 'opportunity'), ('state', 'in', ('open', 'pending'))]) - # Removing current opportunity - if record_id in opp_ids: - opp_ids.remove(record_id) - if not opp_ids: - raise osv.except_osv(_('Warning!'), _("There are no other 'Open' or 'Pending' Opportunities for the partner '%s'.") % (opp.partner_id.name)) - pass - - def action_merge(self, cr, uid, ids, context=None): """ - This function merges two opportunities + This function merges opportunities @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @@ -65,54 +38,87 @@ class crm_merge_opportunity(osv.osv_memory): @return : Dictionary value for created Opportunity form """ - record_id = context and context.get('active_id', False) or False - if record_id: - opp_obj = self.pool.get('crm.lead') - message_obj = self.pool.get('mailgate.message') - current_opp = opp_obj.browse(cr, uid, record_id, context=context) + record_ids = context and context.get('active_ids') or False + if len(record_ids) <= 1: + return {'type': 'ir.actions.act_window_close'} + + obj_opportunity = self.browse(cr, uid, ids[0], context=context) + opp_obj = self.pool.get('crm.lead') + first_opp = obj_opportunity.opportunity_ids[0] + op_ids = obj_opportunity.opportunity_ids + first_opp_data = {} - for this in self.browse(cr, uid, ids, context=context): - for opp in this.opportunity_ids: - opp_obj.write(cr, uid, [opp.id], { - 'stage_id': opp.stage_id.id or current_opp.stage_id.id or False, - 'priority': opp.priority or current_opp.priority, - 'email_from': opp.email_from or current_opp.email_from, - 'phone': opp.phone or current_opp.phone, - 'section_id': opp.section_id.id or current_opp.section_id.id or False, - 'categ_id': opp.categ_id.id or current_opp.categ_id.id or False, - 'description': (opp.description or '') + '\n' + (current_opp.description or ''), - 'partner_name': opp.partner_name or current_opp.partner_name, - 'title': opp.title.id or current_opp.title.id or False, - 'function': opp.function or current_opp.function, - 'street': opp.street or current_opp.street, - 'street2': opp.street2 or current_opp.street2, - 'zip': opp.zip or current_opp.zip, - 'city': opp.city or current_opp.city, - 'country_id': opp.country_id.id or current_opp.country_id.id or False, - 'state_id': opp.state_id.id or current_opp.state_id.id or False, - 'fax': opp.fax or current_opp.fax, - 'mobile': opp.mobile or current_opp.mobile, - 'email_cc': ','.join(filter(lambda x: x, [opp.email_cc, current_opp.email_cc])) - }) - for history in current_opp.message_ids: - if history.history: - new_history = message_obj.copy(cr, uid, history.id, default={'res_id': opp.id}) - opp_obj._history(cr, uid, [current_opp], _('Merged into Opportunity: %s') % (opp.id)) + for opp in op_ids[1:]: + first_opp_data = { + 'partner_id': first_opp.partner_id.id or opp.partner_id.id, + 'stage_id': first_opp.stage_id.id or opp.stage_id.id, + 'section_id': first_opp.section_id.id or opp.section_id.id, + 'categ_id': first_opp.categ_id.id or opp.categ_id.id, + 'type_id': first_opp.type_id.id or opp.type_id.id, + 'channel_id': first_opp.channel_id.id or opp.channel_id.id, + 'user_id': first_opp.user_id.id or opp.user_id.id, + 'country_id': first_opp.country_id.id or opp.country_id.id, + 'state_id': first_opp.state_id.id or opp.state_id.id, + 'partner_address_id': first_opp.partner_address_id.id or opp.partner_address_id.id, + 'priority': first_opp.priority or opp.priority, + 'title': first_opp.title.id or opp.title.id, + 'function': first_opp.function or opp.function, + 'email_from': first_opp.email_from or opp.email_from, + 'phone': first_opp.phone or opp.phone, + 'description': first_opp.description or opp.description, + 'partner_name': first_opp.partner_name or opp.partner_name, + 'street': first_opp.street or opp.street, + 'street2': first_opp.street2 or opp.street2, + 'zip': first_opp.zip or opp.zip, + 'city': first_opp.city or opp.city, + 'fax': first_opp.fax or opp.fax, + 'mobile': first_opp.mobile or opp.mobile, + 'email_cc': ','.join(filter(lambda x: x, [opp.email_cc, first_opp.email_cc])), + 'state': 'open' + } + for history in opp.message_ids: + if history.history: + new_history = message_obj.copy(cr, uid, history.id, default={'res_id': opp.id}) + opp_obj._history(cr, uid, [first_opp], _('Merged from Opportunity: %s : Information lost : [Partner: %s, Stage: %s, Section: %s, Salesman: %s]') % (opp.name, opp.partner_id.name or '', opp.stage_id.name or '', opp.section_id.name or '', opp.user_id.name or '')) + - if this.state == 'unchanged': - pass - elif this.state == 'done': - opp_obj.case_close(cr, uid, [record_id]) - elif this.state == 'draft': - opp_obj.case_reset(cr, uid, [record_id]) - elif this.state in ['cancel', 'open', 'pending']: - act = 'case_' + this.state - getattr(opp_obj, act)(cr, uid, [record_id]) - return {'type': 'ir.actions.act_window_close'} + opp_obj.write(cr, uid, [first_opp.id], first_opp_data) + + unlink_ids = map(lambda x: x.id, op_ids[1:]) + opp_obj.unlink(cr, uid, unlink_ids) + + models_data = self.pool.get('ir.model.data') + + # Get Opportunity views + result = models_data._get_id( + cr, uid, 'crm', 'view_crm_case_opportunities_filter') + opportunity_view_form = models_data._get_id( + cr, uid, 'crm', 'crm_case_form_view_oppor') + opportunity_view_tree = models_data._get_id( + cr, uid, 'crm', 'crm_case_tree_view_oppor') + if opportunity_view_form: + opportunity_view_form = models_data.browse( + cr, uid, opportunity_view_form, context=context).res_id + if opportunity_view_tree: + opportunity_view_tree = models_data.browse( + cr, uid, opportunity_view_tree, context=context).res_id + + return { + 'name': _('Opportunity'), + 'view_type': 'form', + 'view_mode': 'tree, form', + 'res_model': 'crm.lead', + 'domain': [('type', '=', 'opportunity')], + 'res_id': int(first_opp.id), + 'view_id': False, + 'views': [(opportunity_view_form, 'form'), + (opportunity_view_tree, 'tree'), + (False, 'calendar'), (False, 'graph')], + 'type': 'ir.actions.act_window', + } _columns = { 'opportunity_ids' : fields.many2many('crm.lead', 'merge_opportunity_rel', 'merge_id', 'opportunity_id', 'Opportunities', domain=[('type', '=', 'opportunity')]), - 'state': fields.selection(crm.AVAILABLE_STATES + [('unchanged', 'Unchanged')], string='Set State To', required=True), } def default_get(self, cr, uid, fields, context=None): @@ -126,21 +132,12 @@ class crm_merge_opportunity(osv.osv_memory): @return : default values of fields. """ - record_id = context and context.get('active_id', False) or False + record_ids = context and context.get('active_ids', False) or False res = super(crm_merge_opportunity, self).default_get(cr, uid, fields, context=context) - if record_id: - opp_obj = self.pool.get('crm.lead') - opp = opp_obj.browse(cr, uid, record_id, context=context) - opp_ids = opp_obj.search(cr, uid, [('partner_id', '=', opp.partner_id.id), ('type', '=', 'opportunity'), ('state', 'in', ('open', 'pending'))]) - # Removing current opportunity - if record_id in opp_ids: - opp_ids.remove(record_id) - + if record_ids: if 'opportunity_ids' in fields: - res.update({'opportunity_ids': opp_ids}) - if 'state' in fields: - res.update({'state': u'cancel'}) + res.update({'opportunity_ids': record_ids}) return res diff --git a/addons/crm/wizard/crm_merge_opportunities_view.xml b/addons/crm/wizard/crm_merge_opportunities_view.xml index 153267f0ad1..046cc37cd8f 100644 --- a/addons/crm/wizard/crm_merge_opportunities_view.xml +++ b/addons/crm/wizard/crm_merge_opportunities_view.xml @@ -14,7 +14,6 @@ - + + + + + + + + + + + + + + +
+
+ +
+ +
+
+
+
+
+ +
+
+ Debug: +
+
Loading... @@ -61,25 +84,45 @@ - -
    - - - + + -
    - - -
  • - -
      - - - -
    + +
  • + +
    + + <> + + + + </> + - + From 1b7854503d83f973cbdf19304adce24d0d607d97 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 22 Mar 2011 14:12:14 +0100 Subject: [PATCH 641/681] [IMP] Improvements to the screenshots for some modules. bzr revid: nicolas.vanhoren@openerp.com-20110322131214-g4h9rzpam67k2ym9 --- addons/crm/__openerp__.py | 2 +- addons/marketing_campaign/__openerp__.py | 2 +- addons/project/__openerp__.py | 2 +- addons/stock/__openerp__.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index d51cade7f53..719b92f3460 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -132,6 +132,6 @@ Creates a dashboard for CRM that includes: 'installable': True, 'active': False, 'certificate': '0079056041421', - 'images': ['images/crm_dashboard.jpeg','images/leads.jpeg','images/meetings.jpeg','images/opportunities.jpeg','images/outbound_calls.jpeg','images/stages.jpeg'], + 'images': ['images/sale_crm_crm_dashboard.png', 'images/crm_dashboard.jpeg','images/leads.jpeg','images/meetings.jpeg','images/opportunities.jpeg','images/outbound_calls.jpeg','images/stages.jpeg'], } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/marketing_campaign/__openerp__.py b/addons/marketing_campaign/__openerp__.py index a92d1d4de2c..24a251bc000 100644 --- a/addons/marketing_campaign/__openerp__.py +++ b/addons/marketing_campaign/__openerp__.py @@ -61,6 +61,6 @@ Note: If you need demo data, you can install the marketing_campaign_crm_demo mod 'installable': True, 'active': False, 'certificate' : '00421723279617928365', - 'images': ['images/campaigns.jpeg','images/email_account.jpeg','images/email_templates.jpeg','images/segments.jpeg'], + 'images': ['images/campaign.png', 'images/campaigns.jpeg','images/email_account.jpeg','images/email_templates.jpeg','images/segments.jpeg'], } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py index 9f5c78a2e31..f8cab193ab3 100644 --- a/addons/project/__openerp__.py +++ b/addons/project/__openerp__.py @@ -26,7 +26,7 @@ "author": "OpenERP SA", "website": "http://www.openerp.com", "category": "Project Management", - "images": ["images/project_dashboard.jpeg","images/project_task_tree.jpeg","images/project_task.jpeg","images/project.jpeg","images/task_analysis.jpeg"], + "images": ["images/gantt.png", "images/project_dashboard.jpeg","images/project_task_tree.jpeg","images/project_task.jpeg","images/project.jpeg","images/task_analysis.jpeg"], "depends": ["product", "analytic", "board"], "description": """ Project management module tracks multi-level projects, tasks, work done on tasks, eso. diff --git a/addons/stock/__openerp__.py b/addons/stock/__openerp__.py index 3577cee3cf7..1a33fd3012c 100644 --- a/addons/stock/__openerp__.py +++ b/addons/stock/__openerp__.py @@ -44,7 +44,7 @@ Thanks to the double entry management, the inventory controlling is powerful and * Graph : Products to send in delay (date < = today) """, "website" : "http://www.openerp.com", - "images" : ["images/delivery_orders.jpeg", "images/inventory_analysis.jpeg","images/location.jpeg","images/moves_analysis.jpeg","images/physical_inventories.jpeg","images/warehouse_dashboard.jpeg"], + "images" : ["images/stock_forecast_report.png", "images/delivery_orders.jpeg", "images/inventory_analysis.jpeg","images/location.jpeg","images/moves_analysis.jpeg","images/physical_inventories.jpeg","images/warehouse_dashboard.jpeg"], "depends" : ["product", "account"], "category" : "Warehouse", "init_xml" : [], From 9f74d6d07c2e30172b2d238a85e2149097ab9ca6 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Mar 2011 14:15:59 +0100 Subject: [PATCH 642/681] [ADD] underscore utility library. See http://documentcloud.github.com/underscore/ for documentation bzr revid: xmo@openerp.com-20110322131559-afci46oyqecw571s --- addons/base/static/openerp/base.html | 1 + addons/base/static/underscore/underscore.js | 795 ++++++++++++++++++++ 2 files changed, 796 insertions(+) create mode 100644 addons/base/static/underscore/underscore.js diff --git a/addons/base/static/openerp/base.html b/addons/base/static/openerp/base.html index 971da997e92..248196e45ba 100644 --- a/addons/base/static/openerp/base.html +++ b/addons/base/static/openerp/base.html @@ -5,6 +5,7 @@ OpenERP + diff --git a/addons/base/static/underscore/underscore.js b/addons/base/static/underscore/underscore.js new file mode 100644 index 00000000000..c627740a02d --- /dev/null +++ b/addons/base/static/underscore/underscore.js @@ -0,0 +1,795 @@ +// Underscore.js 1.1.5 +// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc. +// Underscore is freely distributable under the MIT license. +// Portions of Underscore are inspired or borrowed from Prototype, +// Oliver Steele's Functional, and John Resig's Micro-Templating. +// For all details and documentation: +// http://documentcloud.github.com/underscore + +(function() { + + // Baseline setup + // -------------- + + // Establish the root object, `window` in the browser, or `global` on the server. + var root = this; + + // Save the previous value of the `_` variable. + var previousUnderscore = root._; + + // Establish the object that gets returned to break out of a loop iteration. + var breaker = {}; + + // Save bytes in the minified (but not gzipped) version: + var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; + + // Create quick reference variables for speed access to core prototypes. + var slice = ArrayProto.slice, + unshift = ArrayProto.unshift, + toString = ObjProto.toString, + hasOwnProperty = ObjProto.hasOwnProperty; + + // All **ECMAScript 5** native function implementations that we hope to use + // are declared here. + var + nativeForEach = ArrayProto.forEach, + nativeMap = ArrayProto.map, + nativeReduce = ArrayProto.reduce, + nativeReduceRight = ArrayProto.reduceRight, + nativeFilter = ArrayProto.filter, + nativeEvery = ArrayProto.every, + nativeSome = ArrayProto.some, + nativeIndexOf = ArrayProto.indexOf, + nativeLastIndexOf = ArrayProto.lastIndexOf, + nativeIsArray = Array.isArray, + nativeKeys = Object.keys, + nativeBind = FuncProto.bind; + + // Create a safe reference to the Underscore object for use below. + var _ = function(obj) { return new wrapper(obj); }; + + // Export the Underscore object for **CommonJS**, with backwards-compatibility + // for the old `require()` API. If we're not in CommonJS, add `_` to the + // global object. + if (typeof module !== 'undefined' && module.exports) { + module.exports = _; + _._ = _; + } else { + root._ = _; + } + + // Current version. + _.VERSION = '1.1.5'; + + // Collection Functions + // -------------------- + + // The cornerstone, an `each` implementation, aka `forEach`. + // Handles objects implementing `forEach`, arrays, and raw objects. + // Delegates to **ECMAScript 5**'s native `forEach` if available. + var each = _.each = _.forEach = function(obj, iterator, context) { + if (obj == null) return; + if (nativeForEach && obj.forEach === nativeForEach) { + obj.forEach(iterator, context); + } else if (_.isNumber(obj.length)) { + for (var i = 0, l = obj.length; i < l; i++) { + if (iterator.call(context, obj[i], i, obj) === breaker) return; + } + } else { + for (var key in obj) { + if (hasOwnProperty.call(obj, key)) { + if (iterator.call(context, obj[key], key, obj) === breaker) return; + } + } + } + }; + + // Return the results of applying the iterator to each element. + // Delegates to **ECMAScript 5**'s native `map` if available. + _.map = function(obj, iterator, context) { + var results = []; + if (obj == null) return results; + if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); + each(obj, function(value, index, list) { + results[results.length] = iterator.call(context, value, index, list); + }); + return results; + }; + + // **Reduce** builds up a single result from a list of values, aka `inject`, + // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. + _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { + var initial = memo !== void 0; + if (obj == null) obj = []; + if (nativeReduce && obj.reduce === nativeReduce) { + if (context) iterator = _.bind(iterator, context); + return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); + } + each(obj, function(value, index, list) { + if (!initial && index === 0) { + memo = value; + initial = true; + } else { + memo = iterator.call(context, memo, value, index, list); + } + }); + if (!initial) throw new TypeError("Reduce of empty array with no initial value"); + return memo; + }; + + // The right-associative version of reduce, also known as `foldr`. + // Delegates to **ECMAScript 5**'s native `reduceRight` if available. + _.reduceRight = _.foldr = function(obj, iterator, memo, context) { + if (obj == null) obj = []; + if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { + if (context) iterator = _.bind(iterator, context); + return memo !== void 0 ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); + } + var reversed = (_.isArray(obj) ? obj.slice() : _.toArray(obj)).reverse(); + return _.reduce(reversed, iterator, memo, context); + }; + + // Return the first value which passes a truth test. Aliased as `detect`. + _.find = _.detect = function(obj, iterator, context) { + var result; + any(obj, function(value, index, list) { + if (iterator.call(context, value, index, list)) { + result = value; + return true; + } + }); + return result; + }; + + // Return all the elements that pass a truth test. + // Delegates to **ECMAScript 5**'s native `filter` if available. + // Aliased as `select`. + _.filter = _.select = function(obj, iterator, context) { + var results = []; + if (obj == null) return results; + if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context); + each(obj, function(value, index, list) { + if (iterator.call(context, value, index, list)) results[results.length] = value; + }); + return results; + }; + + // Return all the elements for which a truth test fails. + _.reject = function(obj, iterator, context) { + var results = []; + if (obj == null) return results; + each(obj, function(value, index, list) { + if (!iterator.call(context, value, index, list)) results[results.length] = value; + }); + return results; + }; + + // Determine whether all of the elements match a truth test. + // Delegates to **ECMAScript 5**'s native `every` if available. + // Aliased as `all`. + _.every = _.all = function(obj, iterator, context) { + iterator = iterator || _.identity; + var result = true; + if (obj == null) return result; + if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context); + each(obj, function(value, index, list) { + if (!(result = result && iterator.call(context, value, index, list))) return breaker; + }); + return result; + }; + + // Determine if at least one element in the object matches a truth test. + // Delegates to **ECMAScript 5**'s native `some` if available. + // Aliased as `any`. + var any = _.some = _.any = function(obj, iterator, context) { + iterator = iterator || _.identity; + var result = false; + if (obj == null) return result; + if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context); + each(obj, function(value, index, list) { + if (result = iterator.call(context, value, index, list)) return breaker; + }); + return result; + }; + + // Determine if a given value is included in the array or object using `===`. + // Aliased as `contains`. + _.include = _.contains = function(obj, target) { + var found = false; + if (obj == null) return found; + if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; + any(obj, function(value) { + if (found = value === target) return true; + }); + return found; + }; + + // Invoke a method (with arguments) on every item in a collection. + _.invoke = function(obj, method) { + var args = slice.call(arguments, 2); + return _.map(obj, function(value) { + return (method ? value[method] : value).apply(value, args); + }); + }; + + // Convenience version of a common use case of `map`: fetching a property. + _.pluck = function(obj, key) { + return _.map(obj, function(value){ return value[key]; }); + }; + + // Return the maximum element or (element-based computation). + _.max = function(obj, iterator, context) { + if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj); + var result = {computed : -Infinity}; + each(obj, function(value, index, list) { + var computed = iterator ? iterator.call(context, value, index, list) : value; + computed >= result.computed && (result = {value : value, computed : computed}); + }); + return result.value; + }; + + // Return the minimum element (or element-based computation). + _.min = function(obj, iterator, context) { + if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj); + var result = {computed : Infinity}; + each(obj, function(value, index, list) { + var computed = iterator ? iterator.call(context, value, index, list) : value; + computed < result.computed && (result = {value : value, computed : computed}); + }); + return result.value; + }; + + // Sort the object's values by a criterion produced by an iterator. + _.sortBy = function(obj, iterator, context) { + return _.pluck(_.map(obj, function(value, index, list) { + return { + value : value, + criteria : iterator.call(context, value, index, list) + }; + }).sort(function(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }), 'value'); + }; + + // Use a comparator function to figure out at what index an object should + // be inserted so as to maintain order. Uses binary search. + _.sortedIndex = function(array, obj, iterator) { + iterator = iterator || _.identity; + var low = 0, high = array.length; + while (low < high) { + var mid = (low + high) >> 1; + iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid; + } + return low; + }; + + // Safely convert anything iterable into a real, live array. + _.toArray = function(iterable) { + if (!iterable) return []; + if (iterable.toArray) return iterable.toArray(); + if (_.isArray(iterable)) return iterable; + if (_.isArguments(iterable)) return slice.call(iterable); + return _.values(iterable); + }; + + // Return the number of elements in an object. + _.size = function(obj) { + return _.toArray(obj).length; + }; + + // Array Functions + // --------------- + + // Get the first element of an array. Passing **n** will return the first N + // values in the array. Aliased as `head`. The **guard** check allows it to work + // with `_.map`. + _.first = _.head = function(array, n, guard) { + return (n != null) && !guard ? slice.call(array, 0, n) : array[0]; + }; + + // Returns everything but the first entry of the array. Aliased as `tail`. + // Especially useful on the arguments object. Passing an **index** will return + // the rest of the values in the array from that index onward. The **guard** + // check allows it to work with `_.map`. + _.rest = _.tail = function(array, index, guard) { + return slice.call(array, (index == null) || guard ? 1 : index); + }; + + // Get the last element of an array. + _.last = function(array) { + return array[array.length - 1]; + }; + + // Trim out all falsy values from an array. + _.compact = function(array) { + return _.filter(array, function(value){ return !!value; }); + }; + + // Return a completely flattened version of an array. + _.flatten = function(array) { + return _.reduce(array, function(memo, value) { + if (_.isArray(value)) return memo.concat(_.flatten(value)); + memo[memo.length] = value; + return memo; + }, []); + }; + + // Return a version of the array that does not contain the specified value(s). + _.without = function(array) { + var values = slice.call(arguments, 1); + return _.filter(array, function(value){ return !_.include(values, value); }); + }; + + // Produce a duplicate-free version of the array. If the array has already + // been sorted, you have the option of using a faster algorithm. + // Aliased as `unique`. + _.uniq = _.unique = function(array, isSorted) { + return _.reduce(array, function(memo, el, i) { + if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) memo[memo.length] = el; + return memo; + }, []); + }; + + // Produce an array that contains every item shared between all the + // passed-in arrays. + _.intersect = function(array) { + var rest = slice.call(arguments, 1); + return _.filter(_.uniq(array), function(item) { + return _.every(rest, function(other) { + return _.indexOf(other, item) >= 0; + }); + }); + }; + + // Zip together multiple lists into a single array -- elements that share + // an index go together. + _.zip = function() { + var args = slice.call(arguments); + var length = _.max(_.pluck(args, 'length')); + var results = new Array(length); + for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i); + return results; + }; + + // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), + // we need this function. Return the position of the first occurrence of an + // item in an array, or -1 if the item is not included in the array. + // Delegates to **ECMAScript 5**'s native `indexOf` if available. + // If the array is large and already in sort order, pass `true` + // for **isSorted** to use binary search. + _.indexOf = function(array, item, isSorted) { + if (array == null) return -1; + var i, l; + if (isSorted) { + i = _.sortedIndex(array, item); + return array[i] === item ? i : -1; + } + if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item); + for (i = 0, l = array.length; i < l; i++) if (array[i] === item) return i; + return -1; + }; + + + // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. + _.lastIndexOf = function(array, item) { + if (array == null) return -1; + if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item); + var i = array.length; + while (i--) if (array[i] === item) return i; + return -1; + }; + + // Generate an integer Array containing an arithmetic progression. A port of + // the native Python `range()` function. See + // [the Python documentation](http://docs.python.org/library/functions.html#range). + _.range = function(start, stop, step) { + if (arguments.length <= 1) { + stop = start || 0; + start = 0; + } + step = arguments[2] || 1; + + var len = Math.max(Math.ceil((stop - start) / step), 0); + var idx = 0; + var range = new Array(len); + + while(idx < len) { + range[idx++] = start; + start += step; + } + + return range; + }; + + // Function (ahem) Functions + // ------------------ + + // Create a function bound to a given object (assigning `this`, and arguments, + // optionally). Binding with arguments is also known as `curry`. + // Delegates to **ECMAScript 5**'s native `Function.bind` if available. + _.bind = function(func, obj) { + if (nativeBind && func.bind === nativeBind) return func.bind.apply(func, slice.call(arguments, 1)); + var args = slice.call(arguments, 2); + return function() { + return func.apply(obj, args.concat(slice.call(arguments))); + }; + }; + + // Bind all of an object's methods to that object. Useful for ensuring that + // all callbacks defined on an object belong to it. + _.bindAll = function(obj) { + var funcs = slice.call(arguments, 1); + if (funcs.length == 0) funcs = _.functions(obj); + each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); + return obj; + }; + + // Memoize an expensive function by storing its results. + _.memoize = function(func, hasher) { + var memo = {}; + hasher = hasher || _.identity; + return function() { + var key = hasher.apply(this, arguments); + return hasOwnProperty.call(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); + }; + }; + + // Delays a function for the given number of milliseconds, and then calls + // it with the arguments supplied. + _.delay = function(func, wait) { + var args = slice.call(arguments, 2); + return setTimeout(function(){ return func.apply(func, args); }, wait); + }; + + // Defers a function, scheduling it to run after the current call stack has + // cleared. + _.defer = function(func) { + return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); + }; + + // Internal function used to implement `_.throttle` and `_.debounce`. + var limit = function(func, wait, debounce) { + var timeout; + return function() { + var context = this, args = arguments; + var throttler = function() { + timeout = null; + func.apply(context, args); + }; + if (debounce) clearTimeout(timeout); + if (debounce || !timeout) timeout = setTimeout(throttler, wait); + }; + }; + + // Returns a function, that, when invoked, will only be triggered at most once + // during a given window of time. + _.throttle = function(func, wait) { + return limit(func, wait, false); + }; + + // Returns a function, that, as long as it continues to be invoked, will not + // be triggered. The function will be called after it stops being called for + // N milliseconds. + _.debounce = function(func, wait) { + return limit(func, wait, true); + }; + + // Returns a function that will be executed at most one time, no matter how + // often you call it. Useful for lazy initialization. + _.once = function(func) { + var ran = false, memo; + return function() { + if (ran) return memo; + ran = true; + return memo = func.apply(this, arguments); + }; + }; + + // Returns the first function passed as an argument to the second, + // allowing you to adjust arguments, run code before and after, and + // conditionally execute the original function. + _.wrap = function(func, wrapper) { + return function() { + var args = [func].concat(slice.call(arguments)); + return wrapper.apply(this, args); + }; + }; + + // Returns a function that is the composition of a list of functions, each + // consuming the return value of the function that follows. + _.compose = function() { + var funcs = slice.call(arguments); + return function() { + var args = slice.call(arguments); + for (var i=funcs.length-1; i >= 0; i--) { + args = [funcs[i].apply(this, args)]; + } + return args[0]; + }; + }; + + // Object Functions + // ---------------- + + // Retrieve the names of an object's properties. + // Delegates to **ECMAScript 5**'s native `Object.keys` + _.keys = nativeKeys || function(obj) { + if (obj !== Object(obj)) throw new TypeError('Invalid object'); + var keys = []; + for (var key in obj) if (hasOwnProperty.call(obj, key)) keys[keys.length] = key; + return keys; + }; + + // Retrieve the values of an object's properties. + _.values = function(obj) { + return _.map(obj, _.identity); + }; + + // Return a sorted list of the function names available on the object. + // Aliased as `methods` + _.functions = _.methods = function(obj) { + return _.filter(_.keys(obj), function(key){ return _.isFunction(obj[key]); }).sort(); + }; + + // Extend a given object with all the properties in passed-in object(s). + _.extend = function(obj) { + each(slice.call(arguments, 1), function(source) { + for (var prop in source) obj[prop] = source[prop]; + }); + return obj; + }; + + // Fill in a given object with default properties. + _.defaults = function(obj) { + each(slice.call(arguments, 1), function(source) { + for (var prop in source) if (obj[prop] == null) obj[prop] = source[prop]; + }); + return obj; + }; + + // Create a (shallow-cloned) duplicate of an object. + _.clone = function(obj) { + return _.isArray(obj) ? obj.slice() : _.extend({}, obj); + }; + + // Invokes interceptor with the obj, and then returns obj. + // The primary purpose of this method is to "tap into" a method chain, in + // order to perform operations on intermediate results within the chain. + _.tap = function(obj, interceptor) { + interceptor(obj); + return obj; + }; + + // Perform a deep comparison to check if two objects are equal. + _.isEqual = function(a, b) { + // Check object identity. + if (a === b) return true; + // Different types? + var atype = typeof(a), btype = typeof(b); + if (atype != btype) return false; + // Basic equality test (watch out for coercions). + if (a == b) return true; + // One is falsy and the other truthy. + if ((!a && b) || (a && !b)) return false; + // Unwrap any wrapped objects. + if (a._chain) a = a._wrapped; + if (b._chain) b = b._wrapped; + // One of them implements an isEqual()? + if (a.isEqual) return a.isEqual(b); + // Check dates' integer values. + if (_.isDate(a) && _.isDate(b)) return a.getTime() === b.getTime(); + // Both are NaN? + if (_.isNaN(a) && _.isNaN(b)) return false; + // Compare regular expressions. + if (_.isRegExp(a) && _.isRegExp(b)) + return a.source === b.source && + a.global === b.global && + a.ignoreCase === b.ignoreCase && + a.multiline === b.multiline; + // If a is not an object by this point, we can't handle it. + if (atype !== 'object') return false; + // Check for different array lengths before comparing contents. + if (a.length && (a.length !== b.length)) return false; + // Nothing else worked, deep compare the contents. + var aKeys = _.keys(a), bKeys = _.keys(b); + // Different object sizes? + if (aKeys.length != bKeys.length) return false; + // Recursive comparison of contents. + for (var key in a) if (!(key in b) || !_.isEqual(a[key], b[key])) return false; + return true; + }; + + // Is a given array or object empty? + _.isEmpty = function(obj) { + if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; + for (var key in obj) if (hasOwnProperty.call(obj, key)) return false; + return true; + }; + + // Is a given value a DOM element? + _.isElement = function(obj) { + return !!(obj && obj.nodeType == 1); + }; + + // Is a given value an array? + // Delegates to ECMA5's native Array.isArray + _.isArray = nativeIsArray || function(obj) { + return toString.call(obj) === '[object Array]'; + }; + + // Is a given variable an arguments object? + _.isArguments = function(obj) { + return !!(obj && hasOwnProperty.call(obj, 'callee')); + }; + + // Is a given value a function? + _.isFunction = function(obj) { + return !!(obj && obj.constructor && obj.call && obj.apply); + }; + + // Is a given value a string? + _.isString = function(obj) { + return !!(obj === '' || (obj && obj.charCodeAt && obj.substr)); + }; + + // Is a given value a number? + _.isNumber = function(obj) { + return !!(obj === 0 || (obj && obj.toExponential && obj.toFixed)); + }; + + // Is the given value `NaN`? `NaN` happens to be the only value in JavaScript + // that does not equal itself. + _.isNaN = function(obj) { + return obj !== obj; + }; + + // Is a given value a boolean? + _.isBoolean = function(obj) { + return obj === true || obj === false; + }; + + // Is a given value a date? + _.isDate = function(obj) { + return !!(obj && obj.getTimezoneOffset && obj.setUTCFullYear); + }; + + // Is the given value a regular expression? + _.isRegExp = function(obj) { + return !!(obj && obj.test && obj.exec && (obj.ignoreCase || obj.ignoreCase === false)); + }; + + // Is a given value equal to null? + _.isNull = function(obj) { + return obj === null; + }; + + // Is a given variable undefined? + _.isUndefined = function(obj) { + return obj === void 0; + }; + + // Utility Functions + // ----------------- + + // Run Underscore.js in *noConflict* mode, returning the `_` variable to its + // previous owner. Returns a reference to the Underscore object. + _.noConflict = function() { + root._ = previousUnderscore; + return this; + }; + + // Keep the identity function around for default iterators. + _.identity = function(value) { + return value; + }; + + // Run a function **n** times. + _.times = function (n, iterator, context) { + for (var i = 0; i < n; i++) iterator.call(context, i); + }; + + // Add your own custom functions to the Underscore object, ensuring that + // they're correctly added to the OOP wrapper as well. + _.mixin = function(obj) { + each(_.functions(obj), function(name){ + addToWrapper(name, _[name] = obj[name]); + }); + }; + + // Generate a unique integer id (unique within the entire client session). + // Useful for temporary DOM ids. + var idCounter = 0; + _.uniqueId = function(prefix) { + var id = idCounter++; + return prefix ? prefix + id : id; + }; + + // By default, Underscore uses ERB-style template delimiters, change the + // following template settings to use alternative delimiters. + _.templateSettings = { + evaluate : /<%([\s\S]+?)%>/g, + interpolate : /<%=([\s\S]+?)%>/g + }; + + // JavaScript micro-templating, similar to John Resig's implementation. + // Underscore templating handles arbitrary delimiters, preserves whitespace, + // and correctly escapes quotes within interpolated code. + _.template = function(str, data) { + var c = _.templateSettings; + var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' + + 'with(obj||{}){__p.push(\'' + + str.replace(/\\/g, '\\\\') + .replace(/'/g, "\\'") + .replace(c.interpolate, function(match, code) { + return "'," + code.replace(/\\'/g, "'") + ",'"; + }) + .replace(c.evaluate || null, function(match, code) { + return "');" + code.replace(/\\'/g, "'") + .replace(/[\r\n\t]/g, ' ') + "__p.push('"; + }) + .replace(/\r/g, '\\r') + .replace(/\n/g, '\\n') + .replace(/\t/g, '\\t') + + "');}return __p.join('');"; + var func = new Function('obj', tmpl); + return data ? func(data) : func; + }; + + // The OOP Wrapper + // --------------- + + // If Underscore is called as a function, it returns a wrapped object that + // can be used OO-style. This wrapper holds altered versions of all the + // underscore functions. Wrapped objects may be chained. + var wrapper = function(obj) { this._wrapped = obj; }; + + // Expose `wrapper.prototype` as `_.prototype` + _.prototype = wrapper.prototype; + + // Helper function to continue chaining intermediate results. + var result = function(obj, chain) { + return chain ? _(obj).chain() : obj; + }; + + // A method to easily add functions to the OOP wrapper. + var addToWrapper = function(name, func) { + wrapper.prototype[name] = function() { + var args = slice.call(arguments); + unshift.call(args, this._wrapped); + return result(func.apply(_, args), this._chain); + }; + }; + + // Add all of the Underscore functions to the wrapper object. + _.mixin(_); + + // Add all mutator Array functions to the wrapper. + each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { + var method = ArrayProto[name]; + wrapper.prototype[name] = function() { + method.apply(this._wrapped, arguments); + return result(this._wrapped, this._chain); + }; + }); + + // Add all accessor Array functions to the wrapper. + each(['concat', 'join', 'slice'], function(name) { + var method = ArrayProto[name]; + wrapper.prototype[name] = function() { + return result(method.apply(this._wrapped, arguments), this._chain); + }; + }); + + // Start chaining a wrapped Underscore object. + wrapper.prototype.chain = function() { + this._chain = true; + return this; + }; + + // Extracts the result from a wrapped and chained object. + wrapper.prototype.value = function() { + return this._wrapped; + }; + +})(); From 1fb6165a8a5da1a9860e8ea76495251b7349aa5b Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Tue, 22 Mar 2011 14:50:26 +0100 Subject: [PATCH 643/681] [FIX] ListView table autoresize bzr revid: fme@openerp.com-20110322135026-ndme63lh7pa98c03 --- addons/base/static/openerp/js/base_views.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index 00c9cbcb1eb..586f958651e 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -337,6 +337,7 @@ openerp.base.ListView = openerp.base.Controller.extend({ // debugger; } //this.log(rows); + var width = this.$element.width(); this.$table.jqGrid({ data: rows, datatype: "local", @@ -348,8 +349,12 @@ openerp.base.ListView = openerp.base.Controller.extend({ //pager: "#plist47", viewrecords: true, caption: this.name - }).setGridWidth(this.$element.width()); - $(window).bind('resize', function() { self.$table.setGridWidth(self.$element.width()); }).trigger('resize'); + }).setGridWidth(width); + $(window).bind('resize', function() { + self.$element.children().hide(); + self.$table.setGridWidth(self.$element.width()); + self.$element.children().show(); + }).trigger('resize'); } }); From 65a3751613a392ae6a36f6efbcaeade924565d84 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Tue, 22 Mar 2011 15:01:24 +0100 Subject: [PATCH 644/681] [FIX] safe_eval: added time in the allowed modules. - The reason is that on some older version of python (e.g. 2.5.2 on Windows), datetime.datetime.now() is doing an import time on itws own. lp bug: https://launchpad.net/bugs/703841 fixed bzr revid: vmt@openerp.com-20110322140124-huqn504k0y5xrkwa --- bin/tools/safe_eval.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/tools/safe_eval.py b/bin/tools/safe_eval.py index 740b426f050..6c068d8fd78 100644 --- a/bin/tools/safe_eval.py +++ b/bin/tools/safe_eval.py @@ -39,7 +39,10 @@ import os __all__ = ['test_expr', 'literal_eval', 'safe_eval', 'const_eval', 'ext_eval' ] -_ALLOWED_MODULES = ['_strptime'] +# The time module is usually already provided in the safe_eval environment +# but some code, e.g. datetime.datetime.now() (Windows/Python 2.5.2, bug +# lp:703841), does import time. +_ALLOWED_MODULES = ['_strptime', 'time'] _CONST_OPCODES = set(opmap[x] for x in [ 'POP_TOP', 'ROT_TWO', 'ROT_THREE', 'ROT_FOUR', 'DUP_TOP','POP_BLOCK','SETUP_LOOP', From 16cbdc2a9004c12587d843e8abee8ea8ff311465 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Mar 2011 15:11:17 +0100 Subject: [PATCH 645/681] [ADD] Be Stubborn. Obey the Goat. Basic testing infrastructure for the base addon JS bzr revid: xmo@openerp.com-20110322141117-7htmchkc4pyus3e2 --- addons/base/static/openerp/js/tests.js | 56 + addons/base/static/openerp/test.html | 29 + addons/base/static/qunit/qunit-2011-23-22.css | 248 +++ addons/base/static/qunit/qunit-2011-23-22.js | 1456 +++++++++++++++++ 4 files changed, 1789 insertions(+) create mode 100644 addons/base/static/openerp/js/tests.js create mode 100644 addons/base/static/openerp/test.html create mode 100644 addons/base/static/qunit/qunit-2011-23-22.css create mode 100644 addons/base/static/qunit/qunit-2011-23-22.js diff --git a/addons/base/static/openerp/js/tests.js b/addons/base/static/openerp/js/tests.js new file mode 100644 index 00000000000..fe5a2998079 --- /dev/null +++ b/addons/base/static/openerp/js/tests.js @@ -0,0 +1,56 @@ +/** + * @function + * Defines a module scope (which lasts until the next call to module). + * + * This module scopes implies setup and teardown callbacks running for each test. + * + * @param {String} name the name of the module + * @param {Object} [lifecycle] callbacks to run before and after each test of the module + * @param {Function} lifecycle.setup function running before each test of this module + * @param {Function} lifecycle.teardown function running after each test of this module + */ +var module; +/** + * @function + * Defines a given test to run. Runs all the assertions present in the test + * + * @param {String} name the name of the test + * @param {Number} [expected] number of assertions expected to run in this test (useful for asynchronous tests) + * @param {Function} test the testing code to run, holding a sequence of assertions (at least one) + */ +var test; +/** + * @function + * The most basic boolean assertion (~assertTrue or assert). + * + * Passes if its argument is truthy + * + * @param {Boolean} state an arbitrary expression, evaluated in a boolean context + * @param {String} [message] the message to output with the assertion result + */ +var ok; +/** + * @function + * Equality assertion (~assertEqual) + * + * Passes if both arguments are equal (via ==) + * + * @param {Object} actual the object to check for correctness (processing result) + * @param {Object} expected the object to check against + * @param {String} [message] message output with the assertion result + */ +var equal; +/** + * @function + * Inequality assertion (~assertEqual) + * + * Passes if the arguments are different (via !=) + * + * @param {Object} actual the object to check for correctness (processing result) + * @param {Object} expected the object to check against + * @param {String} [message] message output with the assertion result + */ +var notEqual, deepEqual, notDeepEqual, + strictEqual, notStrictEqual, raises, start, stop; +$(document).ready(function () { +}); diff --git a/addons/base/static/openerp/test.html b/addons/base/static/openerp/test.html new file mode 100644 index 00000000000..0fd13cde45a --- /dev/null +++ b/addons/base/static/openerp/test.html @@ -0,0 +1,29 @@ + + + + + OpenERP + + + + + + + + + + + + + + + + +

    OpenERP Base Test Suite

    +

    +
    +

    +
      + + + diff --git a/addons/base/static/qunit/qunit-2011-23-22.css b/addons/base/static/qunit/qunit-2011-23-22.css new file mode 100644 index 00000000000..cc791a9b099 --- /dev/null +++ b/addons/base/static/qunit/qunit-2011-23-22.css @@ -0,0 +1,248 @@ +/** Font Family and Sizes */ + +#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { + font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial; +} + +#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { + font-size: small; +} + +#qunit-tests { + font-size: smaller; +} + +/** Resets */ + +#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult { + margin: 0; + padding: 0; +} + +/** Header */ + +#qunit-header { + padding: 0.5em 0 0.5em 1em; + + color: #8699a4; + background-color: #0d3349; + + font-size: 1.5em; + line-height: 1em; + font-weight: normal; + + border-radius: 15px 15px 0 0; + -moz-border-radius: 15px 15px 0 0; + -webkit-border-top-right-radius: 15px; + -webkit-border-top-left-radius: 15px; +} + +#qunit-header a { + text-decoration: none; + color: #c2ccd1; +} + +#qunit-header a:hover, +#qunit-header a:focus { + color: #fff; +} + +#qunit-banner { + height: 5px; +} + +#qunit-testrunner-toolbar { + padding: 0.5em 0 0.5em 2em; + color: #5E740B; + background-color: #eee; +} + +#qunit-userAgent { + padding: 0.5em 0 0.5em 2.5em; + background-color: #2b81af; + color: #fff; + text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; +} + +/** Tests: Pass/Fail */ + +#qunit-tests { + list-style-position: inside; +} + +#qunit-tests li { + padding: 0.4em 0.5em 0.4em 2.5em; + border-bottom: 1px solid #fff; + list-style-position: inside; +} + +#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { + display: none; +} + +#qunit-tests li strong { + cursor: pointer; +} + +#qunit-tests li a { + padding: 0.5em; + color: #c2ccd1; + text-decoration: none; +} + +#qunit-tests li a:hover, +#qunit-tests li a:focus { + color: #000; +} + +#qunit-tests ol { + margin-top: 0.5em; + padding: 0.5em; + + background-color: #fff; + + border-radius: 15px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; + + box-shadow: inset 0px 2px 13px #999; + -moz-box-shadow: inset 0px 2px 13px #999; + -webkit-box-shadow: inset 0px 2px 13px #999; +} + +#qunit-tests table { + border-collapse: collapse; + margin-top: .2em; +} + +#qunit-tests th { + text-align: right; + vertical-align: top; + padding: 0 .5em 0 0; +} + +#qunit-tests td { + vertical-align: top; +} + +#qunit-tests pre { + margin: 0; + white-space: pre-wrap; + word-wrap: break-word; +} + +#qunit-tests del { + background-color: #e0f2be; + color: #374e0c; + text-decoration: none; +} + +#qunit-tests ins { + background-color: #ffcaca; + color: #500; + text-decoration: none; +} + +/*** Test Counts */ + +#qunit-tests b.counts { + color: black; +} + +#qunit-tests b.passed { + color: #5E740B; +} + +#qunit-tests b.failed { + color: #710909; +} + +#qunit-tests li li { + margin: 0.5em; + padding: 0.4em 0.5em 0.4em 0.5em; + background-color: #fff; + border-bottom: none; + list-style-position: inside; +} + +/*** Passing Styles */ + +#qunit-tests li li.pass { + color: #5E740B; + background-color: #fff; + border-left: 26px solid #C6E746; +} + +#qunit-tests .pass { + color: #528CE0; + background-color: #D2E0E6; +} + +#qunit-tests .pass .test-name { + color: #366097; +} + +#qunit-tests .pass .test-actual, +#qunit-tests .pass .test-expected { + color: #999999; +} + +#qunit-banner.qunit-pass { + background-color: #C6E746; +} + +/*** Failing Styles */ + +#qunit-tests li li.fail { + color: #710909; + background-color: #fff; + border-left: 26px solid #EE5757; +} + +#qunit-tests > li:last-child { + border-radius: 0 0 15px 15px; + -moz-border-radius: 0 0 15px 15px; + -webkit-border-bottom-right-radius: 15px; + -webkit-border-bottom-left-radius: 15px; +} + +#qunit-tests .fail { + color: #000000; + background-color: #EE5757; +} + +#qunit-tests .fail .test-name, +#qunit-tests .fail .module-name { + color: #000000; +} + +#qunit-tests .fail .test-actual { + color: #EE5757; +} + +#qunit-tests .fail .test-expected { + color: green; +} + +#qunit-banner.qunit-fail { + background-color: #EE5757; +} + +/** Result */ + +#qunit-testresult { + padding: 0.5em 0.5em 0.5em 2.5em; + + color: #2b81af; + background-color: #D2E0E6; + + border-bottom: 1px solid white; +} + +/** Fixture */ + +#qunit-fixture { + position: absolute; + top: -10000px; + left: -10000px; +} diff --git a/addons/base/static/qunit/qunit-2011-23-22.js b/addons/base/static/qunit/qunit-2011-23-22.js new file mode 100644 index 00000000000..18f8ae1715c --- /dev/null +++ b/addons/base/static/qunit/qunit-2011-23-22.js @@ -0,0 +1,1456 @@ +/* + * QUnit - A JavaScript Unit Testing Framework + * + * http://docs.jquery.com/QUnit + * + * Copyright (c) 2011 John Resig, Jörn Zaefferer + * Dual licensed under the MIT (MIT-LICENSE.txt) + * or GPL (GPL-LICENSE.txt) licenses. + */ + +(function(window) { + + var defined = { + setTimeout: typeof window.setTimeout !== "undefined", + sessionStorage: (function() { + try { + return !!sessionStorage.getItem; + } catch(e) { + return false; + } + })() + }; + + var testId = 0; + + var Test = function(name, testName, expected, testEnvironmentArg, async, callback) { + this.name = name; + this.testName = testName; + this.expected = expected; + this.testEnvironmentArg = testEnvironmentArg; + this.async = async; + this.callback = callback; + this.assertions = []; + }; + Test.prototype = { + init: function() { + var tests = id("qunit-tests"); + if (tests) { + var b = document.createElement("strong"); + b.innerHTML = "Running " + this.name; + var li = document.createElement("li"); + li.appendChild(b); + li.className = "running"; + li.id = this.id = "test-output" + testId++; + tests.appendChild(li); + } + }, + setup: function() { + if (this.module != config.previousModule) { + if (config.previousModule) { + QUnit.moduleDone({ + name: config.previousModule, + failed: config.moduleStats.bad, + passed: config.moduleStats.all - config.moduleStats.bad, + total: config.moduleStats.all + }); + } + config.previousModule = this.module; + config.moduleStats = { all: 0, bad: 0 }; + QUnit.moduleStart({ + name: this.module + }); + } + + config.current = this; + this.testEnvironment = extend({ + setup: function() { + }, + teardown: function() { + } + }, this.moduleTestEnvironment); + if (this.testEnvironmentArg) { + extend(this.testEnvironment, this.testEnvironmentArg); + } + + QUnit.testStart({ + name: this.testName + }); + + // allow utility functions to access the current test environment + // TODO why?? + QUnit.current_testEnvironment = this.testEnvironment; + + try { + if (!config.pollution) { + saveGlobal(); + } + + this.testEnvironment.setup.call(this.testEnvironment); + } catch(e) { + QUnit.ok(false, "Setup failed on " + this.testName + ": " + e.message); + } + }, + run: function() { + if (this.async) { + QUnit.stop(); + } + + if (config.notrycatch) { + this.callback.call(this.testEnvironment); + return; + } + try { + this.callback.call(this.testEnvironment); + } catch(e) { + fail("Test " + this.testName + " died, exception and test follows", e, this.callback); + QUnit.ok(false, "Died on test #" + (this.assertions.length + 1) + ": " + e.message + " - " + QUnit.jsDump.parse(e)); + // else next test will carry the responsibility + saveGlobal(); + + // Restart the tests if they're blocking + if (config.blocking) { + start(); + } + } + }, + teardown: function() { + try { + checkPollution(); + this.testEnvironment.teardown.call(this.testEnvironment); + } catch(e) { + QUnit.ok(false, "Teardown failed on " + this.testName + ": " + e.message); + } + }, + finish: function() { + if (this.expected && this.expected != this.assertions.length) { + QUnit.ok(false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run"); + } + + var good = 0, bad = 0, + tests = id("qunit-tests"); + + config.stats.all += this.assertions.length; + config.moduleStats.all += this.assertions.length; + + if (tests) { + var ol = document.createElement("ol"); + + for (var i = 0; i < this.assertions.length; i++) { + var assertion = this.assertions[i]; + + var li = document.createElement("li"); + li.className = assertion.result ? "pass" : "fail"; + li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed"); + ol.appendChild(li); + + if (assertion.result) { + good++; + } else { + bad++; + config.stats.bad++; + config.moduleStats.bad++; + } + } + + // store result when possible + if (QUnit.config.reorder && defined.sessionStorage) { + if (bad) { + sessionStorage.setItem("qunit-" + this.module + "-" + this.testName, bad) + } else { + sessionStorage.removeItem("qunit-" + this.testName); + } + } + + if (bad == 0) { + ol.style.display = "none"; + } + + var b = document.createElement("strong"); + b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")"; + + var a = document.createElement("a"); + a.innerHTML = "Rerun"; + a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); + + addEvent(b, "click", function() { + var next = b.nextSibling.nextSibling, + display = next.style.display; + next.style.display = display === "none" ? "block" : "none"; + }); + + addEvent(b, "dblclick", function(e) { + var target = e && e.target ? e.target : window.event.srcElement; + if (target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b") { + target = target.parentNode; + } + if (window.location && target.nodeName.toLowerCase() === "strong") { + window.location = QUnit.url({ filter: getText([target]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") }); + } + }); + + var li = id(this.id); + li.className = bad ? "fail" : "pass"; + li.removeChild(li.firstChild); + li.appendChild(b); + li.appendChild(a); + li.appendChild(ol); + + } else { + for (var i = 0; i < this.assertions.length; i++) { + if (!this.assertions[i].result) { + bad++; + config.stats.bad++; + config.moduleStats.bad++; + } + } + } + + try { + QUnit.reset(); + } catch(e) { + fail("reset() failed, following Test " + this.testName + ", exception and reset fn follows", e, QUnit.reset); + } + + QUnit.testDone({ + name: this.testName, + failed: bad, + passed: this.assertions.length - bad, + total: this.assertions.length + }); + }, + + queue: function() { + var test = this; + synchronize(function() { + test.init(); + }); + function run() { + // each of these can by async + synchronize(function() { + test.setup(); + }); + synchronize(function() { + test.run(); + }); + synchronize(function() { + test.teardown(); + }); + synchronize(function() { + test.finish(); + }); + } + + // defer when previous test run passed, if storage is available + var bad = QUnit.config.reorder && defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.module + "-" + this.testName); + if (bad) { + run(); + } else { + synchronize(run); + } + ; + } + + }; + + var QUnit = { + + // call on start of module test to prepend name to all tests + module: function(name, testEnvironment) { + config.currentModule = name; + config.currentModuleTestEnviroment = testEnvironment; + }, + + asyncTest: function(testName, expected, callback) { + if (arguments.length === 2) { + callback = expected; + expected = 0; + } + + QUnit.test(testName, expected, callback, true); + }, + + test: function(testName, expected, callback, async) { + var name = '' + testName + '', testEnvironmentArg; + + if (arguments.length === 2) { + callback = expected; + expected = null; + } + // is 2nd argument a testEnvironment? + if (expected && typeof expected === 'object') { + testEnvironmentArg = expected; + expected = null; + } + + if (config.currentModule) { + name = '' + config.currentModule + ": " + name; + } + + if (!validTest(config.currentModule + ": " + testName)) { + return; + } + + var test = new Test(name, testName, expected, testEnvironmentArg, async, callback); + test.module = config.currentModule; + test.moduleTestEnvironment = config.currentModuleTestEnviroment; + test.queue(); + }, + + /** + * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through. + */ + expect: function(asserts) { + config.current.expected = asserts; + }, + + /** + * Asserts true. + * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" ); + */ + ok: function(a, msg) { + a = !!a; + var details = { + result: a, + message: msg + }; + msg = escapeHtml(msg); + QUnit.log(details); + config.current.assertions.push({ + result: a, + message: msg + }); + }, + + /** + * Checks that the first two arguments are equal, with an optional message. + * Prints out both actual and expected values. + * + * Prefered to ok( actual == expected, message ) + * + * @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." ); + * + * @param Object actual + * @param Object expected + * @param String message (optional) + */ + equal: function(actual, expected, message) { + QUnit.push(expected == actual, actual, expected, message); + }, + + notEqual: function(actual, expected, message) { + QUnit.push(expected != actual, actual, expected, message); + }, + + deepEqual: function(actual, expected, message) { + QUnit.push(QUnit.equiv(actual, expected), actual, expected, message); + }, + + notDeepEqual: function(actual, expected, message) { + QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message); + }, + + strictEqual: function(actual, expected, message) { + QUnit.push(expected === actual, actual, expected, message); + }, + + notStrictEqual: function(actual, expected, message) { + QUnit.push(expected !== actual, actual, expected, message); + }, + + raises: function(block, expected, message) { + var actual, ok = false; + + if (typeof expected === 'string') { + message = expected; + expected = null; + } + + try { + block(); + } catch (e) { + actual = e; + } + + if (actual) { + // we don't want to validate thrown error + if (!expected) { + ok = true; + // expected is a regexp + } else if (QUnit.objectType(expected) === "regexp") { + ok = expected.test(actual); + // expected is a constructor + } else if (actual instanceof expected) { + ok = true; + // expected is a validation function which returns true is validation passed + } else if (expected.call({}, actual) === true) { + ok = true; + } + } + + QUnit.ok(ok, message); + }, + + start: function() { + config.semaphore--; + if (config.semaphore > 0) { + // don't start until equal number of stop-calls + return; + } + if (config.semaphore < 0) { + // ignore if start is called more often then stop + config.semaphore = 0; + } + // A slight delay, to avoid any current callbacks + if (defined.setTimeout) { + window.setTimeout(function() { + if (config.timeout) { + clearTimeout(config.timeout); + } + + config.blocking = false; + process(); + }, 13); + } else { + config.blocking = false; + process(); + } + }, + + stop: function(timeout) { + config.semaphore++; + config.blocking = true; + + if (timeout && defined.setTimeout) { + clearTimeout(config.timeout); + config.timeout = window.setTimeout(function() { + QUnit.ok(false, "Test timed out"); + QUnit.start(); + }, timeout); + } + } + }; + +// Backwards compatibility, deprecated + QUnit.equals = QUnit.equal; + QUnit.same = QUnit.deepEqual; + +// Maintain internal state + var config = { + // The queue of tests to run + queue: [], + + // block until document ready + blocking: true, + + // by default, run previously failed tests first + // very useful in combination with "Hide passed tests" checked + reorder: true, + + noglobals: false, + notrycatch: false + }; + +// Load paramaters + (function() { + var location = window.location || { search: "", protocol: "file:" }, + params = location.search.slice(1).split("&"), + length = params.length, + urlParams = {}, + current; + + if (params[ 0 ]) { + for (var i = 0; i < length; i++) { + current = params[ i ].split("="); + current[ 0 ] = decodeURIComponent(current[ 0 ]); + // allow just a key to turn on a flag, e.g., test.html?noglobals + current[ 1 ] = current[ 1 ] ? decodeURIComponent(current[ 1 ]) : true; + urlParams[ current[ 0 ] ] = current[ 1 ]; + if (current[ 0 ] in config) { + config[ current[ 0 ] ] = current[ 1 ]; + } + } + } + + QUnit.urlParams = urlParams; + config.filter = urlParams.filter; + + // Figure out if we're running the tests from a server or not + QUnit.isLocal = !!(location.protocol === 'file:'); + })(); + +// Expose the API as global variables, unless an 'exports' +// object exists, in that case we assume we're in CommonJS + if (typeof exports === "undefined" || typeof require === "undefined") { + extend(window, QUnit); + window.QUnit = QUnit; + } else { + extend(exports, QUnit); + exports.QUnit = QUnit; + } + +// define these after exposing globals to keep them in these QUnit namespace only + extend(QUnit, { + config: config, + + // Initialize the configuration options + init: function() { + extend(config, { + stats: { all: 0, bad: 0 }, + moduleStats: { all: 0, bad: 0 }, + started: +new Date, + updateRate: 1000, + blocking: false, + autostart: true, + autorun: false, + filter: "", + queue: [], + semaphore: 0 + }); + + var tests = id("qunit-tests"), + banner = id("qunit-banner"), + result = id("qunit-testresult"); + + if (tests) { + tests.innerHTML = ""; + } + + if (banner) { + banner.className = ""; + } + + if (result) { + result.parentNode.removeChild(result); + } + + if (tests) { + result = document.createElement("p"); + result.id = "qunit-testresult"; + result.className = "result"; + tests.parentNode.insertBefore(result, tests); + result.innerHTML = 'Running...
       '; + } + }, + + /** + * Resets the test setup. Useful for tests that modify the DOM. + * + * If jQuery is available, uses jQuery's html(), otherwise just innerHTML. + */ + reset: function() { + if (window.jQuery) { + jQuery("#main, #qunit-fixture").html(config.fixture); + } else { + var main = id('main') || id('qunit-fixture'); + if (main) { + main.innerHTML = config.fixture; + } + } + }, + + /** + * Trigger an event on an element. + * + * @example triggerEvent( document.body, "click" ); + * + * @param {Element} elem + * @param {String} type + */ + triggerEvent: function(elem, type, event) { + if (document.createEvent) { + event = document.createEvent("MouseEvents"); + event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView, + 0, 0, 0, 0, 0, false, false, false, false, 0, null); + elem.dispatchEvent(event); + + } else if (elem.fireEvent) { + elem.fireEvent("on" + type); + } + }, + + // Safe object type checking + is: function(type, obj) { + return QUnit.objectType(obj) == type; + }, + + objectType: function(obj) { + if (typeof obj === "undefined") { + return "undefined"; + + // consider: typeof null === object + } + if (obj === null) { + return "null"; + } + + var type = Object.prototype.toString.call(obj) + .match(/^\[object\s(.*)\]$/)[1] || ''; + + switch (type) { + case 'Number': + if (isNaN(obj)) { + return "nan"; + } else { + return "number"; + } + case 'String': + case 'Boolean': + case 'Array': + case 'Date': + case 'RegExp': + case 'Function': + return type.toLowerCase(); + } + if (typeof obj === "object") { + return "object"; + } + return undefined; + }, + + push: function(result, actual, expected, message) { + var details = { + result: result, + message: message, + actual: actual, + expected: expected + }; + + message = escapeHtml(message) || (result ? "okay" : "failed"); + message = '' + message + ""; + expected = escapeHtml(QUnit.jsDump.parse(expected)); + actual = escapeHtml(QUnit.jsDump.parse(actual)); + var output = message + ''; + if (actual != expected) { + output += ''; + output += ''; + } + if (!result) { + var source = sourceFromStacktrace(); + if (source) { + details.source = source; + output += ''; + } + } + output += "
      Expected:
      ' + expected + '
      Result:
      ' + actual + '
      Diff:
      ' + QUnit.diff(expected, actual) + '
      Source:
      ' + source + '
      "; + + QUnit.log(details); + + config.current.assertions.push({ + result: !!result, + message: output + }); + }, + + url: function(params) { + params = extend(extend({}, QUnit.urlParams), params); + var querystring = "?", + key; + for (key in params) { + querystring += encodeURIComponent(key) + "=" + + encodeURIComponent(params[ key ]) + "&"; + } + return window.location.pathname + querystring.slice(0, -1); + }, + + // Logging callbacks; all receive a single argument with the listed properties + // run test/logs.html for any related changes + begin: function() { + }, + // done: { failed, passed, total, runtime } + done: function() { + }, + // log: { result, actual, expected, message } + log: function() { + }, + // testStart: { name } + testStart: function() { + }, + // testDone: { name, failed, passed, total } + testDone: function() { + }, + // moduleStart: { name } + moduleStart: function() { + }, + // moduleDone: { name, failed, passed, total } + moduleDone: function() { + } + }); + + if (typeof document === "undefined" || document.readyState === "complete") { + config.autorun = true; + } + + addEvent(window, "load", function() { + QUnit.begin({}); + + // Initialize the config, saving the execution queue + var oldconfig = extend({}, config); + QUnit.init(); + extend(config, oldconfig); + + config.blocking = false; + + var userAgent = id("qunit-userAgent"); + if (userAgent) { + userAgent.innerHTML = navigator.userAgent; + } + var banner = id("qunit-header"); + if (banner) { + banner.innerHTML = ' ' + banner.innerHTML + ' ' + + '' + + ''; + addEvent(banner, "change", function(event) { + var params = {}; + params[ event.target.name ] = event.target.checked ? true : undefined; + window.location = QUnit.url(params); + }); + } + + var toolbar = id("qunit-testrunner-toolbar"); + if (toolbar) { + var filter = document.createElement("input"); + filter.type = "checkbox"; + filter.id = "qunit-filter-pass"; + addEvent(filter, "click", function() { + var ol = document.getElementById("qunit-tests"); + if (filter.checked) { + ol.className = ol.className + " hidepass"; + } else { + var tmp = " " + ol.className.replace(/[\n\t\r]/g, " ") + " "; + ol.className = tmp.replace(/ hidepass /, " "); + } + if (defined.sessionStorage) { + if (filter.checked) { + sessionStorage.setItem("qunit-filter-passed-tests", "true"); + } else { + sessionStorage.removeItem("qunit-filter-passed-tests"); + } + } + }); + if (defined.sessionStorage && sessionStorage.getItem("qunit-filter-passed-tests")) { + filter.checked = true; + var ol = document.getElementById("qunit-tests"); + ol.className = ol.className + " hidepass"; + } + toolbar.appendChild(filter); + + var label = document.createElement("label"); + label.setAttribute("for", "qunit-filter-pass"); + label.innerHTML = "Hide passed tests"; + toolbar.appendChild(label); + } + + var main = id('main') || id('qunit-fixture'); + if (main) { + config.fixture = main.innerHTML; + } + + if (config.autostart) { + QUnit.start(); + } + }); + + function done() { + config.autorun = true; + + // Log the last module results + if (config.currentModule) { + QUnit.moduleDone({ + name: config.currentModule, + failed: config.moduleStats.bad, + passed: config.moduleStats.all - config.moduleStats.bad, + total: config.moduleStats.all + }); + } + + var banner = id("qunit-banner"), + tests = id("qunit-tests"), + runtime = +new Date - config.started, + passed = config.stats.all - config.stats.bad, + html = [ + 'Tests completed in ', + runtime, + ' milliseconds.
      ', + '', + passed, + ' tests of ', + config.stats.all, + ' passed, ', + config.stats.bad, + ' failed.' + ].join(''); + + if (banner) { + banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass"); + } + + if (tests) { + id("qunit-testresult").innerHTML = html; + } + + QUnit.done({ + failed: config.stats.bad, + passed: passed, + total: config.stats.all, + runtime: runtime + }); + } + + function validTest(name) { + var filter = config.filter, + run = false; + + if (!filter) { + return true; + } + + var not = filter.charAt(0) === "!"; + if (not) { + filter = filter.slice(1); + } + + if (name.indexOf(filter) !== -1) { + return !not; + } + + if (not) { + run = true; + } + + return run; + } + +// so far supports only Firefox, Chrome and Opera (buggy) +// could be extended in the future to use something like https://github.com/csnover/TraceKit + function sourceFromStacktrace() { + try { + throw new Error(); + } catch (e) { + if (e.stacktrace) { + // Opera + return e.stacktrace.split("\n")[6]; + } else if (e.stack) { + // Firefox, Chrome + return e.stack.split("\n")[4]; + } + } + } + + function escapeHtml(s) { + if (!s) { + return ""; + } + s = s + ""; + return s.replace(/[\&"<>\\]/g, function(s) { + switch (s) { + case "&": return "&"; + case "\\": return "\\\\"; + case '"': return '\"'; + case "<": return "<"; + case ">": return ">"; + default: return s; + } + }); + } + + function synchronize(callback) { + config.queue.push(callback); + + if (config.autorun && !config.blocking) { + process(); + } + } + + function process() { + var start = (new Date()).getTime(); + + while (config.queue.length && !config.blocking) { + if (config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate)) { + config.queue.shift()(); + } else { + window.setTimeout(process, 13); + break; + } + } + if (!config.blocking && !config.queue.length) { + done(); + } + } + + function saveGlobal() { + config.pollution = []; + + if (config.noglobals) { + for (var key in window) { + config.pollution.push(key); + } + } + } + + function checkPollution(name) { + var old = config.pollution; + saveGlobal(); + + var newGlobals = diff(config.pollution, old); + if (newGlobals.length > 0) { + ok(false, "Introduced global variable(s): " + newGlobals.join(", ")); + } + + var deletedGlobals = diff(old, config.pollution); + if (deletedGlobals.length > 0) { + ok(false, "Deleted global variable(s): " + deletedGlobals.join(", ")); + } + } + +// returns a new Array with the elements that are in a but not in b + function diff(a, b) { + var result = a.slice(); + for (var i = 0; i < result.length; i++) { + for (var j = 0; j < b.length; j++) { + if (result[i] === b[j]) { + result.splice(i, 1); + i--; + break; + } + } + } + return result; + } + + function fail(message, exception, callback) { + if (typeof console !== "undefined" && console.error && console.warn) { + console.error(message); + console.error(exception); + console.warn(callback.toString()); + + } else if (window.opera && opera.postError) { + opera.postError(message, exception, callback.toString); + } + } + + function extend(a, b) { + for (var prop in b) { + if (b[prop] === undefined) { + delete a[prop]; + } else { + a[prop] = b[prop]; + } + } + + return a; + } + + function addEvent(elem, type, fn) { + if (elem.addEventListener) { + elem.addEventListener(type, fn, false); + } else if (elem.attachEvent) { + elem.attachEvent("on" + type, fn); + } else { + fn(); + } + } + + function id(name) { + return !!(typeof document !== "undefined" && document && document.getElementById) && + document.getElementById(name); + } + +// Test for equality any JavaScript type. +// Discussions and reference: http://philrathe.com/articles/equiv +// Test suites: http://philrathe.com/tests/equiv +// Author: Philippe Rathé + QUnit.equiv = function () { + + var innerEquiv; // the real equiv function + var callers = []; // stack to decide between skip/abort functions + var parents = []; // stack to avoiding loops from circular referencing + + // Call the o related callback with the given arguments. + function bindCallbacks(o, callbacks, args) { + var prop = QUnit.objectType(o); + if (prop) { + if (QUnit.objectType(callbacks[prop]) === "function") { + return callbacks[prop].apply(callbacks, args); + } else { + return callbacks[prop]; // or undefined + } + } + } + + var callbacks = function () { + + // for string, boolean, number and null + function useStrictEquality(b, a) { + if (b instanceof a.constructor || a instanceof b.constructor) { + // to catch short annotaion VS 'new' annotation of a declaration + // e.g. var i = 1; + // var j = new Number(1); + return a == b; + } else { + return a === b; + } + } + + return { + "string": useStrictEquality, + "boolean": useStrictEquality, + "number": useStrictEquality, + "null": useStrictEquality, + "undefined": useStrictEquality, + + "nan": function (b) { + return isNaN(b); + }, + + "date": function (b, a) { + return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf(); + }, + + "regexp": function (b, a) { + return QUnit.objectType(b) === "regexp" && + a.source === b.source && // the regex itself + a.global === b.global && // and its modifers (gmi) ... + a.ignoreCase === b.ignoreCase && + a.multiline === b.multiline; + }, + + // - skip when the property is a method of an instance (OOP) + // - abort otherwise, + // initial === would have catch identical references anyway + "function": function () { + var caller = callers[callers.length - 1]; + return caller !== Object && + typeof caller !== "undefined"; + }, + + "array": function (b, a) { + var i, j, loop; + var len; + + // b could be an object literal here + if (! (QUnit.objectType(b) === "array")) { + return false; + } + + len = a.length; + if (len !== b.length) { // safe and faster + return false; + } + + //track reference to avoid circular references + parents.push(a); + for (i = 0; i < len; i++) { + loop = false; + for (j = 0; j < parents.length; j++) { + if (parents[j] === a[i]) { + loop = true;//dont rewalk array + } + } + if (!loop && ! innerEquiv(a[i], b[i])) { + parents.pop(); + return false; + } + } + parents.pop(); + return true; + }, + + "object": function (b, a) { + var i, j, loop; + var eq = true; // unless we can proove it + var aProperties = [], bProperties = []; // collection of strings + + // comparing constructors is more strict than using instanceof + if (a.constructor !== b.constructor) { + return false; + } + + // stack constructor before traversing properties + callers.push(a.constructor); + //track reference to avoid circular references + parents.push(a); + + for (i in a) { // be strict: don't ensures hasOwnProperty and go deep + loop = false; + for (j = 0; j < parents.length; j++) { + if (parents[j] === a[i]) + loop = true; //don't go down the same path twice + } + aProperties.push(i); // collect a's properties + + if (!loop && ! innerEquiv(a[i], b[i])) { + eq = false; + break; + } + } + + callers.pop(); // unstack, we are done + parents.pop(); + + for (i in b) { + bProperties.push(i); // collect b's properties + } + + // Ensures identical properties name + return eq && innerEquiv(aProperties.sort(), bProperties.sort()); + } + }; + }(); + + innerEquiv = function () { // can take multiple arguments + var args = Array.prototype.slice.apply(arguments); + if (args.length < 2) { + return true; // end transition + } + + return (function (a, b) { + if (a === b) { + return true; // catch the most you can + } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || QUnit.objectType(a) !== QUnit.objectType(b)) { + return false; // don't lose time with error prone cases + } else { + return bindCallbacks(a, callbacks, [b, a]); + } + + // apply transition with (1..n) arguments + })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length - 1)); + }; + + return innerEquiv; + + }(); + + /** + * jsDump + * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com + * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php) + * Date: 5/15/2008 + * @projectDescription Advanced and extensible data dumping for Javascript. + * @version 1.0.0 + * @author Ariel Flesler + * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html} + */ + QUnit.jsDump = (function() { + function quote(str) { + return '"' + str.toString().replace(/"/g, '\\"') + '"'; + } + + function literal(o) { + return o + ''; + } + + function join(pre, arr, post) { + var s = jsDump.separator(), + base = jsDump.indent(), + inner = jsDump.indent(1); + if (arr.join) + arr = arr.join(',' + s + inner); + if (!arr) + return pre + post; + return [ pre, inner + arr, base + post ].join(s); + } + + function array(arr) { + var i = arr.length, ret = Array(i); + this.up(); + while (i--) + ret[i] = this.parse(arr[i]); + this.down(); + return join('[', ret, ']'); + } + + var reName = /^function (\w+)/; + + var jsDump = { + parse:function(obj, type) { //type is used mostly internally, you can fix a (custom)type in advance + var parser = this.parsers[ type || this.typeOf(obj) ]; + type = typeof parser; + + return type == 'function' ? parser.call(this, obj) : + type == 'string' ? parser : + this.parsers.error; + }, + typeOf:function(obj) { + var type; + if (obj === null) { + type = "null"; + } else if (typeof obj === "undefined") { + type = "undefined"; + } else if (QUnit.is("RegExp", obj)) { + type = "regexp"; + } else if (QUnit.is("Date", obj)) { + type = "date"; + } else if (QUnit.is("Function", obj)) { + type = "function"; + } else if (typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined") { + type = "window"; + } else if (obj.nodeType === 9) { + type = "document"; + } else if (obj.nodeType) { + type = "node"; + } else if (typeof obj === "object" && typeof obj.length === "number" && obj.length >= 0) { + type = "array"; + } else { + type = typeof obj; + } + return type; + }, + separator:function() { + return this.multiline ? this.HTML ? '
      ' : '\n' : this.HTML ? ' ' : ' '; + }, + indent:function(extra) {// extra can be a number, shortcut for increasing-calling-decreasing + if (!this.multiline) + return ''; + var chr = this.indentChar; + if (this.HTML) + chr = chr.replace(/\t/g, ' ').replace(/ /g, ' '); + return Array(this._depth_ + (extra || 0)).join(chr); + }, + up:function(a) { + this._depth_ += a || 1; + }, + down:function(a) { + this._depth_ -= a || 1; + }, + setParser:function(name, parser) { + this.parsers[name] = parser; + }, + // The next 3 are exposed so you can use them + quote:quote, + literal:literal, + join:join, + // + _depth_: 1, + // This is the list of parsers, to modify them, use jsDump.setParser + parsers:{ + window: '[Window]', + document: '[Document]', + error:'[ERROR]', //when no parser is found, shouldn't happen + unknown: '[Unknown]', + 'null':'null', + 'undefined':'undefined', + 'function':function(fn) { + var ret = 'function', + name = 'name' in fn ? fn.name : (reName.exec(fn) || [])[1];//functions never have name in IE + if (name) + ret += ' ' + name; + ret += '('; + + ret = [ ret, QUnit.jsDump.parse(fn, 'functionArgs'), '){'].join(''); + return join(ret, QUnit.jsDump.parse(fn, 'functionCode'), '}'); + }, + array: array, + nodelist: array, + arguments: array, + object:function(map) { + var ret = [ ]; + QUnit.jsDump.up(); + for (var key in map) + ret.push(QUnit.jsDump.parse(key, 'key') + ': ' + QUnit.jsDump.parse(map[key])); + QUnit.jsDump.down(); + return join('{', ret, '}'); + }, + node:function(node) { + var open = QUnit.jsDump.HTML ? '<' : '<', + close = QUnit.jsDump.HTML ? '>' : '>'; + + var tag = node.nodeName.toLowerCase(), + ret = open + tag; + + for (var a in QUnit.jsDump.DOMAttrs) { + var val = node[QUnit.jsDump.DOMAttrs[a]]; + if (val) + ret += ' ' + a + '=' + QUnit.jsDump.parse(val, 'attribute'); + } + return ret + close + open + '/' + tag + close; + }, + functionArgs:function(fn) {//function calls it internally, it's the arguments part of the function + var l = fn.length; + if (!l) return ''; + + var args = Array(l); + while (l--) + args[l] = String.fromCharCode(97 + l);//97 is 'a' + return ' ' + args.join(', ') + ' '; + }, + key:quote, //object calls it internally, the key part of an item in a map + functionCode:'[code]', //function calls it internally, it's the content of the function + attribute:quote, //node calls it internally, it's an html attribute value + string:quote, + date:quote, + regexp:literal, //regex + number:literal, + 'boolean':literal + }, + DOMAttrs:{//attributes to dump from nodes, name=>realName + id:'id', + name:'name', + 'class':'className' + }, + HTML:false,//if true, entities are escaped ( <, >, \t, space and \n ) + indentChar:' ',//indentation unit + multiline:true //if true, items in a collection, are separated by a \n, else just a space. + }; + + return jsDump; + })(); + +// from Sizzle.js + function getText(elems) { + var ret = "", elem; + + for (var i = 0; elems[i]; i++) { + elem = elems[i]; + + // Get the text from text nodes and CDATA nodes + if (elem.nodeType === 3 || elem.nodeType === 4) { + ret += elem.nodeValue; + + // Traverse everything else, except comment nodes + } else if (elem.nodeType !== 8) { + ret += getText(elem.childNodes); + } + } + + return ret; + } + + /* + * Javascript Diff Algorithm + * By John Resig (http://ejohn.org/) + * Modified by Chu Alan "sprite" + * + * Released under the MIT license. + * + * More Info: + * http://ejohn.org/projects/javascript-diff-algorithm/ + * + * Usage: QUnit.diff(expected, actual) + * + * QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick brown fox jumped jumps over" + */ + QUnit.diff = (function() { + function diff(o, n) { + var ns = new Object(); + var os = new Object(); + + for (var i = 0; i < n.length; i++) { + if (ns[n[i]] == null) + ns[n[i]] = { + rows: new Array(), + o: null + }; + ns[n[i]].rows.push(i); + } + + for (var i = 0; i < o.length; i++) { + if (os[o[i]] == null) + os[o[i]] = { + rows: new Array(), + n: null + }; + os[o[i]].rows.push(i); + } + + for (var i in ns) { + if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) { + n[ns[i].rows[0]] = { + text: n[ns[i].rows[0]], + row: os[i].rows[0] + }; + o[os[i].rows[0]] = { + text: o[os[i].rows[0]], + row: ns[i].rows[0] + }; + } + } + + for (var i = 0; i < n.length - 1; i++) { + if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null && + n[i + 1] == o[n[i].row + 1]) { + n[i + 1] = { + text: n[i + 1], + row: n[i].row + 1 + }; + o[n[i].row + 1] = { + text: o[n[i].row + 1], + row: i + 1 + }; + } + } + + for (var i = n.length - 1; i > 0; i--) { + if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null && + n[i - 1] == o[n[i].row - 1]) { + n[i - 1] = { + text: n[i - 1], + row: n[i].row - 1 + }; + o[n[i].row - 1] = { + text: o[n[i].row - 1], + row: i - 1 + }; + } + } + + return { + o: o, + n: n + }; + } + + return function(o, n) { + o = o.replace(/\s+$/, ''); + n = n.replace(/\s+$/, ''); + var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/)); + + var str = ""; + + var oSpace = o.match(/\s+/g); + if (oSpace == null) { + oSpace = [" "]; + } + else { + oSpace.push(" "); + } + var nSpace = n.match(/\s+/g); + if (nSpace == null) { + nSpace = [" "]; + } + else { + nSpace.push(" "); + } + + if (out.n.length == 0) { + for (var i = 0; i < out.o.length; i++) { + str += '' + out.o[i] + oSpace[i] + ""; + } + } + else { + if (out.n[0].text == null) { + for (n = 0; n < out.o.length && out.o[n].text == null; n++) { + str += '' + out.o[n] + oSpace[n] + ""; + } + } + + for (var i = 0; i < out.n.length; i++) { + if (out.n[i].text == null) { + str += '' + out.n[i] + nSpace[i] + ""; + } + else { + var pre = ""; + + for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) { + pre += '' + out.o[n] + oSpace[n] + ""; + } + str += " " + out.n[i].text + nSpace[i] + pre; + } + } + } + + return str; + }; + })(); + +})(this); From 2a068e215241bd3de4d956d9d52d342d09339090 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 22 Mar 2011 17:57:42 +0100 Subject: [PATCH 646/681] [FIX] Removed useless dependency in the documentation generator that is difficult to install under ubuntu. bzr revid: nicolas.vanhoren@openerp.com-20110322165742-umlvufznh5unkhh5 --- doc/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 365a1b7086b..d3f486f19c5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -25,7 +25,7 @@ import sys, os # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage' ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] From 8284359b831a981edcaaf367836d406ca422ce5e Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Tue, 22 Mar 2011 18:18:01 +0100 Subject: [PATCH 647/681] [IMP] Improved FieldChar widget bzr revid: fme@openerp.com-20110322171801-e5jmov41xg3pnzfz --- addons/base/static/openerp/base.css | 3 + addons/base/static/openerp/base.xml | 63 ++++++---- addons/base/static/openerp/js/base_views.js | 129 ++++++++++++-------- doc/source/addons.rst | 16 ++- 4 files changed, 141 insertions(+), 70 deletions(-) diff --git a/addons/base/static/openerp/base.css b/addons/base/static/openerp/base.css index 0be7bcb8807..f84d76a0f07 100644 --- a/addons/base/static/openerp/base.css +++ b/addons/base/static/openerp/base.css @@ -416,6 +416,9 @@ body.openerp { border-bottom-width: 1px; margin: 6px 4px 6px 1px; } +.openerp input[required=required], .openerp select[required=required] { + background-color: #D2D2FF; +} /* jQuery UI override */ .openerp .ui-widget { diff --git a/addons/base/static/openerp/base.xml b/addons/base/static/openerp/base.xml index d640b21803d..40edce66c3e 100644 --- a/addons/base/static/openerp/base.xml +++ b/addons/base/static/openerp/base.xml @@ -162,28 +162,28 @@ - + t-att-valign="td.table ? 'top' : undefined" + t-att-id="td.element_id" + > + -
      - - -
      - -
      -
      -
      + + +
      + +
      +
      @@ -191,23 +191,39 @@
      - - + - + - + - + diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index 586f958651e..d9db2348066 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -273,7 +273,7 @@ openerp.base.FormView = openerp.base.Controller.extend({ }, on_record_loaded: function() { for (var f in this.fields) { - this.fields[f].set_value(); + this.fields[f].set_value(this.datarecord.values[f]); } } }); @@ -487,9 +487,17 @@ openerp.base.WidgetSeparator = openerp.base.Widget.extend({ } }); +openerp.base.WidgetButton = openerp.base.Widget.extend({ + init: function(view, node) { + this._super(view, node); + this.template = "WidgetButton"; + } +}); + openerp.base.WidgetLabel = openerp.base.Widget.extend({ init: function(view, node) { this.is_field_label = true; + this.element_name = 'label_' + node.attrs.name; this._super(view, node); @@ -498,19 +506,13 @@ openerp.base.WidgetLabel = openerp.base.Widget.extend({ } }); -openerp.base.WidgetButton = openerp.base.Widget.extend({ - init: function(view, node) { - this._super(view, node); - this.template = "WidgetButton"; - } -}); - openerp.base.Field = openerp.base.Widget.extend({ init: function(view, node) { this.name = node.attrs.name; view.fields[this.name] = this; this.type = node.attrs.widget || view.fields_view.fields[node.attrs.name].type; this.element_name = "field_" + this.name + "_" + this.type; + this.original_value; this._super(view, node); @@ -523,7 +525,8 @@ openerp.base.Field = openerp.base.Widget.extend({ this.help = node.attrs.help || this.field.help; this.nolabel = (node.attrs.nolabel == '1'); }, - set_value: function() { + set_value: function(value) { + this.original_value = value; } }); @@ -536,53 +539,35 @@ openerp.base.FieldChar = openerp.base.Field.extend({ this._super.apply(this, arguments); // this.$element.bind('change',) ... blur, focus, ... }, - set_value: function() { - this.$element.val(this.view.datarecord.values[this.name]); + set_value: function(value) { + this._super.apply(this, arguments); + if (value != null && value !== false) { + this.$element.find('input').val(this.to_string(value)); + } + }, + get_value: function() { + return this.from_string(this.$element.find('input').val()); + }, + to_string: function(value) { + return value.toString(); + }, + from_string: function(value) { + return value.toString(); }, on_change: function() { //this.view.update_field(this.name,value); } }); -openerp.base.FieldEmail = openerp.base.Field.extend({ - init: function(view, node) { - this._super(view, node); - this.template = "FieldEmail"; - } +openerp.base.FieldEmail = openerp.base.FieldChar.extend({ }); -openerp.base.FieldUrl = openerp.base.Field.extend({ - init: function(view, node) { - this._super(view, node); - this.template = "FieldChar"; - } +openerp.base.FieldUrl = openerp.base.FieldChar.extend({ }); -openerp.base.FieldFloat = openerp.base.Field.extend({ - init: function(view, node) { - this._super(view, node); - this.template = "FieldChar"; - } -}); - -openerp.base.FieldBoolean = openerp.base.Field.extend({ - init: function(view, node) { - this._super(view, node); - this.template = "FieldBoolean"; - } -}); - -openerp.base.FieldDate = openerp.base.Field.extend({ - init: function(view, node) { - this._super(view, node); - this.template = "FieldDate"; - } -}); - -openerp.base.FieldDatetime = openerp.base.Field.extend({ - init: function(view, node) { - this._super(view, node); - this.template = "FieldDatetime"; +openerp.base.FieldFloat = openerp.base.FieldChar.extend({ + to_string: function(value) { + return value.toFixed(2); } }); @@ -590,6 +575,43 @@ openerp.base.FieldText = openerp.base.Field.extend({ init: function(view, node) { this._super(view, node); this.template = "FieldText"; + }, + set_value: function(value) { + this._super.apply(this, arguments); + if (value != null && value !== false) { + this.$element.find('textarea').val(value); + } + }, + get_value: function() { + return this.$element.find('textarea').val(); + } +}); + +openerp.base.FieldBoolean = openerp.base.Field.extend({ + init: function(view, node) { + this._super(view, node); + this.template = "FieldBoolean"; + }, + set_value: function(value) { + this._super.apply(this, arguments); + this.$element.find('input')[0].checked = value; + }, + get_value: function() { + this.$element.find('input')[0].checked; + } +}); + +openerp.base.FieldDate = openerp.base.FieldChar.extend({ + init: function(view, node) { + this._super(view, node); + this.template = "FieldDate"; + } +}); + +openerp.base.FieldDatetime = openerp.base.FieldChar.extend({ + init: function(view, node) { + this._super(view, node); + this.template = "FieldDatetime"; } }); @@ -601,6 +623,15 @@ openerp.base.FieldSelection = openerp.base.Field.extend({ init: function(view, node) { this._super(view, node); this.template = "FieldSelection"; + }, + set_value: function(value) { + this._super.apply(this, arguments); + if (value != null && value !== false) { + this.$element.find('select').val(value); + } + }, + get_value: function() { + return this.$element.find('select').val(); } }); @@ -638,14 +669,16 @@ openerp.base.widgets = { 'separator' : openerp.base.WidgetSeparator, 'label' : openerp.base.WidgetLabel, 'char' : openerp.base.FieldChar, - 'url' : openerp.base.FieldUrl, 'email' : openerp.base.FieldEmail, + 'url' : openerp.base.FieldUrl, + 'text' : openerp.base.FieldText, 'date' : openerp.base.FieldDate, 'datetime' : openerp.base.FieldDatetime, - 'text' : openerp.base.FieldText, 'selection' : openerp.base.FieldSelection, 'many2one' : openerp.base.FieldMany2One, + 'many2many' : openerp.base.FieldMany2Many, 'one2many' : openerp.base.FieldOne2Many, + 'one2many_list' : openerp.base.FieldOne2Many, 'reference' : openerp.base.FieldReference, 'boolean' : openerp.base.FieldBoolean, 'float' : openerp.base.FieldFloat, diff --git a/doc/source/addons.rst b/doc/source/addons.rst index 976054bc47e..cb9864b28d2 100644 --- a/doc/source/addons.rst +++ b/doc/source/addons.rst @@ -86,6 +86,21 @@ replace ``addons`` by the directory in which your own addon lives. and run ``nosetests addons`` instead of the ``unit2`` command, the result should be exactly the same. +APIs +---- + +Javascript +++++++++++ + +.. js:class:: openerp.base.Widget(view, node) + + :param openerp.base.Controller view: The view to which the widget belongs + :param Object node: the ``fields_view_get`` descriptor for the widget + +.. js:attribute:: openerp.base.Widget.$element + + The widget's root element as jQuery object + * Addons lifecycle (loading, execution, events, ...) * Python-side @@ -97,7 +112,6 @@ replace ``addons`` by the directory in which your own addon lives. * Extending templates .. how do you handle deploying static files via e.g. a separate lighttpd? * Python public APIs -* Javascript public APIs * QWeb templates description? * OpenERP Web modules (from OpenERP modules) From efa2ac293908b1ab9153b8fbc4e013d5bb0ae013 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Mar 2011 20:10:43 +0100 Subject: [PATCH 648/681] [ADD] ids and set methods on DataSet bzr revid: xmo@openerp.com-20110322191043-d2s7qz2riuv7tjkd --- addons/base/controllers/main.py | 2 +- addons/base/static/openerp/js/base_views.js | 209 ++++++++++++++++---- addons/base/static/openerp/js/tests.js | 146 +++++++++++++- 3 files changed, 316 insertions(+), 41 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 9c3aeb55b12..185f2d18bca 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -167,7 +167,7 @@ class DataSet(openerpweb.Controller): @openerpweb.jsonrequest def fields(self, req, model): - return {'fields': req.session.model(model).fields_get(False)} + return {'fields': req.session.model(model).fields_get()} @openerpweb.jsonrequest def load(self, req, model, domain=[], fields=['id']): diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index d9db2348066..156b11a9f61 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -94,60 +94,195 @@ openerp.base.EmbbededView = openerp.base.Controller.extend({ // to replace Action }); +/** + * Management interface between views and the collection of selected OpenERP + * records (represents the view's state?) + */ openerp.base.DataSet = openerp.base.Controller.extend({ - init: function(session, element_id, model) { - this._super(session, element_id); - this.model = model; - // SHOULD USE THE ONE FROM FIELDS VIEW GET BECAUSE OF SELECTION - // Should merge those 2 - this.model_fields = null; - this.fields = []; + init: function(session, model) { + this._super(session); + this._model = model; - this.domain = []; - this.context = {}; - this.order = ""; - this.count = null; - this.ids = []; - this.values = {}; -/* - group_by - rows record - fields of row1 field fieldname - { type: value: text: text_format: text_completions type_*: a -*/ + this._fields = null; + + this._ids = []; + this._active_ids = null; + this._active_id_index = 0; + + this._sort = []; + this._domain = []; + this._context = {}; }, start: function() { - this.rpc("/base/dataset/fields", {"model":this.model}, this.on_fields); + // TODO: fields_view_get fields selection? + this.rpc("/base/dataset/fields", {"model":this._model}, this.on_fields); }, on_fields: function(result) { - this.model_fields = result.fields; + this._fields = result._fields; this.on_ready(); }, - do_load: function(offset, limit) { - this.rpc("/base/dataset/load", {model: this.model, fields: this.fields }, this.on_loaded); + + /** + * Fetch all the records selected by this DataSet, based on its domain + * and context. + * + * Fires the on_ids event. + * + * @param {Number} [offset=0] The index from which selected records should be returned + * @param {Number} [limit=null] The maximum number of records to return + * @returns itself + */ + ids: function (offset, limit) { + offset = offset || 0; + limit = limit || null; + this.rpc('/base/dataset/load', { + model: this._model, + fields: this._fields, + domain: this._domain, + context: this._context, + sort: this._sort, + offset: offset, + limit: limit + }, _.bind(function (records) { + var data_records = _.map( + records, function (record) { + return new openerp.base.DataRecord( + this.session, this._model, + this._fields, record); + }, this); + + this.on_ids(data_records, { + offset: offset, + limit: limit, + domain: this._domain, + context: this._context, + sort: this._sort + }); + }, this)); + return this; }, - on_loaded: function(data) { - this.ids = data.ids; - this.values = data.values; + /** + * @event + * + * Fires after the DataSet fetched the records matching its internal ids selection + * + * @param {Array} records An array of the DataRecord fetched + * @param event The on_ids event object + * @param {Number} event.offset the offset with which the original DataSet#ids call was performed + * @param {Number} event.limit the limit set on the original DataSet#ids call + * @param {Array} event.domain the domain set on the DataSet before DataSet#ids was called + * @param {Object} event.context the context set on the DataSet before DataSet#ids was called + * @param {Array} event.sort the sorting criteria used to get the ids + */ + on_ids: function (records, event) { + }, - on_reloaded: function(ids) { + + /** + * Fetch all the currently active records for this DataSet (records selected via DataSet#select) + * + * @param {Number} [offset=0] The index from which selected records should be returned + * @param {Number} [limit=-1] The maximum number of records to return + * @returns itself + */ + active_ids: function (offset, limit) { + return this; + }, + /** + * @event + * + * Fires after the DataSet fetched the records matching its internal active ids selection + * + * @param {Array} records An array of the DataRecord fetched + * @param event The on_active_ids event object + * @param {Number} event.offset the offset with which the original DataSet#ids call was performed + * @param {Number} event.limit the limit set on the original DataSet#ids call + * @param {Array} event.sort the sorting criteria used to get the ids + */ + on_active_ids: function (records, event) { + + }, + + /** + * Fetches the current active record for this DataSet + * + * @returns itself + */ + active_id: function () { + return this; + }, + /** + * Fires after the DataSet fetched the record matching the current active record + * + * @param record the record matching the provided id, or null if there is no record for this id + */ + on_active_id: function (record) { + + }, + + /** + * Configures the DataSet + * + * @param options DataSet options + * @param {Array} options.domain the domain to assign to this DataSet for filtering + * @param {Object} options.context the context this DataSet should use during its calls + * @param {Array} options.sort the sorting criteria for this DataSet + * @returns itself + */ + set: function (options) { + if (options.domain) { + this._domain = _.clone(options.domain); + } + if (options.context) { + this._context = _.clone(options.context); + } + if (options.sort) { + this._sort = _.clone(options.sort); + } + return this; + }, + + /** + * Activates the previous id in the active sequence. If there is no previous id, wraps around to the last one + * @returns itself + */ + prev: function () { + return this; + }, + /** + * Activates the next id in the active sequence. If there is no next id, wraps around to the first one + * @returns itself + */ + next: function () { + return this; + }, + + /** + * Sets active_ids and/or active_id by value: + * + * * If only ids is provided + * - Activates all ids part of the current selection + * - Sets active_id to be the first id of the selection + * * If only id is provided, activates this id (for both active_id and active_ids) + * * If both id and ids are provided + * - Activates all ids part of the current selection + * - If id is part of the active ids, activates it, otherwise see first option + * + * @param {Array} [ids] the list of ids to activate + * @param {Object} [id] the id to activate + */ + select: function (ids, id) { + return this; } }); openerp.base.DataRecord = openerp.base.Controller.extend({ - init: function(session, model, fields) { + init: function(session, model, fields, values) { this._super(session, null); this.model = model; - this.id = null; + this.id = values.id || null; this.fields = fields; - this.values = {}; - }, - load: function(id) { - this.id = id; - this.rpc("/base/datarecord/load", {"model": this.model, "id": id, "fields": "todo"}, this.on_loaded); - }, - on_loaded: function(result) { - this.values = result.value; + this.values = values; }, on_change: function() { }, diff --git a/addons/base/static/openerp/js/tests.js b/addons/base/static/openerp/js/tests.js index fe5a2998079..46d08ff8691 100644 --- a/addons/base/static/openerp/js/tests.js +++ b/addons/base/static/openerp/js/tests.js @@ -19,6 +19,18 @@ var module; * @param {Function} test the testing code to run, holding a sequence of assertions (at least one) */ var test; +/** + * @function + * Defines an asynchronous test: equivalent to calling stop() at the start of + * a normal test(). + * + * The test code needs to restart the test runner via start() + * + * @param {String} name the name of the test + * @param {Number} [expected] number of assertions expected to run in this test (useful for asynchronous tests) + * @param {Function} test the testing code to run, holding a sequence of assertions (at least one) + */ +var asyncTest; /** * @function * The most basic boolean assertion (~assertTrue or assert). @@ -42,7 +54,7 @@ var ok; var equal; /** * @function - * Inequality assertion (~assertEqual) + * Inequality assertion (~assertNotEqual) * * Passes if the arguments are different (via !=) * @@ -50,7 +62,135 @@ var equal; * @param {Object} expected the object to check against * @param {String} [message] message output with the assertion result */ -var notEqual, deepEqual, notDeepEqual, - strictEqual, notStrictEqual, raises, start, stop; +var notEqual; +/** + * @function + * Recursive equality assertion. + * + * Works on primitive types using === and traversing through + * Objects and Arrays as well checking their components + * + * @param {Object} actual the object to check for correctness (processing result) + * @param {Object} expected the object to check against + * @param {String} [message] message output with the assertion result + */ +var deepEqual; +var notDeepEqual, strictEqual, notStrictEqual, raises; +/** + * @function + * Starts running the test runner again from the point where it was + * stopped. + * + * Used to resume testing after a callback. + */ +var start; +/** + * @function + * Stops the test runner in order to wait for an asynchronous test to run + * + * @param {Number} [timeout] fails the test after the timeout triggers, only for debugging tests + */ +var stop; + +var Session = function () { + return { + rpc: function (_url, params, on_success) { + setTimeout(on_success); + } + }; +}; $(document).ready(function () { + var openerp; + module("ids_callback", { + setup: function () { + openerp = window.openerp.init(); + } + }); + asyncTest("Baseline event attributes", 6, function () { + var dataset = new openerp.base.DataSet( + new Session()); + dataset.on_ids.add(function (records, event) { + deepEqual(records, [], 'No records returned'); + equal(event.offset, 0, 'No offset set in call'); + equal(event.limit, null, 'No limit set in call'); + deepEqual(event.domain, [], 'No domain on the dataset'); + deepEqual(event.context, {}, 'No context on the dataset'); + deepEqual(event.sort, [], 'The dataset is not sorted'); + start(); + }); + dataset.ids(); + }); + asyncTest("Offset and limit", 2, function () { + var dataset = new openerp.base.DataSet( + new Session()); + dataset.on_ids.add(function (records, event) { + equal(event.offset, 20); + equal(event.limit, 42); + start(); + }); + dataset.ids(20, 42); + }); + asyncTest("Domain and context propagation", 3, function () { + var dataset = new openerp.base.DataSet( + new Session()); + var domain_value = [['foo', '=', 'bar']]; + var context_value= {active_id:3, active_ids:42}; + var sort_value = ['foo']; + dataset.on_ids.add(function (records, event) { + deepEqual(event.domain, domain_value); + deepEqual(event.context, context_value); + deepEqual(event.sort, sort_value); + start(); + }); + dataset.set({ + domain: domain_value, + context: context_value, + sort: sort_value + }); + dataset.ids(); + }); + asyncTest("Data records", function () { + var dataset = new openerp.base.DataSet({ + rpc: function (url, _params, on_success) { + equal('/base/dataset/load', url); + _.delay(on_success, 0, [ + {id: 1, sequence: 3, name: "dummy", age: 42}, + {id: 5, sequence: 7, name: "whee", age: 55} + ]); + } + }); + dataset.on_ids.add(function (records) { + equal(records.length, 2, "I loaded two virtual records"); + var d1 = records[0], + d2 = records[1]; + ok(d1 instanceof openerp.base.DataRecord); + ok(d2 instanceof openerp.base.DataRecord); + start(); + }); + dataset.ids(); + }); + + var dataset; + module("set", { + setup: function () { + var openerp = window.openerp.init(); + dataset = new openerp.base.DataSet(); + } + }); + test('Basic properties setting', function () { + var domain_value = [['foo', '=', 'bar']]; + var result = dataset.set({ + domain: domain_value + }); + ok(dataset === result); + deepEqual(domain_value, dataset._domain); + }); + test("Ensure changes don't stick", function () { + var domain = [['foo', '=', 'bar']]; + dataset.set({ + domain: domain + }); + domain.pop(); + deepEqual([['foo', '=', 'bar']], dataset._domain); + }); }); From 6a4fc40d5335018db58607a4cae22c8c60231ec1 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Mar 2011 20:22:08 +0100 Subject: [PATCH 649/681] [ADD] finish documenting QUnit functions (for IDEs) bzr revid: xmo@openerp.com-20110322192208-8usouja1b665s1mm --- addons/base/static/openerp/js/tests.js | 51 +++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/addons/base/static/openerp/js/tests.js b/addons/base/static/openerp/js/tests.js index 46d08ff8691..62d1dcda40b 100644 --- a/addons/base/static/openerp/js/tests.js +++ b/addons/base/static/openerp/js/tests.js @@ -75,7 +75,56 @@ var notEqual; * @param {String} [message] message output with the assertion result */ var deepEqual; -var notDeepEqual, strictEqual, notStrictEqual, raises; +/** + * @function + * Recursive inequality assertion. + * + * Works on primitive types using !== and traversing through + * Objects and Arrays as well checking their components + * + * @param {Object} actual the object to check for correctness (processing result) + * @param {Object} expected the object to check against + * @param {String} [message] message output with the assertion result + */ +var notDeepEqual; +/** + * @function + * Strict equality assertion (~assertEqual) + * + * Passes if both arguments are identical (via ===) + * + * @param {Object} actual the object to check for correctness (processing result) + * @param {Object} expected the object to check against + * @param {String} [message] message output with the assertion result + */ +var strictEqual; +/** + * @function + * Strict inequality assertion (~assertNotEqual) + * + * Passes if both arguments are identical (via !==) + * + * @param {Object} actual the object to check for correctness (processing result) + * @param {Object} expected the object to check against + * @param {String} [message] message output with the assertion result + */ +var notStrictEqual; +/** + * @function + * Passes if the provided block raised an exception. + * + * The expect argument can be provided to perform further assertion checks on the exception itself: + * * If it's a RegExp test the exception against the regexp (message?) + * * If it's a constructor, check if the exception is an instance of it + * * If it's an other type of function, call it with the exception as first parameter + * - If the function returns true, the assertion validates + * - Otherwise it fails + * + * @param {Function} block function which should raise an exception when called + * @param {Object} [expect] a RegExp, a constructor or a Function + * @param {String} [message] message output with the assertion result + */ +var raises; /** * @function * Starts running the test runner again from the point where it was From 77b9c7bd8ba01938f62233af8a7ba4b81e070ff5 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Mar 2011 21:36:44 +0100 Subject: [PATCH 650/681] [ADD] basic implementations of DataSet.select and DataSet.active_ids bzr revid: xmo@openerp.com-20110322203644-iubno2jusxp4z98p --- addons/base/static/openerp/js/base_views.js | 29 +++++++++---------- addons/base/static/openerp/js/tests.js | 31 ++++++++++++++++++++- 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index 156b11a9f61..7bd96b45d86 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -135,7 +135,7 @@ openerp.base.DataSet = openerp.base.Controller.extend({ ids: function (offset, limit) { offset = offset || 0; limit = limit || null; - this.rpc('/base/dataset/load', { + this.rpc('/base/dataset/find', { model: this._model, fields: this._fields, domain: this._domain, @@ -174,18 +174,24 @@ openerp.base.DataSet = openerp.base.Controller.extend({ * @param {Object} event.context the context set on the DataSet before DataSet#ids was called * @param {Array} event.sort the sorting criteria used to get the ids */ - on_ids: function (records, event) { - - }, + on_ids: function (records, event) { }, /** * Fetch all the currently active records for this DataSet (records selected via DataSet#select) * - * @param {Number} [offset=0] The index from which selected records should be returned - * @param {Number} [limit=-1] The maximum number of records to return * @returns itself */ - active_ids: function (offset, limit) { + active_ids: function () { + this.rpc('/base/dataset/get', { + ids: this._active_ids + }, _.bind(function (records) { + this.on_active_ids(_.map( + records, function (record) { + return new openerp.base.DataRecord( + this.session, this._model, + this._fields, record); + }, this)); + }, this)); return this; }, /** @@ -194,14 +200,8 @@ openerp.base.DataSet = openerp.base.Controller.extend({ * Fires after the DataSet fetched the records matching its internal active ids selection * * @param {Array} records An array of the DataRecord fetched - * @param event The on_active_ids event object - * @param {Number} event.offset the offset with which the original DataSet#ids call was performed - * @param {Number} event.limit the limit set on the original DataSet#ids call - * @param {Array} event.sort the sorting criteria used to get the ids */ - on_active_ids: function (records, event) { - - }, + on_active_ids: function (records) { }, /** * Fetches the current active record for this DataSet @@ -272,6 +272,7 @@ openerp.base.DataSet = openerp.base.Controller.extend({ * @param {Object} [id] the id to activate */ select: function (ids, id) { + this._active_ids = ids; return this; } }); diff --git a/addons/base/static/openerp/js/tests.js b/addons/base/static/openerp/js/tests.js index 62d1dcda40b..cbb9c7f0dca 100644 --- a/addons/base/static/openerp/js/tests.js +++ b/addons/base/static/openerp/js/tests.js @@ -201,7 +201,7 @@ $(document).ready(function () { asyncTest("Data records", function () { var dataset = new openerp.base.DataSet({ rpc: function (url, _params, on_success) { - equal('/base/dataset/load', url); + equal('/base/dataset/find', url); _.delay(on_success, 0, [ {id: 1, sequence: 3, name: "dummy", age: 42}, {id: 5, sequence: 7, name: "whee", age: 55} @@ -242,4 +242,33 @@ $(document).ready(function () { domain.pop(); deepEqual([['foo', '=', 'bar']], dataset._domain); }); + + module('active_ids', { + setup: function () { + openerp = window.openerp.init(); + } + }); + test('Get pre-set active_ids', 6, function () { + var dataset = new openerp.base.DataSet({ + rpc: function (url, params, on_success) { + equal(url, '/base/dataset/get'); + deepEqual(params.ids, [1, 2, 3]); + _.delay(on_success, 0, _.map( + params.ids, function (id) { + return {id: id, sequence: id, name: 'foo'+id}; + } + )); + } + }); + stop(500); + dataset.select([1, 2, 3]); + dataset.on_active_ids.add(function (data_records) { + equal(data_records.length, 3); + equal(data_records[0].values.id, 1); + equal(data_records[1].values.id, 2); + equal(data_records[2].values.id, 3); + start(); + }); + dataset.active_ids(); + }); }); From 8570ae1fff417ae0ff5eb3077c32f57ca031f6ab Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 22 Mar 2011 21:52:18 +0100 Subject: [PATCH 651/681] [IMP] use asyncTest rather than test + stop() bzr revid: xmo@openerp.com-20110322205218-h2skfkandip8pv8u --- addons/base/static/openerp/js/tests.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/base/static/openerp/js/tests.js b/addons/base/static/openerp/js/tests.js index cbb9c7f0dca..86ae3e9f380 100644 --- a/addons/base/static/openerp/js/tests.js +++ b/addons/base/static/openerp/js/tests.js @@ -248,7 +248,7 @@ $(document).ready(function () { openerp = window.openerp.init(); } }); - test('Get pre-set active_ids', 6, function () { + asyncTest('Get pre-set active_ids', 6, function () { var dataset = new openerp.base.DataSet({ rpc: function (url, params, on_success) { equal(url, '/base/dataset/get'); @@ -260,7 +260,6 @@ $(document).ready(function () { )); } }); - stop(500); dataset.select([1, 2, 3]); dataset.on_active_ids.add(function (data_records) { equal(data_records.length, 3); From f35a9899814a1c193f7eb296f1d2ee7e2de94e9c Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Wed, 23 Mar 2011 04:36:07 +0000 Subject: [PATCH 652/681] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20110323043607-ydbntrwael93hvcn --- addons/auction/i18n/pt_BR.po | 2 +- addons/base_report_creator/i18n/gl.po | 526 +++++++++++++++ addons/crm/i18n/ru.po | 8 +- addons/hr_attendance/i18n/gl.po | 600 ++++++++++++++++++ addons/lunch/i18n/bg.po | 540 ++++++++++++++++ addons/mail_gateway/i18n/es_PY.po | 356 +++++++++++ addons/mail_gateway/i18n/gl.po | 366 +++++++++++ addons/marketing_campaign_crm_demo/i18n/gl.po | 193 ++++++ addons/mrp_subproduct/i18n/gl.po | 129 ++++ addons/outlook/i18n/gl.po | 157 +++++ addons/procurement/i18n/id.po | 40 +- addons/product_manufacturer/i18n/gl.po | 88 +++ addons/share/i18n/pt_BR.po | 2 +- 13 files changed, 2982 insertions(+), 25 deletions(-) create mode 100644 addons/base_report_creator/i18n/gl.po create mode 100644 addons/hr_attendance/i18n/gl.po create mode 100644 addons/lunch/i18n/bg.po create mode 100644 addons/mail_gateway/i18n/es_PY.po create mode 100644 addons/mail_gateway/i18n/gl.po create mode 100644 addons/marketing_campaign_crm_demo/i18n/gl.po create mode 100644 addons/mrp_subproduct/i18n/gl.po create mode 100644 addons/outlook/i18n/gl.po create mode 100644 addons/product_manufacturer/i18n/gl.po diff --git a/addons/auction/i18n/pt_BR.po b/addons/auction/i18n/pt_BR.po index 414eae17b40..95e421502af 100644 --- a/addons/auction/i18n/pt_BR.po +++ b/addons/auction/i18n/pt_BR.po @@ -13,7 +13,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-22 04:35+0000\n" +"X-Launchpad-Export-Date: 2011-03-23 04:35+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: auction diff --git a/addons/base_report_creator/i18n/gl.po b/addons/base_report_creator/i18n/gl.po new file mode 100644 index 00000000000..1cd4dc67972 --- /dev/null +++ b/addons/base_report_creator/i18n/gl.po @@ -0,0 +1,526 @@ +# Galician translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-03-22 17:40+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-23 04:35+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: base_report_creator +#: help:base_report_creator.report.filter,expression:0 +msgid "" +"Provide an expression for the field based on which you want to filter the " +"records.\n" +" e.g. res_partner.id=3" +msgstr "" +"Introduza unha expresión para o campo baseada en como desexa filtrar os " +"rexistros. Por exemplo res_partner.id=3" + +#. module: base_report_creator +#: model:ir.model,name:base_report_creator.model_report_menu_create +msgid "Menu Create" +msgstr "Crear menú" + +#. module: base_report_creator +#: field:base_report_creator.report,view_graph_type:0 +msgid "Graph Type" +msgstr "Tipo de gráfico" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Used View" +msgstr "Vista utilizada" + +#. module: base_report_creator +#: wizard_view:base_report_creator.report_filter.fields,set_value_select_field:0 +msgid "Filter Values" +msgstr "Valores filtro" + +#. module: base_report_creator +#: field:base_report_creator.report.fields,graph_mode:0 +msgid "Graph Mode" +msgstr "Modo de gráfico" + +#. module: base_report_creator +#: code:addons/base_report_creator/base_report_creator.py:320 +#, python-format +msgid "" +"These is/are model(s) (%s) in selection which is/are not related to any " +"other model" +msgstr "" +"Hai modelo(s) (%s) na selección que non están relacionados con ningún outro " +"modelo" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Legend" +msgstr "Lenda" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Graph View" +msgstr "Vista gráfico" + +#. module: base_report_creator +#: field:base_report_creator.report.filter,expression:0 +msgid "Value" +msgstr "Valor" + +#. module: base_report_creator +#: model:ir.actions.wizard,name:base_report_creator.wizard_set_filter_fields +msgid "Set Filter Fields" +msgstr "Fixar campos de filtrado" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,calendar_mode:0 +msgid "Ending Date" +msgstr "Data de finalización" + +#. module: base_report_creator +#: model:ir.model,name:base_report_creator.model_base_report_creator_report_filter +msgid "Report Filters" +msgstr "Filtros informe" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +#: field:base_report_creator.report,sql_query:0 +msgid "SQL Query" +msgstr "Interrogación SQL" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +#: view:report.menu.create:0 +msgid "Create Menu" +msgstr "Crear menú" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,group_method:0 +msgid "Minimum" +msgstr "Mínimo" + +#. module: base_report_creator +#: wizard_field:base_report_creator.report_filter.fields,set_value_select_field,operator:0 +msgid "Operator" +msgstr "Operador" + +#. module: base_report_creator +#: selection:base_report_creator.report.filter,condition:0 +#: selection:base_report_creator.report_filter.fields,set_value_select_field,condition:0 +msgid "OR" +msgstr "ou" + +#. module: base_report_creator +#: model:ir.actions.act_window,name:base_report_creator.base_report_creator_action +msgid "Custom Reports" +msgstr "Informes personalizados" + +#. module: base_report_creator +#: code:addons/base_report_creator/base_report_creator.py:320 +#, python-format +msgid "No Related Models!!" +msgstr "Non existen modelos relacionados!" + +#. module: base_report_creator +#: view:report.menu.create:0 +msgid "Menu Information" +msgstr "Información do menú" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,group_method:0 +msgid "Sum" +msgstr "Suma" + +#. module: base_report_creator +#: constraint:base_report_creator.report:0 +msgid "You must have to give calendar view's color,start date and delay." +msgstr "Debe indicar a cor, a data inicial e o atraso da vista calendario." + +#. module: base_report_creator +#: field:base_report_creator.report,model_ids:0 +msgid "Reported Objects" +msgstr "Obxectos de informe" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Field List" +msgstr "Lista de campos" + +#. module: base_report_creator +#: field:base_report_creator.report,type:0 +msgid "Report Type" +msgstr "Tipo de informe" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Add filter" +msgstr "Engadir filtro" + +#. module: base_report_creator +#: model:ir.actions.act_window,name:base_report_creator.action_report_menu_create +msgid "Create Menu for Report" +msgstr "Crear menú para o informe" + +#. module: base_report_creator +#: selection:base_report_creator.report,view_type1:0 +#: selection:base_report_creator.report,view_type2:0 +#: selection:base_report_creator.report,view_type3:0 +msgid "Form" +msgstr "Formulario" + +#. module: base_report_creator +#: selection:base_report_creator.report,view_type2:0 +#: selection:base_report_creator.report,view_type3:0 +#: selection:base_report_creator.report.fields,calendar_mode:0 +#: selection:base_report_creator.report.fields,graph_mode:0 +msgid "/" +msgstr "/" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +#: field:base_report_creator.report.fields,report_id:0 +#: field:base_report_creator.report.filter,report_id:0 +#: model:ir.model,name:base_report_creator.model_base_report_creator_report +msgid "Report" +msgstr "Informe" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,calendar_mode:0 +msgid "Starting Date" +msgstr "Data de inicio" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Filters on Fields" +msgstr "Filtros en campos" + +#. module: base_report_creator +#: field:base_report_creator.report,group_ids:0 +msgid "Authorized Groups" +msgstr "Grupos autorizados" + +#. module: base_report_creator +#: selection:base_report_creator.report,view_type1:0 +#: selection:base_report_creator.report,view_type2:0 +#: selection:base_report_creator.report,view_type3:0 +msgid "Tree" +msgstr "Árbore" + +#. module: base_report_creator +#: field:base_report_creator.report,view_graph_orientation:0 +msgid "Graph Orientation" +msgstr "Orientación gráfico" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Authorized Groups (empty for all)" +msgstr "Grupos autorizados (baleiro para todos)" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Security" +msgstr "Seguridade" + +#. module: base_report_creator +#: field:report.menu.create,menu_name:0 +msgid "Menu Name" +msgstr "Nome do menú" + +#. module: base_report_creator +#: selection:base_report_creator.report.filter,condition:0 +#: selection:base_report_creator.report_filter.fields,set_value_select_field,condition:0 +msgid "AND" +msgstr "E" + +#. module: base_report_creator +#: constraint:base_report_creator.report:0 +msgid "You can not display field which are not stored in Database." +msgstr "Non pode amosar un campo que non estea almacenado na base de datos." + +#. module: base_report_creator +#: field:base_report_creator.report.fields,calendar_mode:0 +msgid "Calendar Mode" +msgstr "Modo calendario" + +#. module: base_report_creator +#: model:ir.model,name:base_report_creator.model_base_report_creator_report_fields +msgid "Display Fields" +msgstr "Campos a amosar" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,graph_mode:0 +msgid "Y Axis" +msgstr "Eixo Y" + +#. module: base_report_creator +#: selection:base_report_creator.report,view_type1:0 +#: selection:base_report_creator.report,view_type2:0 +#: selection:base_report_creator.report,view_type3:0 +msgid "Calendar" +msgstr "Calendario" + +#. module: base_report_creator +#: selection:base_report_creator.report,view_type1:0 +#: selection:base_report_creator.report,view_type2:0 +#: selection:base_report_creator.report,view_type3:0 +msgid "Graph" +msgstr "Gráfico" + +#. module: base_report_creator +#: wizard_field:base_report_creator.report_filter.fields,set_value_select_field,field_id:0 +msgid "Field Name" +msgstr "Nome do campo" + +#. module: base_report_creator +#: wizard_view:base_report_creator.report_filter.fields,set_value_select_field:0 +msgid "Set Filter Values" +msgstr "Fixar valores filtrado" + +#. module: base_report_creator +#: selection:base_report_creator.report,view_graph_orientation:0 +msgid "Vertical" +msgstr "Vertical" + +#. module: base_report_creator +#: selection:base_report_creator.report,type:0 +msgid "Rows And Columns Report" +msgstr "Informe de filas e columnas" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "General Configuration" +msgstr "Configuración xeral" + +#. module: base_report_creator +#: help:base_report_creator.report.fields,sequence:0 +msgid "Gives the sequence order when displaying a list of fields." +msgstr "Indica a orde da secuencia cando se amosa unha lista de campos." + +#. module: base_report_creator +#: wizard_view:base_report_creator.report_filter.fields,init:0 +msgid "Select Field to filter" +msgstr "Seleccione o campo a filtrar" + +#. module: base_report_creator +#: field:base_report_creator.report,active:0 +msgid "Active" +msgstr "Activo" + +#. module: base_report_creator +#: selection:base_report_creator.report,view_graph_orientation:0 +msgid "Horizontal" +msgstr "Horizontal" + +#. module: base_report_creator +#: field:base_report_creator.report.fields,group_method:0 +msgid "Grouping Method" +msgstr "Método de agrupamento" + +#. module: base_report_creator +#: field:base_report_creator.report.filter,condition:0 +#: wizard_field:base_report_creator.report_filter.fields,set_value_select_field,condition:0 +msgid "Condition" +msgstr "Condición" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,group_method:0 +msgid "Count" +msgstr "Reconto" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,graph_mode:0 +msgid "X Axis" +msgstr "Eixo X" + +#. module: base_report_creator +#: field:report.menu.create,menu_parent_id:0 +msgid "Parent Menu" +msgstr "Menú Pai" + +#. module: base_report_creator +#: wizard_button:base_report_creator.report_filter.fields,set_value_select_field,set_value:0 +msgid "Confirm Filter" +msgstr "Confirmar filtro" + +#. module: base_report_creator +#: field:base_report_creator.report.filter,name:0 +msgid "Filter Name" +msgstr "Nome do filtro" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Open Report" +msgstr "Abrir informe" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,group_method:0 +msgid "Grouped" +msgstr "Agrupado" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +#: model:ir.module.module,shortdesc:base_report_creator.module_meta_information +msgid "Report Creator" +msgstr "Creador de informes" + +#. module: base_report_creator +#: wizard_button:base_report_creator.report_filter.fields,init,end:0 +#: wizard_button:base_report_creator.report_filter.fields,set_value_select_field,end:0 +#: view:report.menu.create:0 +msgid "Cancel" +msgstr "Anular" + +#. module: base_report_creator +#: constraint:base_report_creator.report:0 +msgid "You can apply aggregate function to the non calculated field." +msgstr "Pode aplicar a función de agregado para o campo non calculado." + +#. module: base_report_creator +#: field:base_report_creator.report,menu_id:0 +msgid "Menu" +msgstr "Menú" + +#. module: base_report_creator +#: field:base_report_creator.report,view_type1:0 +msgid "First View" +msgstr "Primeira vista" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,calendar_mode:0 +msgid "Delay" +msgstr "Atraso" + +#. module: base_report_creator +#: field:base_report_creator.report.fields,field_id:0 +msgid "Field" +msgstr "Campo" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,calendar_mode:0 +msgid "Unique Colors" +msgstr "Cores únicas" + +#. module: base_report_creator +#: help:base_report_creator.report,active:0 +msgid "" +"If the active field is set to False, it will allow you to hide the report " +"without removing it." +msgstr "" +"Se se desmarca o campo activo, permite ocultar o informe sen eliminalo." + +#. module: base_report_creator +#: selection:base_report_creator.report,view_graph_type:0 +msgid "Pie Chart" +msgstr "Gráfico de sectores" + +#. module: base_report_creator +#: field:base_report_creator.report,view_type3:0 +msgid "Third View" +msgstr "Terceira vista" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,calendar_mode:0 +msgid "End Date" +msgstr "Data de remate" + +#. module: base_report_creator +#: field:base_report_creator.report,name:0 +msgid "Report Name" +msgstr "Nome do informe" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Fields" +msgstr "Campos" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,group_method:0 +msgid "Average" +msgstr "Termo medio" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "Use %(uid)s to filter by the connected user" +msgstr "Use %(uid)s para filtrar polo usuario conectado" + +#. module: base_report_creator +#: selection:base_report_creator.report.fields,group_method:0 +msgid "Maximum" +msgstr "Maximo" + +#. module: base_report_creator +#: wizard_button:base_report_creator.report_filter.fields,init,set_value_select_field:0 +msgid "Continue" +msgstr "Continuar" + +#. module: base_report_creator +#: wizard_field:base_report_creator.report_filter.fields,set_value_select_field,value:0 +msgid "Values" +msgstr "Valores" + +#. module: base_report_creator +#: selection:base_report_creator.report,view_graph_type:0 +msgid "Bar Chart" +msgstr "Gráfico de barras" + +#. module: base_report_creator +#: field:base_report_creator.report,view_type2:0 +msgid "Second View" +msgstr "Segunda vista" + +#. module: base_report_creator +#: view:report.menu.create:0 +msgid "Create Menu For This Report" +msgstr "Crear menú para este informe" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +msgid "View parameters" +msgstr "Ver parámetros" + +#. module: base_report_creator +#: field:base_report_creator.report.fields,sequence:0 +msgid "Sequence" +msgstr "Secuencia" + +#. module: base_report_creator +#: wizard_field:base_report_creator.report_filter.fields,init,field_id:0 +msgid "Filter Field" +msgstr "Filtrar campo" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +#: field:base_report_creator.report,field_ids:0 +msgid "Fields to Display" +msgstr "Campos a amosar" + +#. module: base_report_creator +#: view:base_report_creator.report:0 +#: field:base_report_creator.report,filter_ids:0 +msgid "Filters" +msgstr "Filtros" + +#. module: base_report_creator +#: model:ir.module.module,description:base_report_creator.module_meta_information +msgid "" +"This module allows you to create any statistic\n" +"report on several objects. It's a SQL query builder and browser\n" +"for and users.\n" +"\n" +"After installing the module, it adds a menu to define custom report in\n" +"the \"Dashboard\" menu.\n" +msgstr "" +"Este módulo permite crear calquera informe estatístico sobre varios " +"obxectos. É un xerador de consultas SQL e navegador para calquera usuario. " +"Despois de instalar o módulo, engádese un menú para definir informes " +"personalizados no menú \"Taboleiro\".\n" diff --git a/addons/crm/i18n/ru.po b/addons/crm/i18n/ru.po index c00f64960d3..e34ba6e139e 100644 --- a/addons/crm/i18n/ru.po +++ b/addons/crm/i18n/ru.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2011-03-14 18:33+0000\n" -"Last-Translator: Chertykov Denis \n" +"PO-Revision-Date: 2011-03-22 14:25+0000\n" +"Last-Translator: Sergei Kostigoff \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-18 04:44+0000\n" +"X-Launchpad-Export-Date: 2011-03-23 04:35+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: crm @@ -991,7 +991,7 @@ msgstr "Сделки" #. module: crm #: field:crm.segmentation,categ_id:0 msgid "Partner Category" -msgstr "Категория партнера" +msgstr "Категория контрагента" #. module: crm #: view:crm.add.note:0 diff --git a/addons/hr_attendance/i18n/gl.po b/addons/hr_attendance/i18n/gl.po new file mode 100644 index 00000000000..4be010ed1e6 --- /dev/null +++ b/addons/hr_attendance/i18n/gl.po @@ -0,0 +1,600 @@ +# Galician translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-03-22 16:05+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-23 04:35+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: hr_attendance +#: model:ir.ui.menu,name:hr_attendance.menu_hr_time_tracking +msgid "Time Tracking" +msgstr "Control do tempo" + +#. module: hr_attendance +#: view:hr.attendance:0 +msgid "Group By..." +msgstr "Agrupar por..." + +#. module: hr_attendance +#: view:hr.attendance:0 +msgid "Today" +msgstr "Hoxe" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "March" +msgstr "Marzo" + +#. module: hr_attendance +#: view:hr.sign.in.out.ask:0 +msgid "" +"You did not sign out the last time. Please enter the date and time you " +"signed out." +msgstr "" +"Non rexistrou a saída a última vez. Por favor, introduza a data e a hora da " +"saída." + +#. module: hr_attendance +#: report:report.hr.timesheet.attendance.error:0 +msgid "Total period:" +msgstr "Total período:" + +#. module: hr_attendance +#: field:hr.action.reason,name:0 +msgid "Reason" +msgstr "Motivo" + +#. module: hr_attendance +#: view:hr.attendance.error:0 +msgid "Print Attendance Report Error" +msgstr "Imprimir informe erros presencias" + +#. module: hr_attendance +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:156 +#, python-format +msgid "The sign-out date must be in the past" +msgstr "A data do rexistro de saída debe ser anterior." + +#. module: hr_attendance +#: report:report.hr.timesheet.attendance.error:0 +msgid "Date Signed" +msgstr "Data rexistro" + +#. module: hr_attendance +#: model:ir.actions.act_window,help:hr_attendance.open_view_attendance +msgid "" +"The Time Tracking functionality aims to manage employee attendances from " +"Sign in/Sign out actions. You can also link this feature to an attendance " +"device using OpenERP's web service features." +msgstr "" +"A funcionalidade de Seguimento de Tempos permítelle xestionar as asistencias " +"dos empregados a través das accións de Rexistrar Entrada/Rexistrar Saída. " +"Tamén pode enlazar esta funcionalidade cun dispositivo de rexistro de " +"asistencia usando as características do servizo web de OpenERP." + +#. module: hr_attendance +#: view:hr.action.reason:0 +msgid "Attendance reasons" +msgstr "Causas de asistencia/ausencia" + +#. module: hr_attendance +#: view:hr.attendance:0 +#: field:hr.attendance,day:0 +msgid "Day" +msgstr "Día" + +#. module: hr_attendance +#: selection:hr.employee,state:0 +msgid "Present" +msgstr "Presente" + +#. module: hr_attendance +#: model:ir.model,name:hr_attendance.model_hr_sign_in_out_ask +msgid "Ask for Sign In Out" +msgstr "Preguntar para rexistrar entrada / saída" + +#. module: hr_attendance +#: field:hr.attendance,action_desc:0 +#: model:ir.model,name:hr_attendance.model_hr_action_reason +msgid "Action Reason" +msgstr "Razón da acción" + +#. module: hr_attendance +#: view:hr.sign.in.out:0 +msgid "Ok" +msgstr "Aceptar" + +#. module: hr_attendance +#: view:hr.action.reason:0 +msgid "Define attendance reason" +msgstr "Defina o motivo da asistencia" + +#. module: hr_attendance +#: constraint:hr.employee:0 +msgid "" +"Error ! You cannot select a department for which the employee is the manager." +msgstr "" +"Erro! Non pode seleccionar un departamento para o cal o empregado sexa o " +"director." + +#. module: hr_attendance +#: model:ir.actions.act_window,name:hr_attendance.action_hr_attendance_month +msgid "Attendances By Month" +msgstr "Presenzas por mes" + +#. module: hr_attendance +#: field:hr.sign.in.out,name:0 +#: field:hr.sign.in.out.ask,name:0 +msgid "Employees name" +msgstr "Nome empregados" + +#. module: hr_attendance +#: model:ir.actions.act_window,name:hr_attendance.open_view_attendance_reason +#: model:ir.ui.menu,name:hr_attendance.menu_open_view_attendance_reason +msgid "Attendance Reasons" +msgstr "Causas de asistencia/ausencia" + +#. module: hr_attendance +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:156 +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:162 +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:169 +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:174 +#, python-format +msgid "UserError" +msgstr "ErroDeUsuario" + +#. module: hr_attendance +#: field:hr.attendance.error,end_date:0 +#: field:hr.attendance.week,end_date:0 +msgid "Ending Date" +msgstr "Data de finalización" + +#. module: hr_attendance +#: view:hr.attendance:0 +msgid "Employee attendance" +msgstr "Asistencia empregado" + +#. module: hr_attendance +#: code:addons/hr_attendance/hr_attendance.py:136 +#, python-format +msgid "Warning" +msgstr "Aviso" + +#. module: hr_attendance +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:169 +#, python-format +msgid "The Sign-in date must be in the past" +msgstr "A data do rexistro de entrada debe ser anterior" + +#. module: hr_attendance +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:162 +#, python-format +msgid "A sign-in must be right after a sign-out !" +msgstr "Un rexistro de entrada debe estar despois dun rexistro de saída!" + +#. module: hr_attendance +#: field:hr.employee,state:0 +#: model:ir.model,name:hr_attendance.model_hr_attendance +msgid "Attendance" +msgstr "Asistencia" + +#. module: hr_attendance +#: field:hr.attendance.error,max_delay:0 +msgid "Max. Delay (Min)" +msgstr "Atraso máx. (minutos)" + +#. module: hr_attendance +#: view:hr.attendance.error:0 +#: view:hr.attendance.month:0 +msgid "Print" +msgstr "Imprimir" + +#. module: hr_attendance +#: view:hr.attendance:0 +msgid "Hr Attendance Search" +msgstr "Buscar presenzas RH" + +#. module: hr_attendance +#: model:ir.module.module,description:hr_attendance.module_meta_information +msgid "" +"\n" +" This module aims to manage employee's attendances.\n" +" Keeps account of the attendances of the employees on the basis of the\n" +" actions(Sign in/Sign out) performed by them.\n" +" " +msgstr "" +"\n" +" Este módulo serve para xestionar a asistencia dos empregados. Controla a " +"asistencia dos empregados mediante as accións(Rexistrar entrada/ Rexistrar " +"saída) realizadas por eles.\n" +" " + +#. module: hr_attendance +#: constraint:hr.attendance:0 +msgid "Error: Sign in (resp. Sign out) must follow Sign out (resp. Sign in)" +msgstr "" +"Erro: Rexistro de entrada (resp. Rexistro de saída) debe seguir ó Rexistro " +"de saída (resp. Rexistro de entrada)" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "July" +msgstr "Xullo" + +#. module: hr_attendance +#: model:ir.actions.act_window,name:hr_attendance.action_hr_attendance_error +#: model:ir.actions.report.xml,name:hr_attendance.attendance_error_report +msgid "Attendance Error Report" +msgstr "Informe erros de asistencia" + +#. module: hr_attendance +#: field:hr.attendance.error,init_date:0 +#: field:hr.attendance.week,init_date:0 +msgid "Starting Date" +msgstr "Data de inicio" + +#. module: hr_attendance +#: report:report.hr.timesheet.attendance.error:0 +msgid "Min Delay" +msgstr "Atraso mín." + +#. module: hr_attendance +#: selection:hr.attendance,action:0 +#: view:hr.employee:0 +msgid "Sign In" +msgstr "Iniciar sesión" + +#. module: hr_attendance +#: report:report.hr.timesheet.attendance.error:0 +msgid "Operation" +msgstr "Operación" + +#. module: hr_attendance +#: code:addons/hr_attendance/wizard/hr_attendance_error.py:49 +#, python-format +msgid "No Data Available" +msgstr "Non hai datos dispoñibles" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "September" +msgstr "Setembro" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "December" +msgstr "Decembro" + +#. module: hr_attendance +#: field:hr.attendance.month,month:0 +msgid "Month" +msgstr "Mes" + +#. module: hr_attendance +#: report:report.hr.timesheet.attendance.error:0 +msgid "" +"(*) A negative delay means that the employee worked more than encoded." +msgstr "" +"(*) Un atraso negativo significa que o empregado traballou máis horas das " +"codificadas." + +#. module: hr_attendance +#: help:hr.attendance,action_desc:0 +msgid "" +"Specifies the reason for Signing In/Signing Out in case of extra hours." +msgstr "Especifique a razón de entrada e saída no caso de horas extras." + +#. module: hr_attendance +#: model:ir.model,name:hr_attendance.model_hr_attendance_month +msgid "Print Monthly Attendance Report" +msgstr "Imprimir informe mensual de asistencias" + +#. module: hr_attendance +#: model:ir.model,name:hr_attendance.model_hr_sign_in_out +msgid "Sign In Sign Out" +msgstr "Entrada Saída" + +#. module: hr_attendance +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:103 +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:125 +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:141 +#: view:hr.sign.in.out:0 +#: model:ir.actions.act_window,name:hr_attendance.action_hr_attendance_sigh_in_out +#: model:ir.ui.menu,name:hr_attendance.menu_hr_attendance_sigh_in_out +#, python-format +msgid "Sign in / Sign out" +msgstr "Rexistrar entrada/saída" + +#. module: hr_attendance +#: view:hr.sign.in.out.ask:0 +msgid "hr.sign.out.ask" +msgstr "hr.sign.out.ask" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "August" +msgstr "Agosto" + +#. module: hr_attendance +#: code:addons/hr_attendance/wizard/hr_attendance_sign_in_out.py:174 +#, python-format +msgid "A sign-out must be right after a sign-in !" +msgstr "Un rexistro de saída debe estar despois dun rexistro de entrada!" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "June" +msgstr "Xuño" + +#. module: hr_attendance +#: model:ir.model,name:hr_attendance.model_hr_attendance_error +msgid "Print Error Attendance Report" +msgstr "Erro na impresión do informe de asistencia" + +#. module: hr_attendance +#: model:ir.module.module,shortdesc:hr_attendance.module_meta_information +msgid "Attendances Of Employees" +msgstr "Asistencia de empregados" + +#. module: hr_attendance +#: field:hr.attendance,name:0 +msgid "Date" +msgstr "Data" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "November" +msgstr "Novembro" + +#. module: hr_attendance +#: constraint:hr.employee:0 +msgid "Error ! You cannot create recursive Hierarchy of Employees." +msgstr "Erro! Non pode crear unha xerarquía recorrente de empregados." + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "October" +msgstr "Outubro" + +#. module: hr_attendance +#: view:hr.attendance:0 +msgid "My Attendances" +msgstr "As miñas presenzas" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "January" +msgstr "Xaneiro" + +#. module: hr_attendance +#: selection:hr.action.reason,action_type:0 +#: view:hr.sign.in.out:0 +#: view:hr.sign.in.out.ask:0 +msgid "Sign in" +msgstr "Acceder" + +#. module: hr_attendance +#: view:hr.attendance.error:0 +msgid "Analysis Information" +msgstr "Información para a análise" + +#. module: hr_attendance +#: view:hr.sign.in.out:0 +msgid "Sign-Out Entry must follow Sign-In." +msgstr "O rexistro de entrada debe seguir ó rexistro de saída." + +#. module: hr_attendance +#: report:report.hr.timesheet.attendance.error:0 +msgid "Attendance Errors" +msgstr "Erros de asistencia" + +#. module: hr_attendance +#: field:hr.attendance,action:0 +#: selection:hr.attendance,action:0 +msgid "Action" +msgstr "Acción" + +#. module: hr_attendance +#: view:hr.sign.in.out:0 +msgid "" +"If you need your staff to sign in when they arrive at work and sign out " +"again at the end of the day, OpenERP allows you to manage this with this " +"tool. If each employee has been linked to a system user, then they can " +"encode their time with this action button." +msgstr "" +"Se precisa que o seu persoal fiche ó inicio e ó final da xornada laboral, " +"esta ferramenta do OpenERP permítelle efectuar esta xestión. Se cada " +"empregado se vinculou a un usuario do sistema, pódese controlar a súa " +"xornada con este botón de acción." + +#. module: hr_attendance +#: field:hr.sign.in.out,emp_id:0 +msgid "Employee ID" +msgstr "ID de empregado" + +#. module: hr_attendance +#: model:ir.model,name:hr_attendance.model_hr_attendance_week +msgid "Print Week Attendance Report" +msgstr "Imprimir informe de presenza semanal" + +#. module: hr_attendance +#: field:hr.sign.in.out.ask,emp_id:0 +msgid "Empoyee ID" +msgstr "ID empregado" + +#. module: hr_attendance +#: view:hr.attendance.error:0 +#: view:hr.attendance.month:0 +#: view:hr.sign.in.out:0 +#: view:hr.sign.in.out.ask:0 +msgid "Cancel" +msgstr "Anular" + +#. module: hr_attendance +#: help:hr.action.reason,name:0 +msgid "Specifies the reason for Signing In/Signing Out." +msgstr "Indique o motivo da entrada/saída." + +#. module: hr_attendance +#: report:report.hr.timesheet.attendance.error:0 +msgid "" +"(*) A positive delay means that the employee worked less than recorded." +msgstr "" +"(*) Un valor positivo significa que o empregado traballou menos có " +"programado." + +#. module: hr_attendance +#: view:hr.attendance.month:0 +msgid "Print Attendance Report Monthly" +msgstr "Imprimir informe de asistencia mensualmente" + +#. module: hr_attendance +#: selection:hr.action.reason,action_type:0 +#: view:hr.sign.in.out:0 +#: view:hr.sign.in.out.ask:0 +msgid "Sign out" +msgstr "Pechar sesión" + +#. module: hr_attendance +#: report:report.hr.timesheet.attendance.error:0 +msgid "Delay" +msgstr "Atraso" + +#. module: hr_attendance +#: view:hr.attendance:0 +#: model:ir.model,name:hr_attendance.model_hr_employee +msgid "Employee" +msgstr "Empregado" + +#. module: hr_attendance +#: code:addons/hr_attendance/hr_attendance.py:136 +#, python-format +msgid "" +"You tried to %s with a date anterior to another event !\n" +"Try to contact the administrator to correct attendances." +msgstr "" +"Tentou %s cunha data anterior a outro evento! Tente poñerse en contacto co " +"administrador para corrixir as asistencias." + +#. module: hr_attendance +#: view:hr.sign.in.out.ask:0 +#: field:hr.sign.in.out.ask,last_time:0 +msgid "Your last sign out" +msgstr "O seu último rexistro de saída" + +#. module: hr_attendance +#: report:report.hr.timesheet.attendance.error:0 +msgid "Date Recorded" +msgstr "Data rexistrada" + +#. module: hr_attendance +#: model:ir.actions.act_window,name:hr_attendance.open_view_attendance +#: model:ir.ui.menu,name:hr_attendance.menu_hr_attendance +#: model:ir.ui.menu,name:hr_attendance.menu_open_view_attendance +msgid "Attendances" +msgstr "Asistencias" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "May" +msgstr "Maio" + +#. module: hr_attendance +#: view:hr.sign.in.out.ask:0 +msgid "Your last sign in" +msgstr "O seu último rexistro entrada" + +#. module: hr_attendance +#: selection:hr.attendance,action:0 +#: view:hr.employee:0 +msgid "Sign Out" +msgstr "Pechar sesión" + +#. module: hr_attendance +#: model:ir.actions.act_window,help:hr_attendance.action_hr_attendance_sigh_in_out +msgid "" +"Sign in / Sign out. In some companies, staff have to sign in when they " +"arrive at work and sign out again at the end of the day. If each employee " +"has been linked to a system user, then they can encode their time with this " +"action button." +msgstr "" +"Entrada/Saída. Nalgunhas empresas, o persoal ten que fichar cando chegan ó " +"traballo e ó rematar a xornada. Se cada empregado se vinculou a un usuario " +"do sistema, pódese controlar a súa xornada con este botón de acción." + +#. module: hr_attendance +#: field:hr.attendance,employee_id:0 +msgid "Employee's Name" +msgstr "Nome do empregado" + +#. module: hr_attendance +#: selection:hr.employee,state:0 +msgid "Absent" +msgstr "Ausente" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "February" +msgstr "Febreiro" + +#. module: hr_attendance +#: field:hr.action.reason,action_type:0 +msgid "Action's type" +msgstr "Tipo de acción" + +#. module: hr_attendance +#: view:hr.attendance:0 +msgid "Employee attendances" +msgstr "Asistencia empregado" + +#. module: hr_attendance +#: field:hr.sign.in.out,state:0 +msgid "Current state" +msgstr "Estado actual" + +#. module: hr_attendance +#: selection:hr.attendance.month,month:0 +msgid "April" +msgstr "Abril" + +#. module: hr_attendance +#: view:hr.attendance.error:0 +msgid "Bellow this delay, the error is considered to be voluntary" +msgstr "Aínda que indique esta demora, considérase que o erro é voluntario" + +#. module: hr_attendance +#: code:addons/hr_attendance/wizard/hr_attendance_error.py:49 +#, python-format +msgid "No records found for your selection!" +msgstr "Non se atoparon rexistros para a súa selección!" + +#. module: hr_attendance +#: view:hr.sign.in.out.ask:0 +msgid "" +"You did not sign in the last time. Please enter the date and time you signed " +"in." +msgstr "" +"Non rexistrou a entrada a última vez. Por favor, introduza a data e a hora " +"da entrada." + +#. module: hr_attendance +#: field:hr.attendance.month,year:0 +msgid "Year" +msgstr "Ano" + +#. module: hr_attendance +#: view:hr.sign.in.out.ask:0 +msgid "hr.sign.in.out.ask" +msgstr "hr.sign.in.out.ask" diff --git a/addons/lunch/i18n/bg.po b/addons/lunch/i18n/bg.po new file mode 100644 index 00000000000..95ef1ae4eac --- /dev/null +++ b/addons/lunch/i18n/bg.po @@ -0,0 +1,540 @@ +# Bulgarian translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-03-22 19:18+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Bulgarian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-23 04:36+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: lunch +#: wizard_view:lunch.cashbox.clean,init:0 +msgid "Reset cashbox" +msgstr "" + +#. module: lunch +#: model:ir.actions.act_window,name:lunch.action_lunch_order_form +#: model:ir.ui.menu,name:lunch.menu_lunch_order_form +#: model:ir.ui.menu,name:lunch.menu_lunch_reporting_order +msgid "Lunch Orders" +msgstr "Поръчки за обяд" + +#. module: lunch +#: wizard_view:lunch.order.cancel,init:0 +msgid "Are you sure you want to cancel this order ?" +msgstr "" + +#. module: lunch +#: model:ir.ui.menu,name:lunch.menu_lunch_cashmove_form +msgid "Cash Moves" +msgstr "" + +#. module: lunch +#: view:lunch.cashmove:0 +#: view:lunch.order:0 +#: view:report.lunch.amount:0 +#: view:report.lunch.order:0 +msgid "Group By..." +msgstr "" + +#. module: lunch +#: model:ir.model,name:lunch.model_lunch_order_confirm +msgid "confirm Order" +msgstr "" + +#. module: lunch +#: view:report.lunch.order:0 +msgid " 7 Days " +msgstr "" + +#. module: lunch +#: model:ir.module.module,description:lunch.module_meta_information +msgid "" +"\n" +" The base module to manage lunch\n" +"\n" +" keep track for the Lunch Order ,Cash Moves ,CashBox ,Product.\n" +" Apply Different Category for the product.\n" +" " +msgstr "" + +#. module: lunch +#: view:lunch.cashmove:0 +#: view:lunch.order:0 +msgid "Today" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "March" +msgstr "" + +#. module: lunch +#: report:lunch.order:0 +msgid "Total :" +msgstr "" + +#. module: lunch +#: field:report.lunch.amount,day:0 +#: view:report.lunch.order:0 +#: field:report.lunch.order,day:0 +msgid "Day" +msgstr "" + +#. module: lunch +#: model:ir.actions.wizard,name:lunch.wizard_id_cancel +#: wizard_view:lunch.order.cancel,init:0 +msgid "Cancel Order" +msgstr "" + +#. module: lunch +#: field:lunch.cashmove,amount:0 +#: field:report.lunch.amount,amount:0 +msgid "Amount" +msgstr "" + +#. module: lunch +#: model:ir.ui.menu,name:lunch.menu_lunch_product_form +#: view:lunch.product:0 +msgid "Products" +msgstr "Продукти" + +#. module: lunch +#: model:ir.model,name:lunch.model_report_lunch_amount +msgid "Amount available by user and box" +msgstr "" + +#. module: lunch +#: view:report.lunch.amount:0 +msgid " Month " +msgstr " Месец " + +#. module: lunch +#: model:ir.model,name:lunch.model_report_lunch_order +msgid "Lunch Orders Statistics" +msgstr "" + +#. module: lunch +#: model:ir.actions.act_window,name:lunch.action_lunch_cashmove_form +#: view:lunch.cashmove:0 +#: field:lunch.order,cashmove:0 +msgid "CashMove" +msgstr "" + +#. module: lunch +#: selection:lunch.order,state:0 +msgid "Confirmed" +msgstr "Потвърдено" + +#. module: lunch +#: view:lunch.order.confirm:0 +msgid "Confirm" +msgstr "" + +#. module: lunch +#: model:ir.module.module,shortdesc:lunch.module_meta_information +msgid "Lunch Module" +msgstr "" + +#. module: lunch +#: view:lunch.order:0 +msgid "Search Lunch Order" +msgstr "" + +#. module: lunch +#: field:lunch.order,state:0 +msgid "State" +msgstr "Област" + +#. module: lunch +#: field:report.lunch.order,price_total:0 +msgid "Total Price" +msgstr "Обща цена" + +#. module: lunch +#: model:ir.ui.menu,name:lunch.menu_lunch_report_amount_tree +#: view:report.lunch.amount:0 +msgid "Box Amount by User" +msgstr "" + +#. module: lunch +#: field:lunch.cashmove,create_date:0 +msgid "Creation Date" +msgstr "" + +#. module: lunch +#: report:lunch.order:0 +msgid "Name/Date" +msgstr "" + +#. module: lunch +#: field:lunch.order,descript:0 +msgid "Description Order" +msgstr "" + +#. module: lunch +#: model:ir.actions.wizard,name:lunch.lunch_order_confirm +#: wizard_button:lunch.order.confirm,init,go:0 +msgid "Confirm Order" +msgstr "Потвърждения на поръчка" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "July" +msgstr "" + +#. module: lunch +#: view:lunch.cashmove:0 +#: view:report.lunch.amount:0 +#: view:report.lunch.order:0 +msgid "Box" +msgstr "" + +#. module: lunch +#: view:report.lunch.order:0 +msgid " 365 Days " +msgstr "" + +#. module: lunch +#: view:report.lunch.amount:0 +msgid " Month-1 " +msgstr "" + +#. module: lunch +#: field:report.lunch.amount,date:0 +msgid "Created Date" +msgstr "" + +#. module: lunch +#: model:ir.actions.act_window,name:lunch.action_lunch_category_form +msgid " Product Categories " +msgstr "" + +#. module: lunch +#: wizard_button:lunch.cashbox.clean,init,zero:0 +msgid "Set to Zero" +msgstr "" + +#. module: lunch +#: model:ir.model,name:lunch.model_lunch_cashmove +msgid "Cash Move" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "April" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "September" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "December" +msgstr "" + +#. module: lunch +#: field:report.lunch.amount,month:0 +#: view:report.lunch.order:0 +#: field:report.lunch.order,month:0 +msgid "Month" +msgstr "" + +#. module: lunch +#: wizard_field:lunch.order.confirm,init,confirm_cashbox:0 +msgid "Name of box" +msgstr "" + +#. module: lunch +#: wizard_button:lunch.order.cancel,init,cancel:0 +msgid "Yes" +msgstr "" + +#. module: lunch +#: model:ir.model,name:lunch.model_lunch_category +#: view:lunch.category:0 +#: field:lunch.product,category_id:0 +msgid "Category" +msgstr "" + +#. module: lunch +#: view:report.lunch.amount:0 +msgid " Year " +msgstr "" + +#. module: lunch +#: model:ir.ui.menu,name:lunch.menu_lunch_category_form +msgid "Product Categories" +msgstr "" + +#. module: lunch +#: wizard_button:lunch.order.cancel,init,end:0 +msgid "No" +msgstr "" + +#. module: lunch +#: wizard_view:lunch.order.confirm,init:0 +msgid "Orders Confirmation" +msgstr "" + +#. module: lunch +#: wizard_view:lunch.cashbox.clean,init:0 +msgid "Are you sure you want to reset this cashbox ?" +msgstr "" + +#. module: lunch +#: selection:lunch.order,state:0 +msgid "Draft" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "August" +msgstr "" + +#. module: lunch +#: model:ir.actions.act_window,name:lunch.action_report_lunch_order_all +#: view:report.lunch.order:0 +msgid "Lunch Order Analysis" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "June" +msgstr "" + +#. module: lunch +#: field:lunch.cashmove,user_cashmove:0 +#: field:lunch.order,user_id:0 +#: field:report.lunch.amount,user_id:0 +msgid "User Name" +msgstr "" + +#. module: lunch +#: view:report.lunch.order:0 +msgid "Sales Analysis" +msgstr "" + +#. module: lunch +#: model:ir.ui.menu,name:lunch.menu_lunch +msgid "Lunch" +msgstr "" + +#. module: lunch +#: view:lunch.cashmove:0 +#: view:report.lunch.order:0 +msgid "User" +msgstr "" + +#. module: lunch +#: field:lunch.order,date:0 +msgid "Date" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "November" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "October" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "January" +msgstr "" + +#. module: lunch +#: model:ir.model,name:lunch.model_lunch_cashbox_clean +msgid "clean cashbox" +msgstr "" + +#. module: lunch +#: field:lunch.cashmove,active:0 +#: field:lunch.product,active:0 +msgid "Active" +msgstr "" + +#. module: lunch +#: field:report.lunch.order,date:0 +msgid "Date Order" +msgstr "" + +#. module: lunch +#: model:ir.model,name:lunch.model_lunch_cashbox +msgid "Cashbox for Lunch " +msgstr "" + +#. module: lunch +#: model:ir.actions.wizard,name:lunch.wizard_clean_cashbox +msgid "Set CashBox to Zero" +msgstr "" + +#. module: lunch +#: field:lunch.cashmove,box:0 +#: field:report.lunch.amount,box:0 +msgid "Box Name" +msgstr "" + +#. module: lunch +#: wizard_button:lunch.cashbox.clean,init,end:0 +#: wizard_button:lunch.order.confirm,init,end:0 +msgid "Cancel" +msgstr "" + +#. module: lunch +#: model:ir.actions.act_window,name:lunch.action_lunch_cashbox_form +msgid " Cashboxes " +msgstr "" + +#. module: lunch +#: rml:lunch.order:0 +msgid "Unit Price" +msgstr "" + +#. module: lunch +#: model:ir.actions.act_window,name:lunch.action_lunch_product_form +#: field:lunch.order,product:0 +msgid "Product" +msgstr "" + +#. module: lunch +#: rml:lunch.order:0 +#: field:lunch.product,description:0 +msgid "Description" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "May" +msgstr "" + +#. module: lunch +#: field:lunch.order,price:0 +#: field:lunch.product,price:0 +msgid "Price" +msgstr "" + +#. module: lunch +#: view:lunch.cashmove:0 +msgid "Search CashMove" +msgstr "" + +#. module: lunch +#: view:report.lunch.amount:0 +msgid "Total box" +msgstr "" + +#. module: lunch +#: model:ir.model,name:lunch.model_lunch_product +msgid "Lunch Product" +msgstr "" + +#. module: lunch +#: field:lunch.cashbox,sum_remain:0 +msgid "Total Remaining" +msgstr "" + +#. module: lunch +#: view:lunch.order:0 +msgid "Total price" +msgstr "" + +#. module: lunch +#: selection:report.lunch.amount,month:0 +#: selection:report.lunch.order,month:0 +msgid "February" +msgstr "" + +#. module: lunch +#: field:lunch.cashbox,name:0 +#: field:lunch.cashmove,name:0 +#: field:lunch.category,name:0 +#: rml:lunch.order:0 +#: field:lunch.product,name:0 +msgid "Name" +msgstr "" + +#. module: lunch +#: view:lunch.cashmove:0 +msgid "Total amount" +msgstr "" + +#. module: lunch +#: view:lunch.category:0 +msgid "Category related to Products" +msgstr "" + +#. module: lunch +#: model:ir.ui.menu,name:lunch.menu_lunch_cashbox_form +#: view:lunch.cashbox:0 +msgid "Cashboxes" +msgstr "" + +#. module: lunch +#: view:lunch.category:0 +#: rml:lunch.order:0 +#: view:lunch.order:0 +msgid "Order" +msgstr "" + +#. module: lunch +#: model:ir.actions.report.xml,name:lunch.report_lunch_order +#: model:ir.model,name:lunch.model_lunch_order +#: model:ir.ui.menu,name:lunch.menu_lunch +#: report:lunch.order:0 +msgid "Lunch Order" +msgstr "" + +#. module: lunch +#: model:ir.actions.act_window,name:lunch.action_report_lunch_amount_tree +#: model:ir.ui.menu,name:lunch.menu_lunch_report_amount_tree +msgid "Cash Position by User" +msgstr "" + +#. module: lunch +#: field:lunch.cashbox,manager:0 +msgid "Manager" +msgstr "" + +#. module: lunch +#: view:report.lunch.order:0 +msgid " 30 Days " +msgstr "" + +#. module: lunch +#: view:lunch.order:0 +msgid "To Confirm" +msgstr "" + +#. module: lunch +#: field:report.lunch.amount,year:0 +#: view:report.lunch.order:0 +#: field:report.lunch.order,year:0 +msgid "Year" +msgstr "" diff --git a/addons/mail_gateway/i18n/es_PY.po b/addons/mail_gateway/i18n/es_PY.po new file mode 100644 index 00000000000..fd46c3e69b6 --- /dev/null +++ b/addons/mail_gateway/i18n/es_PY.po @@ -0,0 +1,356 @@ +# Spanish (Paraguay) translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-03-22 10:43+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Spanish (Paraguay) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-23 04:36+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: mail_gateway +#: field:mailgate.message,res_id:0 +msgid "Resource ID" +msgstr "ID del recurso" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:68 +#: code:addons/mail_gateway/mail_gateway.py:71 +#: code:addons/mail_gateway/mail_gateway.py:89 +#, python-format +msgid "Method is not implemented" +msgstr "Método no implementado" + +#. module: mail_gateway +#: view:mailgate.message:0 +#: field:mailgate.message,email_from:0 +msgid "From" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Open Attachments" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Message Details" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,message_id:0 +msgid "Message Id" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,ref_id:0 +msgid "Reference Id" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.thread:0 +msgid "Mailgateway History" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:249 +#, python-format +msgid "Note" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Group By..." +msgstr "" + +#. module: mail_gateway +#: constraint:res.partner:0 +msgid "Error ! You can not create recursive associated members." +msgstr "" + +#. module: mail_gateway +#: help:mailgate.message,message_id:0 +msgid "Message Id on Email." +msgstr "" + +#. module: mail_gateway +#: help:mailgate.message,email_to:0 +msgid "Email Recipients" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Details" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.thread:0 +msgid "Mailgate History" +msgstr "" + +#. module: mail_gateway +#: model:ir.model,name:mail_gateway.model_email_server_tools +msgid "Email Server Tools" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Email Followers" +msgstr "" + +#. module: mail_gateway +#: model:ir.model,name:mail_gateway.model_res_partner +#: view:mailgate.message:0 +#: field:mailgate.message,partner_id:0 +msgid "Partner" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:250 +#, python-format +msgid " wrote on %s:\n" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +#: field:mailgate.message,description:0 +#: field:mailgate.message,message:0 +msgid "Description" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,email_to:0 +msgid "To" +msgstr "" + +#. module: mail_gateway +#: help:mailgate.message,references:0 +msgid "References emails." +msgstr "" + +#. module: mail_gateway +#: help:mailgate.message,email_cc:0 +msgid "Carbon Copy Email Recipients" +msgstr "" + +#. module: mail_gateway +#: model:ir.module.module,shortdesc:mail_gateway.module_meta_information +msgid "Email Gateway System" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,date:0 +msgid "Date" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,model:0 +msgid "Object Name" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Partner Name" +msgstr "" + +#. module: mail_gateway +#: model:ir.actions.act_window,name:mail_gateway.action_view_mailgate_thread +msgid "Mailgateway Threads" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:247 +#, python-format +msgid "Opportunity" +msgstr "" + +#. module: mail_gateway +#: model:ir.actions.act_window,name:mail_gateway.act_res_partner_emails +#: model:ir.actions.act_window,name:mail_gateway.action_view_mailgate_message +#: view:mailgate.message:0 +#: field:res.partner,emails:0 +msgid "Emails" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:252 +#, python-format +msgid "Stage" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:250 +#, python-format +msgid " added note on " +msgstr "" + +#. module: mail_gateway +#: help:mailgate.message,email_from:0 +msgid "Email From" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Thread" +msgstr "" + +#. module: mail_gateway +#: model:ir.model,name:mail_gateway.model_mailgate_message +msgid "Mailgateway Message" +msgstr "" + +#. module: mail_gateway +#: model:ir.actions.act_window,name:mail_gateway.action_view_mail_message +#: field:mailgate.thread,message_ids:0 +msgid "Messages" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,user_id:0 +msgid "User Responsible" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:248 +#, python-format +msgid "Converted to Opportunity" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,email_bcc:0 +msgid "Bcc" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,history:0 +msgid "Is History?" +msgstr "" + +#. module: mail_gateway +#: help:mailgate.message,email_bcc:0 +msgid "Blind Carbon Copy Email Recipients" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "mailgate message" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:148 +#: view:mailgate.thread:0 +#: view:res.partner:0 +#, python-format +msgid "History" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,references:0 +msgid "References" +msgstr "" + +#. module: mail_gateway +#: model:ir.model,name:mail_gateway.model_mailgate_thread +#: view:mailgate.thread:0 +msgid "Mailgateway Thread" +msgstr "" + +#. module: mail_gateway +#: model:ir.actions.act_window,name:mail_gateway.act_res_partner_open_email +#: view:mailgate.message:0 +#: field:mailgate.message,attachment_ids:0 +#: view:mailgate.thread:0 +msgid "Attachments" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Open Document" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.thread:0 +msgid "Email Details" +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,email_cc:0 +msgid "Cc" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:254 +#, python-format +msgid " on %s:\n" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Month" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Email Search" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:561 +#, python-format +msgid "receive" +msgstr "" + +#. module: mail_gateway +#: model:ir.module.module,description:mail_gateway.module_meta_information +msgid "" +"The generic email gateway system allows to send and receive emails\n" +" * History for Emails\n" +" * Easy Integration with any Module" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:255 +#, python-format +msgid "Changed Status to: " +msgstr "" + +#. module: mail_gateway +#: field:mailgate.message,display_text:0 +msgid "Display Text" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Owner" +msgstr "" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:253 +#, python-format +msgid "Changed Stage to: " +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Message" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +#: field:mailgate.message,name:0 +msgid "Subject" +msgstr "" + +#. module: mail_gateway +#: help:mailgate.message,ref_id:0 +msgid "Message Id in Email Server." +msgstr "" diff --git a/addons/mail_gateway/i18n/gl.po b/addons/mail_gateway/i18n/gl.po new file mode 100644 index 00000000000..87922670af6 --- /dev/null +++ b/addons/mail_gateway/i18n/gl.po @@ -0,0 +1,366 @@ +# Galician translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-03-22 10:49+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-23 04:36+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: mail_gateway +#: field:mailgate.message,res_id:0 +msgid "Resource ID" +msgstr "ID do Recurso" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:68 +#: code:addons/mail_gateway/mail_gateway.py:71 +#: code:addons/mail_gateway/mail_gateway.py:89 +#, python-format +msgid "Method is not implemented" +msgstr "Método non aplicado" + +#. module: mail_gateway +#: view:mailgate.message:0 +#: field:mailgate.message,email_from:0 +msgid "From" +msgstr "Desde" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Open Attachments" +msgstr "Abrir datos anexos" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Message Details" +msgstr "Detalles da mensaxe" + +#. module: mail_gateway +#: field:mailgate.message,message_id:0 +msgid "Message Id" +msgstr "ID da Mensaxe" + +#. module: mail_gateway +#: field:mailgate.message,ref_id:0 +msgid "Reference Id" +msgstr "ID referencia" + +#. module: mail_gateway +#: view:mailgate.thread:0 +msgid "Mailgateway History" +msgstr "Rexistros pasarela de correo" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:249 +#, python-format +msgid "Note" +msgstr "Nota" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Group By..." +msgstr "Agrupar por..." + +#. module: mail_gateway +#: constraint:res.partner:0 +msgid "Error ! You can not create recursive associated members." +msgstr "Erro! Non pode crear membros asociados recorrentes." + +#. module: mail_gateway +#: help:mailgate.message,message_id:0 +msgid "Message Id on Email." +msgstr "ID da mensaxe no e-mail." + +#. module: mail_gateway +#: help:mailgate.message,email_to:0 +msgid "Email Recipients" +msgstr "Destinatarios do e-mail." + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Details" +msgstr "Detalles" + +#. module: mail_gateway +#: view:mailgate.thread:0 +msgid "Mailgate History" +msgstr "Rexistro da pasarela de correo" + +#. module: mail_gateway +#: model:ir.model,name:mail_gateway.model_email_server_tools +msgid "Email Server Tools" +msgstr "Ferramentas do servidor de correo" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Email Followers" +msgstr "Destinatarios do e-mail" + +#. module: mail_gateway +#: model:ir.model,name:mail_gateway.model_res_partner +#: view:mailgate.message:0 +#: field:mailgate.message,partner_id:0 +msgid "Partner" +msgstr "Socio" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:250 +#, python-format +msgid " wrote on %s:\n" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +#: field:mailgate.message,description:0 +#: field:mailgate.message,message:0 +msgid "Description" +msgstr "Descrición" + +#. module: mail_gateway +#: field:mailgate.message,email_to:0 +msgid "To" +msgstr "Ata" + +#. module: mail_gateway +#: help:mailgate.message,references:0 +msgid "References emails." +msgstr "Referencias dos e-mails." + +#. module: mail_gateway +#: help:mailgate.message,email_cc:0 +msgid "Carbon Copy Email Recipients" +msgstr "Destinatarios do email en copia carbón (CC)." + +#. module: mail_gateway +#: model:ir.module.module,shortdesc:mail_gateway.module_meta_information +msgid "Email Gateway System" +msgstr "Sistema de pasarela de correo" + +#. module: mail_gateway +#: field:mailgate.message,date:0 +msgid "Date" +msgstr "Data" + +#. module: mail_gateway +#: field:mailgate.message,model:0 +msgid "Object Name" +msgstr "Nome do obxecto" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Partner Name" +msgstr "Nome do socio" + +#. module: mail_gateway +#: model:ir.actions.act_window,name:mail_gateway.action_view_mailgate_thread +msgid "Mailgateway Threads" +msgstr "Fíos pasarela de correo" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:247 +#, python-format +msgid "Opportunity" +msgstr "Oportunidade" + +#. module: mail_gateway +#: model:ir.actions.act_window,name:mail_gateway.act_res_partner_emails +#: model:ir.actions.act_window,name:mail_gateway.action_view_mailgate_message +#: view:mailgate.message:0 +#: field:res.partner,emails:0 +msgid "Emails" +msgstr "E-mails" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:252 +#, python-format +msgid "Stage" +msgstr "Fase" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:250 +#, python-format +msgid " added note on " +msgstr " nota engadida en " + +#. module: mail_gateway +#: help:mailgate.message,email_from:0 +msgid "Email From" +msgstr "E-mail de" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Thread" +msgstr "Fío" + +#. module: mail_gateway +#: model:ir.model,name:mail_gateway.model_mailgate_message +msgid "Mailgateway Message" +msgstr "Mensaxe da pasarela de correo electrónico" + +#. module: mail_gateway +#: model:ir.actions.act_window,name:mail_gateway.action_view_mail_message +#: field:mailgate.thread,message_ids:0 +msgid "Messages" +msgstr "Mensaxes" + +#. module: mail_gateway +#: field:mailgate.message,user_id:0 +msgid "User Responsible" +msgstr "Usuario responsable" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:248 +#, python-format +msgid "Converted to Opportunity" +msgstr "Convertido en oportunidade" + +#. module: mail_gateway +#: field:mailgate.message,email_bcc:0 +msgid "Bcc" +msgstr "Cco" + +#. module: mail_gateway +#: field:mailgate.message,history:0 +msgid "Is History?" +msgstr "É o rexistro?" + +#. module: mail_gateway +#: help:mailgate.message,email_bcc:0 +msgid "Blind Carbon Copy Email Recipients" +msgstr "Destinatarios do e-mail en copia carbón oculta (cco)." + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "mailgate message" +msgstr "Mensaxe da pasarela de correo" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:148 +#: view:mailgate.thread:0 +#: view:res.partner:0 +#, python-format +msgid "History" +msgstr "Historia" + +#. module: mail_gateway +#: field:mailgate.message,references:0 +msgid "References" +msgstr "Referencias" + +#. module: mail_gateway +#: model:ir.model,name:mail_gateway.model_mailgate_thread +#: view:mailgate.thread:0 +msgid "Mailgateway Thread" +msgstr "Fío da pasarela de correo" + +#. module: mail_gateway +#: model:ir.actions.act_window,name:mail_gateway.act_res_partner_open_email +#: view:mailgate.message:0 +#: field:mailgate.message,attachment_ids:0 +#: view:mailgate.thread:0 +msgid "Attachments" +msgstr "Anexos" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Open Document" +msgstr "Abrir un documento" + +#. module: mail_gateway +#: view:mailgate.thread:0 +msgid "Email Details" +msgstr "Detalles do e-mail" + +#. module: mail_gateway +#: field:mailgate.message,email_cc:0 +msgid "Cc" +msgstr "Cc" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:254 +#, python-format +msgid " on %s:\n" +msgstr "" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Month" +msgstr "Mes" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Email Search" +msgstr "Buscar e-mail" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:561 +#, python-format +msgid "receive" +msgstr "recibir" + +#. module: mail_gateway +#: model:ir.module.module,description:mail_gateway.module_meta_information +msgid "" +"The generic email gateway system allows to send and receive emails\n" +" * History for Emails\n" +" * Easy Integration with any Module" +msgstr "" +"A pasarela de correo xenérica permite enviar e recibir e-mails* Rexistro dos " +"e-mails* Integración doada con calquera módulo" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:255 +#, python-format +msgid "Changed Status to: " +msgstr "Estado cambiado a: " + +#. module: mail_gateway +#: field:mailgate.message,display_text:0 +msgid "Display Text" +msgstr "Amosar texto" + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Owner" +msgstr "Propietario" + +#. module: mail_gateway +#: code:addons/mail_gateway/mail_gateway.py:253 +#, python-format +msgid "Changed Stage to: " +msgstr "Etapa cambiada a: " + +#. module: mail_gateway +#: view:mailgate.message:0 +msgid "Message" +msgstr "Mensaxe" + +#. module: mail_gateway +#: view:mailgate.message:0 +#: field:mailgate.message,name:0 +msgid "Subject" +msgstr "Asunto" + +#. module: mail_gateway +#: help:mailgate.message,ref_id:0 +msgid "Message Id in Email Server." +msgstr "ID da mensaxe no servidor de correo." + +#, python-format +#~ msgid " wrote on " +#~ msgstr " escrito o " + +#, python-format +#~ msgid " on " +#~ msgstr " en " diff --git a/addons/marketing_campaign_crm_demo/i18n/gl.po b/addons/marketing_campaign_crm_demo/i18n/gl.po new file mode 100644 index 00000000000..30457774cd3 --- /dev/null +++ b/addons/marketing_campaign_crm_demo/i18n/gl.po @@ -0,0 +1,193 @@ +# Galician translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-03-22 11:43+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-23 04:36+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: marketing_campaign_crm_demo +#: model:ir.actions.report.xml,name:marketing_campaign_crm_demo.mc_crm_lead_demo_report +msgid "Marketing campaign demo report" +msgstr "Informe da campaña de márketing de demostración" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_body_text:marketing_campaign_crm_demo.email_template_1 +msgid "" +"Hello,Thanks for generous interest you have shown in the " +"openERP.Regards,OpenERP Team," +msgstr "" +"Ola, grazas polo xeneroso interese amosado en OpenERP. Saúdos, o Equipo de " +"OpenERP." + +#. module: marketing_campaign_crm_demo +#: model:ir.module.module,description:marketing_campaign_crm_demo.module_meta_information +msgid "Demo data for the module marketing_campaign." +msgstr "Datos demo para os módulos márketing_campaign." + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_body_text:marketing_campaign_crm_demo.email_template_4 +msgid "" +"Hello,Thanks for showing intrest and buying the OpenERP book.\n" +" If any further information required kindly revert back.\n" +" I really appreciate your co-operation on this.\n" +" Regards,OpenERP Team," +msgstr "" +"Ola, Grazas polo interese amosado e pola compra do libro OpenERP. Se precisa " +"máis información, non dubide en escribir a este enderezo. Agradecémoslle " +"sinceiramente a súa cooperación. Saúdos, o equipo de OpenERP," + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_subject:marketing_campaign_crm_demo.email_template_2 +msgid "Propose to subscribe to the OpenERP Discovery Day on May 2010" +msgstr "Propor subscribirse ó OpenERP Discovery Day en maio de 2010" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_subject:marketing_campaign_crm_demo.email_template_6 +msgid "Propose paid training to Silver partners" +msgstr "Propor a formación de pago ós asociados Prata" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_subject:marketing_campaign_crm_demo.email_template_1 +msgid "Thanks for showing interest in OpenERP" +msgstr "Grazas por amosar o seu interese en OpenERP" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_subject:marketing_campaign_crm_demo.email_template_4 +msgid "Thanks for buying the OpenERP book" +msgstr "Grazas por mercar o libro de OpenERP" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_subject:marketing_campaign_crm_demo.email_template_5 +msgid "Propose a free technical training to Gold partners" +msgstr "Propor unha formación técnica a asociados Ouro" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_body_text:marketing_campaign_crm_demo.email_template_7 +msgid "" +"Hello, We have very good offer that might suit you.\n" +" For our silver partners,We are offering Gold partnership.\n" +" If any further information required kindly revert back.\n" +" I really appreciate your co-operation on this.\n" +" Regards,OpenERP Team," +msgstr "" +"Ola: Temos unha excelente oferta que pode ser axeitada para vostede. Para os " +"nosos asociados Silver, estamos a ofrecer a asociación Gold. Se precisa máis " +"información, non dubide en escribir a este enderezo. Agradecémoslle " +"sinceiramente a súa cooperación. Saúdos, o equipo de OpenERP," + +#. module: marketing_campaign_crm_demo +#: report:crm.lead.demo:0 +msgid "Partner :" +msgstr "Empresa:" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_body_text:marketing_campaign_crm_demo.email_template_8 +msgid "" +"Hello, Thanks for showing intrest and for subscribing to technical " +"training.If any further information required kindly revert back.I really " +"appreciate your co-operation on this.\n" +" Regards,OpenERP Team," +msgstr "" +"Ola: Grazas polo seu interese e pola súa subscrición á formación técnica. Se " +"precisa máis información, non dubide en escribir a este enderezo. " +"Agradecémoslle sinceiramente a súa cooperación. Saúdos, o equipo de OpenERP," + +#. module: marketing_campaign_crm_demo +#: report:crm.lead.demo:0 +msgid "Company :" +msgstr "Compañía :" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_subject:marketing_campaign_crm_demo.email_template_8 +msgid "Thanks for subscribing to technical training" +msgstr "Grazas por subscribirse á formación técnica" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_subject:marketing_campaign_crm_demo.email_template_3 +msgid "Thanks for subscribing to the OpenERP Discovery Day" +msgstr "Grazas por subscribirse ó OpenERP Discovery Day" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_body_text:marketing_campaign_crm_demo.email_template_5 +msgid "" +"Hello, We have very good offer that might suit you.\n" +" For our gold partners,We are arranging free technical training " +"on june,2010.\n" +" If any further information required kindly revert back.\n" +" I really appreciate your co-operation on this.\n" +" Regards,OpenERP Team," +msgstr "" +"Ola: Temos unha excelente oferta que pode ser axeitada para vostede. Estamos " +"a ofrecer ós nosos asociados Gold formación técnica gratuíta en xuño de " +"2010. Se precisa máis información, non dubide en escribir a este enderezo. " +"Agradecémoslle sinceiramente a súa cooperación. Saúdos, o equipo de OpenERP," + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_body_text:marketing_campaign_crm_demo.email_template_3 +msgid "" +"Hello,Thanks for showing intrest and for subscribing to the OpenERP " +"Discovery Day.\n" +" If any further information required kindly revert back.\n" +" I really appreciate your co-operation on this.\n" +" Regards,OpenERP Team," +msgstr "" +"Ola: Grazas polo seu interese e pola subscrición ó OpenERP Discovery Day. Se " +"precisa máis información, non dubide en escribir a este enderezo. " +"Agradecémoslle sinceiramente á súa cooperación. Saúdos, o equipo de OpenERP," + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_body_text:marketing_campaign_crm_demo.email_template_2 +msgid "" +"Hello,We have very good offer that might suit you.\n" +" We propose you to subscribe to the OpenERP Discovery Day on May " +"2010.\n" +" If any further information required kindly revert back.\n" +" We really appreciate your co-operation on this.\n" +" Regards,OpenERP Team," +msgstr "" +"Ola: Temos unha excelente oferta que pode ser axeitada para vostede. " +"Ofrecémoslle subscribirse ó OpenERP Discovery Day de maio de 2010. Se " +"precisa máis información, non dubide en escribir a este enderezo. " +"Agradecémoslle sinceiramente a súa cooperación. Saúdos, o equipo de OpenERP," + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_body_text:marketing_campaign_crm_demo.email_template_6 +msgid "" +"Hello, We have very good offer that might suit you.\n" +" For our silver partners,We are paid technical training on " +"june,2010.\n" +" If any further information required kindly revert back.\n" +" I really appreciate your co-operation on this.\n" +" Regards,OpenERP Team," +msgstr "" +"Ola: Temos unha excelente oferta que pode ser axeitada para vostede. Para os " +"nosos asociados Silver, temos formación técnica pagada en xuño 2010. Se " +"precisa máis información, non dubide en escribir a este enderezo. " +"Agradecémoslle sinceiramente a súa cooperación. Saúdos, o equipo de OpenERP," + +#. module: marketing_campaign_crm_demo +#: model:ir.actions.server,name:marketing_campaign_crm_demo.action_dummy +msgid "Dummy Action" +msgstr "Acción de simulacro" + +#. module: marketing_campaign_crm_demo +#: model:ir.module.module,shortdesc:marketing_campaign_crm_demo.module_meta_information +msgid "marketing_campaign_crm_demo" +msgstr "márketing_campaign_crm_demo" + +#. module: marketing_campaign_crm_demo +#: model:email.template,def_subject:marketing_campaign_crm_demo.email_template_7 +msgid "Propose gold partnership to silver partners" +msgstr "Propoñer a asociación ouro ós asociados prata" diff --git a/addons/mrp_subproduct/i18n/gl.po b/addons/mrp_subproduct/i18n/gl.po new file mode 100644 index 00000000000..b9e7209a733 --- /dev/null +++ b/addons/mrp_subproduct/i18n/gl.po @@ -0,0 +1,129 @@ +# Galician translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-03 16:58+0000\n" +"PO-Revision-Date: 2011-03-22 18:08+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-23 04:35+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: mrp_subproduct +#: field:mrp.subproduct,product_id:0 +msgid "Product" +msgstr "Produto" + +#. module: mrp_subproduct +#: sql_constraint:mrp.bom:0 +msgid "" +"All product quantities must be greater than 0.\n" +"You should install the mrp_subproduct module if you want to manage extra " +"products on BoMs !" +msgstr "" +"Tódalas cantidades de produto deben ser superiores a cero. Debe instalar o " +"módulo mrp_subproduct se desexa xestionar produtos extra nas LdM!" + +#. module: mrp_subproduct +#: view:mrp.bom:0 +msgid "sub products" +msgstr "subprodutos" + +#. module: mrp_subproduct +#: model:ir.model,name:mrp_subproduct.model_mrp_production +msgid "Manufacturing Order" +msgstr "Orde de fabricación" + +#. module: mrp_subproduct +#: model:ir.module.module,shortdesc:mrp_subproduct.module_meta_information +msgid "" +"MRP Sub Product - To produce several products from one production order" +msgstr "" +"MRP Subproduto - Para producir varios produtos desde unha orde de fabricación" + +#. module: mrp_subproduct +#: field:mrp.subproduct,product_qty:0 +msgid "Product Qty" +msgstr "Cantidade produto" + +#. module: mrp_subproduct +#: field:mrp.bom,sub_products:0 +msgid "sub_products" +msgstr "sub_produtos" + +#. module: mrp_subproduct +#: field:mrp.subproduct,subproduct_type:0 +msgid "Quantity Type" +msgstr "Tipo de cantidade" + +#. module: mrp_subproduct +#: model:ir.model,name:mrp_subproduct.model_mrp_bom +msgid "Bill of Material" +msgstr "Lista de material" + +#. module: mrp_subproduct +#: model:ir.module.module,description:mrp_subproduct.module_meta_information +msgid "" +"\n" +"This module allows you to produce several products from one production " +"order.\n" +"You can configure sub-products in the bill of material.\n" +"Without this module:\n" +" A + B + C -> D\n" +"With this module:\n" +" A + B + C -> D + E\n" +" " +msgstr "" +"\n" +"Este módulo permítelle producir varios produtos desde unha orde de " +"produción. Pode configurar os subprodutos na lista de materiais. Sen este " +"módulo: A + B + C -> D Con este módulo: A + B + C -> D + E\n" +" " + +#. module: mrp_subproduct +#: field:mrp.subproduct,product_uom:0 +msgid "Product UOM" +msgstr "UdM do produto" + +#. module: mrp_subproduct +#: field:mrp.subproduct,bom_id:0 +msgid "BoM" +msgstr "Lista de materiais" + +#. module: mrp_subproduct +#: constraint:mrp.bom:0 +msgid "Error ! You can not create recursive BoM." +msgstr "Erro! Non pode crear Listas de Material recorrentes." + +#. module: mrp_subproduct +#: view:mrp.bom:0 +msgid "Sub Products" +msgstr "Subprodutos" + +#. module: mrp_subproduct +#: selection:mrp.subproduct,subproduct_type:0 +msgid "Variable" +msgstr "Variable" + +#. module: mrp_subproduct +#: constraint:mrp.production:0 +msgid "Order quantity cannot be negative or zero !" +msgstr "A cantidade do pedido non pode ser negativa ou cero!" + +#. module: mrp_subproduct +#: model:ir.model,name:mrp_subproduct.model_mrp_subproduct +msgid "Sub Product" +msgstr "Subproduto" + +#. module: mrp_subproduct +#: selection:mrp.subproduct,subproduct_type:0 +msgid "Fixed" +msgstr "Fixo" diff --git a/addons/outlook/i18n/gl.po b/addons/outlook/i18n/gl.po new file mode 100644 index 00000000000..1748240cc96 --- /dev/null +++ b/addons/outlook/i18n/gl.po @@ -0,0 +1,157 @@ +# Galician translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-03-22 11:24+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-23 04:36+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: outlook +#: field:outlook.installer,doc_file:0 +msgid "Installation Manual" +msgstr "Manual de instalación" + +#. module: outlook +#: field:outlook.installer,plugin_file:0 +msgid "Outlook Plug-in" +msgstr "Conector Outlook" + +#. module: outlook +#: field:outlook.installer,description:0 +msgid "Description" +msgstr "Descrición" + +#. module: outlook +#: model:ir.ui.menu,name:outlook.menu_base_config_plugins_outlook +#: view:outlook.installer:0 +msgid "Outlook Plug-In" +msgstr "Conector Outlook" + +#. module: outlook +#: view:outlook.installer:0 +msgid "Skip" +msgstr "Omitir" + +#. module: outlook +#: model:ir.module.module,shortdesc:outlook.module_meta_information +msgid "Outlook Interface" +msgstr "Interface Outlook" + +#. module: outlook +#: field:outlook.installer,doc_name:0 +#: field:outlook.installer,name:0 +msgid "File name" +msgstr "Nome do arquivo" + +#. module: outlook +#: field:outlook.installer,outlook:0 +msgid "Outlook Plug-in " +msgstr "Conector Outlook " + +#. module: outlook +#: model:ir.module.module,description:outlook.module_meta_information +msgid "" +"\n" +" This module provide the Outlook plug-in. \n" +"\n" +" Outlook plug-in allows you to select an object that you’d like to add\n" +" to your email and its attachments from MS Outlook. You can select a " +"partner, a task,\n" +" a project, an analytical account, or any other object and Archived " +"selected\n" +" mail in mailgate.messages with attachments.\n" +"\n" +" " +msgstr "" +"\n" +" Este módulo prové o conector (plug-in) de Outlook. O conector de " +"Outlook permítelle seleccionar un obxecto que desexaría achegar ó seu correo " +"e os seus anexos desde MS Outlook. Pode seleccionar unha empresa, unha " +"tarefa, un proxecto, unha conta analítica, ou calquera outro obxecto, e " +"arquivar o correo seleccionado en mensaxes de correo con anexos.\n" +"\n" +" " + +#. module: outlook +#: help:outlook.installer,doc_file:0 +msgid "The documentation file :- how to install Outlook Plug-in." +msgstr "O arquivo de documentación: Como instalar o conector Outlook." + +#. module: outlook +#: model:ir.model,name:outlook.model_outlook_installer +msgid "outlook.installer" +msgstr "outlook.instalador" + +#. module: outlook +#: model:ir.actions.act_window,name:outlook.action_outlook_installer +#: model:ir.actions.act_window,name:outlook.action_outlook_wizard +#: view:outlook.installer:0 +msgid "Outlook Plug-In Configuration" +msgstr "Configuración do conector Outlook" + +#. module: outlook +#: field:outlook.installer,progress:0 +msgid "Configuration Progress" +msgstr "Progreso da configuración" + +#. module: outlook +#: view:outlook.installer:0 +msgid "" +"This plug-in allows you to link your e-mail to OpenERP's documents. You can " +"attach it to any existing one in OpenERP or create a new one." +msgstr "" +"Este conector permítelle vincular o seu correo electrónico con documentos " +"OpenERP. Pódeo achegar á calquera elemento de OpenERP ou crear un novo." + +#. module: outlook +#: help:outlook.installer,outlook:0 +msgid "" +"Allows you to select an object that you would like to add to your email and " +"its attachments." +msgstr "" +"Permítelle seleccionar un obxecto ó que desexe engadir o seu correo " +"electrónico e os arquivos anexos." + +#. module: outlook +#: view:outlook.installer:0 +msgid "title" +msgstr "título" + +#. module: outlook +#: view:outlook.installer:0 +msgid "_Close" +msgstr "_Pechar" + +#. module: outlook +#: view:outlook.installer:0 +msgid "Installation and Configuration Steps" +msgstr "Pasos da instalación e configuración" + +#. module: outlook +#: field:outlook.installer,config_logo:0 +msgid "Image" +msgstr "Imaxe" + +#. module: outlook +#: help:outlook.installer,plugin_file:0 +msgid "" +"outlook plug-in file. Save as this file and install this plug-in in outlook." +msgstr "" +"Arquivo do conector Outlook. Garde este arquivo e instale este conector na " +"aplicación Outlook." + +#. module: outlook +#: view:outlook.installer:0 +msgid "Configure" +msgstr "Configurar" diff --git a/addons/procurement/i18n/id.po b/addons/procurement/i18n/id.po index 97a53ca1949..0bc8654be73 100644 --- a/addons/procurement/i18n/id.po +++ b/addons/procurement/i18n/id.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2011-03-21 09:53+0000\n" +"PO-Revision-Date: 2011-03-22 06:13+0000\n" "Last-Translator: moelyana \n" "Language-Team: Indonesian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-22 04:35+0000\n" +"X-Launchpad-Export-Date: 2011-03-23 04:36+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: procurement @@ -665,17 +665,19 @@ msgstr "Informasi Umum" #. module: procurement #: view:procurement.order:0 msgid "Run Procurement" -msgstr "" +msgstr "Jalankan Procurement" #. module: procurement #: selection:procurement.order,state:0 msgid "Done" -msgstr "" +msgstr "selesai" #. module: procurement #: help:stock.warehouse.orderpoint,qty_multiple:0 msgid "The procurement quantity will by rounded up to this multiple." msgstr "" +"Kuantitas procurement akan dengan dibulatkan ke atas ke beberapa bagian " +"ini." #. module: procurement #: view:make.procurement:0 @@ -685,42 +687,42 @@ msgstr "" #: view:procurement.order.compute.all:0 #: view:procurement.orderpoint.compute:0 msgid "Cancel" -msgstr "" +msgstr "Batal" #. module: procurement #: field:stock.warehouse.orderpoint,logic:0 msgid "Reordering Mode" -msgstr "" +msgstr "Mode order kembali" #. module: procurement #: field:procurement.order,origin:0 msgid "Source Document" -msgstr "" +msgstr "Sumber berkas" #. module: procurement #: selection:procurement.order,priority:0 msgid "Not urgent" -msgstr "" +msgstr "Tidak begitu penting" #. module: procurement #: model:ir.model,name:procurement.model_procurement_order_compute_all msgid "Compute all schedulers" -msgstr "" +msgstr "Hitung semua penjadwalan" #. module: procurement #: view:procurement.order:0 msgid "Current" -msgstr "" +msgstr "Saat Ini" #. module: procurement #: view:board.board:0 msgid "Procurements in Exception" -msgstr "" +msgstr "Procurement dalam pengecualian" #. module: procurement #: view:procurement.order:0 msgid "Details" -msgstr "" +msgstr "Rincian" #. module: procurement #: model:ir.actions.act_window,name:procurement.procurement_action5 @@ -728,7 +730,7 @@ msgstr "" #: model:ir.actions.act_window,name:procurement.procurement_exceptions #: model:ir.ui.menu,name:procurement.menu_stock_procurement_action msgid "Procurement Exceptions" -msgstr "" +msgstr "Pengadaan Pengecualian" #. module: procurement #: model:ir.actions.act_window,name:procurement.act_procurement_2_stock_warehouse_orderpoint @@ -748,7 +750,7 @@ msgstr "" #. module: procurement #: view:procurement.order:0 msgid "Scheduled Date" -msgstr "" +msgstr "Tanggal terjadwal" #. module: procurement #: field:make.procurement,product_id:0 @@ -756,28 +758,28 @@ msgstr "" #: field:procurement.order,product_id:0 #: field:stock.warehouse.orderpoint,product_id:0 msgid "Product" -msgstr "" +msgstr "Produk" #. module: procurement #: view:procurement.order:0 msgid "Temporary" -msgstr "" +msgstr "Sementara" #. module: procurement #: field:mrp.property,description:0 #: field:mrp.property.group,description:0 msgid "Description" -msgstr "" +msgstr "Keterangan" #. module: procurement #: selection:mrp.property,composition:0 msgid "min" -msgstr "" +msgstr "min" #. module: procurement #: view:stock.warehouse.orderpoint:0 msgid "Quantity Rules" -msgstr "" +msgstr "Aturan Kuantitas" #. module: procurement #: selection:procurement.order,state:0 diff --git a/addons/product_manufacturer/i18n/gl.po b/addons/product_manufacturer/i18n/gl.po new file mode 100644 index 00000000000..6405cc8a2ae --- /dev/null +++ b/addons/product_manufacturer/i18n/gl.po @@ -0,0 +1,88 @@ +# Galician translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:15+0000\n" +"PO-Revision-Date: 2011-03-22 18:14+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-23 04:35+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: product_manufacturer +#: model:ir.module.module,description:product_manufacturer.module_meta_information +msgid "A module that add manufacturers and attributes on the product form" +msgstr "" +"Un módulo que engade fabricantes e atributos no formulario de produto" + +#. module: product_manufacturer +#: field:product.product,manufacturer_pref:0 +msgid "Manufacturer Product Code" +msgstr "Código produto fabricante" + +#. module: product_manufacturer +#: model:ir.model,name:product_manufacturer.model_product_product +#: field:product.manufacturer.attribute,product_id:0 +msgid "Product" +msgstr "Produto" + +#. module: product_manufacturer +#: view:product.manufacturer.attribute:0 +msgid "Product Template Name" +msgstr "Nome do modelo de produto" + +#. module: product_manufacturer +#: model:ir.model,name:product_manufacturer.model_product_manufacturer_attribute +msgid "Product attributes" +msgstr "Atributos do produto" + +#. module: product_manufacturer +#: view:product.manufacturer.attribute:0 +#: view:product.product:0 +msgid "Product Attributes" +msgstr "Atributos do produto" + +#. module: product_manufacturer +#: field:product.manufacturer.attribute,name:0 +msgid "Attribute" +msgstr "Atributo" + +#. module: product_manufacturer +#: field:product.manufacturer.attribute,value:0 +msgid "Value" +msgstr "Valor" + +#. module: product_manufacturer +#: constraint:product.product:0 +msgid "Error: Invalid ean code" +msgstr "Erro: Código EAN non válido" + +#. module: product_manufacturer +#: view:product.product:0 +#: field:product.product,attribute_ids:0 +msgid "Attributes" +msgstr "Atributos" + +#. module: product_manufacturer +#: model:ir.module.module,shortdesc:product_manufacturer.module_meta_information +msgid "Products Attributes & Manufacturers" +msgstr "Fabricantes e atributos dos produtos" + +#. module: product_manufacturer +#: field:product.product,manufacturer_pname:0 +msgid "Manufacturer Product Name" +msgstr "Nome produto fabricante" + +#. module: product_manufacturer +#: view:product.product:0 +#: field:product.product,manufacturer:0 +msgid "Manufacturer" +msgstr "Fabricante" diff --git a/addons/share/i18n/pt_BR.po b/addons/share/i18n/pt_BR.po index 2d63bea4f39..dfadb15541a 100644 --- a/addons/share/i18n/pt_BR.po +++ b/addons/share/i18n/pt_BR.po @@ -14,7 +14,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-22 04:35+0000\n" +"X-Launchpad-Export-Date: 2011-03-23 04:35+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: share From 99f90b17a2459f08153af26963b10ce58c7bbb40 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 23 Mar 2011 08:27:12 +0100 Subject: [PATCH 653/681] [FIX] split selection of a range of ids and activation of a single id into two methods, write some tests bzr revid: xmo@openerp.com-20110323072712-10gohth1mxrgh6o1 --- addons/base/static/openerp/js/base_views.js | 68 +++++++++++++++++---- addons/base/static/openerp/js/tests.js | 56 +++++++++++++++++ 2 files changed, 113 insertions(+), 11 deletions(-) diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index 7bd96b45d86..0b852138795 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -247,6 +247,10 @@ openerp.base.DataSet = openerp.base.Controller.extend({ * @returns itself */ prev: function () { + this._active_id_index -= 1; + if (this._active_id_index < 0) { + this._active_id_index = this._active_ids.length - 1; + } return this; }, /** @@ -254,26 +258,68 @@ openerp.base.DataSet = openerp.base.Controller.extend({ * @returns itself */ next: function () { + this._active_id_index += 1; + if (this._active_id_index >= this._active_ids.length) { + this._active_id_index = 0; + } return this; }, /** - * Sets active_ids and/or active_id by value: + * Sets active_ids by value: * - * * If only ids is provided - * - Activates all ids part of the current selection - * - Sets active_id to be the first id of the selection - * * If only id is provided, activates this id (for both active_id and active_ids) - * * If both id and ids are provided - * - Activates all ids part of the current selection - * - If id is part of the active ids, activates it, otherwise see first option + * * Activates all ids part of the current selection + * * Sets active_id to be the first id of the selection * - * @param {Array} [ids] the list of ids to activate - * @param {Object} [id] the id to activate + * @param {Array} ids the list of ids to activate + * @returns itself */ - select: function (ids, id) { + select: function (ids) { this._active_ids = ids; + this._active_id_index = 0; return this; + }, + /** + * Fetches the ids of the currently selected records, if any. + */ + get_active_ids: function () { + return this._active_ids; + }, + /** + * Sets the current active_id by value + * + * If there are no active_ids selected, selects the provided id as the sole active_id + * + * If there are ids selected and the provided id is not in them, raise an error + * + * @param {Object} id the id to activate + * @returns itself + */ + activate: function (id) { + if(!this._active_ids) { + this._active_ids = [id]; + this._active_id_index = 0; + } else { + var index = _.indexOf(this._active_ids, id); + if (index == -1) { + throw new Error( + "Could not find id " + id + + " in array [" + this._active_ids.join(', ') + "]"); + } + this._active_id_index = index; + } + return this; + }, + /** + * Fetches the id of the current active record, if any. + * + * @returns record? record id or null + */ + get_active_id: function () { + if (!this._active_ids) { + return null; + } + return this._active_ids[this._active_id_index]; } }); diff --git a/addons/base/static/openerp/js/tests.js b/addons/base/static/openerp/js/tests.js index 86ae3e9f380..0b3bf5d6529 100644 --- a/addons/base/static/openerp/js/tests.js +++ b/addons/base/static/openerp/js/tests.js @@ -243,6 +243,62 @@ $(document).ready(function () { deepEqual([['foo', '=', 'bar']], dataset._domain); }); + module('ids_activation', { + setup: function () { + var openerp = window.openerp.init(); + dataset = new openerp.base.DataSet(); + } + }); + test('activate id', function () { + dataset.activate(1); + deepEqual(dataset.get_active_ids(), [1]); + equal(dataset.get_active_id(), 1); + }); + test('set active_ids', function () { + dataset.select([1, 2, 3]); + deepEqual(dataset.get_active_ids(), [1, 2, 3], + "selecting an ids range"); + equal(dataset.get_active_id(), 1); + }); + test('activate incorrect id', function () { + dataset.select([1, 2, 3]); + raises(function () { dataset.activate(42); }, + "Activating an id not present in the selection is an error"); + }); + test('reset active id on set active ids', function () { + dataset.select([1, 2, 3]).activate(3).select([1, 2, 3]); + equal(dataset.get_active_id(), 1, + "selecting an ids range resets the active id"); + }); + + module('active_id_iteration', { + setup: function () { + var openerp = window.openerp.init(); + dataset = new openerp.base.DataSet(); + dataset.select([1, 2, 3]); + } + }); + test('step forward', function () { + dataset.activate(1); + dataset.next(); + equal(dataset.get_active_id(), 2); + }); + test('wraparound forward', function () { + dataset.activate(3); + dataset.next(); + equal(dataset.get_active_id(), 1); + }); + test('step back', function () { + dataset.activate(3); + dataset.prev(); + equal(dataset.get_active_id(), 2); + }); + test('wraparound back', function () { + dataset.activate(1); + dataset.prev(); + equal(dataset.get_active_id(), 3); + }); + module('active_ids', { setup: function () { openerp = window.openerp.init(); From 1284858cb181a7ea2cb76c0672bea51145a56b7b Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 23 Mar 2011 08:54:29 +0100 Subject: [PATCH 654/681] [ADD] get_active_id, use API functions more instead of internals in DataSet bzr revid: xmo@openerp.com-20110323075429-ek9bvxs6vzoxcqlc --- addons/base/static/openerp/js/base_views.js | 11 +++++- addons/base/static/openerp/js/tests.js | 40 ++++++++++++++++----- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index 0b852138795..e24b5835d44 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -183,7 +183,7 @@ openerp.base.DataSet = openerp.base.Controller.extend({ */ active_ids: function () { this.rpc('/base/dataset/get', { - ids: this._active_ids + ids: this.get_active_ids() }, _.bind(function (records) { this.on_active_ids(_.map( records, function (record) { @@ -209,6 +209,15 @@ openerp.base.DataSet = openerp.base.Controller.extend({ * @returns itself */ active_id: function () { + this.rpc('/base/dataset/get', { + ids: [this.get_active_id()] + }, _.bind(function (records) { + var record = records[0]; + this.on_active_id( + record && new openerp.base.DataRecord( + this.session, this._model, + this._fields, record)); + }, this)); return this; }, /** diff --git a/addons/base/static/openerp/js/tests.js b/addons/base/static/openerp/js/tests.js index 0b3bf5d6529..596eb134031 100644 --- a/addons/base/static/openerp/js/tests.js +++ b/addons/base/static/openerp/js/tests.js @@ -299,23 +299,28 @@ $(document).ready(function () { equal(dataset.get_active_id(), 3); }); - module('active_ids', { - setup: function () { - openerp = window.openerp.init(); - } - }); - asyncTest('Get pre-set active_ids', 6, function () { - var dataset = new openerp.base.DataSet({ + var ResponseAssertSession = function (response_ids) { + return { rpc: function (url, params, on_success) { equal(url, '/base/dataset/get'); - deepEqual(params.ids, [1, 2, 3]); + deepEqual(params.ids, response_ids); _.delay(on_success, 0, _.map( params.ids, function (id) { return {id: id, sequence: id, name: 'foo'+id}; } )); } - }); + }; + }; + + module('active_ids', { + setup: function () { + openerp = window.openerp.init(); + } + }); + asyncTest('Get pre-set active_ids', 6, function () { + var dataset = new openerp.base.DataSet( + new ResponseAssertSession([1, 2, 3])); dataset.select([1, 2, 3]); dataset.on_active_ids.add(function (data_records) { equal(data_records.length, 3); @@ -326,4 +331,21 @@ $(document).ready(function () { }); dataset.active_ids(); }); + + module('active_id', { + setup: function () { + openerp = window.openerp.init(); + } + }); + test('Get pre-set active_id', 3, function () { + var dataset = new openerp.base.DataSet( + new ResponseAssertSession([42])); + stop(500); + dataset.select([1, 2, 3, 42]).activate(42); + dataset.on_active_id.add(function (data_record) { + equal(data_record.values.id, 42); + start(); + }); + dataset.active_id(); + }); }); From 3d65a024d2cce9cd9dd8258a36f18bea7a4d8aea Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 23 Mar 2011 09:34:41 +0100 Subject: [PATCH 655/681] [IMP] implement DataSet.find, rename .ids() to .fetch() (and the corresponding event), make list and form views use the new dataset API bzr revid: xmo@openerp.com-20110323083441-ego3wphgpb94obrg --- addons/base/controllers/main.py | 14 ++++-- addons/base/static/openerp/base.xml | 1 - addons/base/static/openerp/js/base_views.js | 54 ++++++++------------- addons/base/static/openerp/js/tests.js | 16 +++--- 4 files changed, 37 insertions(+), 48 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 185f2d18bca..f976f809a44 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -170,11 +170,15 @@ class DataSet(openerpweb.Controller): return {'fields': req.session.model(model).fields_get()} @openerpweb.jsonrequest - def load(self, req, model, domain=[], fields=['id']): - m = req.session.model(model) - ids = m.search(domain) - values = m.read(ids, fields) - return {'ids': ids, 'values': values} + def find(self, request, model, fields=False, offset=0, limit=False, + domain=None, context=None, sort=None): + Model = request.session.model(model) + ids = Model.search(domain or [], offset or 0, limit or False, + sort or False, context or False) + if fields and fields == ['id']: + # shortcut read if we only want the ids + return map(lambda id: {'id': id}, ids) + return Model.read(ids, fields or False) class DataRecord(openerpweb.Controller): diff --git a/addons/base/static/openerp/base.xml b/addons/base/static/openerp/base.xml index 40edce66c3e..c416d9cf093 100644 --- a/addons/base/static/openerp/base.xml +++ b/addons/base/static/openerp/base.xml @@ -348,7 +348,6 @@ -
      diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index e24b5835d44..de42b5470bb 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -44,7 +44,7 @@ openerp.base.Action = openerp.base.Controller.extend({ }, do_action_window: function(action) { this.formview_id = false; - this.dataset = new openerp.base.DataSet(this.session, "oe_action_dataset", action.res_model); + this.dataset = new openerp.base.DataSet(this.session, action.res_model); this.dataset.start(); // Locate first tree view @@ -101,7 +101,7 @@ openerp.base.EmbbededView = openerp.base.Controller.extend({ openerp.base.DataSet = openerp.base.Controller.extend({ init: function(session, model) { this._super(session); - this._model = model; + this.model = model; this._fields = null; @@ -115,7 +115,7 @@ openerp.base.DataSet = openerp.base.Controller.extend({ }, start: function() { // TODO: fields_view_get fields selection? - this.rpc("/base/dataset/fields", {"model":this._model}, this.on_fields); + this.rpc("/base/dataset/fields", {"model":this.model}, this.on_fields); }, on_fields: function(result) { this._fields = result._fields; @@ -132,11 +132,11 @@ openerp.base.DataSet = openerp.base.Controller.extend({ * @param {Number} [limit=null] The maximum number of records to return * @returns itself */ - ids: function (offset, limit) { + fetch: function (offset, limit) { offset = offset || 0; limit = limit || null; this.rpc('/base/dataset/find', { - model: this._model, + model: this.model, fields: this._fields, domain: this._domain, context: this._context, @@ -147,11 +147,11 @@ openerp.base.DataSet = openerp.base.Controller.extend({ var data_records = _.map( records, function (record) { return new openerp.base.DataRecord( - this.session, this._model, + this.session, this.model, this._fields, record); }, this); - this.on_ids(data_records, { + this.on_fetch(data_records, { offset: offset, limit: limit, domain: this._domain, @@ -174,7 +174,7 @@ openerp.base.DataSet = openerp.base.Controller.extend({ * @param {Object} event.context the context set on the DataSet before DataSet#ids was called * @param {Array} event.sort the sorting criteria used to get the ids */ - on_ids: function (records, event) { }, + on_fetch: function (records, event) { }, /** * Fetch all the currently active records for this DataSet (records selected via DataSet#select) @@ -188,7 +188,7 @@ openerp.base.DataSet = openerp.base.Controller.extend({ this.on_active_ids(_.map( records, function (record) { return new openerp.base.DataRecord( - this.session, this._model, + this.session, this.model, this._fields, record); }, this)); }, this)); @@ -215,7 +215,7 @@ openerp.base.DataSet = openerp.base.Controller.extend({ var record = records[0]; this.on_active_id( record && new openerp.base.DataRecord( - this.session, this._model, + this.session, this.model, this._fields, record)); }, this)); return this; @@ -398,7 +398,7 @@ openerp.base.SearchView = openerp.base.Controller.extend({ // collect all non disabled domains definitions, AND them // evaluate as python expression // save the result in this.domain - this.dataset.do_load(); + this.dataset.fetch(); }, on_clear: function() { } @@ -422,7 +422,6 @@ openerp.base.FormView = openerp.base.Controller.extend({ init: function(session, element_id, dataset, view_id) { this._super(session, element_id); this.dataset = dataset; - this.dataset_index = 0; this.model = dataset.model; this.view_id = view_id; this.fields_views = {}; @@ -447,22 +446,11 @@ openerp.base.FormView = openerp.base.Controller.extend({ } // bind to all wdigets that have onchange ?? - // When the dataset is loaded load the first record (like gtk) - this.dataset.on_loaded.add_last(this.do_load_record); - - // When a datarecord is loaded display the values in the inputs - this.datarecord = new openerp.base.DataRecord(this.session, this.model,{}); - this.datarecord.on_loaded.add_last(this.on_record_loaded); - + this.dataset.on_fetch.add(this.on_record_loaded); }, - do_load_record: function() { - // if dataset is empty display the empty datarecord - if(this.dataset.ids.length == 0) { - this.on_record_loaded(); - } - this.datarecord.load(this.dataset.ids[this.dataset_index]); - }, - on_record_loaded: function() { + on_record_loaded: function(records) { + this.datarecord = records[0]; + console.log('record', this.datarecord); for (var f in this.fields) { this.fields[f].set_value(this.datarecord.values[f]); } @@ -508,20 +496,18 @@ openerp.base.ListView = openerp.base.Controller.extend({ this.colmodel.push({ name: col.attrs.name, index: col.attrs.name }); } } - //this.log(this.cols); this.dataset.fields = this.cols; - this.dataset.on_loaded.add_last(this.do_fill_table); + this.dataset.on_fetch.add(this.do_fill_table); }, - do_fill_table: function() { - //this.log("do_fill_table"); + do_fill_table: function(records) { + this.log("do_fill_table"); var self = this; //this.log(this.dataset.data); var rows = []; - var ids = this.dataset.ids; - for(var i = 0; i < ids.length; i++) { + for(var i = 0; i < records.length; i++) { // TODO very strange is sometimes non existing ? even as admin ? example ir.ui.menu - var row = this.dataset.values[ids[i]]; + var row = records[i].values; if(row) rows.push(row); // else diff --git a/addons/base/static/openerp/js/tests.js b/addons/base/static/openerp/js/tests.js index 596eb134031..39c8f213fe6 100644 --- a/addons/base/static/openerp/js/tests.js +++ b/addons/base/static/openerp/js/tests.js @@ -158,7 +158,7 @@ $(document).ready(function () { asyncTest("Baseline event attributes", 6, function () { var dataset = new openerp.base.DataSet( new Session()); - dataset.on_ids.add(function (records, event) { + dataset.on_fetch.add(function (records, event) { deepEqual(records, [], 'No records returned'); equal(event.offset, 0, 'No offset set in call'); equal(event.limit, null, 'No limit set in call'); @@ -167,17 +167,17 @@ $(document).ready(function () { deepEqual(event.sort, [], 'The dataset is not sorted'); start(); }); - dataset.ids(); + dataset.fetch(); }); asyncTest("Offset and limit", 2, function () { var dataset = new openerp.base.DataSet( new Session()); - dataset.on_ids.add(function (records, event) { + dataset.on_fetch.add(function (records, event) { equal(event.offset, 20); equal(event.limit, 42); start(); }); - dataset.ids(20, 42); + dataset.fetch(20, 42); }); asyncTest("Domain and context propagation", 3, function () { var dataset = new openerp.base.DataSet( @@ -185,7 +185,7 @@ $(document).ready(function () { var domain_value = [['foo', '=', 'bar']]; var context_value= {active_id:3, active_ids:42}; var sort_value = ['foo']; - dataset.on_ids.add(function (records, event) { + dataset.on_fetch.add(function (records, event) { deepEqual(event.domain, domain_value); deepEqual(event.context, context_value); deepEqual(event.sort, sort_value); @@ -196,7 +196,7 @@ $(document).ready(function () { context: context_value, sort: sort_value }); - dataset.ids(); + dataset.fetch(); }); asyncTest("Data records", function () { var dataset = new openerp.base.DataSet({ @@ -208,7 +208,7 @@ $(document).ready(function () { ]); } }); - dataset.on_ids.add(function (records) { + dataset.on_fetch.add(function (records) { equal(records.length, 2, "I loaded two virtual records"); var d1 = records[0], d2 = records[1]; @@ -216,7 +216,7 @@ $(document).ready(function () { ok(d2 instanceof openerp.base.DataRecord); start(); }); - dataset.ids(); + dataset.fetch(); }); var dataset; From 2594a8cad652f71c62a2e5cbe260fb57f5fe1ed1 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 23 Mar 2011 10:08:01 +0100 Subject: [PATCH 656/681] [ADD] tests for DataSet.(do_)find bzr revid: xmo@openerp.com-20110323090801-vx75gc5vk0hx71og --- addons/base/controllers/main.py | 4 +++ addons/base/static/openerp/js/base_views.js | 1 - addons/base/tests/test_dataset.py | 37 +++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 addons/base/tests/test_dataset.py diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index f976f809a44..f5eda8020c5 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -172,6 +172,10 @@ class DataSet(openerpweb.Controller): @openerpweb.jsonrequest def find(self, request, model, fields=False, offset=0, limit=False, domain=None, context=None, sort=None): + return self.do_find(request, model, fields, offset, limit, + domain, context, sort) + def do_find(self, request, model, fields=False, offset=0, limit=False, + domain=None, context=None, sort=None): Model = request.session.model(model) ids = Model.search(domain or [], offset or 0, limit or False, sort or False, context or False) diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index de42b5470bb..e2876333868 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -450,7 +450,6 @@ openerp.base.FormView = openerp.base.Controller.extend({ }, on_record_loaded: function(records) { this.datarecord = records[0]; - console.log('record', this.datarecord); for (var f in this.fields) { this.fields[f].set_value(this.datarecord.values[f]); } diff --git a/addons/base/tests/test_dataset.py b/addons/base/tests/test_dataset.py new file mode 100644 index 00000000000..c0cd8d7a465 --- /dev/null +++ b/addons/base/tests/test_dataset.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +import mock +import unittest2 +import base.controllers.main + +class TestDataSetController(unittest2.TestCase): + def setUp(self): + self.dataset = base.controllers.main.DataSet() + self.request = mock.Mock() + self.read = self.request.session.model().read + self.search = self.request.session.model().search + + def test_empty_find(self): + self.search.return_value = [] + self.read.return_value = [] + + self.assertFalse(self.dataset.do_find(self.request, 'fake.model')) + self.read.assert_called_once_with([], False) + + def test_regular_find(self): + self.search.return_value = [1, 2, 3] + + self.dataset.do_find(self.request, 'fake.model') + self.read.assert_called_once_with([1, 2, 3], False) + + def test_ids_shortcut(self): + self.search.return_value = [1, 2, 3] + self.read.return_value = [ + {'id': 1, 'name': 'foo'}, + {'id': 2, 'name': 'bar'}, + {'id': 3, 'name': 'qux'} + ] + + self.assertEqual( + self.dataset.do_find(self.request, 'fake.model', ['id']), + [{'id': 1}, {'id': 2}, {'id': 3}]) + self.assertFalse(self.read.called) From 2b6d4c6c28e8a0249a99dcafa2f11d4b7ea9dae9 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Wed, 23 Mar 2011 15:17:15 +0530 Subject: [PATCH 657/681] [FIX] WIKI: Wiki Pages Application Now got warning if in Section charecter avalable- Create Index lp bug: https://launchpad.net/bugs/736102 fixed bzr revid: aag@tinyerp.co.in-20110323094715-cvsypmap2yssqf1o --- addons/wiki/wizard/wiki_make_index.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/addons/wiki/wizard/wiki_make_index.py b/addons/wiki/wizard/wiki_make_index.py index 7deb674c35c..9048e9423bb 100644 --- a/addons/wiki/wizard/wiki_make_index.py +++ b/addons/wiki/wizard/wiki_make_index.py @@ -21,6 +21,7 @@ from osv import fields, osv from tools.translate import _ +import re class wiki_make_index(osv.osv_memory): """ Create Index For Selected Page """ @@ -50,6 +51,14 @@ class wiki_make_index(osv.osv_memory): lst0 = cr.fetchall() if not lst0[0][1]: raise osv.except_osv(_('Warning !'), _('There is no section in this Page')) + + check = map(lambda x: x.split('.'), lst0[0][1]) + + if check: + for i in check: + match = re.match('[a-zA-Z]', i[0]) + if match: + raise osv.except_osv(_('Warning !'), _('The section values must be like 1/1.1/1.3.4')) lst = [] s_ids = {} @@ -81,7 +90,6 @@ class wiki_make_index(osv.osv_memory): current = current[:pos + 1] if pos == len(l) - 1: break - key = ('.'.join([str(x) for x in l])) id = s_ids[key] val = ('.'.join([str(x) for x in current[:]]), id) From 4f4bf7d34fe5c689c175993bbebc71b2bd038160 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Wed, 23 Mar 2011 15:24:56 +0530 Subject: [PATCH 658/681] [FIX] WIKI: Wiki Pages Application Now got warning if in Section charecter avalable22- Create Index lp bug: https://launchpad.net/bugs/736102 fixed bzr revid: aag@tinyerp.co.in-20110323095456-ciclodma2ws7pdr6 --- addons/wiki/wizard/wiki_make_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/wiki/wizard/wiki_make_index.py b/addons/wiki/wizard/wiki_make_index.py index 9048e9423bb..90528652587 100644 --- a/addons/wiki/wizard/wiki_make_index.py +++ b/addons/wiki/wizard/wiki_make_index.py @@ -56,7 +56,7 @@ class wiki_make_index(osv.osv_memory): if check: for i in check: - match = re.match('[a-zA-Z]', i[0]) + match = re.match('[a-zA-Z_%-+$*&^#@!]', i[0]) if match: raise osv.except_osv(_('Warning !'), _('The section values must be like 1/1.1/1.3.4')) lst = [] From 65c8aaf78b7e4cabbd3c2888c9e09e30297c748d Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 23 Mar 2011 11:50:31 +0100 Subject: [PATCH 659/681] [ADD] some doc for the dataset bzr revid: xmo@openerp.com-20110323105031-9j2s5d2g8kxwf9wu --- addons/base/static/openerp/js/base_views.js | 10 +- doc/source/addons.rst | 178 +++++++++++++++++++- 2 files changed, 181 insertions(+), 7 deletions(-) diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index e2876333868..f86be31c89a 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -167,11 +167,11 @@ openerp.base.DataSet = openerp.base.Controller.extend({ * Fires after the DataSet fetched the records matching its internal ids selection * * @param {Array} records An array of the DataRecord fetched - * @param event The on_ids event object - * @param {Number} event.offset the offset with which the original DataSet#ids call was performed - * @param {Number} event.limit the limit set on the original DataSet#ids call - * @param {Array} event.domain the domain set on the DataSet before DataSet#ids was called - * @param {Object} event.context the context set on the DataSet before DataSet#ids was called + * @param event The on_fetch event object + * @param {Number} event.offset the offset with which the original DataSet#fetch call was performed + * @param {Number} event.limit the limit set on the original DataSet#fetch call + * @param {Array} event.domain the domain set on the DataSet before DataSet#fetch was called + * @param {Object} event.context the context set on the DataSet before DataSet#fetch was called * @param {Array} event.sort the sorting criteria used to get the ids */ on_fetch: function (records, event) { }, diff --git a/doc/source/addons.rst b/doc/source/addons.rst index cb9864b28d2..71bfe9ceb37 100644 --- a/doc/source/addons.rst +++ b/doc/source/addons.rst @@ -97,9 +97,183 @@ Javascript :param openerp.base.Controller view: The view to which the widget belongs :param Object node: the ``fields_view_get`` descriptor for the widget -.. js:attribute:: openerp.base.Widget.$element + .. js:attribute:: $element - The widget's root element as jQuery object + The widget's root element as jQuery object + +.. js:class:: openerp.base.DataSet(session, model) + + :param openerp.base.Session session: the RPC session object + :param String model: the model managed by this dataset + + The DataSet is the abstraction for a sequence of records stored in + database. + + It provides interfaces for reading records based on search + criteria, and for selecting and fetching records based on + activated ids. + + .. js:function:: fetch([offset][, limit]) + + :param Number offset: the index from which records should start + being returned (section) + :param Number limit: the maximum number of records to return + :returns: the dataset instance it was called on + + Asynchronously fetches the records selected by the DataSet's + domain and context, in the provided sort order if any. + + Only fetches the fields selected by the DataSet. + + On success, triggers :js:func:`on_fetch` + + .. js:function:: on_fetch(records, event) + + :param Array records: an array of + :js:class:`openerp.base.DataRecord` + matching the DataSet's selection + :param event: a data holder letting the event handler fetch + meta-informations about the event. + :type event: OnFetchEvent + + Fired after :js:func:`fetch` is done fetching the records + selected by the DataSet. + + .. js:function:: active_ids + + :returns: the dataset instance it was called on + + Asynchronously fetches the active records for this DataSet. + + On success, triggers :js:func:`on_active_ids` + + .. js:function:: on_active_ids(records) + + :param Array records: an array of + :js:class:`openerp.base.DataRecord` + matching the currently active ids + + Fired after :js:func:`active_ids` fetched the records matching + the DataSet's active ids. + + .. js:function:: active_id + + :returns: the dataset instance in was called on + + Asynchronously fetches the current active record. + + On success, triggers :js:func:`on_active_id` + + .. js:function:: on_active_id(record) + + :param Object record: the record fetched by + :js:func:`active_id`, or ``null`` + :type record: openerp.base.DataRecord + + Fired after :js:func:`active_id` fetched the record matching + the dataset's active id + + .. js:function:: set(options) + + :param Object options: the options to set on the dataset + :type options: DataSetOptions + :returns: the dataset instance it was called on + + Configures the data set by setting various properties on it + + .. js:function:: prev + + :returns: the dataset instance it was called on + + Activates the id preceding the current one in the active ids + sequence of the dataset. + + If the current active id is at the start of the sequence, + wraps back to the last id of the sequence. + + .. js:function:: next + + :returns: the dataset instance it was called on + + Activates the id following the current one in the active ids + sequence. + + If the current active id is the last of the sequence, wraps + back to the beginning of the active ids sequence. + + .. js:function:: select(ids) + + :param Array ids: the identifiers to activate on the dataset + :returns: the dataset instance it was called on + + Activates all the ids specified in the dataset, resets the + current active id to be the first id of the new sequence. + + The internal order will be the same as the ids list provided. + + .. js:function:: get_active_ids + + :returns: the list of current active ids for the dataset + + .. js:function:: activate(id) + + :param Number id: the id to activate + :returns: the dataset instance it was called on + + Activates the id provided in the dataset. If no ids are + selected, selects the id in the dataset. + + If ids are already selected and the provided id is not in that + selection, raises an error. + + .. js:function:: get_active_id + + :returns: the dataset's current active id + +.. js:class:: openerp.base.DataRecord(session, model, fields, values) + +Ad-hoc objects and structural types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +These objects are not associated with any specific class, they're +generally literal objects created on the spot. Names are merely +convenient ways to refer to them and their properties. + +.. js:class:: OnFetchEvent + + .. js:attribute:: context + + The context used for the :js:func:`fetch` call (domain set on + the :js:class:`openerp.base.DataSet` when ``fetch`` was + called) + + .. js:attribute:: domain + + The domain used for the :js:func:`fetch` call + + .. js:attribute:: limit + + The limit with which the original :js:func:`fetch` call was + performed + + .. js:attribute:: offset + + The offset with which the original :js:func:`fetch` call was + performed + + .. js:attribute:: sort + + The sorting criteria active on the + :js:class:`openerp.base.DataSet` when :js:func:`fetch` was + called + +.. js:class:: DataSetOptions + + .. js:attribute:: context + + .. js:attribute:: domain + + .. js:attribute:: sort * Addons lifecycle (loading, execution, events, ...) From 68748879d13fe4b9ea0838934bf40112068ab9e7 Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Wed, 23 Mar 2011 17:25:17 +0530 Subject: [PATCH 660/681] [FIX]:stock_move done date not recorded lp bug: https://launchpad.net/bugs/740762 fixed bzr revid: ksa@tinyerp.co.in-20110323115517-vqrzwbqaca1gk4ck --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index db5b3f677d3..0a8f66fc77d 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2145,7 +2145,7 @@ class stock_move(osv.osv): if todo: self.action_confirm(cr, uid, todo, context=context) - self.write(cr, uid, move_ids, {'state': 'done', 'date_planned': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context) + self.write(cr, uid, move_ids, {'state': 'done', 'date': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context) for id in move_ids: wf_service.trg_trigger(uid, 'stock.move', id, cr) From 801fae18ca92eecd9f6febcc15ec4f3ee0887cc4 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 23 Mar 2011 13:08:06 +0100 Subject: [PATCH 661/681] [ADD] implement forgotten DataSet.get RPC method, test it a bit bzr revid: xmo@openerp.com-20110323120806-uhas8xvxnpsa1dm2 --- addons/base/controllers/main.py | 27 ++++++++++++++ addons/base/static/openerp/js/base_views.js | 6 ++-- addons/base/tests/test_dataset.py | 39 +++++++++++++++++++++ 3 files changed, 70 insertions(+), 2 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index f5eda8020c5..723b0ae39dc 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -176,6 +176,9 @@ class DataSet(openerpweb.Controller): domain, context, sort) def do_find(self, request, model, fields=False, offset=0, limit=False, domain=None, context=None, sort=None): + """ Performs a search() followed by a read() (if needed) using the + provided search criteria, only + """ Model = request.session.model(model) ids = Model.search(domain or [], offset or 0, limit or False, sort or False, context or False) @@ -184,6 +187,30 @@ class DataSet(openerpweb.Controller): return map(lambda id: {'id': id}, ids) return Model.read(ids, fields or False) + @openerpweb.jsonrequest + def get(self, request, model, ids): + self.do_get(request, model, ids) + + def do_get(self, request, model, ids): + """ Fetches and returns the records of the model ``model`` whose ids + are in ``ids``. + + The results are in the same order as the inputs, but elements may be + missing (if there is no record left for the id) + + :param request: the JSON-RPC2 request object + :type request: openerpweb.JsonRequest + :param model: the model to read from + :type model: str + :param ids: a list of identifiers + :type ids: list + """ + Model = request.session.model(model) + records = Model.read(ids) + + record_map = dict((record['id'], record) for record in records) + + return [record_map[id] for id in ids if record_map.get(id)] class DataRecord(openerpweb.Controller): _cp_path = "/base/datarecord" diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index f86be31c89a..004d57fd13b 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -183,7 +183,8 @@ openerp.base.DataSet = openerp.base.Controller.extend({ */ active_ids: function () { this.rpc('/base/dataset/get', { - ids: this.get_active_ids() + ids: this.get_active_ids(), + model: this.model }, _.bind(function (records) { this.on_active_ids(_.map( records, function (record) { @@ -210,7 +211,8 @@ openerp.base.DataSet = openerp.base.Controller.extend({ */ active_id: function () { this.rpc('/base/dataset/get', { - ids: [this.get_active_id()] + ids: [this.get_active_id()], + model: this.model }, _.bind(function (records) { var record = records[0]; this.on_active_id( diff --git a/addons/base/tests/test_dataset.py b/addons/base/tests/test_dataset.py index c0cd8d7a465..80d1e52561b 100644 --- a/addons/base/tests/test_dataset.py +++ b/addons/base/tests/test_dataset.py @@ -35,3 +35,42 @@ class TestDataSetController(unittest2.TestCase): self.dataset.do_find(self.request, 'fake.model', ['id']), [{'id': 1}, {'id': 2}, {'id': 3}]) self.assertFalse(self.read.called) + + def test_get(self): + self.read.return_value = [ + {'id': 1, 'name': 'baz'}, + {'id': 3, 'name': 'foo'}, + {'id': 2, 'name': 'bar'} + ] + + result = self.dataset.do_get( + self.request, 'fake.model', [3, 2, 1]) + self.read.assert_called_once_with( + [3, 2, 1]) + self.assertFalse(self.search.called) + + self.assertEqual( + result, + [ + {'id': 3, 'name': 'foo'}, + {'id': 2, 'name': 'bar'}, + {'id': 1, 'name': 'baz'} + ] + ) + + def test_get_missing_result(self): + self.read.return_value = [ + {'id': 1, 'name': 'baz'}, + {'id': 2, 'name': 'bar'} + ] + + result = self.dataset.do_get( + self.request, 'fake.model', [3, 2, 1]) + + self.assertEqual( + result, + [ + {'id': 2, 'name': 'bar'}, + {'id': 1, 'name': 'baz'} + ] + ) From 1d587145de0bfad76db50b5e2a96a659ad42e032 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 23 Mar 2011 13:21:26 +0100 Subject: [PATCH 662/681] [IMP] fix docstrings on DataSet, insert into internal APIdoc (and fix documentation PYTHONPATH to generate this correctly) bzr revid: xmo@openerp.com-20110323122126-3qj7vkhjsc6l0x5x --- addons/base/controllers/main.py | 23 ++++++++++++++++++++++- doc/source/conf.py | 3 ++- doc/source/development.rst | 9 +++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 723b0ae39dc..58dc837379e 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -177,7 +177,26 @@ class DataSet(openerpweb.Controller): def do_find(self, request, model, fields=False, offset=0, limit=False, domain=None, context=None, sort=None): """ Performs a search() followed by a read() (if needed) using the - provided search criteria, only + provided search criteria + + :param request: a JSON-RPC request object + :type request: openerpweb.JsonRequest + :param model: the name of the model to search on + :type model: str + :param fields: a list of the fields to return in the result records + :type fields: [str] + :param offset: from which index should the results start being returned + :type offset: int + :param limit: the maximum number of records to return + :type limit: int + :param domain: the search domain for the query + :type domain: list + :param context: the context in which the search should be executed + :type context: dict + :param sort: sorting directives + :type sort: list + :returns: a list of result records + :rtype: [] """ Model = request.session.model(model) ids = Model.search(domain or [], offset or 0, limit or False, @@ -204,6 +223,8 @@ class DataSet(openerpweb.Controller): :type model: str :param ids: a list of identifiers :type ids: list + :returns: a list of records, in the same order as the list of ids + :rtype: list """ Model = request.session.model(model) records = Model.read(ids) diff --git a/doc/source/conf.py b/doc/source/conf.py index d3f486f19c5..13a490c5072 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -16,7 +16,8 @@ import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('../../addons')) +sys.path.insert(0, os.path.abspath('../..')) # -- General configuration ----------------------------------------------------- diff --git a/doc/source/development.rst b/doc/source/development.rst index a2be0ec2eef..afc6040227d 100644 --- a/doc/source/development.rst +++ b/doc/source/development.rst @@ -8,6 +8,15 @@ Contributing to OpenERP Web * Style guide and coding conventions (PEP8? More) * Test frameworks in JS? +Internal API Doc +---------------- + +Python +++++++ + +.. autoclass:: base.controllers.main.DataSet + :members: + Testing ------- From c6aab663bc60d73fdb265b41370f84cf89e68f86 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 23 Mar 2011 13:22:17 +0100 Subject: [PATCH 663/681] [FIX] rst rtype specification for a bare list is the constructor name bzr revid: xmo@openerp.com-20110323122217-ehqru2nu2iq2jhvj --- addons/base/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 58dc837379e..11db3d3a5c2 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -196,7 +196,7 @@ class DataSet(openerpweb.Controller): :param sort: sorting directives :type sort: list :returns: a list of result records - :rtype: [] + :rtype: list """ Model = request.session.model(model) ids = Model.search(domain or [], offset or 0, limit or False, From 1b466d4a9de28eb81ede0c28b526266ab1eb53ea Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Wed, 23 Mar 2011 18:18:33 +0530 Subject: [PATCH 664/681] [FIX] WIKI: Wiki Pages Application Now got warning if in Section charecter avalable33- Create Index lp bug: https://launchpad.net/bugs/736102 fixed bzr revid: aag@tinyerp.co.in-20110323124833-bo7gurieys58jzmk --- addons/wiki/wizard/wiki_make_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/wiki/wizard/wiki_make_index.py b/addons/wiki/wizard/wiki_make_index.py index 90528652587..effb9023b4a 100644 --- a/addons/wiki/wizard/wiki_make_index.py +++ b/addons/wiki/wizard/wiki_make_index.py @@ -56,8 +56,8 @@ class wiki_make_index(osv.osv_memory): if check: for i in check: - match = re.match('[a-zA-Z_%-+$*&^#@!]', i[0]) - if match: + match = re.match('[0-9]', i[0]) + if not match: raise osv.except_osv(_('Warning !'), _('The section values must be like 1/1.1/1.3.4')) lst = [] s_ids = {} From 9e6718db9eb09db6d21e3db985dcc6c7a612e8b0 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Wed, 23 Mar 2011 18:43:52 +0530 Subject: [PATCH 665/681] [FIX] WIKI: Wiki Pages Application Now get warning id not proper formate lp bug: https://launchpad.net/bugs/736102 fixed bzr revid: aag@tinyerp.co.in-20110323131352-wv3chvlt0w7aquj8 --- addons/wiki/wizard/wiki_make_index.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/addons/wiki/wizard/wiki_make_index.py b/addons/wiki/wizard/wiki_make_index.py index effb9023b4a..95dc2a7e9cd 100644 --- a/addons/wiki/wizard/wiki_make_index.py +++ b/addons/wiki/wizard/wiki_make_index.py @@ -52,13 +52,10 @@ class wiki_make_index(osv.osv_memory): if not lst0[0][1]: raise osv.except_osv(_('Warning !'), _('There is no section in this Page')) - check = map(lambda x: x.split('.'), lst0[0][1]) - - if check: - for i in check: - match = re.match('[0-9]', i[0]) - if not match: - raise osv.except_osv(_('Warning !'), _('The section values must be like 1/1.1/1.3.4')) + for i in lst0[0][1]: + match = re.match('[0-9\.]', i) + if not match: + raise osv.except_osv(_('Warning !'), _('The section values must be like 1/1.1/1.3.4')) lst = [] s_ids = {} From b507d2231faa93d18b30cd95e806b394c37fbb8f Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 24 Mar 2011 02:08:14 +0100 Subject: [PATCH 666/681] loud thinking about viewmanager bzr revid: al@openerp.com-20110324010814-n8hk09002jfq65eg --- addons/base/static/openerp/js/base_views.js | 58 +++++++++++++-------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index 004d57fd13b..b9ee746f081 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -4,6 +4,13 @@ openerp.base$views = function(openerp) { +// process all kind of actions +openerp.base.ActionManager = openerp.base.Controller.extend({ +// This controller should be used for one2many also or not ? +// to replace Action +}); + +// This will be ViewManager Abstract/Common openerp.base.Action = openerp.base.Controller.extend({ init: function(session, element_id) { this._super(session, element_id); @@ -11,6 +18,10 @@ openerp.base.Action = openerp.base.Controller.extend({ this.dataset = null; this.searchview_id = false; this.searchview = null; + this.search_visible = true; + + // this will be changed into + // this.views = { "list": { "view_id":1234, "controller": instance} } this.listview_id = false; this.listview = null; this.formview_id = false; @@ -22,6 +33,7 @@ openerp.base.Action = openerp.base.Controller.extend({ this.$element.find("#mode_form").bind('click',this.on_mode_form); this.on_mode_list(); }, + // this will be changed into on_view_switch(kind_of_view) on_mode_list: function() { $("#oe_action_form").hide(); $("#oe_action_search").show(); @@ -32,6 +44,7 @@ openerp.base.Action = openerp.base.Controller.extend({ $("#oe_action_search").hide(); $("#oe_action_list").hide(); }, + // This will move to actionmanager do_action: function(action) { // instantiate the right controllers by understanding the action this.action = action; @@ -42,11 +55,21 @@ openerp.base.Action = openerp.base.Controller.extend({ this.do_action_window(action); } }, + // this will be renamed setup_view_manager_from_an_actwindow and will setup this.views do_action_window: function(action) { - this.formview_id = false; + // this will move into set_dataset() this.dataset = new openerp.base.DataSet(this.session, action.res_model); this.dataset.start(); + this.searchview_id = false; + if(this.listview && action.search_view_id) { + this.searchview_id = action.search_view_id[0]; + } + this.searchview = new openerp.base.SearchView(this.session, "oe_action_search", this.dataset, this.searchview_id); + this.searchview.start(); + + // Those two will be a foreach kind of view + // Locate first tree view this.listview_id = false; for(var i = 0; i < action.views.length; i++) { @@ -59,7 +82,7 @@ openerp.base.Action = openerp.base.Controller.extend({ this.listview.start(); // Locate first form view - this.listview_id = false; + this.formview_id = false; for(var j = 0; j < action.views.length; j++) { if(action.views[j][1] == "form") { this.formview_id = action.views[j][0]; @@ -69,29 +92,22 @@ openerp.base.Action = openerp.base.Controller.extend({ this.formview = new openerp.base.FormView(this.session, "oe_action_form", this.dataset, this.formview_id); this.formview.start(); - // Take the only possible search view. Is that consistent ? - this.searchview_id = false; - if(this.listview && action.search_view_id) { - this.searchview_id = action.search_view_id[0]; - } - this.searchview = new openerp.base.SearchView(this.session, "oe_action_search", this.dataset, this.searchview_id); - this.searchview.start(); - } + }, + // create when root, also add to parent when o2m + on_create: function() { + }, + on_remove: function() { + }, + on_edit: function() { + }, }); -openerp.base.View = openerp.base.Controller.extend({ -// This controller should be used for one2many also or not ? -// to replace Action +// Extends view manager +openerp.base.ViewManagerRoot = openerp.base.Controller.extend({ }); -openerp.base.ActionView = openerp.base.Controller.extend({ -// This controller should be used for one2many also or not ? -// to replace Action -}); - -openerp.base.EmbbededView = openerp.base.Controller.extend({ -// This controller should be used for one2many also or not ? -// to replace Action +// Extends view manager +openerp.base.ViewManagerUsedAsAMany2One = openerp.base.Controller.extend({ }); /** From b5d02ab327b7ed3dc88ccd75be88587556c820b0 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Thu, 24 Mar 2011 04:49:23 +0000 Subject: [PATCH 667/681] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20110324044923-41vu5q9ctj3nry8j --- bin/addons/base/i18n/ro.po | 39 +++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/bin/addons/base/i18n/ro.po b/bin/addons/base/i18n/ro.po index 2254ebce308..467f8fe56fd 100644 --- a/bin/addons/base/i18n/ro.po +++ b/bin/addons/base/i18n/ro.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2011-03-17 12:20+0000\n" +"PO-Revision-Date: 2011-03-23 16:38+0000\n" "Last-Translator: Dorin \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-18 04:36+0000\n" +"X-Launchpad-Export-Date: 2011-03-24 04:49+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: base @@ -58,7 +58,7 @@ msgstr "Metadate" #: field:ir.ui.view,arch:0 #: field:ir.ui.view.custom,arch:0 msgid "View Architecture" -msgstr "Alcatuirea afisarii" +msgstr "Alcatuirea afișării" #. module: base #: field:base.language.import,code:0 @@ -1408,7 +1408,7 @@ msgstr "Calea completă" #. module: base #: view:res.request:0 msgid "References" -msgstr "Referinta" +msgstr "Referințe" #. module: base #: view:res.lang:0 @@ -2311,7 +2311,7 @@ msgstr "" #. module: base #: field:ir.default,ref_id:0 msgid "ID Ref." -msgstr "Referinta ID" +msgstr "Referința ID" #. module: base #: model:ir.actions.server,name:base.action_start_configurator @@ -2776,7 +2776,7 @@ msgid "" "If the selected language is loaded in the system, all documents related to " "this partner will be printed in this language. If not, it will be english." msgstr "" -"Dacă limba selectata este încărcată în sistem, toate documentele legate de " +"Dacă limba selectată este încărcată în sistem, toate documentele legate de " "acest partener vor fi tipărite în această limbă. Dacă nu, limba folosita va " "fi engleză." @@ -3295,7 +3295,7 @@ msgstr "Ucraineană / українська" #: model:ir.actions.act_window,name:base.action_translation #: model:ir.ui.menu,name:base.menu_action_translation msgid "Translation Terms" -msgstr "" +msgstr "Traducere termeni" #. module: base #: model:res.country,name:base.sn @@ -3599,7 +3599,7 @@ msgstr "" #: field:workflow,name:0 #: field:workflow.activity,name:0 msgid "Name" -msgstr "Nume raport-XML" +msgstr "Nume" #. module: base #: help:ir.actions.act_window,multi:0 @@ -4377,6 +4377,7 @@ msgstr "Contract de mentenanţă" #: help:ir.actions.server,trigger_obj_id:0 msgid "Select the object from the model on which the workflow will executed." msgstr "" +"Selectați din cadrul modelului obiectul pentru care procesul va fi executat." #. module: base #: field:res.partner,employee:0 @@ -4386,7 +4387,7 @@ msgstr "Angajat" #. module: base #: field:ir.model.access,perm_create:0 msgid "Create Access" -msgstr "" +msgstr "Acces creare" #. module: base #: field:res.partner.address,state_id:0 @@ -4675,7 +4676,7 @@ msgstr "Spaniolă (MX) / Español (MX)" #. module: base #: view:res.log:0 msgid "My Logs" -msgstr "" +msgstr "Logul meu" #. module: base #: model:res.country,name:base.bt @@ -5770,7 +5771,7 @@ msgstr "Nucleul OpenERP , necesar pentru toate instalarile." #: view:publisher_warranty.contract.wizard:0 #: view:res.widget.wizard:0 msgid "Cancel" -msgstr "Anulare" +msgstr "Renunță" #. module: base #: selection:base.language.export,format:0 @@ -6629,6 +6630,8 @@ msgid "" "Please be patient, this operation may take a few minutes (depending on the " "number of modules currently installed)..." msgstr "" +"Vă rugăm să aveți răbdare, această operație poate dura câteva minute " +"(depinzând de numărul de module instalate)..." #. module: base #: field:ir.ui.menu,child_id:0 @@ -7457,7 +7460,7 @@ msgstr "Insulele Heard şi McDonald" #. module: base #: field:ir.actions.act_window,view_id:0 msgid "View Ref." -msgstr "Referinta view" +msgstr "Referință view" #. module: base #: selection:ir.translation,type:0 @@ -7715,6 +7718,8 @@ msgid "" "Important when you deal with multiple actions, the execution order will be " "decided based on this, low number is higher priority." msgstr "" +"Important când lucrați cu acțiuni multiple: ordinea de execuție este decisă " +"de regula număr mic prioritate mare." #. module: base #: field:ir.actions.report.xml,header:0 @@ -7739,7 +7744,7 @@ msgstr "Croată / hrvatski jezik" #. module: base #: field:base.language.install,overwrite:0 msgid "Overwrite Existing Terms" -msgstr "" +msgstr "Suprascrie termenii existenți" #. module: base #: help:ir.actions.server,code:0 @@ -8289,7 +8294,7 @@ msgstr "Acțiuni" #. module: base #: selection:res.request,priority:0 msgid "High" -msgstr "" +msgstr "Ridicat" #. module: base #: field:ir.exports.line,export_id:0 @@ -8532,9 +8537,9 @@ msgid "" "Check this box if the partner is a supplier. If it's not checked, purchase " "people will not see it when encoding a purchase order." msgstr "" -"Bifați aceasta căsuță dacă partenerul este un furnizor. dacă nu este bifata, " -"personalul care se ocupa de aprovizionare nu îl vor vedea atunci când " -"întocmesc un ordin de cumpărare." +"Bifați această căsuță dacă partenerul este un furnizor. Dacă nu bifați, " +"utilizatorul care se ocupa de aprovizionare nu îl va vedea atunci când " +"întocmește o comandă de aprovizionare." #. module: base #: field:ir.model.fields,relation_field:0 From ff20865adf0a7c0fe105d1fed037dd10c3ae6d7c Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Thu, 24 Mar 2011 04:50:30 +0000 Subject: [PATCH 668/681] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20110324045030-dnid31oi7qb2oql6 --- addons/account_sequence/i18n/de.po | 236 +++++++++++++++++++++++++++ addons/anonymization/i18n/de.po | 230 ++++++++++++++++++++++++++ addons/crm/i18n/ru.po | 145 ++++++++-------- addons/crm_partner_assign/i18n/ru.po | 16 +- addons/mrp/i18n/ro.po | 12 +- addons/sale/i18n/ru.po | 12 +- addons/sale_crm/i18n/ru.po | 16 +- addons/sale_order_dates/i18n/ru.po | 8 +- 8 files changed, 579 insertions(+), 96 deletions(-) create mode 100644 addons/account_sequence/i18n/de.po create mode 100644 addons/anonymization/i18n/de.po diff --git a/addons/account_sequence/i18n/de.po b/addons/account_sequence/i18n/de.po new file mode 100644 index 00000000000..44799f6bce9 --- /dev/null +++ b/addons/account_sequence/i18n/de.po @@ -0,0 +1,236 @@ +# German translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-03-23 12:34+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-24 04:50+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: account_sequence +#: view:account.sequence.installer:0 +#: model:ir.actions.act_window,name:account_sequence.action_account_seq_installer +msgid "Account Sequence Application Configuration" +msgstr "Konfiguration Konto Sequenz Anwendung" + +#. module: account_sequence +#: constraint:account.move:0 +msgid "" +"You cannot create entries on different periods/journals in the same move" +msgstr "" +"Sie können keine Buchung in verschiedenen Perioden/Journalen durch einen " +"Buchungssatz erstellen" + +#. module: account_sequence +#: help:account.move,internal_sequence_number:0 +#: help:account.move.line,internal_sequence_number:0 +msgid "Internal Sequence Number" +msgstr "Interne Sequenznummer" + +#. module: account_sequence +#: help:account.sequence.installer,number_next:0 +msgid "Next number of this sequence" +msgstr "Nächste Nummer dieser Sequenz" + +#. module: account_sequence +#: field:account.sequence.installer,number_next:0 +msgid "Next Number" +msgstr "Nächste Nummer zuweisen" + +#. module: account_sequence +#: field:account.sequence.installer,number_increment:0 +msgid "Increment Number" +msgstr "Schrittweise Erhöhung" + +#. module: account_sequence +#: model:ir.module.module,description:account_sequence.module_meta_information +msgid "" +"\n" +" This module maintains internal sequence number for accounting entries.\n" +" " +msgstr "" +"\n" +" Dieses Modul verwaltet interne Sequenznummern für Buchungszeilen.\n" +" " + +#. module: account_sequence +#: model:ir.module.module,shortdesc:account_sequence.module_meta_information +msgid "Entries Sequence Numbering" +msgstr "Buchungszeilen Sequenznummern" + +#. module: account_sequence +#: help:account.sequence.installer,number_increment:0 +msgid "The next number of the sequence will be incremented by this number" +msgstr "Die nächste Nummer dieser Sequenz wir um diese Zahl erhöht." + +#. module: account_sequence +#: view:account.sequence.installer:0 +msgid "Configure Your Account Sequence Application" +msgstr "Konfiguration der Sequenzen für Buchungungszeilen" + +#. module: account_sequence +#: field:account.sequence.installer,progress:0 +msgid "Configuration Progress" +msgstr "Konfigurationsprozeß" + +#. module: account_sequence +#: help:account.sequence.installer,suffix:0 +msgid "Suffix value of the record for the sequence" +msgstr "Endung (Suffix) einer Sequenz" + +#. module: account_sequence +#: field:account.sequence.installer,company_id:0 +msgid "Company" +msgstr "Unternehmen" + +#. module: account_sequence +#: help:account.journal,internal_sequence_id:0 +msgid "" +"This sequence will be used to maintain the internal number for the journal " +"entries related to this journal." +msgstr "" +"Diese Sequenz wird für die Numerierung der Buchungszeilen dieses Journals " +"verwendet" + +#. module: account_sequence +#: field:account.sequence.installer,padding:0 +msgid "Number padding" +msgstr "Vorlaufende Stellen" + +#. module: account_sequence +#: model:ir.model,name:account_sequence.model_account_move_line +msgid "Journal Items" +msgstr "Journaleinträge" + +#. module: account_sequence +#: field:account.move,internal_sequence_number:0 +#: field:account.move.line,internal_sequence_number:0 +msgid "Internal Number" +msgstr "Interne Nummer" + +#. module: account_sequence +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "Die Firma muss für zugehörige Konten und Perioden identisch sein." + +#. module: account_sequence +#: help:account.sequence.installer,padding:0 +msgid "" +"OpenERP will automatically adds some '0' on the left of the 'Next Number' to " +"get the required padding size." +msgstr "" +"OpenERP wird automatisch '0' vor die \"Nächste Nummer\" stellen um die " +"gewünschte Länge zu erzeugen" + +#. module: account_sequence +#: field:account.sequence.installer,name:0 +msgid "Name" +msgstr "Bezeichnung" + +#. module: account_sequence +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "Sie können keine Buchung auf einem geschlossenen Konto erzeugen." + +#. module: account_sequence +#: constraint:account.move:0 +msgid "" +"You cannot create more than one move per period on centralized journal" +msgstr "" +"Sie können nicht mehr als eine Buchung pro Periode und Konto bei Anwendung " +"eines zentralen Gegenkontos erstellen." + +#. module: account_sequence +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "Falscher Debit oder Kreditwert im Buchungseintrag!" + +#. module: account_sequence +#: field:account.journal,internal_sequence_id:0 +msgid "Internal Sequence" +msgstr "Interne Sequenz" + +#. module: account_sequence +#: model:ir.model,name:account_sequence.model_account_sequence_installer +msgid "account.sequence.installer" +msgstr "account.sequence.installer" + +#. module: account_sequence +#: view:account.sequence.installer:0 +msgid "Configure" +msgstr "Konfigurieren" + +#. module: account_sequence +#: help:account.sequence.installer,prefix:0 +msgid "Prefix value of the record for the sequence" +msgstr "Vorlauf (Prefix) einer Sequenz" + +#. module: account_sequence +#: model:ir.model,name:account_sequence.model_account_move +msgid "Account Entry" +msgstr "Buchungssatz" + +#. module: account_sequence +#: field:account.sequence.installer,suffix:0 +msgid "Suffix" +msgstr "Endung" + +#. module: account_sequence +#: field:account.sequence.installer,config_logo:0 +msgid "Image" +msgstr "Bild" + +#. module: account_sequence +#: view:account.sequence.installer:0 +msgid "title" +msgstr "Titel" + +#. module: account_sequence +#: sql_constraint:account.journal:0 +msgid "The name of the journal must be unique per company !" +msgstr "Die Journalbezeichnung sollte pro Unternehmen eindeutig sein." + +#. module: account_sequence +#: field:account.sequence.installer,prefix:0 +msgid "Prefix" +msgstr "Prefix" + +#. module: account_sequence +#: sql_constraint:account.journal:0 +msgid "The code of the journal must be unique per company !" +msgstr "" +"Die Journalkurzbezeichnung sollte innerhalb eines Unternehmens eindeutig " +"sein !" + +#. module: account_sequence +#: constraint:account.move.line:0 +msgid "" +"You can not create move line on receivable/payable account without partner" +msgstr "" +"Sie können keine Buchung auf Forderungs- oder Verbindlichkeitskonten ohne " +"einen vorher vorhandenen Partner erstellen." + +#. module: account_sequence +#: model:ir.model,name:account_sequence.model_account_journal +msgid "Journal" +msgstr "Journal" + +#. module: account_sequence +#: view:account.sequence.installer:0 +msgid "You can enhance the Account Sequence Application by installing ." +msgstr "" + +#. module: account_sequence +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "Sie können keine Buchungen auf Konten des Typs Ansicht erstellen." diff --git a/addons/anonymization/i18n/de.po b/addons/anonymization/i18n/de.po new file mode 100644 index 00000000000..abefff7fe8d --- /dev/null +++ b/addons/anonymization/i18n/de.po @@ -0,0 +1,230 @@ +# German translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-01-11 11:14+0000\n" +"PO-Revision-Date: 2011-03-23 12:46+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-03-24 04:50+0000\n" +"X-Generator: Launchpad (build 12559)\n" + +#. module: anonymization +#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard +msgid "ir.model.fields.anonymize.wizard" +msgstr "ir.model.fields.anonymize.wizard" + +#. module: anonymization +#: field:ir.model.fields.anonymization,field_name:0 +msgid "Field Name" +msgstr "Feldname" + +#. module: anonymization +#: field:ir.model.fields.anonymization,field_id:0 +msgid "Field" +msgstr "Feld" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,state:0 +#: field:ir.model.fields.anonymize.wizard,state:0 +msgid "State" +msgstr "Status" + +#. module: anonymization +#: field:ir.model.fields.anonymize.wizard,file_import:0 +msgid "Import" +msgstr "Import" + +#. module: anonymization +#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization +msgid "ir.model.fields.anonymization" +msgstr "ir.model.fields.anonymization" + +#. module: anonymization +#: model:ir.module.module,shortdesc:anonymization.module_meta_information +msgid "Database anonymization module" +msgstr "Datenbank Anonymisierungsmodul" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,direction:0 +msgid "Direction" +msgstr "Richtung" + +#. module: anonymization +#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_tree +#: view:ir.model.fields.anonymization:0 +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_fields +msgid "Anonymized Fields" +msgstr "Anonymisierte Felder" + +#. module: anonymization +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization +msgid "Database anonymization" +msgstr "Datenbank Anonymisierung" + +#. module: anonymization +#: code:addons/anonymization/anonymization.py:55 +#: sql_constraint:ir.model.fields.anonymization:0 +#, python-format +msgid "You cannot have two records having the same model and the same field" +msgstr "" +"2 Datensätze können nicht das gleiche Model und gleiche Datenfeld haben" + +#. module: anonymization +#: selection:ir.model.fields.anonymization,state:0 +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Anonymized" +msgstr "Anonymisiert" + +#. module: anonymization +#: field:ir.model.fields.anonymization,state:0 +msgid "unknown" +msgstr "unbekannt" + +#. module: anonymization +#: field:ir.model.fields.anonymization,model_id:0 +msgid "Object" +msgstr "Objekt" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,filepath:0 +msgid "File path" +msgstr "Dateipfad" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,date:0 +msgid "Date" +msgstr "Datum" + +#. module: anonymization +#: field:ir.model.fields.anonymize.wizard,file_export:0 +msgid "Export" +msgstr "Export" + +#. module: anonymization +#: view:ir.model.fields.anonymize.wizard:0 +msgid "Reverse the Database Anonymization" +msgstr "Mache Datenbankanonymiserung rückgängig" + +#. module: anonymization +#: view:ir.model.fields.anonymize.wizard:0 +msgid "Database Anonymization" +msgstr "Datenbankanonymisierung" + +#. module: anonymization +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard +msgid "Anonymize database" +msgstr "Anonymisiere Datenbank" + +#. module: anonymization +#: view:ir.model.fields.anonymization.history:0 +#: field:ir.model.fields.anonymization.history,field_ids:0 +msgid "Fields" +msgstr "Felder" + +#. module: anonymization +#: selection:ir.model.fields.anonymization,state:0 +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Clear" +msgstr "Leeren" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,direction:0 +msgid "clear -> anonymized" +msgstr "leer -> anonymisiert" + +#. module: anonymization +#: view:ir.model.fields.anonymize.wizard:0 +#: field:ir.model.fields.anonymize.wizard,summary:0 +msgid "Summary" +msgstr "Zusammenfassung" + +#. module: anonymization +#: view:ir.model.fields.anonymization:0 +msgid "Anonymized Field" +msgstr "Anonymisiertes Feld" + +#. module: anonymization +#: model:ir.module.module,description:anonymization.module_meta_information +msgid "" +"\n" +"This module allows you to anonymize a database.\n" +" " +msgstr "" +"\n" +"Dieses Module anonymisiert die Datenbank (für Migration durch OpenERP)\n" +" " + +#. module: anonymization +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Unstable" +msgstr "Instabil" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,state:0 +msgid "Exception occured" +msgstr "Ausnahme aufgetreten" + +#. module: anonymization +#: selection:ir.model.fields.anonymization,state:0 +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Not Existing" +msgstr "Existiert nicht" + +#. module: anonymization +#: field:ir.model.fields.anonymization,model_name:0 +msgid "Object Name" +msgstr "Objekt Bezeichnung" + +#. module: anonymization +#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_history_tree +#: view:ir.model.fields.anonymization.history:0 +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_history +msgid "Anonymization History" +msgstr "Anonymisierungs Verlauf" + +#. module: anonymization +#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history +msgid "ir.model.fields.anonymization.history" +msgstr "ir.model.fields.anonymization.history" + +#. module: anonymization +#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymize_wizard +#: view:ir.model.fields.anonymize.wizard:0 +msgid "Anonymize Database" +msgstr "Anonymisiere Datenbank" + +#. module: anonymization +#: field:ir.model.fields.anonymize.wizard,name:0 +msgid "File Name" +msgstr "Dateiname" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,direction:0 +msgid "anonymized -> clear" +msgstr "anonymisiert -> leer" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,state:0 +msgid "Started" +msgstr "Begonnen" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,state:0 +msgid "Done" +msgstr "Erledigt" + +#. module: anonymization +#: view:ir.model.fields.anonymization.history:0 +#: field:ir.model.fields.anonymization.history,msg:0 +#: field:ir.model.fields.anonymize.wizard,msg:0 +msgid "Message" +msgstr "Nachricht" diff --git a/addons/crm/i18n/ru.po b/addons/crm/i18n/ru.po index e34ba6e139e..b98eec055c8 100644 --- a/addons/crm/i18n/ru.po +++ b/addons/crm/i18n/ru.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2011-03-22 14:25+0000\n" -"Last-Translator: Sergei Kostigoff \n" +"PO-Revision-Date: 2011-03-23 13:45+0000\n" +"Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-23 04:35+0000\n" +"X-Launchpad-Export-Date: 2011-03-24 04:50+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: crm @@ -78,7 +78,7 @@ msgstr "Сегодня" #. module: crm #: view:crm.merge.opportunity:0 msgid "Select Opportunities" -msgstr "Выберите сделки" +msgstr "Выберите предложения" #. module: crm #: view:crm.meeting:0 @@ -127,7 +127,7 @@ msgstr "Код отдела продаж должен быть уникальн #: code:addons/crm/wizard/crm_lead_to_opportunity.py:93 #, python-format msgid "Lead '%s' has been converted to an opportunity." -msgstr "Кандидат '%s' был преобразован в сделку." +msgstr "Кандидат '%s' был преобразован в предложение." #. module: crm #: code:addons/crm/crm_lead.py:228 @@ -177,14 +177,15 @@ msgstr "Не создавать партнера" #. module: crm #: view:crm.lead:0 msgid "Search Opportunities" -msgstr "Искать сделки" +msgstr "Искать предложения" #. module: crm #: code:addons/crm/wizard/crm_merge_opportunities.py:46 #, python-format msgid "" "Opportunity must have Partner assigned before merging with other Opportunity." -msgstr "Сделка должна иметь партнера перед объединением с другой сделкой." +msgstr "" +"Предложение должно иметь партнера перед объединением с другим предложением." #. module: crm #: code:addons/crm/wizard/crm_merge_opportunities.py:46 @@ -198,7 +199,7 @@ msgstr "Внимание!" #: model:ir.actions.act_window,name:crm.action_report_crm_opportunity #: model:ir.ui.menu,name:crm.menu_report_crm_opportunities_tree msgid "Opportunities Analysis" -msgstr "Анализ сделок" +msgstr "Анализ предложений" #. module: crm #: field:crm.lead,partner_id:0 @@ -260,7 +261,7 @@ msgstr "Отказ" #: code:addons/crm/crm_opportunity.py:108 #, python-format msgid "The opportunity '%s' has been marked as lost." -msgstr "Сделка '%s' была отмечена как проигранная." +msgstr "Предложение '%s' было отмечено как проигранное." #. module: crm #: model:ir.actions.act_window,help:crm.action_report_crm_lead @@ -310,9 +311,9 @@ msgid "" "communication history) will be merged with existing Opportunity of Selected " "partner." msgstr "" -"При выборе объединения с существующей сделкой, реквизиты кандидата (вместе с " -"историей общения) будут объединены с существующей сделкой выбранного " -"партнера." +"При выборе объединения с существующим предложением, реквизиты кандидата " +"(вместе с историей общения) будут объединены с существующим предложением " +"выбранного партнера." #. module: crm #: selection:crm.meeting,class:0 @@ -394,7 +395,7 @@ msgstr "Кандидат '%s' был открыт" #. module: crm #: model:process.transition,name:crm.process_transition_opportunitymeeting0 msgid "Opportunity Meeting" -msgstr "Встреча по сделке" +msgstr "Встреча по предложению" #. module: crm #: help:crm.lead.report,delay_close:0 @@ -405,7 +406,7 @@ msgstr "Количество дней, чтобы закрыть вопрос" #. module: crm #: model:process.node,note:crm.process_node_opportunities0 msgid "When a real project/opportunity is detected" -msgstr "При обнаружении реального проекта/сделки" +msgstr "При обнаружении реального проекта/предложения" #. module: crm #: field:crm.installer,crm_fundraising:0 @@ -416,7 +417,7 @@ msgstr "Фандрайзинг" #: view:res.partner:0 #: field:res.partner,opportunity_ids:0 msgid "Leads and Opportunities" -msgstr "Кандидаты и сделки" +msgstr "Кандидаты и предложения" #. module: crm #: view:crm.send.mail:0 @@ -451,7 +452,7 @@ msgstr "" #. module: crm #: model:ir.model,name:crm.model_crm_lead2opportunity_action msgid "Convert/Merge Opportunity" -msgstr "Преобразовать/Объединить сделку" +msgstr "Преобразовать/Объединить предложение" #. module: crm #: field:crm.lead,write_date:0 @@ -480,7 +481,7 @@ msgstr "Категория" #. module: crm #: view:crm.lead.report:0 msgid "#Opportunities" -msgstr "#Сделок" +msgstr "# Предложений" #. module: crm #: model:crm.case.resource.type,name:crm.type_oppor2 @@ -500,7 +501,7 @@ msgstr "Конфиденциальность" #. module: crm #: view:crm.lead.report:0 msgid "Opportunity Analysis" -msgstr "Анализ сделок" +msgstr "Анализ предложений" #. module: crm #: help:crm.meeting,location:0 @@ -530,7 +531,7 @@ msgstr "Позволяет получать эл. почту с POP/IMAP сер #. module: crm #: model:process.transition,note:crm.process_transition_opportunitymeeting0 msgid "Normal or phone meeting for opportunity" -msgstr "Обычная встреча или звонок по сделке" +msgstr "Обычная встреча или звонок по предложению" #. module: crm #: model:process.node,note:crm.process_node_leads0 @@ -549,7 +550,7 @@ msgstr "Самый первый перспективный контакт" #: model:ir.actions.act_window,name:crm.crm_partner2opportunity #, python-format msgid "Create Opportunity" -msgstr "Создать сделку" +msgstr "Создать предложение" #. module: crm #: view:crm.installer:0 @@ -832,7 +833,7 @@ msgstr "Панель статистики" #: field:crm.phonecall,opportunity_id:0 #, python-format msgid "Opportunity" -msgstr "Сделка" +msgstr "Предложение" #. module: crm #: model:crm.case.resource.type,name:crm.type_lead7 @@ -896,7 +897,7 @@ msgstr "Эксклюзивный" #: code:addons/crm/crm_opportunity.py:91 #, python-format msgid "The opportunity '%s' has been won." -msgstr "Сделка '%s' выиграна." +msgstr "Предложение '%s' выиграно." #. module: crm #: help:crm.meeting,alarm_id:0 @@ -972,7 +973,7 @@ msgstr "" #. module: crm #: view:crm.phonecall2opportunity:0 msgid "Convert To Opportunity " -msgstr "Преобразовать в сделку " +msgstr "Преобразовать в предложение " #. module: crm #: help:crm.case.stage,sequence:0 @@ -986,7 +987,7 @@ msgstr "Дает последовательность при отображен #: model:ir.ui.menu,name:crm.menu_crm_case_opp #: model:process.node,name:crm.process_node_opportunities0 msgid "Opportunities" -msgstr "Сделки" +msgstr "Предложения" #. module: crm #: field:crm.segmentation,categ_id:0 @@ -1035,7 +1036,7 @@ msgstr "Март" #: code:addons/crm/crm_lead.py:230 #, python-format msgid "The opportunity '%s' has been closed." -msgstr "Сделка '%s' закрыта." +msgstr "Предложение '%s' закрыто." #. module: crm #: field:crm.lead,day_open:0 @@ -1076,7 +1077,8 @@ msgstr "Способ прекращения повторения" msgid "" "There are no other 'Open' or 'Pending' Opportunities for the partner '%s'." msgstr "" -"Нет других сделок в стадии \"Открыто\" или \"В ожидании\" для партнера '%s'." +"Нет других предложений в стадии \"Открыто\" или \"В ожидании\" для партнера " +"'%s'." #. module: crm #: view:crm.lead:0 @@ -1150,7 +1152,7 @@ msgstr "" #: code:addons/crm/wizard/crm_phonecall_to_opportunity.py:57 #, python-format msgid "Closed/Cancelled Phone Call Could not convert into Opportunity" -msgstr "Закрытый/отмененный звонок нельзя преобразовать в сделку" +msgstr "Закрытый/отмененный звонок нельзя преобразовать в предложение" #. module: crm #: view:crm.segmentation:0 @@ -1397,7 +1399,7 @@ msgstr "Управление техподдержкой" #. module: crm #: field:crm.partner2opportunity,name:0 msgid "Opportunity Name" -msgstr "Название сделки" +msgstr "Название предложения" #. module: crm #: help:crm.case.section,active:0 @@ -1496,7 +1498,7 @@ msgstr "Идентификатор" #. module: crm #: model:ir.model,name:crm.model_crm_partner2opportunity msgid "Partner To Opportunity" -msgstr "Партнер в Сделку" +msgstr "Партнер в Предложение" #. module: crm #: view:crm.meeting:0 @@ -1520,7 +1522,7 @@ msgstr "Расширенные фильтры..." #. module: crm #: field:crm.phonecall2opportunity,name:0 msgid "Opportunity Summary" -msgstr "Кратко о сделке" +msgstr "Кратко о предложении" #. module: crm #: view:crm.phonecall.report:0 @@ -1530,7 +1532,7 @@ msgstr "Искать" #. module: crm #: view:board.board:0 msgid "Opportunities by Categories" -msgstr "Сделки по категориям" +msgstr "Предложения по категориям" #. module: crm #: view:crm.meeting:0 @@ -1615,7 +1617,7 @@ msgstr "res.users" #. module: crm #: model:ir.model,name:crm.model_crm_merge_opportunity msgid "Merge two Opportunities" -msgstr "Объединить две сделки" +msgstr "Объединить два предложения" #. module: crm #: selection:crm.meeting,end_type:0 @@ -1690,6 +1692,11 @@ msgid "" "mainly used by the sales manager in order to do the periodic review with the " "teams of the sales pipeline." msgstr "" +"Анализ предложений дает вам мгновенный доступ к такой информации, как " +"ожидаемый доход, плановая себестоимость, пропущенные сроки или количество " +"взаимодействий в предложении. Этот отчет в основном используется менеджером " +"по продажам, с тем чтобы сделать периодический обзор по отделам продаж в " +"процессе продаж." #. module: crm #: field:crm.case.categ,name:0 @@ -1713,9 +1720,9 @@ msgid "" "organise their sales pipeline. Stages will allow them to easily track how a " "specific lead or opportunity is positioned in the sales cycle." msgstr "" -"Добавление специальных этапов к кандидатам и сделкам позволяет лучше " +"Добавление специальных этапов к кандидатам и предложениям позволяет лучше " "организовать процесс продаж. Этапы позволяют легче отслеживать нахождение " -"кандидатов и сделок в процессе продаж." +"кандидатов и предложений в процессе продаж." #. module: crm #: view:crm.lead.report:0 @@ -1960,7 +1967,7 @@ msgstr "Значение" #: view:crm.lead:0 #: view:crm.lead.report:0 msgid "Opportunity by Categories" -msgstr "Сделки по категориям" +msgstr "Предложения по категориям" #. module: crm #: view:crm.lead:0 @@ -1980,7 +1987,7 @@ msgstr "" #. module: crm #: model:ir.model,name:crm.model_crm_phonecall2opportunity msgid "Phonecall To Opportunity" -msgstr "Звонок в Сделку" +msgstr "Звонок в Предложение" #. module: crm #: field:crm.case.section,reply_to:0 @@ -1995,7 +2002,7 @@ msgstr "Выберите этапы для этого отдела продаж" #. module: crm #: view:board.board:0 msgid "Opportunities by Stage" -msgstr "Сделки по этапам" +msgstr "Предложения по этапам" #. module: crm #: view:crm.meeting:0 @@ -2012,7 +2019,7 @@ msgstr "Перспектива преобразуется в бизнес-пар #: view:crm.partner2opportunity:0 #: model:ir.actions.act_window,name:crm.phonecall2opportunity_act msgid "Convert To Opportunity" -msgstr "Преобразовать в сделку" +msgstr "Преобразовать в предложение" #. module: crm #: view:crm.phonecall:0 @@ -2038,7 +2045,7 @@ msgstr "Доп. информация" #: model:ir.actions.act_window,name:crm.action_merge_opportunities #: model:ir.actions.act_window,name:crm.merge_opportunity_act msgid "Merge Opportunities" -msgstr "Объединить сделки" +msgstr "Объединить предложения" #. module: crm #: model:crm.case.resource.type,name:crm.type_lead5 @@ -2090,7 +2097,7 @@ msgstr "Использовать правила продаж покупок" #. module: crm #: model:ir.model,name:crm.model_crm_lead2opportunity_partner msgid "Lead To Opportunity Partner" -msgstr "Кандидат в партнера сделки" +msgstr "Кандидат в партнера предложения" #. module: crm #: field:crm.meeting,location:0 @@ -2157,7 +2164,7 @@ msgstr "Google Adwords 2" #: help:crm.lead,type:0 #: help:crm.lead.report,type:0 msgid "Type is used to separate Leads and Opportunities" -msgstr "Тип используется для разделения кандидатов и сделок" +msgstr "Тип используется для разделения кандидатов и предложений" #. module: crm #: view:crm.phonecall2partner:0 @@ -2182,8 +2189,8 @@ msgid "" msgstr "" "Определение отдела продаж для организации различных продавцов или отделов " "продаж в отдельные команды. Каждая команда будет работать со своим списком " -"сделок, заказов и т.д. Каждый пользователь может установить команду по " -"умолчанию в своих настройках. Выводимые сделки и заказы, будут " +"предложений, заказов и т.д. Каждый пользователь может установить команду по " +"умолчанию в своих настройках. Выводимые предложения и заказы, будут " "автоматически фильтроваться в соответствии с отделом продаж пользователя." #. module: crm @@ -2265,7 +2272,7 @@ msgstr "" "Кандидаты позволяют управлять и отслеживать все первоначальные контакты с " "предполагаемыми клиентами или партнерами проявившими интерес к вашей " "продукции или услугам. Кандидат - обычно первый шаг в процессе продажи. " -"После оценки, кандидат может быть преобразован в сделку с созданием " +"После оценки, кандидат может быть преобразован в предложение с созданием " "соответствующего партнера для будущего отслеживания связанной с ним " "деятельности. Вы можете импортировать базу данных предполагаемых клиентов, " "работать с визитными карточками или интегрировать запросы с вашего сайта с " @@ -2415,7 +2422,7 @@ msgstr "Активен" #: code:addons/crm/crm_lead.py:306 #, python-format msgid "The stage of opportunity '%s' has been changed to '%s'." -msgstr "Этап сделки '%s' изменен на '%s'." +msgstr "Этап предложения '%s' изменен на '%s'." #. module: crm #: code:addons/crm/crm_lead.py:282 @@ -2591,7 +2598,7 @@ msgstr "Вопрос '%s' отменен." #. module: crm #: field:crm.installer,sale_crm:0 msgid "Opportunity to Quotation" -msgstr "Сделка в Запрос цен" +msgstr "Предложение в Заказ на продажу" #. module: crm #: model:ir.model,name:crm.model_crm_send_mail @@ -2602,7 +2609,7 @@ msgstr "Послать новое эл. письмо" #: view:board.board:0 #: model:ir.actions.act_window,name:crm.act_my_oppor msgid "My Open Opportunities" -msgstr "Мои открытые сделки" +msgstr "Мои открытые предложения" #. module: crm #: model:ir.actions.act_window,name:crm.open_board_statistical_dash @@ -2646,7 +2653,7 @@ msgstr "Тип встречи" #: code:addons/crm/wizard/crm_lead_to_opportunity.py:312 #, python-format msgid "Merge with Existing Opportunity" -msgstr "Объединить с существующей сделкой" +msgstr "Объединить с существующим предложением" #. module: crm #: help:crm.lead,state:0 @@ -2730,7 +2737,7 @@ msgstr "Указатель" #. module: crm #: model:ir.model,name:crm.model_crm_lead2opportunity msgid "Lead To Opportunity" -msgstr "Кандидат в Сделку" +msgstr "Кандидат в Предложение" #. module: crm #: model:ir.model,name:crm.model_calendar_attendee @@ -2763,7 +2770,8 @@ msgid "" "The name of the future partner that will be created while converting the " "into opportunity" msgstr "" -"Название будущего партнера, который будет создан при преобразовании в сделку" +"Название будущего партнера, который будет создан при преобразовании в " +"предложение" #. module: crm #: field:crm.opportunity2phonecall,user_id:0 @@ -2864,15 +2872,16 @@ msgid "" "opportunities, convert them into quotations, manage related documents, track " "all customer related activities, and much more." msgstr "" -"Со сделками вы можете управлять и отслеживать процесс продаж с помощью " +"С предложениями вы можете управлять и отслеживать процесс продаж с помощью " "создания специфичных для заказчика или предполагаемого клиента документов " "для продаж. Может быть сохранена такая информация: ожидаемый доход, этап " -"сделки, ожидаемая дата закрытия, история общения и многое другое. Сделки " -"могут быть связаны с почтовым шлюзом: новые сообщения могут создавать " -"сделки, каждая из них автоматически получает историю общения с клиентом.\n" +"предложения, ожидаемая дата закрытия, история общения и многое другое. " +"Предложения могут быть связаны с почтовым шлюзом: новые сообщения могут " +"создавать предложения, каждое из них автоматически получает историю общения " +"с клиентом.\n" "\n" "Вы и ваш отдел будете иметь возможность планировать встречи и телефонные " -"звонки по сделкам, превращать их в запросы цен, управлять связанными " +"звонки по предложениям, превращать их в запросы цен, управлять связанными " "документами, отслеживать деятельность связанную с заказчиком, и многое " "другое." @@ -3020,8 +3029,8 @@ msgid "" msgstr "" "Создавать специальные категории, которые подходят к деятельности вашей " "компании, чтобы лучше классифицировать и анализировать ваших кандидатов и " -"сделки. Такие категории, могут, например, отражать вашу структуру продукции " -"или различные типы продаж." +"предложения. Такие категории, могут, например, отражать вашу структуру " +"продукции или различные типы продаж." #. module: crm #: help:crm.segmentation,som_interval_decrease:0 @@ -3190,7 +3199,7 @@ msgstr "Запланировать звонок" #: code:addons/crm/wizard/crm_lead_to_opportunity.py:258 #, python-format msgid "Closed/Cancelled Leads Could not convert into Opportunity" -msgstr "Закрытого/отмененного кандидата нельзя преобразовать в сделку" +msgstr "Закрытого/отмененного кандидата нельзя преобразовать в предложение" #. module: crm #: view:crm.segmentation:0 @@ -3233,7 +3242,7 @@ msgstr "Штат" #. module: crm #: model:process.transition,note:crm.process_transition_leadopportunity0 msgid "Creating business opportunities from Leads" -msgstr "Создание сделок из кандидатов" +msgstr "Создание предложений из кандидатов" #. module: crm #: help:crm.send.mail,html:0 @@ -3248,7 +3257,7 @@ msgstr "Нужна информация" #. module: crm #: model:process.transition,name:crm.process_transition_leadopportunity0 msgid "Prospect Opportunity" -msgstr "Перспективы сделки" +msgstr "Перспективы предложения" #. module: crm #: view:crm.installer:0 @@ -3388,7 +3397,7 @@ msgstr "Ожидаемое закрытие" #. module: crm #: model:ir.model,name:crm.model_crm_opportunity2phonecall msgid "Opportunity to Phonecall" -msgstr "Сделка в звонок" +msgstr "Предложение в звонок" #. module: crm #: help:crm.case.section,allow_unlink:0 @@ -3584,7 +3593,7 @@ msgstr "Нет ID эл. почты в адресе вашей компании!" #. module: crm #: view:crm.lead.report:0 msgid "Opportunities By Stage" -msgstr "Сделки по этапам" +msgstr "Предложения по этапам" #. module: crm #: model:ir.actions.act_window,name:crm.crm_case_categ_phone_create_partner @@ -3607,7 +3616,7 @@ msgid "" "cycle." msgstr "" "Добавление специальных этапов, которые будут помогать лучше организовывать " -"процесс продаж. Этапы позволяют легче отслеживать положение сделок в " +"процесс продаж. Этапы позволяют легче отслеживать положение предложений в " "процессе продаж." #. module: crm @@ -3671,7 +3680,7 @@ msgstr "Вы не можете иметь двух одинаковых поль #: code:addons/crm/wizard/crm_merge_opportunities.py:100 #, python-format msgid "Merged into Opportunity: %s" -msgstr "Объединено со сделкой: %s" +msgstr "Объединено с предложением: %s" #. module: crm #: code:addons/crm/crm.py:347 @@ -3781,7 +3790,7 @@ msgstr "Интерес к аксессуарам" #: code:addons/crm/crm_lead.py:211 #, python-format msgid "The opportunity '%s' has been opened." -msgstr "Сделка '%s' была открыта." +msgstr "Предложение '%s' было открыто." #. module: crm #: field:crm.lead.report,email:0 @@ -3796,7 +3805,7 @@ msgstr "Улица" #. module: crm #: view:crm.lead.report:0 msgid "Opportunities by User and Team" -msgstr "Сделки по пользователям и отделам" +msgstr "Предложения по пользователям и отделам" #. module: crm #: field:crm.case.section,working_hours:0 @@ -3843,7 +3852,7 @@ msgstr "Страна" #: view:crm.phonecall:0 #: view:res.partner:0 msgid "Convert to Opportunity" -msgstr "Преобразовать в сделку" +msgstr "Преобразовать в предложение" #. module: crm #: selection:crm.meeting,week_list:0 @@ -3870,7 +3879,7 @@ msgstr "Звонки по пользователям и секциям" #. module: crm #: selection:crm.lead2opportunity.action,name:0 msgid "Merge with existing Opportunity" -msgstr "Объединить с существующей сделкой" +msgstr "Объединить с существующим предложением" #. module: crm #: field:crm.meeting,select1:0 diff --git a/addons/crm_partner_assign/i18n/ru.po b/addons/crm_partner_assign/i18n/ru.po index 159ca6d6dd8..2f0f0b950ae 100644 --- a/addons/crm_partner_assign/i18n/ru.po +++ b/addons/crm_partner_assign/i18n/ru.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2011-03-14 19:21+0000\n" +"PO-Revision-Date: 2011-03-23 13:46+0000\n" "Last-Translator: Chertykov Denis \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-15 04:55+0000\n" +"X-Launchpad-Export-Date: 2011-03-24 04:50+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: crm_partner_assign @@ -281,7 +281,7 @@ msgstr "Назначение партнера" #. module: crm_partner_assign #: help:crm.lead.report.assign,type:0 msgid "Type is used to separate Leads and Opportunities" -msgstr "Тип используется для разделения кандидатов и сделок" +msgstr "Тип используется для разделения кандидатов и предложений" #. module: crm_partner_assign #: selection:crm.lead.report.assign,month:0 @@ -308,7 +308,7 @@ msgstr "" #. module: crm_partner_assign #: view:crm.lead.report.assign:0 msgid "Opportunities Assignment Analysis" -msgstr "Анализ распределения сделок" +msgstr "Анализ распределения предложений" #. module: crm_partner_assign #: view:res.partner:0 @@ -397,7 +397,7 @@ msgstr "Категория" #. module: crm_partner_assign #: view:crm.lead.report.assign:0 msgid "#Opportunities" -msgstr "# Сделок" +msgstr "# Предложений" #. module: crm_partner_assign #: model:ir.module.module,shortdesc:crm_partner_assign.module_meta_information @@ -431,7 +431,7 @@ msgstr "Закрыто" #: view:res.partner:0 #: field:res.partner,opportunity_assigned_ids:0 msgid "Assigned Opportunities" -msgstr "Назначенные сделки" +msgstr "Назначенные предложения" #. module: crm_partner_assign #: field:crm.lead,date_assign:0 @@ -622,7 +622,7 @@ msgstr "Адрес" #. module: crm_partner_assign #: selection:crm.lead.report.assign,type:0 msgid "Opportunity" -msgstr "Сделка" +msgstr "Предложение" #. module: crm_partner_assign #: field:crm.lead.report.assign,partner_id:0 @@ -648,7 +648,7 @@ msgstr "Страна" #. module: crm_partner_assign #: view:res.partner:0 msgid "Convert to Opportunity" -msgstr "Преобразовать в сделку" +msgstr "Преобразовать в предложение" #. module: crm_partner_assign #: view:crm.lead:0 diff --git a/addons/mrp/i18n/ro.po b/addons/mrp/i18n/ro.po index 5f81dd55fcd..3bdf42116e0 100644 --- a/addons/mrp/i18n/ro.po +++ b/addons/mrp/i18n/ro.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:15+0000\n" -"PO-Revision-Date: 2011-03-09 21:08+0000\n" +"PO-Revision-Date: 2011-03-23 12:20+0000\n" "Last-Translator: Dorin \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-12 05:01+0000\n" +"X-Launchpad-Export-Date: 2011-03-24 04:49+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: mrp @@ -80,7 +80,7 @@ msgstr "" #: field:mrp.production,picking_id:0 #: field:mrp.production.order,picking_id:0 msgid "Picking list" -msgstr "Lista de preluare" +msgstr "Listă de preluare" #. module: mrp #: code:addons/mrp/report/price.py:121 @@ -365,7 +365,7 @@ msgstr "Octombrie" #: code:addons/mrp/report/price.py:177 #, python-format msgid "Components Cost of " -msgstr "" +msgstr "Costul componentelor " #. module: mrp #: model:process.transition,name:mrp.process_transition_procurestockableproduct0 @@ -843,7 +843,7 @@ msgstr "Urgent" #. module: mrp #: model:ir.model,name:mrp.model_mrp_routing_workcenter msgid "Work Center Usage" -msgstr "" +msgstr "Utilizare post de lucru" #. module: mrp #: model:ir.model,name:mrp.model_mrp_production @@ -1722,7 +1722,7 @@ msgstr "Produse fabricate" #: field:mrp.production,date_finished:0 #: field:mrp.production.order,date_finished:0 msgid "End Date" -msgstr "Data de sfîrșit" +msgstr "Dată de sfârșit" #. module: mrp #: field:mrp.workcenter,resource_id:0 diff --git a/addons/sale/i18n/ru.po b/addons/sale/i18n/ru.po index 44c96226c3d..81c1b81fac3 100644 --- a/addons/sale/i18n/ru.po +++ b/addons/sale/i18n/ru.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:16+0000\n" -"PO-Revision-Date: 2011-03-20 10:02+0000\n" +"PO-Revision-Date: 2011-03-23 14:07+0000\n" "Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-21 04:46+0000\n" +"X-Launchpad-Export-Date: 2011-03-24 04:50+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: sale @@ -144,6 +144,14 @@ msgid "" "configuration of the sales order, a draft invoice will be generated so that " "you just have to confirm it when you want to bill your customer." msgstr "" +"Заказы на продажу помогают вам управлять запросами/предложениями цен и " +"заказами от клиентов. OpenERP предполагает, что вы начинаете с создания " +"запроса/предложения цен. Как только это подтверждается, запрос/предложение " +"цен будет преобразован в заказ на продажу. OpenERP может обрабатывать " +"множество видов ТМЦ так, что заказ может вызвать выполнение задач, доставку " +"заказов, заказы на производство, закупки и так далее. В зависимости от вида " +"заказа на продажу, черновик счета будет создан и вы просто должны " +"подтвердить его в случае выставления счета заказчику." #. module: sale #: help:sale.order,invoice_quantity:0 diff --git a/addons/sale_crm/i18n/ru.po b/addons/sale_crm/i18n/ru.po index 472a50ccddf..44d6a930a7d 100644 --- a/addons/sale_crm/i18n/ru.po +++ b/addons/sale_crm/i18n/ru.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-01-11 11:16+0000\n" -"PO-Revision-Date: 2011-03-20 14:00+0000\n" +"PO-Revision-Date: 2011-03-23 13:50+0000\n" "Last-Translator: Chertykov Denis \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-03-21 04:46+0000\n" +"X-Launchpad-Export-Date: 2011-03-24 04:50+0000\n" "X-Generator: Launchpad (build 12559)\n" #. module: sale_crm @@ -30,7 +30,7 @@ msgstr "Преобразовать в предложение" #: code:addons/sale_crm/wizard/crm_make_sale.py:108 #, python-format msgid "Opportunity '%s' is converted to Quotation." -msgstr "Сделка '%s' преобразована в запрос цен." +msgstr "Gредложение '%s' преобразовано в заказ на продажу." #. module: sale_crm #: code:addons/sale_crm/wizard/crm_make_sale.py:89 @@ -67,7 +67,7 @@ msgid "" msgstr "" "\n" "Этот модуль добавляет действие к одному или нескольким вопросам в CRM.\n" -"Этот действие позволяет создавать заказ на продажу из выбранного вопроса.\n" +"Это действие позволяет создавать заказ на продажу из выбранного вопроса.\n" "Если открыто несколько вопросов, то создается один заказ на один вопрос.\n" "Затем, вопрос закрывается и связывается с созданным заказом на продажу.\n" "Мы советуем вам установить этот модуль, если вы установили модуль CRM и " @@ -111,12 +111,12 @@ msgstr "Преобразовано в коммерческое предложе #: code:addons/sale_crm/wizard/crm_make_sale.py:92 #, python-format msgid "Opportunity: %s" -msgstr "Сделка: %s" +msgstr "Предложение: %s" #. module: sale_crm #: model:ir.module.module,shortdesc:sale_crm.module_meta_information msgid "Creates Sales order from Opportunity" -msgstr "Создает заказ на продажу из сделки" +msgstr "Создает заказ на продажу из предложения" #. module: sale_crm #: model:ir.actions.act_window,name:sale_crm.action_quotation_for_sale_crm @@ -131,7 +131,7 @@ msgstr "Магазин" #. module: sale_crm #: view:board.board:0 msgid "Opportunities by Stage" -msgstr "Сделки по этапам" +msgstr "Предложения по этапам" #. module: sale_crm #: view:board.board:0 @@ -141,7 +141,7 @@ msgstr "Мои предложения" #. module: sale_crm #: field:crm.make.sale,close:0 msgid "Close Opportunity" -msgstr "Закрыть сделку" +msgstr "Закрыть предложение" #. module: sale_crm #: view:sale.order:0 diff --git a/addons/sale_order_dates/i18n/ru.po b/addons/sale_order_dates/i18n/ru.po index 99bcc5e1eb6..8c78824cb26 100644 --- a/addons/sale_order_dates/i18n/ru.po +++ b/addons/sale_order_dates/i18n/ru.po @@ -8,19 +8,19 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:16+0000\n" -"PO-Revision-Date: 2011-01-20 08:51+0000\n" +"PO-Revision-Date: 2011-03-23 13:53+0000\n" "Last-Translator: Chertykov Denis \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-01-21 04:41+0000\n" -"X-Generator: Launchpad (build 12177)\n" +"X-Launchpad-Export-Date: 2011-03-24 04:50+0000\n" +"X-Generator: Launchpad (build 12559)\n" #. module: sale_order_dates #: sql_constraint:sale.order:0 msgid "Order Reference must be unique !" -msgstr "Ссылка на заказ должна быть уникальной !" +msgstr "Номер заказа должен быть уникальным!" #. module: sale_order_dates #: help:sale.order,requested_date:0 From a51d1c0c4960faa3fd0ab1103230aa13dee227e2 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 24 Mar 2011 08:16:52 +0100 Subject: [PATCH 669/681] [FIX] trailing comma bzr revid: xmo@openerp.com-20110324071652-8i6rnyb9drkmsbb5 --- addons/base/static/openerp/js/base_views.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index b9ee746f081..9fb79ca962d 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -99,7 +99,7 @@ openerp.base.Action = openerp.base.Controller.extend({ on_remove: function() { }, on_edit: function() { - }, + } }); // Extends view manager From 7766fcca6215e7bf27bf436ee484c8beb0d0eaad Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Thu, 24 Mar 2011 10:50:12 +0100 Subject: [PATCH 670/681] [REF] renamed openerp-server.py to openerp-server. bzr revid: vmt@openerp.com-20110324095012-a5joofz60zrhbit5 --- bin/openerp-server.py | 2 +- openerp-server.py => openerp-server | 0 openerp/addons/base_quality_interrogation.py | 2 +- openerp/osv/orm.py | 2 +- setup.README | 2 +- setup.py | 4 ++-- 6 files changed, 6 insertions(+), 6 deletions(-) rename openerp-server.py => openerp-server (100%) diff --git a/bin/openerp-server.py b/bin/openerp-server.py index b31dbd1e6a5..c61a22858c0 100755 --- a/bin/openerp-server.py +++ b/bin/openerp-server.py @@ -14,6 +14,6 @@ if __name__ == "__main__": os.chdir(os.path.normpath(os.path.dirname(__file__))) os.chdir('..') # ... and execute the new executable. - os.execv('openerp-server.py', sys.argv) + os.execv('openerp-server', sys.argv) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/openerp-server.py b/openerp-server similarity index 100% rename from openerp-server.py rename to openerp-server diff --git a/openerp/addons/base_quality_interrogation.py b/openerp/addons/base_quality_interrogation.py index fe5bc27811b..ae49996ec95 100755 --- a/openerp/addons/base_quality_interrogation.py +++ b/openerp/addons/base_quality_interrogation.py @@ -49,7 +49,7 @@ def to_decode(s): return s def start_server(root_path, port, netport, addons_path): - os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --no-xmlrpcs --xmlrpc-port=%s --netrpc-port=%s --addons-path=%s' %(root_path, str(port),str(netport),addons_path)) + os.system('python2.5 %sopenerp-server --pidfile=openerp.pid --no-xmlrpcs --xmlrpc-port=%s --netrpc-port=%s --addons-path=%s' %(root_path, str(port),str(netport),addons_path)) def clean(): if os.path.isfile('openerp.pid'): ps = open('openerp.pid') diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index c2e5743099b..9ecf547969f 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -2690,7 +2690,7 @@ class orm(orm_template): self._table, k) except Exception: msg = "WARNING: unable to set column %s of table %s not null !\n"\ - "Try to re-run: openerp-server.py --update=module\n"\ + "Try to re-run: openerp-server --update=module\n"\ "If it doesn't work, update records and execute manually:\n"\ "ALTER TABLE %s ALTER COLUMN %s SET NOT NULL" self.__logger.warn(msg, k, self._table, self._table, k) diff --git a/setup.README b/setup.README index 4432e5bd1a6..5ee564ecfb4 100644 --- a/setup.README +++ b/setup.README @@ -24,4 +24,4 @@ This file should/will be moved on a proper documentation place later. - Run the main script, again specifying the PYTHONPATH: > PYTHONPATH=/home/openerp/openerp-tmp/lib/python2.6/site-packages/ \ - bin/openerp-server.py + /home/openerp/openerp-tmp/bin/openerp-server diff --git a/setup.py b/setup.py index f90e52da3f3..76c59126e73 100755 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ py2exe_data_files = [] if os.name == 'nt': import py2exe py2exe_keywords['console'] = [ - { "script": "openerp-server.py", + { "script": "openerp-server", "icon_resources": [(1, join("pixmaps","openerp-icon.ico"))], }] py2exe_keywords['options'] = { @@ -123,7 +123,7 @@ setup(name = name, (join('man', 'man5'), ['man/openerp_serverrc.5']), ('doc', filter(isfile, glob.glob('doc/*'))), ] + py2exe_data_files, - scripts = ['openerp-server.py'], + scripts = ['openerp-server'], packages = find_packages(), include_package_data = True, package_data = { From cee122bcfbc2f5c42cfad57304f92c35c401105d Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 24 Mar 2011 12:12:12 +0100 Subject: [PATCH 671/681] [FIX] analytic: fixed the constraint on currencies on analytic accounts in order to be compliant with analytic accounts that doesn't belong to a company and for which we should be able to set any currency (no constraint in that case, otherwise it has to be the same as company) bzr revid: qdp-launchpad@openerp.com-20110324111212-bal82qcrdhc0pyzh --- addons/analytic/analytic.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 77ec4c153c0..ee458ca0076 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -133,23 +133,18 @@ class account_analytic_account(osv.osv): if type(ids) != type([]): ids=[ids] for account in self.browse(cr, uid, ids, context=context): - if not value: - cr.execute("""update account_analytic_account set - currency_id=NULL where id=%s""", (account.id, )) - elif account.company_id.currency_id.id == value: - cr.execute("""update account_analytic_account set - currency_id=%s where id=%s""", (value, account.id, )) - else: - raise osv.except_osv(_('Error !'), _("The currency has to be the same as the currency of the analytic account's company or empty.")) - return True + if account.company_id: + if account.company_id.currency_id.id != value: + raise osv.except_osv(_('Error !'), _("If you set a company, the currency selected has to be the same as it's currency. \nYou can remove the company belonging, and thus change the currency, only on analytic account of type 'view'. This can be really usefull for consolidation purposes of several companies charts with different currencies, for example.")) + return cr.execute("""update account_analytic_account set currency_id=%s where id=%s""", (value, account.id, )) def _currency(self, cr, uid, ids, field_name, arg, context=None): result = {} for rec in self.browse(cr, uid, ids, context=context): - if not rec.currency_id.id: - result[rec.id] = False - else: + if rec.company_id: result[rec.id] = rec.company_id.currency_id.id + else: + result[rec.id] = rec.currency_id.id return result _columns = { From 506a85c80e4de6ccd71bf33e71e086b5ee10d26b Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 24 Mar 2011 17:31:14 +0100 Subject: [PATCH 672/681] viewmanager part1 bzr revid: al@openerp.com-20110324163114-dvoi8l3nzmut5y63 --- addons/base/controllers/main.py | 2 + addons/base/static/openerp/base.xml | 25 +++-- addons/base/static/openerp/js/base_chrome.js | 2 +- addons/base/static/openerp/js/base_views.js | 111 +++++++++---------- 4 files changed, 70 insertions(+), 70 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index 11db3d3a5c2..af790ad1357 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -156,8 +156,10 @@ class Menu(openerpweb.Controller): @openerpweb.jsonrequest def action(self, req, menu_id): + print "QUERY" m = req.session.model('ir.values') r = m.get('action', 'tree_but_open', [('ir.ui.menu', menu_id)], False, {}) + print r res = {"action": r} return res diff --git a/addons/base/static/openerp/base.xml b/addons/base/static/openerp/base.xml index c416d9cf093..094b732a928 100644 --- a/addons/base/static/openerp/base.xml +++ b/addons/base/static/openerp/base.xml @@ -124,6 +124,21 @@
      + + +
      + + + + +
      +
      + +
      +
      +
      -
      - - -
      - -
      -
      -
      diff --git a/addons/base/static/openerp/js/base_chrome.js b/addons/base/static/openerp/js/base_chrome.js index 08b69db7e6f..dedcdd0e61a 100644 --- a/addons/base/static/openerp/js/base_chrome.js +++ b/addons/base/static/openerp/js/base_chrome.js @@ -542,7 +542,7 @@ openerp.base.WebClient = openerp.base.Controller.extend({ this.menu.start(); }, on_loggued: function() { - this.action = new openerp.base.Action(this.session, "oe_application"); + this.action = new openerp.base.ActionManager(this.session, "oe_application"); this.action.start(); }, on_menu_action: function(action) { diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index 9fb79ca962d..913456053d3 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -6,12 +6,28 @@ openerp.base$views = function(openerp) { // process all kind of actions openerp.base.ActionManager = openerp.base.Controller.extend({ -// This controller should be used for one2many also or not ? -// to replace Action + init: function(session, element_id) { + this._super(session, element_id); + this.action = null; + this.viewmanager = null; + }, + /** + * Process an action + * Supported actions: act_window + */ + do_action: function(action) { + // instantiate the right controllers by understanding the action + this.action = action; + if(action.type == "ir.actions.act_window") { + this.viewmanager = new openerp.base.ViewManager(this.session,this.element_id); + this.viewmanager.do_action_window(action); + this.viewmanager.start(); + } + }, }); // This will be ViewManager Abstract/Common -openerp.base.Action = openerp.base.Controller.extend({ +openerp.base.ViewManager = openerp.base.Controller.extend({ init: function(session, element_id) { this._super(session, element_id); this.action = null; @@ -19,79 +35,56 @@ openerp.base.Action = openerp.base.Controller.extend({ this.searchview_id = false; this.searchview = null; this.search_visible = true; - - // this will be changed into // this.views = { "list": { "view_id":1234, "controller": instance} } - this.listview_id = false; - this.listview = null; - this.formview_id = false; - this.formview = null; + this.views = {}; }, start: function() { - this.$element.html(QWeb.render("Action", {"prefix":this.element_id})); - this.$element.find("#mode_list").bind('click',this.on_mode_list); - this.$element.find("#mode_form").bind('click',this.on_mode_form); - this.on_mode_list(); }, - // this will be changed into on_view_switch(kind_of_view) - on_mode_list: function() { - $("#oe_action_form").hide(); - $("#oe_action_search").show(); - $("#oe_action_list").show(); - }, - on_mode_form: function() { - $("#oe_action_form").show(); - $("#oe_action_search").hide(); - $("#oe_action_list").hide(); - }, - // This will move to actionmanager - do_action: function(action) { - // instantiate the right controllers by understanding the action - this.action = action; - this.log(action); -// debugger; - //this.log(action); - if(action.type == "ir.actions.act_window") { - this.do_action_window(action); + on_mode_switch: function(view_type) { + for (var i in this.views) { + if(i == view_type) { + this.views.i.controller.$element.show(); + } else { + this.views.i.controller.$element.hide(); + } } }, - // this will be renamed setup_view_manager_from_an_actwindow and will setup this.views do_action_window: function(action) { - // this will move into set_dataset() + var self = this; + var prefix_id = "#" + this.element_id; + this.action = action; this.dataset = new openerp.base.DataSet(this.session, action.res_model); this.dataset.start(); + this.$element.html(QWeb.render("ViewManager", {"prefix": this.element_id, views: action.views})); + this.searchview_id = false; - if(this.listview && action.search_view_id) { + if(this.search_visible && action.search_view_id) { this.searchview_id = action.search_view_id[0]; + this.searchview = new openerp.base.SearchView(this.session, this.element_id + "_search", this.dataset, this.searchview_id); + this.searchview.start(); } - this.searchview = new openerp.base.SearchView(this.session, "oe_action_search", this.dataset, this.searchview_id); - this.searchview.start(); - - // Those two will be a foreach kind of view - - // Locate first tree view - this.listview_id = false; for(var i = 0; i < action.views.length; i++) { + var view_id, controller; + view_id = action.views[i][0]; if(action.views[i][1] == "tree") { - this.listview_id = action.views[i][0]; - break; + controller = new openerp.base.ListView(this.session, this.element_id + "_view_tree", this.dataset, view_id); + controller.start(); + this.views.tree = { view_id: view_id, controller: controller }; + this.$element.find(prefix_id + "_button_tree").bind('click',function(){ + this.on_mode_switch("tree"); + }); + } else if(action.views[i][1] == "form") { + controller = new openerp.base.FormView(this.session, this.element_id + "_view_form", this.dataset, view_id); + controller.start(); + this.views.form = { view_id: view_id, controller: controller }; + this.$element.find(prefix_id + "_button_form").bind('click',function(){ + this.on_mode_switch("form"); + }); } } - this.listview = new openerp.base.ListView(this.session, "oe_action_list", this.dataset, this.listview_id); - this.listview.start(); - - // Locate first form view - this.formview_id = false; - for(var j = 0; j < action.views.length; j++) { - if(action.views[j][1] == "form") { - this.formview_id = action.views[j][0]; - break; - } - } - this.formview = new openerp.base.FormView(this.session, "oe_action_form", this.dataset, this.formview_id); - this.formview.start(); - + // switch to the first one in sequence + this.on_mode_switch("tree"); }, // create when root, also add to parent when o2m on_create: function() { From cce35c01e1529f73e4584ea2444d544f6396fe16 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 24 Mar 2011 17:34:49 +0100 Subject: [PATCH 673/681] viewmanager typo bzr revid: al@openerp.com-20110324163449-26amfxhsx03h72jg --- addons/base/static/openerp/js/base_views.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/base/static/openerp/js/base_views.js b/addons/base/static/openerp/js/base_views.js index 913456053d3..5032967c3c7 100644 --- a/addons/base/static/openerp/js/base_views.js +++ b/addons/base/static/openerp/js/base_views.js @@ -43,9 +43,9 @@ openerp.base.ViewManager = openerp.base.Controller.extend({ on_mode_switch: function(view_type) { for (var i in this.views) { if(i == view_type) { - this.views.i.controller.$element.show(); + this.views[i].controller.$element.show(); } else { - this.views.i.controller.$element.hide(); + this.views[i].controller.$element.hide(); } } }, @@ -72,14 +72,14 @@ openerp.base.ViewManager = openerp.base.Controller.extend({ controller.start(); this.views.tree = { view_id: view_id, controller: controller }; this.$element.find(prefix_id + "_button_tree").bind('click',function(){ - this.on_mode_switch("tree"); + self.on_mode_switch("tree"); }); } else if(action.views[i][1] == "form") { controller = new openerp.base.FormView(this.session, this.element_id + "_view_form", this.dataset, view_id); controller.start(); this.views.form = { view_id: view_id, controller: controller }; this.$element.find(prefix_id + "_button_form").bind('click',function(){ - this.on_mode_switch("form"); + self.on_mode_switch("form"); }); } } From 196f6f6ec8f0319ddccc4aff1580a272e2179525 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 24 Mar 2011 21:08:58 +0100 Subject: [PATCH 674/681] [FIX] Using js keywords for object keys is a bad idea (of fme) bzr revid: fme@openerp.com-20110324200858-36lh8ioqdd2m6su1 --- addons/base/static/openerp/base.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/base/static/openerp/base.xml b/addons/base/static/openerp/base.xml index 094b732a928..4ea928f26a3 100644 --- a/addons/base/static/openerp/base.xml +++ b/addons/base/static/openerp/base.xml @@ -206,9 +206,9 @@
      - -