@@ -298,8 +295,5 @@
-
-
-
\ No newline at end of file
diff --git a/addons/hr_payroll/report/report_year_salary.py b/addons/hr_payroll/report/report_year_salary.py
index 4d0e0aa670c..0a7857582d4 100755
--- a/addons/hr_payroll/report/report_year_salary.py
+++ b/addons/hr_payroll/report/report_year_salary.py
@@ -43,6 +43,9 @@ class year_salary_report(rml_parse.rml_parse):
cm = 0
cy = ly
cm = cm +1
+ for c in range(0,(12-no_months)):
+ mnth_name.append('None')
+ self.mnths.append('None')
return [mnth_name]
def get_employee(self,form):
@@ -58,11 +61,14 @@ class year_salary_report(rml_parse.rml_parse):
ls1.append(emp_id.name)
tol = 0.0
for mnth in self.mnths:
- if len(mnth) != 7:
- mnth = '0' + str(mnth)
- query = "select net from hr_payslip where employee_id = "+str(emp_id.id)+" and to_char(date,'mm-yyyy') like '%"+mnth+"%' and state = 'done' "
- self.cr.execute(query)
- sal = self.cr.fetchall()
+ if mnth <> 'None':
+ if len(mnth) != 7:
+ mnth = '0' + str(mnth)
+ query = "select net from hr_payslip where employee_id = "+str(emp_id.id)+" and to_char(date,'mm-yyyy') like '%"+mnth+"%' and state = 'done' "
+ self.cr.execute(query)
+ sal = self.cr.fetchall()
+ else:
+ sal = [(0.0,)]
try:
ls1.append(sal[0][0])
except:
diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py
index 75ad6101e11..84e7db409ab 100644
--- a/addons/hr_timesheet/hr_timesheet.py
+++ b/addons/hr_timesheet/hr_timesheet.py
@@ -33,6 +33,29 @@ class hr_employee(osv.osv):
'product_id': fields.many2one('product.product', 'Product', help="Specifies employee's designation as a product with type 'service'."),
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal')
}
+
+ def _getAnalyticJournal(self, cr, uid, context=None):
+ md = self.pool.get('ir.model.data')
+ try:
+ result = md.get_object_reference(cr, uid, 'hr_timesheet', 'analytic_journal')
+ return result[1]
+ except ValueError, e:
+ pass
+ return False
+
+ def _getEmployeeProduct(self, cr, uid, context=None):
+ md = self.pool.get('ir.model.data')
+ try:
+ result = md.get_object_reference(cr, uid, 'hr_timesheet', 'product_consultant')
+ return result[1]
+ except ValueError, e:
+ pass
+ return False
+
+ _defaults = {
+ 'journal_id' : _getAnalyticJournal,
+ 'product_id' : _getEmployeeProduct
+ }
hr_employee()
diff --git a/addons/hr_timesheet/hr_timesheet_data.xml b/addons/hr_timesheet/hr_timesheet_data.xml
index 08a769d7ee6..e7cb3d5e0d4 100644
--- a/addons/hr_timesheet/hr_timesheet_data.xml
+++ b/addons/hr_timesheet/hr_timesheet_data.xml
@@ -6,5 +6,17 @@
Timesheet Journalgeneral
+
+
+ 75.0
+ 30.0
+
+
+ Service on Timesheet
+
+ service
+
+
+
diff --git a/addons/hr_timesheet/hr_timesheet_demo.xml b/addons/hr_timesheet/hr_timesheet_demo.xml
index f344b60c83e..e7ba5c91342 100644
--- a/addons/hr_timesheet/hr_timesheet_demo.xml
+++ b/addons/hr_timesheet/hr_timesheet_demo.xml
@@ -2,20 +2,6 @@
-
- DEV
- 75.0
- 30.0
-
-
- Consultancy - Senior Developer
-
- service
- produce
- make_to_order
-
-
-
diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml
index a47fbf24685..664587b75a3 100644
--- a/addons/hr_timesheet/hr_timesheet_view.xml
+++ b/addons/hr_timesheet/hr_timesheet_view.xml
@@ -111,7 +111,7 @@
-
+
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
index 7f79051edce..f605fd760be 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py
@@ -63,7 +63,8 @@ class account_analytic_account(osv.osv):
_inherit = "account.analytic.account"
_columns = {
- 'pricelist_id' : fields.many2one('product.pricelist', 'Sale Pricelist'),
+ 'pricelist_id' : fields.many2one('product.pricelist', 'Sale Pricelist',
+ help="The product to invoice is defined on the employee form, the price will be deduced by this pricelist on the product."),
'amount_max': fields.float('Max. Invoice Price'),
'amount_invoiced': fields.function(_invoiced_calc, method=True, string='Invoiced Amount',
help="Total invoiced"),
diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
index 4beda0999d0..4a70a80f381 100644
--- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
+++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml
@@ -80,7 +80,7 @@
-
+
@@ -112,7 +112,7 @@
- Costs to Invoice
+ Bill Tasks Worksaccount.analytic.lineformtree,form
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 1bb7765b372..475315068ae 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
@@ -35,31 +35,14 @@ class hr_timesheet_invoice_create(osv.osv_memory):
_name = 'hr.timesheet.invoice.create'
_description = 'Create invoice from timesheet'
_columns = {
- 'accounts': fields.many2many('account.analytic.account', 'invoice_id', 'account_id', 'Analytic Accounts', required=True),
'date': fields.boolean('Date', help='The real date of each work will be displayed on the invoice'),
'time': fields.boolean('Time spent', help='The time of each work done will be displayed on the invoice'),
'name': fields.boolean('Description', help='The detail of each work done will be displayed on the invoice'),
'price': fields.boolean('Cost', help='The cost of each work done will be displayed on the invoice. You probably don\'t want to check this'),
'product': fields.many2one('product.product', 'Product', help='Complete this field only if you want to force to use a specific product. Keep empty to use the real product that comes from the cost.'),
- }
-
- def _get_accounts(self, cr, uid, context=None):
- if context is None:
- context = {}
- if not len(context['active_ids']):
- return {}
- #Checking whether the analytic line is invoiced or not
- analytic_line_obj = self.pool.get('account.analytic.line').browse(cr, uid, context['active_ids'], context=context)
- for obj_acc in analytic_line_obj:
- if obj_acc.invoice_id and obj_acc.invoice_id.state !='cancel':
- raise osv.except_osv(_('Warning'),_('The analytic entry "%s" is already invoiced!')%(obj_acc.name,))
-
- cr.execute("SELECT distinct(account_id) from account_analytic_line where id IN %s",(tuple(context['active_ids']),))
- account_ids = cr.fetchall()
- return [x[0] for x in account_ids]
+ }
_defaults = {
- 'accounts': _get_accounts,
'date': lambda *args: 1,
'name': lambda *args: 1
}
@@ -82,12 +65,17 @@ class hr_timesheet_invoice_create(osv.osv_memory):
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
res = mod_obj.read(cr, uid, result, ['res_id'], context=context)
data = self.read(cr, uid, ids, [], context=context)[0]
- account_ids = data['accounts']
+
+ 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']
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):
raise osv.except_osv(_('Analytic Account incomplete'),
- _('Please fill in the Associate Partner and Sale Pricelist fields in the Analytic Account:\n%s') % (account.name,))
+ _('Please fill in the Partner or Customer and Sale Pricelist fields in the Analytic Account:\n%s') % (account.name,))
if not partner.address:
raise osv.except_osv(_('Partner incomplete'),
@@ -190,7 +178,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
invoice_line_obj.create(cr, uid, curr_line, context=context)
cr.execute("update account_analytic_line set invoice_id=%s WHERE account_id = %s and id IN %s" ,(last_invoice, account.id, tuple(context['active_ids'])))
- invoice_obj.button_reset_taxes(cr, uid, [last_invoice], context)
+ invoice_obj.button_reset_taxes(cr, uid, [last_invoice], context)
mod_obj = self.pool.get('ir.model.data')
act_obj = self.pool.get('ir.actions.act_window')
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml
index 7b3f5ed4d6a..b45deeae8a2 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_final_view.xml
@@ -20,7 +20,7 @@
-
+
@@ -46,4 +46,4 @@
-
\ No newline at end of file
+
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml
index fc6d6da911e..c02215cf742 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create_view.xml
@@ -10,23 +10,23 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/addons/hr_timesheet_sheet/__openerp__.py b/addons/hr_timesheet_sheet/__openerp__.py
index 1b554a6b242..7b114d46387 100644
--- a/addons/hr_timesheet_sheet/__openerp__.py
+++ b/addons/hr_timesheet_sheet/__openerp__.py
@@ -53,7 +53,6 @@ The validation can be configured in the company:
'hr_timesheet_sheet_view.xml',
'hr_timesheet_workflow.xml',
'process/hr_timesheet_sheet_process.xml',
- 'report/timesheet_report_view.xml',
'board_hr_timesheet_view.xml',
'report/hr_timesheet_report_view.xml',
'wizard/hr_timesheet_current_view.xml',
diff --git a/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml b/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml
index f299cb94298..a50042c3dfb 100644
--- a/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml
+++ b/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml
@@ -1,7 +1,9 @@
-
+
-
- Timesheets by Month
- ir.actions.act_window
- timesheet.report
- form
- graph,tree
- [('user_id','=',uid), ('month', '=' , time.strftime('%m')), ('year', '=', time.strftime('%Y'))]
-
-
-
Timesheetsir.actions.act_window
@@ -28,39 +20,6 @@
-
- Employee Attendance Graph
- timesheet.report
- graph
-
-
-
-
-
-
-
-
-
-
- Employee Attendance Graph
- timesheet.report
- form
- graph
-
-
-
-
- board.hr.timesheet.form
- board.board
-
- form
-
-
-
-
-
-
-
hr.timesheet.sheet.tree.simplified.boardhr_timesheet_sheet.sheet
diff --git a/addons/hr_timesheet_sheet/report/__init__.py b/addons/hr_timesheet_sheet/report/__init__.py
index b06b0608356..8dac73f07ec 100644
--- a/addons/hr_timesheet_sheet/report/__init__.py
+++ b/addons/hr_timesheet_sheet/report/__init__.py
@@ -19,7 +19,5 @@
#
##############################################################################
-import timesheet_report
import hr_timesheet_report
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report.py b/addons/hr_timesheet_sheet/report/timesheet_report.py
deleted file mode 100644
index 6688c747983..00000000000
--- a/addons/hr_timesheet_sheet/report/timesheet_report.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as
-# published by the Free Software Foundation, either version 3 of the
-# License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-import tools
-from osv import fields,osv
-
-class timesheet_report(osv.osv):
- _name = "timesheet.report"
- _description = "Timesheet"
- _auto = False
- _columns = {
- 'year': fields.char('Year',size=64,required=False, readonly=True),
- 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
- ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
- ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
- 'day': fields.char('Day', size=128, readonly=True),
- 'name': fields.char('Description', size=64,readonly=True),
- 'product_id' : fields.many2one('product.product', 'Product'),
- 'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
- 'employee_id': fields.many2one('hr.employee', 'Employee',readonly=True),
- 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Type of Invoicing',readonly=True),
- 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
- 'nbr': fields.integer('#Nbr',readonly=True),
- 'total_diff': fields.float('#Total Diff',readonly=True),
- 'total_timesheet': fields.float('#Total Timesheet',readonly=True),
- 'total_attendance': fields.float('#Total Attendance',readonly=True),
- 'company_id': fields.many2one('res.company', 'Company',readonly=True),
- 'department_id':fields.many2one('hr.department','Department',readonly=True),
- 'date_from': fields.date('Date from',readonly=True,),
- 'date_to': fields.date('Date to',readonly=True),
- 'date_current': fields.date('Current date', required=True),
- 'state' : fields.selection([
- ('new', 'New'),
- ('draft','Draft'),
- ('confirm','Confirmed'),
- ('done','Done')], 'State', readonly=True),
- 'quantity': fields.float('#Quantity',readonly=True),
- 'cost': fields.float('#Cost',readonly=True),
- }
-
- def init(self, cr):
- tools.drop_view_if_exists(cr, 'timesheet_report')
- cr.execute("""
- create or replace view timesheet_report as (
- select
- min(aal.id) as id,
- htss.date_current,
- htss.name,
- htss.date_from,
- htss.date_to,
- to_char(htss.date_current,'YYYY') as year,
- to_char(htss.date_current,'MM') as month,
- to_char(htss.date_current, 'YYYY-MM-DD') as day,
- count(*) as nbr,
- aal.unit_amount as quantity,
- aal.amount as cost,
- aal.account_id,
- aal.product_id,
- (SELECT sum(day.total_difference)
- FROM hr_timesheet_sheet_sheet AS sheet
- LEFT JOIN hr_timesheet_sheet_sheet_day AS day
- ON (sheet.id = day.sheet_id
- AND day.name = sheet.date_current) where sheet.id=htss.id) as total_diff,
- (SELECT sum(day.total_timesheet)
- FROM hr_timesheet_sheet_sheet AS sheet
- LEFT JOIN hr_timesheet_sheet_sheet_day AS day
- ON (sheet.id = day.sheet_id
- AND day.name = sheet.date_current) where sheet.id=htss.id) as total_timesheet,
- (SELECT sum(day.total_attendance)
- FROM hr_timesheet_sheet_sheet AS sheet
- LEFT JOIN hr_timesheet_sheet_sheet_day AS day
- ON (sheet.id = day.sheet_id
- AND day.name = sheet.date_current) where sheet.id=htss.id) as total_attendance,
- aal.to_invoice,
- aal.general_account_id,
- htss.employee_id as employee_id,
- htss.company_id,
- htss.department_id,
- htss.state
- from hr_timesheet_sheet_sheet as htss
- left join hr_analytic_timesheet as hat ON (hat.create_uid=htss.create_uid)
- left join account_analytic_line as aal ON (hat.line_id=aal.id)
- group by
- to_char(htss.date_current,'YYYY'),
- to_char(htss.date_current,'MM'),
- to_char(htss.date_current, 'YYYY-MM-DD'),
- aal.account_id,
- htss.date_from,
- htss.date_to,
- aal.unit_amount,
- aal.amount,
- htss.date_current,
- aal.to_invoice,
- aal.product_id,
- aal.general_account_id,
- htss.name,
- htss.company_id,
- htss.state,
- htss.id,
- htss.department_id,
- htss.employee_id
-
- )
- """)
-timesheet_report()
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
deleted file mode 100644
index 34397ba1c7d..00000000000
--- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
- timesheet.report.graph
- timesheet.report
- graph
-
-
-
-
-
-
-
-
-
- timesheet.report.tree
- timesheet.report
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- timesheet.report.search
- timesheet.report
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Timesheet Sheet Analysis
- timesheet.report
- form
- tree,graph
- {'search_default_month':1,'search_default_Employee_id':1,'group_by_no_leaf':1,'group_by':[]}
-
-
-
-
-
diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml
index f7ddb8bf504..456c4dd1f7a 100644
--- a/addons/idea/idea_view.xml
+++ b/addons/idea/idea_view.xml
@@ -65,7 +65,7 @@
+ id="base.menu_lunch_survey_root" sequence="20" groups="base.group_tool_manager"/>
@@ -90,7 +90,8 @@
+ action="action_idea_select"
+ groups="base.group_tool_user"/>
@@ -382,12 +383,12 @@
formgraph,tree
-
+
+ id="menu_idea_vote_stat" action="action_idea_vote_stat" groups="base.group_tool_user"/>
diff --git a/addons/idea/report/report_vote_view.xml b/addons/idea/report/report_vote_view.xml
index 8418377065c..c68c829794b 100644
--- a/addons/idea/report/report_vote_view.xml
+++ b/addons/idea/report/report_vote_view.xml
@@ -91,7 +91,7 @@
{'search_default_User':1,'search_default_State':1,'group_by_no_leaf':1,'group_by':[]}
-
+
diff --git a/addons/idea/security/idea_security.xml b/addons/idea/security/idea_security.xml
index ef377c799c9..4b060c51e6c 100644
--- a/addons/idea/security/idea_security.xml
+++ b/addons/idea/security/idea_security.xml
@@ -2,10 +2,6 @@
-
- Sales / User
-
-
Tools / Manager
@@ -13,7 +9,6 @@
Tools / User
-
diff --git a/addons/idea/security/ir.model.access.csv b/addons/idea/security/ir.model.access.csv
index 30dc0850c3f..b76cc9bd58a 100644
--- a/addons/idea/security/ir.model.access.csv
+++ b/addons/idea/security/ir.model.access.csv
@@ -1,26 +1,8 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_idea_category","idea.category","model_idea_category","base.group_user",1,1,1,1
-"access_idea_idea","idea.idea","model_idea_idea","base.group_user",1,1,1,1
-"access_idea_vote","idea.vote","model_idea_vote","base.group_user",1,1,1,1
-"access_idea_vote_stat","idea.vote.stat","model_idea_vote_stat","base.group_user",1,1,1,1
-"access_idea_category_system","idea.category system","model_idea_category","base.group_system",1,1,1,1
-"access_idea_comment","idea.comment","model_idea_comment","base.group_system",1,1,1,1
-"access_idea_comment_base_user","idea.comment.base.user","model_idea_comment","base.group_user",1,1,1,1
-"access_report_vote","report.vote","model_report_vote","base.group_user",1,1,1,1
-"access_idea_idea_sale_salesman","idea.idea.sale","model_idea_idea","base.group_sale_salesman",1,1,1,1
-"access_idea_vote_sale_salesman","idea.vote.sale","model_idea_vote","base.group_sale_salesman",1,1,1,1
"access_idea_category_user","idea.category user","model_idea_category","base.group_tool_user",1,1,1,1
"access_idea_idea_user","idea.idea user","model_idea_idea","base.group_tool_user",1,1,1,1
"access_idea_vote_user","idea.vote user","model_idea_vote","base.group_tool_user",1,1,1,1
-"access_idea_category_manager","idea.category manager","model_idea_category","base.group_tool_manager",1,1,1,1
-"access_idea_idea_manager","idea.idea manager","model_idea_idea","base.group_tool_manager",1,1,1,1
"access_idea_vote_manager","idea.vote manager","model_idea_vote","base.group_tool_manager",1,1,1,1
"access_idea_vote_stat_user","idea.vote.stat user","model_idea_vote_stat","base.group_tool_user",1,1,1,1
"access_idea_comment_user","idea.comment user","model_idea_comment","base.group_tool_user",1,1,1,1
"access_report_vote_manager","report.vote manager","model_report_vote","base.group_tool_manager",1,1,1,1
-"access_idea_idea_system","idea.idea system","model_idea_idea","base.group_system",1,0,0,0
-"access_idea_vote_system","idea.vote system","model_idea_vote","base.group_system",1,0,0,0
-"access_report_vote_system","report.vote system","model_report_vote","base.group_system",1,0,0,0
-"access_idea_vote_stat_manager","idea.vote.stat manager","model_idea_vote_stat","base.group_tool_manager",1,1,1,1
-"access_idea_vote_stat_system","idea.vote.stat system","model_idea_vote_stat","base.group_system",1,1,1,1
-"access_idea_comment_manager","idea.comment.manager","model_idea_comment","base.group_tool_manager",1,1,1,1
diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml
index 6b0e4c4b8c7..0ecdea5c017 100644
--- a/addons/lunch/lunch_view.xml
+++ b/addons/lunch/lunch_view.xml
@@ -6,14 +6,14 @@
id="menu_lunch" sequence="1" />
+ id="base.menu_lunch_reporting" sequence="6" groups="base.group_tool_manager"/>
+ id="base.menu_lunch_survey_root" sequence="20" groups="base.group_tool_manager"/>
diff --git a/addons/lunch/security/ir.model.access.csv b/addons/lunch/security/ir.model.access.csv
index b936b26a55e..59670a8d1b1 100644
--- a/addons/lunch/security/ir.model.access.csv
+++ b/addons/lunch/security/ir.model.access.csv
@@ -1,20 +1,8 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_lunch_category","lunch.category","model_lunch_category","base.group_user",1,1,1,1
-"access_lunch_product","lunch.product","model_lunch_product","base.group_user",1,1,1,1
-"access_lunch_cashbox","lunch.cashbox","model_lunch_cashbox","base.group_user",1,1,1,1
-"access_lunch_order","lunch.order","model_lunch_order","base.group_user",1,1,1,1
-"access_report_lunch_amount","report.lunch.amount","model_report_lunch_amount","base.group_user",1,1,1,1
-"access_lunch_order_sale_salesman","lunch.order.sale","model_lunch_order","base.group_sale_salesman",1,1,1,1
"access_lunch_order_user","lunch.order user","model_lunch_order","base.group_tool_user",1,1,1,1
-"access_lunch_order_manager","lunch.order manager","model_lunch_order","base.group_tool_manager",1,1,1,1
"access_lunch_cashmove_user","lunch.cashmove user","model_lunch_cashmove","base.group_tool_user",1,1,1,1
-"access_lunch_cashmove_manager","lunch.cashmove manager","model_lunch_cashmove","base.group_tool_manager",1,1,1,1
"access_report_lunch_amount_manager","report.lunch.amount manager","model_report_lunch_amount","base.group_tool_manager",1,1,1,1
-"access_lunch_category_system","lunch.category system","model_lunch_category","base.group_system",1,1,1,1
-"access_lunch_product_system","lunch.product system","model_lunch_product","base.group_system",1,1,1,1
-"access_lunch_cashbox_system","lunch.cashbox system","model_lunch_cashbox","base.group_system",1,1,1,1
-"access_lunch_order_system","lunch.order system","model_lunch_order","base.group_system",1,0,0,0
-"access_lunch_cashmove_system","lunch.cashmove system","model_lunch_cashmove","base.group_system",1,0,0,0
+"access_lunch_category_manager","lunch.category.user","model_lunch_category","base.group_tool_user",1,1,1,1
"access_report_lunch_order_manager","report.lunch.order manager","model_report_lunch_order","base.group_tool_manager",1,1,1,1
"access_lunch_product_user","lunch.product user","model_lunch_product","base.group_tool_user",1,1,1,1
"access_lunch_cashbox_user","lunch.cashbox user","model_lunch_cashbox","base.group_tool_user",1,1,1,1
diff --git a/addons/lunch/security/lunch_security.xml b/addons/lunch/security/lunch_security.xml
index 6c3559fa138..0014f38182b 100644
--- a/addons/lunch/security/lunch_security.xml
+++ b/addons/lunch/security/lunch_security.xml
@@ -2,9 +2,6 @@
-
- Sales / User
- Tools / Manager
diff --git a/addons/lunch/wizard/lunch_order_cancel_view.xml b/addons/lunch/wizard/lunch_order_cancel_view.xml
index d47cc6d8ee9..e50f4ad222c 100644
--- a/addons/lunch/wizard/lunch_order_cancel_view.xml
+++ b/addons/lunch/wizard/lunch_order_cancel_view.xml
@@ -34,7 +34,7 @@
+ view_mode="form" target="new" view_type="form"/>
diff --git a/addons/lunch/wizard/lunch_order_confirm_view.xml b/addons/lunch/wizard/lunch_order_confirm_view.xml
index dabcd7d5e84..eba7d12c846 100644
--- a/addons/lunch/wizard/lunch_order_confirm_view.xml
+++ b/addons/lunch/wizard/lunch_order_confirm_view.xml
@@ -36,7 +36,7 @@
+ view_mode="form" target="new" view_type="form"/>
diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml
index 614055dddcd..b23826969a8 100644
--- a/addons/marketing_campaign/marketing_campaign_view.xml
+++ b/addons/marketing_campaign/marketing_campaign_view.xml
@@ -36,10 +36,10 @@
+
-
@@ -161,9 +161,9 @@
+
-
@@ -382,9 +382,9 @@
+
-
diff --git a/addons/membership/membership_view.xml b/addons/membership/membership_view.xml
index ad9c3bcf772..afa1ee9bebe 100644
--- a/addons/membership/membership_view.xml
+++ b/addons/membership/membership_view.xml
@@ -140,7 +140,8 @@
parent="menu_membership"
id="menu_membership_products"
action="action_membership_products"
- sequence="1"/>
+ sequence="1"
+ groups="base.group_partner_manager"/>
diff --git a/addons/membership/report/report_membership_view.xml b/addons/membership/report/report_membership_view.xml
index abe8b44bcba..291efee4834 100644
--- a/addons/membership/report/report_membership_view.xml
+++ b/addons/membership/report/report_membership_view.xml
@@ -116,7 +116,8 @@
+ id="menu_report_membership"
+ groups="base.group_partner_manager"/>
diff --git a/addons/membership/security/ir.model.access.csv b/addons/membership/security/ir.model.access.csv
index 6cf3eb755c2..f3d91646c44 100644
--- a/addons/membership/security/ir.model.access.csv
+++ b/addons/membership/security/ir.model.access.csv
@@ -1,4 +1,4 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_membership_membership_line_partner_manager","membership.membership_line partner_manager","model_membership_membership_line","base.group_partner_manager",1,0,0,0
+"access_membership_membership_line_partner_manager","membership.membership_line partner_manager","model_membership_membership_line","base.group_partner_manager",1,1,1,1
"access_membership_membership_line","membership.membership_line","model_membership_membership_line",,1,0,0,0
"access_report_membership","report.membership","model_report_membership","base.group_partner_manager",1,0,0,0
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 7addfbc3194..32f3100b868 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -604,7 +604,7 @@
-
+
@@ -627,12 +627,12 @@
+
-
diff --git a/addons/mrp/test/mrp_procurement.yml b/addons/mrp/test/mrp_procurement.yml
index 40d22ae817f..4e01062d7b2 100644
--- a/addons/mrp/test/mrp_procurement.yml
+++ b/addons/mrp/test/mrp_procurement.yml
@@ -177,7 +177,7 @@
purch_ids = self.search(cr, uid, [('partner_id.name','=','Maxtor')])
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
- wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
+ wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
-
I confirm purchase order for Buttons.
@@ -187,7 +187,7 @@
purch_ids = self.search(cr, uid, [('partner_id.name','=','ASUStek')])
wf_service = netsvc.LocalService("workflow")
for p_id in purch_ids:
- wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
+ wf_service.trg_validate(uid, 'purchase.order', p_id, 'purchase_confirm', cr)
-
I Check incoming shipments for cloth. And receive products.
@@ -284,7 +284,7 @@
assert prod_ids, _('No Ready Manufacturing Orders found!')
wf_service = netsvc.LocalService("workflow")
for p_id in prod_ids:
- wf_service.trg_validate(uid, 'mrp.production', p_id, 'button_produce', cr)
+ wf_service.trg_validate(uid, 'mrp.production', p_id, 'button_produce', cr)
-
I create record for producing products with quantity 5.00.
-
diff --git a/addons/mrp_operations/mrp_operations_view.xml b/addons/mrp_operations/mrp_operations_view.xml
index 9a93b67a36f..62298f4aa5f 100644
--- a/addons/mrp_operations/mrp_operations_view.xml
+++ b/addons/mrp_operations/mrp_operations_view.xml
@@ -14,10 +14,10 @@
+
-
@@ -32,10 +32,10 @@
+
-
@@ -114,10 +114,10 @@
+
-
diff --git a/addons/mrp_repair/mrp_repair_view.xml b/addons/mrp_repair/mrp_repair_view.xml
index 04c9587b6c5..15878ec1b37 100644
--- a/addons/mrp_repair/mrp_repair_view.xml
+++ b/addons/mrp_repair/mrp_repair_view.xml
@@ -2,24 +2,24 @@
-
- mrp.repair.tree
- mrp.repair
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ mrp.repair.tree
+ mrp.repair
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+ mrp.repair.form
@@ -177,30 +177,30 @@
search
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
+
diff --git a/addons/mrp_repair/wizard/mrp_repair_make_invoice_view.xml b/addons/mrp_repair/wizard/mrp_repair_make_invoice_view.xml
index 982ee5d4bc0..4c3f6ede30d 100644
--- a/addons/mrp_repair/wizard/mrp_repair_make_invoice_view.xml
+++ b/addons/mrp_repair/wizard/mrp_repair_make_invoice_view.xml
@@ -17,7 +17,7 @@
+ colspan="1" type="object" icon="terp-gtk-go-back-rtl" />
diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py
index c8cb8f460f0..4f0d3530a80 100644
--- a/addons/procurement/procurement.py
+++ b/addons/procurement/procurement.py
@@ -322,7 +322,7 @@ class procurement_order(osv.osv):
if procurement.procure_method == 'make_to_order':
source = procurement.product_id.product_tmpl_id.property_stock_procurement.id
id = move_obj.create(cr, uid, {
- 'name': 'PROC:' + procurement.name,
+ 'name': procurement.name,
'location_id': source,
'location_dest_id': procurement.location_id.id,
'product_id': procurement.product_id.id,
@@ -374,10 +374,6 @@ class procurement_order(osv.osv):
"Not enough stock and no minimum orderpoint rule defined.") % \
procurement.name
self.log(cr, uid, procurement.id, message)
- if procurement.state=='exception' and procurement.message=='':
- cr.execute('update procurement_order set message=%s where id=%s',
- (_('Not enough stock '), procurement.id) )
-
return ok
def action_produce_assign_service(self, cr, uid, ids, context={}):
diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml
index 03a4c5aad82..3c9bff9be9c 100644
--- a/addons/procurement/procurement_view.xml
+++ b/addons/procurement/procurement_view.xml
@@ -72,9 +72,9 @@
+
-
diff --git a/addons/procurement/schedulers.py b/addons/procurement/schedulers.py
index 06cbb86957a..9abdf3d1ff5 100644
--- a/addons/procurement/schedulers.py
+++ b/addons/procurement/schedulers.py
@@ -23,8 +23,10 @@ import time
from mx import DateTime
from osv import osv
+from tools.translate import _
import netsvc
import pooler
+from tools.translate import _
class procurement_order(osv.osv):
_inherit = 'procurement.order'
@@ -170,8 +172,8 @@ class procurement_order(osv.osv):
else:
continue
proc_id = proc_obj.create(cr, uid, {
- 'name': 'Automatic OP: %s' % product.name,
- 'origin': 'SCHEDULER',
+ 'name': _('Automatic OP: %s') % (product.name,),
+ 'origin': _('SCHEDULER'),
'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'),
'product_id': product.id,
'product_qty': -product.virtual_available,
@@ -236,7 +238,7 @@ class procurement_order(osv.osv):
continue
if op.product_id.type not in ('consu'):
proc_id = procurement_obj.create(cr, uid, {
- 'name': 'OP:' + str(op.id),
+ 'name': op.name,
'date_planned': newdate.strftime('%Y-%m-%d'),
'product_id': op.product_id.id,
'product_qty': qty,
diff --git a/addons/product/product.py b/addons/product/product.py
index 22f57ac981f..04a5232b1ea 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -308,6 +308,7 @@ class product_template(osv.osv):
'uos_coeff' : lambda *a: 1.0,
'mes_type' : lambda *a: 'fixed',
'categ_id' : _default_category,
+ 'type' : lambda *a: 'consu',
}
def _check_uom(self, cursor, user, ids):
@@ -386,7 +387,7 @@ class product_product(osv.osv):
def _get_partner_code_name(self, cr, uid, ids, product, partner_id, context={}):
for supinfo in product.seller_ids:
if supinfo.name.id == partner_id:
- return {'code': supinfo.product_code, 'name': supinfo.product_name, 'variants': ''}
+ return {'code': supinfo.product_code or product.default_code, 'name': supinfo.product_name or product.name, 'variants': ''}
res = {'code': product.default_code, 'name': product.name, 'variants': product.variants}
return res
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 5872e325715..b58fa4cc811 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -9,10 +9,8 @@
search
-
-
-
+
+
@@ -197,7 +195,6 @@
In OpenERP, a product is something you can buy and sell. It can be a raw material, a stockable product, a consumable or a service. The product form contains a detailed information on the products like procurement logistic, sales price, product category, suppliers, etc.
-
diff --git a/addons/project/board_project_view.xml b/addons/project/board_project_view.xml
index 275a969cbe9..71b5d87aa1f 100644
--- a/addons/project/board_project_view.xml
+++ b/addons/project/board_project_view.xml
@@ -88,16 +88,10 @@
-
+
-
-
-
-
-
-
-
-
+
+
diff --git a/addons/project/project.py b/addons/project/project.py
index 27bbb2f8c7f..c0f9be5394e 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -315,7 +315,7 @@ class project(osv.osv):
if child_ids:
self.setActive(cr, uid, child_ids, value, context=None)
return True
-
+
project()
class users(osv.osv):
@@ -418,7 +418,7 @@ class task(osv.osv):
'active': fields.function(_is_template, method=True, store=True, string='Not a Template Task', type='boolean', help="This field is computed automatically and have the same behavior than the boolean 'active' field: if the task is linked to a template or unactivated project, it will be hidden unless specifically asked."),
'name': fields.char('Task Summary', size=128, required=True),
'description': fields.text('Description'),
- 'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Priority'),
+ 'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Priority'),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of tasks."),
'type_id': fields.many2one('project.task.type', 'Stage',),
'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
@@ -526,7 +526,7 @@ class task(osv.osv):
if not project_id: return False
task = self.browse(cr, uid, project_id, context=context)
project = task.project_id
- res = self.do_close(cr, uid, [project_id], context=context)
+ res = self.do_close(cr, uid, [project_id], context=context)
if project.warn_manager or project.warn_customer:
return {
'name': _('Send Email after close task'),
@@ -537,7 +537,7 @@ class task(osv.osv):
'target': 'new',
'nodestroy': True,
'context': {'active_id': task.id}
- }
+ }
return res
def do_close(self, cr, uid, ids, context=None):
@@ -678,7 +678,7 @@ class task(osv.osv):
if types:
if not typeid:
self.write(cr, uid, task.id, {'type_id': types[0]})
- elif typeid and typeid in types and types.index(typeid) != len(types)-1 :
+ elif typeid and typeid in types and types.index(typeid) != len(types)-1:
index = types.index(typeid)
self.write(cr, uid, task.id, {'type_id': types[index+1]})
return True
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 5e5be5ee4b0..6fd11bd245f 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -27,7 +27,7 @@
-
+
@@ -46,11 +46,11 @@
-
+
+
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
@@ -242,13 +244,13 @@
+
-
@@ -323,10 +325,10 @@
-
+
+
-
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index a5032047c2a..4623f968c05 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -84,10 +84,10 @@
+
-
@@ -191,9 +191,9 @@
+
-
@@ -290,9 +290,9 @@
+
-
diff --git a/addons/project_long_term/project_long_term_view.xml b/addons/project_long_term/project_long_term_view.xml
index fa645af4127..f2e4c6efd68 100644
--- a/addons/project_long_term/project_long_term_view.xml
+++ b/addons/project_long_term/project_long_term_view.xml
@@ -146,11 +146,11 @@
+
-
diff --git a/addons/project_planning/project_planning_view.xml b/addons/project_planning/project_planning_view.xml
index ff354c69ccd..8e14631fb2c 100644
--- a/addons/project_planning/project_planning_view.xml
+++ b/addons/project_planning/project_planning_view.xml
@@ -104,14 +104,13 @@
+
-
-
@@ -139,12 +138,12 @@
+
-
diff --git a/addons/project_scrum/project_scrum_view.xml b/addons/project_scrum/project_scrum_view.xml
index 843b35646e4..7ae07d9eea8 100644
--- a/addons/project_scrum/project_scrum_view.xml
+++ b/addons/project_scrum/project_scrum_view.xml
@@ -113,12 +113,12 @@
+
-
diff --git a/addons/project_timesheet/project_timesheet_view.xml b/addons/project_timesheet/project_timesheet_view.xml
index 2a1b94620a8..61834abbe66 100644
--- a/addons/project_timesheet/project_timesheet_view.xml
+++ b/addons/project_timesheet/project_timesheet_view.xml
@@ -11,9 +11,9 @@
-
-
-
+
+
+
diff --git a/addons/purchase/purchase_demo.xml b/addons/purchase/purchase_demo.xml
index ebd0b0becaf..b3fe345308a 100644
--- a/addons/purchase/purchase_demo.xml
+++ b/addons/purchase/purchase_demo.xml
@@ -3,19 +3,17 @@
-
-
+
+
-
-
-
-
+
+
+
-
@@ -30,7 +28,6 @@
1505
- make_to_stock
@@ -57,4 +54,4 @@
-
\ No newline at end of file
+
diff --git a/addons/purchase/security/ir.model.access.csv b/addons/purchase/security/ir.model.access.csv
index 86784a34351..77a0aff7bb4 100644
--- a/addons/purchase/security/ir.model.access.csv
+++ b/addons/purchase/security/ir.model.access.csv
@@ -31,8 +31,9 @@
"access_account_sequence_fiscalyear_purchase_user","account.sequence.fiscalyear purchase","account.model_account_sequence_fiscalyear","group_purchase_user",1,1,1,1
"access_res_partner_purchase_user","res.partner purchase","base.model_res_partner","group_purchase_user",1,0,0,0
"access_res_partner_address_purchase_user","res.partner.address purchase","base.model_res_partner_address","group_purchase_user",1,0,0,0
-"access_account_journal","account.journal","account.model_account_journal","group_purchase_user",1,1,1,0
-"access_account_journal_manager","account.journal","account.model_account_journal","group_purchase_manager",1,1,1,1
+"access_account_journal_period","account.journal.period","account.model_account_journal_period","group_purchase_user",1,1,1,0
+"access_account_journal","account.journal","account.model_account_journal","group_purchase_user",1,0,0,0
+"access_account_journal_manager","account.journal","account.model_account_journal","group_purchase_manager",1,0,0,0
"access_account_period","account.period","account.model_account_period","group_purchase_user",1,0,0,0
"access_account_fiscalyear","account.fiscalyear","account.model_account_fiscalyear","group_purchase_user",1,0,0,0
"access_account_move","account.move","account.model_account_move","group_purchase_user",1,1,1,1
diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml
index de25b07ff9d..d209ef6b3fd 100644
--- a/addons/purchase_requisition/purchase_requisition_view.xml
+++ b/addons/purchase_requisition/purchase_requisition_view.xml
@@ -61,10 +61,10 @@
+
-
@@ -78,9 +78,9 @@
+
-
diff --git a/addons/purchase_requisition/test/purchase_requisition.yml b/addons/purchase_requisition/test/purchase_requisition.yml
index 3f3aae2d8f0..c61a83a9b39 100644
--- a/addons/purchase_requisition/test/purchase_requisition.yml
+++ b/addons/purchase_requisition/test/purchase_requisition.yml
@@ -127,7 +127,7 @@
-
!python {model: stock.picking }: |
from tools.translate import _
- picking_id = self.search(cr, uid, [('origin','=','TEST/TENDER/0001'),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=','TEST/TENDER/0001')])
if picking_id:
pick=self.browse(cr,uid,picking_id[0])
assert (pick.state =='confirmed'),_('Picking is not in confirm state.')
diff --git a/addons/report_designer/installer.py b/addons/report_designer/installer.py
index 1accab65c0b..f849392d328 100644
--- a/addons/report_designer/installer.py
+++ b/addons/report_designer/installer.py
@@ -31,7 +31,6 @@ class report_designer_installer(osv.osv_memory):
"upload the report using the same wizard."),
'base_report_creator':fields.boolean('Query Builder',help="Allows you to create any statistic "
"reports on several objects. It's a SQL query builder and browser for end users."),
- 'olap':fields.boolean('Business Intelligence Report',help="Helps you manage Online Analytical Process with the mdx query and provides Cube Designing and Cube Browsing"),
}
report_designer_installer()
diff --git a/addons/report_designer/report_designer_installer.xml b/addons/report_designer/report_designer_installer.xml
index b377331a208..2f838c0b74c 100644
--- a/addons/report_designer/report_designer_installer.xml
+++ b/addons/report_designer/report_designer_installer.xml
@@ -28,7 +28,6 @@
-
diff --git a/addons/sale/board_sale_view.xml b/addons/sale/board_sale_view.xml
index 39ce39eee9d..0aa1a9d238d 100644
--- a/addons/sale/board_sale_view.xml
+++ b/addons/sale/board_sale_view.xml
@@ -33,8 +33,7 @@
form
-
+
-
-
\ No newline at end of file
+
diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml
index 20f20a7ef72..e20cf959c9b 100644
--- a/addons/sale/process/sale_process.xml
+++ b/addons/sale/process/sale_process.xml
@@ -85,7 +85,6 @@
-
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index ac2b1a620cf..8a26ef6ebba 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -1234,11 +1234,6 @@ class sale_config_picking_policy(osv.osv_memory):
ir_values_obj.set(cr, uid, 'default', False, 'order_policy', ['sale.order'], o.order_policy)
if o.step == 'one':
md = self.pool.get('ir.model.data')
- group_id = md._get_id(cr, uid, 'base', 'group_no_one')
- group_id = md.browse(cr, uid, group_id, context=context).res_id
- menu_id = md._get_id(cr, uid, 'stock', 'menu_action_picking_tree_delivery')
- menu_id = md.browse(cr, uid, menu_id, context=context).res_id
- self.pool.get('ir.ui.menu').write(cr, uid, [menu_id], {'groups_id': [(6, 0, [group_id])]})
location_id = md._get_id(cr, uid, 'stock', 'stock_location_output')
location_id = md.browse(cr, uid, location_id, context=context).res_id
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'transparent'})
diff --git a/addons/sale/sale_data.xml b/addons/sale/sale_data.xml
index 6c8249131e8..f2ebe3af020 100644
--- a/addons/sale/sale_data.xml
+++ b/addons/sale/sale_data.xml
@@ -2,16 +2,16 @@
+ Requests Links
+ -->
Sale Ordersale.order
+ Resource: sale.shop
+ -->
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 913dfa1f82d..85dd4c86c27 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -2,7 +2,8 @@
-
+
@@ -205,7 +206,7 @@
-
+
@@ -375,22 +376,22 @@ to your configuration: from the sales order, from the pickings, etc.
form
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -518,7 +519,7 @@ to your configuration: from the sales order, from the pickings, etc.
groups="base.group_extended"/>
+ groups="base.group_extended"/>
diff --git a/addons/sale/stock_view.xml b/addons/sale/stock_view.xml
index 93529fd3b7d..dddcad07932 100644
--- a/addons/sale/stock_view.xml
+++ b/addons/sale/stock_view.xml
@@ -23,7 +23,30 @@
-
+
+
+
+
+
+
+ tree
+
+
+
+
+
+
+ form
+
+
+
+
diff --git a/addons/sale/test/manual_order_policy.yml b/addons/sale/test/manual_order_policy.yml
index c6cf4d66c74..7cb253a2bfb 100644
--- a/addons/sale/test/manual_order_policy.yml
+++ b/addons/sale/test/manual_order_policy.yml
@@ -110,7 +110,7 @@
!python {model: stock.picking }: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=',so.name)])
assert (picking_id),"Delivery order has not been generated"
-
I verify that a procurement has been generated for so
@@ -282,7 +282,7 @@
import time
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=',so.name)])
if picking_id:
pick=self.browse(cr,uid,picking_id[0])
pick.force_assign(cr, uid)
@@ -304,7 +304,7 @@
!python {model: stock.picking }: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=',so.name)])
pick = self.browse(cr,uid,picking_id[0])
assert (pick.state) =='done', "Picking for SO is not in done state."
-
diff --git a/addons/sale/test/picking_order_policy.yml b/addons/sale/test/picking_order_policy.yml
index e90d58bab68..c3f4ba87aaf 100644
--- a/addons/sale/test/picking_order_policy.yml
+++ b/addons/sale/test/picking_order_policy.yml
@@ -261,7 +261,7 @@
!python {model: stock.picking }: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=',so.name)])
assert (picking_id),"Delivery order has not been generated"
-
I verify that delivery has been done
@@ -270,7 +270,7 @@
import time
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=',so.name)])
if picking_id:
pick=self.browse(cr,uid,picking_id[0])
pick.force_assign(cr, uid)
@@ -292,7 +292,7 @@
!python {model: stock.picking }: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=',so.name)])
if picking_id:
pick = self.browse(cr,uid,picking_id[0])
assert (pick.state) =='done', "Picking for SO is not in done state."
diff --git a/addons/sale/test/postpaid_order_policy.yml b/addons/sale/test/postpaid_order_policy.yml
index 8ef86840fc9..bbd015d726b 100644
--- a/addons/sale/test/postpaid_order_policy.yml
+++ b/addons/sale/test/postpaid_order_policy.yml
@@ -73,7 +73,7 @@
!python {model: stock.picking }: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=',so.name)])
assert (picking_id),"Delivery order has not been generated"
-
I click on the Products Sent button and then on the Validate button
@@ -82,7 +82,7 @@
import time
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=',so.name)])
if picking_id:
pick=self.browse(cr,uid,picking_id[0])
pick.force_assign(cr, uid)
@@ -104,7 +104,7 @@
!python {model: stock.picking }: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
- picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','delivery')])
+ picking_id = self.search(cr, uid, [('origin','=',so.name)])
if picking_id:
pick = self.browse(cr,uid,picking_id[0])
assert (pick.state) =='done', "Picking for SO is not in done state."
diff --git a/addons/sale/test/prepaid_order_policy.yml b/addons/sale/test/prepaid_order_policy.yml
index f9bf8dbd330..0a8f2aafa81 100644
--- a/addons/sale/test/prepaid_order_policy.yml
+++ b/addons/sale/test/prepaid_order_policy.yml
@@ -40,7 +40,7 @@
!python {model: stock.picking }: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
- picking_id = self.search(cr, uid, [('origin','!=',so.name),(('type','=','out')and('type','=','delivery'))])
+ picking_id = self.search(cr, uid, [('origin','=',so.name),('type','=','out')])
assert picking_id,"There is a picking attached to this sale order"
-
I open the Invoice for the SO.
diff --git a/addons/sale/test/so_make_invoice.yml b/addons/sale/test/so_make_invoice.yml
index 61d379c9a60..0133391395b 100644
--- a/addons/sale/test/so_make_invoice.yml
+++ b/addons/sale/test/so_make_invoice.yml
@@ -110,7 +110,7 @@
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so4"))
pick_obj = self.pool.get('stock.picking')
- pick_id = pick_obj.search(cr, uid, [('origin', '=', so.name),('type','=','delivery')])
+ pick_id = pick_obj.search(cr, uid, [('origin', '=', so.name)])
pick_brw = pick_obj.browse(cr,uid,pick_id)[0]
move_obj = self.pool.get('stock.move')
move_id = move_obj.search(cr, uid, [('picking_id', '=', pick_brw.name),('name','=','LG Viewty Smart')])
diff --git a/addons/sale/wizard/sale_line_invoice.xml b/addons/sale/wizard/sale_line_invoice.xml
index c1e9d9c3b89..774759c82c7 100644
--- a/addons/sale/wizard/sale_line_invoice.xml
+++ b/addons/sale/wizard/sale_line_invoice.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/addons/sale/wizard/sale_make_invoice.xml b/addons/sale/wizard/sale_make_invoice.xml
index 106e6945207..e8e698e56b9 100644
--- a/addons/sale/wizard/sale_make_invoice.xml
+++ b/addons/sale/wizard/sale_make_invoice.xml
@@ -13,7 +13,7 @@
-
+
@@ -38,4 +38,4 @@
sale.order
-
\ No newline at end of file
+
diff --git a/addons/sale/wizard/sale_make_invoice_advance.xml b/addons/sale/wizard/sale_make_invoice_advance.xml
index 3257d1aafe8..6e192d31108 100644
--- a/addons/sale/wizard/sale_make_invoice_advance.xml
+++ b/addons/sale/wizard/sale_make_invoice_advance.xml
@@ -15,7 +15,7 @@
-
+
@@ -55,4 +55,4 @@
new
-
\ No newline at end of file
+
diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml
index 8c9103d25f0..029908da37a 100644
--- a/addons/sale_journal/sale_journal_view.xml
+++ b/addons/sale_journal/sale_journal_view.xml
@@ -213,38 +213,6 @@
-
-
-
- stock.picking.journal.view.form
- form
- stock.picking
-
-
-
-
-
-
-
-
-
-
-
-
-
- stock.picking.journal.view.tree
- tree
- stock.picking
-
-
-
-
-
-
-
-
-
-
stock.picking.journal.view.formform
@@ -487,18 +455,6 @@
-
- stock.picking.journal.search
- stock.picking
- search
-
-
-
-
-
-
-
-
stock.picking.journal.searchstock.picking
diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml
index 561bb9f2206..60fab009d0e 100644
--- a/addons/stock/product_view.xml
+++ b/addons/stock/product_view.xml
@@ -61,8 +61,8 @@
-
-
+
+
diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py
index 618c086cd4f..49c3f8fb327 100644
--- a/addons/stock/report/report_stock_move.py
+++ b/addons/stock/report/report_stock_move.py
@@ -39,7 +39,7 @@ class report_stock_move(osv.osv):
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'picking_id':fields.many2one('stock.picking', 'Packing', readonly=True),
- 'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery'), ('other', 'Others')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
+ 'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('other', 'Others')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
'location_id': fields.many2one('stock.location', 'Source Location', readonly=True, select=True, help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."),
'location_dest_id': fields.many2one('stock.location', 'Dest. Location', readonly=True, select=True, help="Location where the system will stock the finished products."),
'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True),
@@ -85,7 +85,7 @@ class report_stock_move(osv.osv):
al.stock_journal as stock_journal,
sum(al.in_value - al.out_value) as value
FROM (SELECT
- CASE WHEN sp.type in ('out','delivery') THEN
+ CASE WHEN sp.type in ('out') THEN
sum(sm.product_qty * pu.factor)
ELSE 0.0
END AS out_qty,
@@ -93,7 +93,7 @@ class report_stock_move(osv.osv):
sum(sm.product_qty * pu.factor)
ELSE 0.0
END AS in_qty,
- CASE WHEN sp.type in ('out','delivery') THEN
+ CASE WHEN sp.type in ('out') THEN
sum(sm.product_qty * pu.factor) * pt.standard_price
ELSE 0.0
END AS out_value,
diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml
index 353b8b6bc9c..1d9dc4a5ce4 100644
--- a/addons/stock/report/report_stock_move_view.xml
+++ b/addons/stock/report/report_stock_move_view.xml
@@ -74,7 +74,6 @@
-
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 989fc50cc31..5717143c1a6 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -186,7 +186,7 @@ class stock_location(osv.osv):
"validated automatically. With 'Manual Operation', the stock move has to be validated "\
"by a worker. With 'Automatic No Step Added', the location is replaced in the original move."
),
- 'chained_picking_type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', help="Shipping Type of the Picking List that will contain the chained move (leave empty to automatically detect the type based on the source and destination locations)."),
+ 'chained_picking_type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', help="Shipping Type of the Picking List that will contain the chained move (leave empty to automatically detect the type based on the source and destination locations)."),
'chained_company_id': fields.many2one('res.company', 'Chained Company', help='The company the Picking List containing the chained move will belong to (leave empty to use the default company determination rules'),
'chained_delay': fields.integer('Chaining Lead Time',help="Delay between original move and chained move in days"),
'address_id': fields.many2one('res.partner.address', 'Location Address',help="Address of customer or supplier."),
@@ -242,7 +242,7 @@ class stock_location(osv.osv):
"""
result = 'internal'
if (from_location.usage=='internal') and (to_location and to_location.usage in ('customer', 'supplier')):
- result = 'delivery'
+ result = 'out'
elif (from_location.usage in ('supplier', 'customer')) and (to_location.usage == 'internal'):
result = 'in'
return result
@@ -602,7 +602,7 @@ class stock_picking(osv.osv):
'name': fields.char('Reference', size=64, select=True),
'origin': fields.char('Origin', size=64, help="Reference of the document that produced this picking.", select=True),
'backorder_id': fields.many2one('stock.picking', 'Back Order of', help="If this picking was split this field links to the picking that contains the other part that has been processed already.", select=True),
- 'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
+ 'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
'note': fields.text('Notes'),
'stock_journal_id': fields.many2one('stock.journal','Stock Journal', select=True),
'location_id': fields.many2one('stock.location', 'Location', help="Keep empty if you produce at the location where the finished products are needed." \
@@ -980,6 +980,8 @@ class stock_picking(osv.osv):
invoices_group[partner.id] = invoice_id
res[picking.id] = invoice_id
for move_line in picking.move_lines:
+ if move_line.state == 'cancel':
+ continue
origin = move_line.picking_id.name or ''
if move_line.picking_id.origin:
origin += ':' + move_line.picking_id.origin
@@ -1251,7 +1253,6 @@ class stock_picking(osv.osv):
'out':'Picking List',
'in':'Reception',
'internal': 'Internal picking',
- 'delivery': 'Delivery order'
}
message = type_list.get(pick.type, _('Document')) + " '" + (pick.name or 'n/a') + "' "
if pick.min_date:
@@ -1652,10 +1653,20 @@ class stock_move(osv.osv):
)
if dest:
if dest[1] == 'transparent':
+ newdate = (datetime.strptime(m.date, '%Y-%m-%d %H:%M:%S') + relativedelta(days=dest[2] or 0)).strftime('%Y-%m-%d')
self.write(cr, uid, [m.id], {
- 'date': (datetime.strptime(m.date, '%Y-%m-%d %H:%M:%S') + \
- relativedelta(days=dest[2] or 0)).strftime('%Y-%m-%d'),
+ 'date': newdate,
'location_dest_id': dest[0].id})
+ if m.picking_id and (dest[3] or dest[5]):
+ self.pool.get('stock.picking').write(cr, uid, [m.picking_id.id], {
+ 'stock_journal_id': dest[3] or m.picking_id.stock_journal_id.id,
+ 'type': dest[5] or m.picking_id.type
+ }, context=context)
+ m.location_dest_id = dest[0]
+ res2 = self._chain_compute(cr, uid, [m], context=context)
+ for pick_id in res2.keys():
+ result.setdefault(pick_id, [])
+ result[pick_id] += res2[pick_id]
else:
result.setdefault(m.picking_id, [])
result[m.picking_id].append( (m, dest) )
@@ -1695,16 +1706,10 @@ class stock_move(osv.osv):
for picking, todo in self._chain_compute(cr, uid, moves, context=context).items():
ptype = todo[0][1][5] and todo[0][1][5] or self.pool.get('stock.location').picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0])
pick_name = picking.name or ''
- if ptype == 'delivery':
- pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.delivery')
- check_picking_ids = picking_obj.search(cr, uid, [('name','=',picking.name),('origin','=',str(picking.origin or '')),('type','=',ptype),('move_type','=',picking.move_type)])
- if check_picking_ids:
- pickid = check_picking_ids[0]
+ if picking:
+ pickid = self._create_chained_picking(cr, uid, pick_name,picking,ptype,todo,context)
else:
- if picking:
- pickid = self._create_chained_picking(cr, uid, pick_name,picking,ptype,todo,context)
- else:
- pickid = False
+ pickid = False
for move, (loc, auto, delay, journal, company_id, ptype) in todo:
new_id = move_obj.copy(cr, uid, move.id, {
'location_id': move.location_dest_id.id,
diff --git a/addons/stock/stock_data.xml b/addons/stock/stock_data.xml
index b9aaff33e72..be1881634eb 100644
--- a/addons/stock/stock_data.xml
+++ b/addons/stock/stock_data.xml
@@ -74,11 +74,17 @@
view
+
+
+ Delivery Orders
+ Outputinternalcustomer
+ out
+ Stock
diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml
index 1249317a2e4..33d130c2d77 100644
--- a/addons/stock/stock_demo.xml
+++ b/addons/stock/stock_demo.xml
@@ -3,8 +3,8 @@
+ Resource: stock.location
+ -->
IT Suppliers
@@ -30,30 +30,18 @@
customer
-
- Stock Level 1
-
- Shelf 2
-
-
-
- Sub Products
-
-
-
- WorkshopShelf 1
-
+
+ Resource: stock.inventory
+ -->
Starting Inventory
@@ -62,8 +50,8 @@
+ Resource: stock.inventory.line
+ -->
@@ -189,7 +177,7 @@
-
+
@@ -206,7 +194,7 @@
-
+
@@ -223,7 +211,7 @@
-
+
@@ -234,14 +222,14 @@
-
+
-
+
@@ -263,13 +251,13 @@
-
+ property_stock_variation
-
-
+
+
-
+ PACKO1outdirect
diff --git a/addons/stock/stock_sequence.xml b/addons/stock/stock_sequence.xml
index 06d898c6637..cabf24dda5b 100644
--- a/addons/stock/stock_sequence.xml
+++ b/addons/stock/stock_sequence.xml
@@ -20,14 +20,9 @@
stock.picking.internal
-
- Picking Delivery
- stock.picking.delivery
-
-
-
+
Picking IN
@@ -50,13 +45,6 @@
5
-
- Picking DLV
- stock.picking.delivery
- DLV/
- 5
-
-
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index fa81b7534c3..2a4bec6fe3b 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -134,9 +134,9 @@
+
-
@@ -652,7 +652,6 @@
-
@@ -682,7 +681,6 @@
states="draft,assigned,confirmed,done"/>
-
@@ -734,10 +732,10 @@
+
-
@@ -748,7 +746,7 @@
-
+
@@ -798,224 +796,6 @@
-
- stock.picking.delivery.tree
- stock.picking
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- stock.picking.delivery.form
- stock.picking
- form
-
-