From 683cf35070c9723099fe3b90ddcbe7de2e0a57c9 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 14 Sep 2010 13:36:35 +0000 Subject: [PATCH 001/305] 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/305] [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/305] [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/305] [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/305] [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/305] [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/305] [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/305] [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/305] [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/305] [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/305] [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/305] [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 2caa4c37b357130f6592d2c233613eab6c0a3d36 Mon Sep 17 00:00:00 2001 From: mtr Date: Wed, 2 Feb 2011 15:24:46 +0530 Subject: [PATCH 015/305] [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 016/305] [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 017/305] [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 018/305] [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 019/305] [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 020/305] [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 021/305] [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 022/305] [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 023/305] [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 @@ -