diff --git a/addons/base_contact/test/base_contact00.yml b/addons/base_contact/test/base_contact00.yml index 335f525f92f..c6a4ed9e057 100644 --- a/addons/base_contact/test/base_contact00.yml +++ b/addons/base_contact/test/base_contact00.yml @@ -55,7 +55,7 @@ Now I will check that the new job is assigned properly to contact or not - !assert {model: res.partner.contact, id: res_partner_contact_williams0}: - - len(job_ids) > 2 + - len(job_ids) >= 2 - | In order to check contacts working at several addresses for different partners I will create contact with 2 different addresses diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py index e13a428138a..db5aa168bbb 100644 --- a/addons/crm/crm_opportunity.py +++ b/addons/crm/crm_opportunity.py @@ -70,6 +70,20 @@ class crm_opportunity(osv.osv): self.log(cr, uid, id, message) return res + def case_mark_lost(self, cr, uid, ids, *args): + """Mark the case as lost: state = done and probability = 0% + @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 ids: List of case Ids + @param *args: Tuple Value for additional Params + """ + res = self.write(cr, uid, ids, {'probability' : 0.0, 'state': 'done'}) + for (id, name) in self.name_get(cr, uid, ids): + message = _('Opportunity ') + " '" + name + "' "+ _("is Lost.") + self.log(cr, uid, id, message) + return res + def case_cancel(self, cr, uid, ids, *args): """Overrides cancel for crm_case for setting probability @param self: The object pointer @@ -80,9 +94,6 @@ class crm_opportunity(osv.osv): """ res = super(crm_opportunity, self).case_cancel(cr, uid, ids, args) self.write(cr, uid, ids, {'probability' : 0.0}) - for (id, name) in self.name_get(cr, uid, ids): - message = _('Opportunity ') + " '" + name + "' "+ _("is Lost.") - self.log(cr, uid, id, message) return res def case_open(self, cr, uid, ids, *args): diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml index 4bcdb8afa49..5c3f3ffa8e1 100644 --- a/addons/crm/crm_opportunity_view.xml +++ b/addons/crm/crm_opportunity_view.xml @@ -65,8 +65,11 @@ - + + @@ -74,18 +77,18 @@ states="draft,open" type="object" icon="gtk-media-pause" /> - + - @@ -224,15 +227,15 @@ - - + diff --git a/addons/crm_claim/report/crm_claim_report.py b/addons/crm_claim/report/crm_claim_report.py index 5be9d3c163b..18c6d16ed53 100644 --- a/addons/crm_claim/report/crm_claim_report.py +++ b/addons/crm_claim/report/crm_claim_report.py @@ -45,42 +45,6 @@ class crm_claim_report(osv.osv): _name = "crm.claim.report" _auto = False _description = "CRM Claim Report" - - def _get_data(self, cr, uid, ids, field_name, arg, context={}): - - """ @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of case and section Data’s IDs - @param context: A standard dictionary for contextual values """ - - res = {} - state_perc = 0.0 - avg_ans = 0.0 - - for case in self.browse(cr, uid, ids, context): - if field_name != 'avg_answers': - state = field_name[5:] - cr.execute("select count(*) from crm_opportunity where \ - section_id =%s and state='%s'"%(case.section_id.id, state)) - state_cases = cr.fetchone()[0] - perc_state = (state_cases / float(case.nbr)) * 100 - - res[case.id] = perc_state - else: - model_name = self._name.split('report.') - if len(model_name) < 2: - res[case.id] = 0.0 - else: - model_name = model_name[1] - - cr.execute("select count(*) from crm_case_log l, ir_model m \ - where l.model_id=m.id and m.model = '%s'" , model_name) - logs = cr.fetchone()[0] - - avg_ans = logs / case.nbr - res[case.id] = avg_ans - - return res _columns = { 'name': fields.char('Year', size=64, required=False, readonly=True), @@ -88,9 +52,6 @@ class crm_claim_report(osv.osv): 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), 'nbr': fields.integer('# of Cases', readonly=True), 'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True), - 'avg_answers': fields.function(_get_data, string='Avg. Answers', method=True, type="integer"), - 'perc_done': fields.function(_get_data, string='%Done', method=True, type="float"), - 'perc_cancel': fields.function(_get_data, string='%Cancel', method=True, type="float"), 'month':fields.selection([('01', 'January'), ('02', 'February'), \ ('03', 'March'), ('04', 'April'),\ ('05', 'May'), ('06', 'June'), \ @@ -137,9 +98,6 @@ class crm_claim_report(osv.osv): c.company_id, c.categ_id, count(*) as nbr, - 0 as avg_answers, - 0.0 as perc_done, - 0.0 as perc_cancel, c.priority as priority, c.type_id as type_id, date_trunc('day',c.create_date) as create_date, diff --git a/addons/crm_fundraising/report/crm_fundraising_report.py b/addons/crm_fundraising/report/crm_fundraising_report.py index 5c19689257c..8ab9e0f94be 100644 --- a/addons/crm_fundraising/report/crm_fundraising_report.py +++ b/addons/crm_fundraising/report/crm_fundraising_report.py @@ -36,42 +36,6 @@ class crm_fundraising_report(osv.osv): _name = "crm.fundraising.report" _auto = False _description = "CRM Fundraising Report" - - def _get_data(self, cr, uid, ids, field_name, arg, context={}): - - """ @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of case and section Data’s IDs - @param context: A standard dictionary for contextual values """ - - res = {} - state_perc = 0.0 - avg_ans = 0.0 - - for case in self.browse(cr, uid, ids, context): - if field_name != 'avg_answers': - state = field_name[5:] - cr.execute("select count(*) from crm_opportunity where \ - section_id =%s and state='%s'"%(case.section_id.id, state)) - state_cases = cr.fetchone()[0] - perc_state = (state_cases / float(case.nbr)) * 100 - - res[case.id] = perc_state - else: - model_name = self._name.split('report.') - if len(model_name) < 2: - res[case.id] = 0.0 - else: - model_name = model_name[1] - - cr.execute("select count(*) from crm_case_log l, ir_model m \ - where l.model_id=m.id and m.model = '%s'" , model_name) - logs = cr.fetchone()[0] - - avg_ans = logs / case.nbr - res[case.id] = avg_ans - - return res _columns = { 'name': fields.char('Year', size=64, required=False, readonly=True), @@ -79,9 +43,6 @@ class crm_fundraising_report(osv.osv): 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), 'nbr': fields.integer('# of Cases', readonly=True), 'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True), - 'avg_answers': fields.function(_get_data, string='Avg. Answers', method=True, type="integer"), - 'perc_done': fields.function(_get_data, string='%Done', method=True, type="float"), - 'perc_cancel': fields.function(_get_data, string='%Cancel', method=True, type="float"), 'month':fields.selection([('01', 'January'), ('02', 'February'), \ ('03', 'March'), ('04', 'April'),\ ('05', 'May'), ('06', 'June'), \ @@ -123,9 +84,6 @@ class crm_fundraising_report(osv.osv): c.company_id, c.partner_id, count(*) as nbr, - 0 as avg_answers, - 0.0 as perc_done, - 0.0 as perc_cancel, date_trunc('day',c.create_date) as create_date, sum(planned_revenue) as amount_revenue, sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob, diff --git a/addons/crm_helpdesk/crm_helpdesk_demo.xml b/addons/crm_helpdesk/crm_helpdesk_demo.xml index 9953d07dd92..fd31bb4c8fb 100644 --- a/addons/crm_helpdesk/crm_helpdesk_demo.xml +++ b/addons/crm_helpdesk/crm_helpdesk_demo.xml @@ -1,6 +1,61 @@ - + + + + + + + + 3 + draft + + 2010-07-04 11:10:36 + Download old version of OpenERP? + + - - + + + + + + + 3 + draft + + 2010-07-12 11:12:09 + Can not able to connect to Server + + + + + + + + + + 2 + draft + + 2010-07-12 11:13:10 + Documentation for CRM? + + + + + + + + + + + + 3 + draft + 2010-07-12 11:15:17 + How to create a new module + + + + \ No newline at end of file diff --git a/addons/crm_helpdesk/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml index 19f1d9555d5..f91da940991 100644 --- a/addons/crm_helpdesk/crm_helpdesk_view.xml +++ b/addons/crm_helpdesk/crm_helpdesk_view.xml @@ -66,8 +66,7 @@ - + diff --git a/addons/crm_helpdesk/report/crm_helpdesk_report.py b/addons/crm_helpdesk/report/crm_helpdesk_report.py index cf2578ddfaf..631e03699f2 100644 --- a/addons/crm_helpdesk/report/crm_helpdesk_report.py +++ b/addons/crm_helpdesk/report/crm_helpdesk_report.py @@ -38,51 +38,12 @@ class crm_helpdesk_report(osv.osv): _description = "Helpdesk report after Sales Services" _auto = False - def _get_data(self, cr, uid, ids, field_name, arg, context={}): - - """ @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of case and section Data’s IDs - @param context: A standard dictionary for contextual values """ - - res = {} - state_perc = 0.0 - avg_ans = 0.0 - - for case in self.browse(cr, uid, ids, context): - if field_name != 'avg_answers': - state = field_name[5:] - cr.execute("select count(*) from crm_opportunity where \ - section_id =%s and state='%s'"%(case.section_id.id, state)) - state_cases = cr.fetchone()[0] - perc_state = (state_cases / float(case.nbr)) * 100 - - res[case.id] = perc_state - else: - model_name = self._name.split('report.') - if len(model_name) < 2: - res[case.id] = 0.0 - else: - model_name = model_name[1] - - cr.execute("select count(*) from crm_case_log l, ir_model m \ - where l.model_id=m.id and m.model = '%s'" , model_name) - logs = cr.fetchone()[0] - - avg_ans = logs / case.nbr - res[case.id] = avg_ans - - return res - _columns = { 'name': fields.char('Year', size=64, required=False, readonly=True), 'user_id':fields.many2one('res.users', 'User', readonly=True), 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), 'nbr': fields.integer('# of Cases', readonly=True), 'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True), - 'avg_answers': fields.function(_get_data, string='Avg. Answers', method=True, type="integer"), - 'perc_done': fields.function(_get_data, string='%Done', method=True, type="float"), - 'perc_cancel': fields.function(_get_data, string='%Cancel', method=True, type="float"), 'month':fields.selection([('01', 'January'), ('02', 'February'), \ ('03', 'March'), ('04', 'April'),\ ('05', 'May'), ('06', 'June'), \ @@ -122,9 +83,6 @@ class crm_helpdesk_report(osv.osv): c.priority, c.date_deadline, count(*) as nbr, - 0 as avg_answers, - 0.0 as perc_done, - 0.0 as perc_cancel, to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close from crm_helpdesk c diff --git a/addons/hr_attendance/__openerp__.py b/addons/hr_attendance/__openerp__.py index 1e40f35891b..e31773fb314 100644 --- a/addons/hr_attendance/__openerp__.py +++ b/addons/hr_attendance/__openerp__.py @@ -33,6 +33,7 @@ 'depends': ['base', 'hr'], 'update_xml': [ 'security/hr_security.xml', + 'security/ir.model.access.csv', 'hr_attendance_view.xml', 'hr_attendance_wizard.xml', 'hr_attendance_report.xml', diff --git a/addons/hr_attendance/security/ir.model.access.csv b/addons/hr_attendance/security/ir.model.access.csv index c96ceff4c45..ca7faa5c6f8 100644 --- a/addons/hr_attendance/security/ir.model.access.csv +++ b/addons/hr_attendance/security/ir.model.access.csv @@ -2,5 +2,5 @@ "access_hr_action_reason_employee","hr action reason employee","model_hr_action_reason","hr_attendance.group_hr_attendance",1,0,0,0 "access_hr_action_reason_employee","hr action reason employee","model_hr_action_reason","hr.group_hr_manager",1,1,1,1 "access_hr_attendance_employee","hr attendance employee","model_hr_attendance","hr_attendance.group_hr_attendance",1,1,1,1 -"access_hr_attendance_employee","hr employee attendance sign in out","hr.model_hr_employee","hr_attendance.group_hr_attendance",1,0,0,0 +"access_hr_employee_attendance","hr employee attendance sign in out","hr.model_hr_employee","hr_attendance.group_hr_attendance",1,0,0,0 "access_hr_attendance_resource","hr resource attendance sign in out","resource.model_resource_resource","hr_attendance.group_hr_attendance",1,0,0,0 diff --git a/addons/hr_recruitment/report/hr_recruitment_report.py b/addons/hr_recruitment/report/hr_recruitment_report.py index 7c867247cd0..62011b21a04 100644 --- a/addons/hr_recruitment/report/hr_recruitment_report.py +++ b/addons/hr_recruitment/report/hr_recruitment_report.py @@ -50,7 +50,7 @@ class hr_recruitment_report(osv.osv): for case in self.browse(cr, uid, ids, context): if field_name != 'avg_answers': state = field_name[5:] - cr.execute("select count(*) from crm_opportunity where \ + cr.execute("select count(*) from crm_lead where \ section_id =%s and state='%s'"%(case.section_id.id, state)) state_cases = cr.fetchone()[0] perc_state = (state_cases / float(case.nbr)) * 100 diff --git a/addons/hr_timesheet/security/ir.model.access.csv b/addons/hr_timesheet/security/ir.model.access.csv index 3a5c509981e..2ae7f12464a 100644 --- a/addons/hr_timesheet/security/ir.model.access.csv +++ b/addons/hr_timesheet/security/ir.model.access.csv @@ -2,3 +2,4 @@ "access_hr_analytic_timesheet","hr.analytic.timesheet","model_hr_analytic_timesheet","hr.group_hr_user",1,1,1,1 "access_hr_account_analytic_line","account.account.analytic.line","account.model_account_analytic_line","hr.group_hr_user",1,1,1,0 "access_account_analytic_journal","account.account.analytic.journal","account.model_account_analytic_journal","hr.group_hr_user",1,0,0,0 +"access_product_product_user","product.product user","product.model_product_product","hr.group_hr_user",1,0,0,0 diff --git a/addons/hr_timesheet/test/test_hr_timesheet.yml b/addons/hr_timesheet/test/test_hr_timesheet.yml index 2a94e440265..2b5a924805a 100644 --- a/addons/hr_timesheet/test/test_hr_timesheet.yml +++ b/addons/hr_timesheet/test/test_hr_timesheet.yml @@ -99,25 +99,11 @@ self.check_state(cr, uid, [ref("hr_employee_fracline1")], {"active_ids": [ref("hr_timesheet.menu_hr_timesheet_sign_in")]}) - | I select start date and Perform start work on project. -- - !record {model: hr.sign.in.project, id: hr_sign_in_project_francline0}: - emp_id: 'hr_employee_fracline1' - name: Francline - server_date: '2010-06-08 19:50:54' - state: absent - - -- | - I click on "Start Working" button of this wizard to start work on Project. - !python {model: hr.sign.in.project}: | uid = ref('res_users_user0') - obj_attendance = self.pool.get('hr.employee') - emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Francline")]) - if emp_id: - employee = obj_attendance.read(cr, uid, emp_id)[0] - self.write(cr, uid, [ref('hr_sign_in_project_francline0')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]}) - #self.sign_in_result(cr, uid, [ref("hr_sign_in_project_francline0")], context) + new_id = self.create(cr, uid, {'emp_id': 'hr_employee_fracline1', 'name': 'Francline', 'server_date': '2010-06-08 19:50:54', 'state': 'absent'}) + self.sign_in_result(cr, uid, [new_id], context) - | My work is done and I want to stop work.for that I click on "Sign In/Sign Out" button of "Sign In/Sign Out by Project" wizard. @@ -125,33 +111,31 @@ - !python {model: hr.sign.in.project}: | uid = ref('res_users_user0') - self.check_state(cr, uid, [ref("hr_sign_in_project_francline0")], {"active_ids": [ref("hr_timesheet.menu_hr_timesheet_sign_in")] + ids = self.search(cr, uid, [('emp_id', '=', ref('hr_employee_fracline1')),('name', '=', 'Francline')]) + self.check_state(cr, uid, ids, {"active_ids": [ref("hr_timesheet.menu_hr_timesheet_sign_in")] }) - | This will Open "hr sign out project" form. I select analytical project2 development account. -- - !record {model: hr.sign.out.project, id: hr_sign_out_project_francline0}: - account_id: account.analytic_project_2_development - analytic_amount: 7.0 - date: '2010-05-25 16:40:00' - date_start: '2010-06-05 16:37:00' - info: Create Yaml for hr module - name: Francline - server_date: '2010-06-09 16:40:15' - state: present +- + For that I Creating a analytic account. +- + !record {model: account.analytic.account, id: account_analytic_account_project0}: + company_id: base.main_company + name: Project2 + parent_id: account.analytic_root + quantity_max: 0.0 + state: open - | My work for this project is over and I stop work by click on "Stop Work" button of this wizard. - !python {model: hr.sign.out.project}: | + import time + from datetime import datetime, date, timedelta uid = ref('res_users_user0') - obj_attendance = self.pool.get('hr.employee') - emp_id = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Francline")]) - if emp_id: - employee = obj_attendance.read(cr, uid, emp_id)[0] - self.write(cr, uid, [ref('hr_sign_out_project_francline0')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]}) - #self.sign_out_result_end(cr, uid, [ref('hr_sign_out_project_francline0')]) + new_id = self.create(cr, uid, {'account_id': ref('account_analytic_account_project0'), 'analytic_amount': 7.0, 'date': (datetime.now()+timedelta(1)).strftime('%Y-%m-%d %H:%M:%S'), 'date_start': '2010-06-05 16:37:00', 'info': 'Create Yaml for hr module', 'name': 'Francline', 'server_date': '2010-06-09 16:40:15', 'state': 'absent'}) + self.sign_out_result_end(cr, uid, [new_id], context) - | I can see employee timesheet for particular month using "Employee Timesheet" report. diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml index 0160d228248..b5016d5679c 100644 --- a/addons/idea/idea_view.xml +++ b/addons/idea/idea_view.xml @@ -1,6 +1,26 @@ + + + idea.category.search + idea.category + search + + + + + + + + + + + + + + + @@ -41,6 +61,7 @@ idea.category form tree,form + [[ formatLang(o.date_planned, date_time = True) ]] - [[ o.sale_ref or removeParentNode('para')]] + [[ 'sale_ref' in o._columns.keys() and o.sale_ref or removeParentNode('para') ]] - [[ o.sale_name or removeParentNode('para') ]] + [[ 'sale_name' in o._columns.keys() and o.sale_name or removeParentNode('para') ]] diff --git a/addons/mrp/wizard/__init__.py b/addons/mrp/wizard/__init__.py index aa4408e543e..be148883d10 100644 --- a/addons/mrp/wizard/__init__.py +++ b/addons/mrp/wizard/__init__.py @@ -24,6 +24,7 @@ import mrp_price import mrp_workcenter_load #import mrp_track_prod import change_production_qty +import mrp_change_standard_price # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mrp/wizard/mrp_change_standard_price.py b/addons/mrp/wizard/mrp_change_standard_price.py new file mode 100644 index 00000000000..0a5a054762b --- /dev/null +++ b/addons/mrp/wizard/mrp_change_standard_price.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from osv import fields, osv + +class change_standard_price(osv.osv_memory): + _inherit = "stock.change.standard.price" + _description = "Change Standard Price" + + _columns = { + 'change_parent_price': fields.boolean('Change Parent Price'), + } + + + def change_price(self, cr, uid, ids, context): + """ Changes the Standard Price of Parent Product according to BoM + only when the field 'change_parent_price' is True. + And creates an account move accordingly. + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param ids: List of IDs selected + @param context: A standard dictionary + @return: + """ + res = self.browse(cr, uid, ids) + context.update({'change_parent_price': res[0].change_parent_price}) + return super(change_standard_price, self).change_price(cr, uid, ids, context=context) + +change_standard_price() diff --git a/addons/mrp/wizard/mrp_change_standard_price_view.xml b/addons/mrp/wizard/mrp_change_standard_price_view.xml new file mode 100644 index 00000000000..6c9b2059aca --- /dev/null +++ b/addons/mrp/wizard/mrp_change_standard_price_view.xml @@ -0,0 +1,17 @@ + + + + + Change Standard Price (Inherit) + stock.change.standard.price + + form + + + + + + + + + diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml index fb4d728f4da..5c626b24814 100644 --- a/addons/mrp_operations/mrp_operations_view.xml +++ b/addons/mrp_operations/mrp_operations_view.xml @@ -4,6 +4,41 @@ + + + mrp.production.form.inherit + mrp.production + form + + + + + + + + + + + + + + + + + + mrp.production.form.inherit2 + mrp.production + form + + + + + + + + + + mrp.production.workcenter.line.tree mrp.production.workcenter.line @@ -150,7 +185,7 @@ - + Work Orders @@ -158,21 +193,9 @@ mrp.production.workcenter.line form tree,form,gantt,calendar,graph - [('id','=',active_id)] - - - - All Work Orders - ir.actions.act_window - mrp.production.workcenter.line - form - tree,form,graph,calendar,gantt - - - Work Orders Planning ir.actions.act_window diff --git a/addons/purchase_requisition/test/purchase_requisition_exclusive.yml b/addons/purchase_requisition/test/purchase_requisition_exclusive.yml index 84a6bb0d68f..32c47836f23 100644 --- a/addons/purchase_requisition/test/purchase_requisition_exclusive.yml +++ b/addons/purchase_requisition/test/purchase_requisition_exclusive.yml @@ -50,7 +50,7 @@ - !workflow {model: sale.order, action: order_confirm, ref: sale_order_testtender1} - - I launch he scheduler to compute all procurements, and planify all requisitions orders. + I launch the scheduler to compute all procurements, and planify all requisitions orders. - !python {model: procurement.order.compute.all}: | proc_obj = self.pool.get('procurement.order') @@ -109,4 +109,4 @@ ids =req_obj.search(cr, uid, [('origin','=','Laptop ACER1')]) purchase_id= self.search(cr, uid, [('partner_id','=',partner_id),('requisition_id','in',ids)])[0] state=self.browse(cr,uid,purchase_id).state - assert (state=='cancel') \ No newline at end of file + assert (state=='cancel') diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 2cef2799fae..e93bcdd34ad 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -251,7 +251,7 @@ class sale_order(osv.osv): 'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft': [('readonly', False)]}), 'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoices', help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."), 'picking_ids': fields.one2many('stock.picking', 'sale_id', 'Related Picking', readonly=True, help="This is the list of picking list that have been generated for this invoice"), - 'shipped': fields.boolean('Picked', readonly=True, help="It indicates that a picking has been done.It will set to True if the ordered quantities are available and the picking is done.If the ordered quantities are not available it generates a Purchase/Manufacturing order.Unless its Picking and Purchase/Manufacturing order are not in the done state it wont be set to True"), + 'shipped': fields.boolean('Picked', readonly=True, help="It indicates that a picking has been done. It will be set to True if the ordered quantities are available and the picking is done. If the ordered quantities are not available it generates a Purchase/Manufacturing order. Unless its Picking and Purchase/Manufacturing order are not in the done state it wont be set to True"), 'picked_rate': fields.function(_picked_rate, method=True, string='Picked', type='float'), 'invoiced_rate': fields.function(_invoiced_rate, method=True, string='Invoiced', type='float'), 'invoiced': fields.function(_invoiced, method=True, string='Paid', @@ -1198,4 +1198,4 @@ class sale_config_picking_policy(osv.osv_memory): self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'transparent'}) sale_config_picking_policy() -# 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/sale/test/sale_procurement.yml b/addons/sale/test/sale_procurement.yml index 2475c7bdceb..4e7d2162421 100644 --- a/addons/sale/test/sale_procurement.yml +++ b/addons/sale/test/sale_procurement.yml @@ -87,4 +87,4 @@ !python {model: procurement.order}: | from tools.translate import _ proc_ids = self.search(cr, uid, [('state','=','exception'),('product_id','=',ref('sale.product_product_table0'))]) - assert proc_ids, _('No Procurements are in exception state for the table!') + assert not proc_ids, _('There is no procurement in exception state!') diff --git a/addons/sale_crm/board_sale_crm_view.xml b/addons/sale_crm/board_sale_crm_view.xml index b28d7a9c35d..34156147d81 100644 --- a/addons/sale_crm/board_sale_crm_view.xml +++ b/addons/sale_crm/board_sale_crm_view.xml @@ -54,8 +54,8 @@ @@ -74,8 +74,8 @@ - + @@ -78,10 +78,10 @@ - - - - + + + + @@ -378,7 +378,7 @@ - + @@ -391,9 +391,10 @@ - - - + + + + @@ -474,5 +475,19 @@ + + + sale.order.journal.search + sale.order + search + + + + + + + + + diff --git a/addons/stock/report/packing.rml b/addons/stock/report/packing.rml index 3edb83921a0..07c8758b8c0 100644 --- a/addons/stock/report/packing.rml +++ b/addons/stock/report/packing.rml @@ -276,9 +276,9 @@ - [[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]] - Non Assigned Products: [[ ( line.state == 'assigned' or line.state == 'done' or line.state == 'confirmed' ) and removeParentNode('para') ]] - [[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]] + [[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]] + Non Assigned Products: [[ ( move_lines.state == 'assigned' or move_lines.state == 'done' or move_lines.state == 'confirmed' ) and removeParentNode('para') ]] + [[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]] [[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]] diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 68bae72ba84..677cdfbcfc0 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -268,9 +268,9 @@ - [[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]] - Non Assigned Products: [[ ( line.state == 'assigned' or line.state == 'done' or line.state == 'confirmed' ) and removeParentNode('para') ]] - [[ (line.state == 'done' or line.state == 'confirmed') and removeParentNode('para') ]] + [[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]] + Non Assigned Products: [[ ( move_lines.state == 'assigned' or move_lines.state == 'done' or move_lines.state == 'confirmed' ) and removeParentNode('para') ]] + [[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]] [[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]] diff --git a/addons/stock_location/__openerp__.py b/addons/stock_location/__openerp__.py index 96e5bfe41ba..e80b00fc7ad 100644 --- a/addons/stock_location/__openerp__.py +++ b/addons/stock_location/__openerp__.py @@ -43,7 +43,7 @@ This module may be useful for different purposes: 'demo_xml': [], 'installable': True, 'test':[ -# 'test/stock_location.yml' + 'test/stock_location.yml' ], 'active': False, 'certificate': '0046505115101', diff --git a/addons/stock_location/test/stock_location.yml b/addons/stock_location/test/stock_location.yml index 40c34b8b0ec..e3040b6e75b 100644 --- a/addons/stock_location/test/stock_location.yml +++ b/addons/stock_location/test/stock_location.yml @@ -159,7 +159,7 @@ country_id: base.in partner_id: res_partner_microlinktechnologies0 street: Ash House, Ash Road - title: Ms. + title: base.res_partner_title_miss -