-
-
- Picking by journal
- sale_journal.picking.stats
- ir.actions.act_window
- form
- tree,form
- [('name','=',time.strftime('%Y-%m-01'))]
+
+ sale_journal.picking.stats.search
+ sale_journal.picking.stats
+ search
+
+
+
+
+
+
+
+
+
+
+
+
-
-
Picking by journalsale_journal.picking.statsir.actions.act_windowformtree,form
+
-
+
diff --git a/addons/sale_journal/sale_journal_picking_report.py b/addons/sale_journal/sale_journal_picking_report.py
index 5ae9ee814e4..d7735b2a29c 100644
--- a/addons/sale_journal/sale_journal_picking_report.py
+++ b/addons/sale_journal/sale_journal_picking_report.py
@@ -20,13 +20,14 @@
##############################################################################
from osv import fields,osv
+import tools
class report_sale_journal_invoice_type_stats(osv.osv):
_name = "sale_journal.invoice.type.stats"
_description = "Stats on packing by invoice method"
_auto = False
_columns = {
- 'name': fields.date('Month', readonly=True),
+ 'name': fields.char('Year',size=64,required=False, readonly=True),
'invoice_state':fields.selection([
("invoiced","invoiced"),
("2binvoiced","to be invoiced"),
@@ -45,14 +46,19 @@ class report_sale_journal_invoice_type_stats(osv.osv):
'price_total': fields.float('Total Price', readonly=True),
'price_average': fields.float('Average Price', readonly=True),
'count': fields.integer('# of Lines', 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),
+
}
_order = 'state,invoice_state,name desc'
def init(self, cr):
+ tools.drop_view_if_exists(cr, 'sale_journal_invoice_type_stats')
cr.execute("""
create or replace view sale_journal_invoice_type_stats as (
select
min(l.id) as id,
- to_char(s.date, 'YYYY-MM-01') as name,
+ to_char(s.date, 'YYYY') as name,
+ to_char(s.date, 'MM') as month,
s.state,
s.invoice_state,
s.invoice_type_id,
@@ -63,7 +69,7 @@ class report_sale_journal_invoice_type_stats(osv.osv):
from stock_picking s
left join stock_move l on (s.id=l.picking_id)
left join sale_order_line ol on (l.sale_line_id=ol.id)
- group by s.invoice_type_id, to_char(s.date, 'YYYY-MM-01'),s.state, s.invoice_state
+ group by s.invoice_type_id, to_char(s.date, 'YYYY'),to_char(s.date, 'MM'),s.state, s.invoice_state
order by s.invoice_type_id, s.invoice_state, s.state
)
""")
@@ -74,7 +80,7 @@ class report_sale_journal_picking(osv.osv):
_description = "Picking lists by Journal"
_auto = False
_columns = {
- 'name': fields.date('Month', readonly=True),
+ 'name': fields.char('Year',size=64,required=False, readonly=True),
'state': fields.selection([
('draft','draft'),
('auto','waiting'),
@@ -88,14 +94,19 @@ class report_sale_journal_picking(osv.osv):
'price_total': fields.float('Total Price', readonly=True),
'price_average': fields.float('Average Price', readonly=True),
'count': fields.integer('# of Lines', 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),
+
}
_order = 'journal_id,name desc,price_total desc'
def init(self, cr):
+ tools.drop_view_if_exists(cr, 'sale_journal_picking_stats')
cr.execute("""
create or replace view sale_journal_picking_stats as (
select
min(l.id) as id,
- to_char(s.date, 'YYYY-MM-01') as name,
+ to_char(s.date, 'YYYY') as name,
+ to_char(s.date, 'MM') as month,
s.state,
s.journal_id,
sum(l.product_qty) as quantity,
@@ -105,7 +116,7 @@ class report_sale_journal_picking(osv.osv):
from stock_picking s
right join stock_move l on (s.id=l.picking_id)
right join sale_order_line ol on (l.sale_line_id=ol.id)
- group by s.journal_id, to_char(s.date, 'YYYY-MM-01'),s.state
+ group by s.journal_id, to_char(s.date, 'YYYY'),to_char(s.date, 'MM'),s.state
)
""")
report_sale_journal_picking()
diff --git a/addons/sale_journal/sale_journal_report.py b/addons/sale_journal/sale_journal_report.py
index f1fe7e96946..2aee0ba09e9 100644
--- a/addons/sale_journal/sale_journal_report.py
+++ b/addons/sale_journal/sale_journal_report.py
@@ -20,13 +20,14 @@
##############################################################################
from osv import fields,osv
+import tools
class report_sale_journal_sale(osv.osv):
_name = "sale_journal.sale.stats"
_description = "Sales Orders by Journal"
_auto = False
_columns = {
- 'name': fields.date('Month', readonly=True),
+ 'name': fields.char('Year',size=64,required=False, readonly=True),
'state': fields.selection([
('draft','Quotation'),
('waiting_date','Waiting Schedule'),
@@ -42,14 +43,18 @@ class report_sale_journal_sale(osv.osv):
'price_total': fields.float('Total Price', readonly=True),
'price_average': fields.float('Average Price', readonly=True),
'count': fields.integer('# of Lines', 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),
}
_order = 'journal_id,name desc,price_total desc'
def init(self, cr):
+ tools.drop_view_if_exists(cr, 'sale_journal_sale_stats')
cr.execute("""
create or replace view sale_journal_sale_stats as (
select
min(l.id) as id,
- to_char(s.date_order, 'YYYY-MM-01') as name,
+ to_char(s.date_order, 'YYYY') as name,
+ to_char(s.date_order,'MM') as month,
s.state,
s.journal_id,
sum(l.product_uom_qty) as quantity,
@@ -58,7 +63,7 @@ class report_sale_journal_sale(osv.osv):
(sum(l.product_uom_qty*l.price_unit)/sum(l.product_uom_qty))::decimal(16,2) as price_average
from sale_order s
right join sale_order_line l on (s.id=l.order_id)
- group by s.journal_id, to_char(s.date_order, 'YYYY-MM-01'),s.state
+ group by s.journal_id, to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),s.state
)
""")
report_sale_journal_sale()
diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml
index 3a595b319c8..5fe8e511870 100644
--- a/addons/sale_journal/sale_journal_view.xml
+++ b/addons/sale_journal/sale_journal_view.xml
@@ -91,10 +91,31 @@
+
+
+ sale_journal.sale.journal.search
+ sale_journal.sale.journal
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
sale_journal.sale.journalformtree,form
+
@@ -104,32 +125,11 @@
formtree,form[]
+
-
- My open journals
- sale_journal.sale.journal
- form
- tree,form
- [('user_id','=',uid),('state','=','open')]
-
-
-
-
-
-
- Open journals
- sale_journal.sale.journal
- form
- tree,form
- [('state','=','open')]
-
-
-
-
-
sale.order.journal.view.formform
@@ -303,27 +303,36 @@
-
-
- Sales by journal (this month)
- sale_journal.sale.stats
- ir.actions.act_window
- form
- tree,form
- [('name','=',time.strftime('%Y-%m-01'))]
+
+
+ sale_journal.sale.stats.search
+ sale_journal.sale.stats
+ search
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+ Sales by Journalsale_journal.sale.statsir.actions.act_windowformtree,form
+
-
+
+
+
+
+ scrum.product.backlog.search
+ scrum.product.backlog
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Backlogsscrum.product.backlogform
+
-
- Draft Backlogs
- scrum.product.backlog
- form
- tree,form
- [('state','=','draft')]
-
-
-
-
- Opened Backlogs
- scrum.product.backlog
- form
- tree,form
- [('state','=','open')]
-
-
-
@@ -192,82 +196,36 @@
+
+ scrum.sprint.search
+ scrum.sprint
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Sprintsscrum.sprintformtree,form
+
-
- Sprint
- scrum.sprint
- form
-
-
-
-
-
- Opened Sprints
- scrum.sprint
- tree
- [('state','=','open')]
-
-
-
-
- Draft Sprints
- scrum.sprint
- tree
- [('state','=','draft')]
-
-
-
-
- Sprints Done
- scrum.sprint
- tree
- [('state','=','done')]
-
-
-
-
-
- My Sprints (Product Owner)
- scrum.sprint
- tree
- [('product_owner_id','=',uid)]
-
-
-
-
- My Sprints (Scrum Master)
- scrum.sprint
- tree
- [('scrum_master_id','=',uid)]
-
-
-
-
-
- My opened sprints (Product Owner)
- scrum.sprint
- tree
- [('product_owner_id','=',uid),('state','=','open')]
-
-
-
-
- My opened sprints (Scrum Master)
- scrum.sprint
- tree
- [('scrum_master_id','=',uid),('state','=','open')]
-
-
-
-
@@ -403,6 +361,18 @@
+
+
+ scrum.task.search
+ scrum.task
+ search
+
+
+
+
+
+
+ All Tasks
@@ -410,6 +380,7 @@
formtree,form[('scrum','=',1)]
+
@@ -428,25 +399,6 @@
-
- My tasks
- scrum.task
- form
- tree,form
- [('user_id', '=', uid),('scrum','=',1)]
-
-
-
-
-
- My opened tasks
- scrum.task
- form
- tree,form
- [('user_id','=',uid),('state','=','open'),('scrum','=',1)]
-
-
-
Opened tasksscrum.task
diff --git a/addons/stock/security/ir.model.access.csv b/addons/stock/security/ir.model.access.csv
index 068c4f1f6cc..25a455e771f 100644
--- a/addons/stock/security/ir.model.access.csv
+++ b/addons/stock/security/ir.model.access.csv
@@ -15,3 +15,4 @@
"access_stock_report_prodlots","stock.report.prodlots","model_stock_report_prodlots","stock.group_stock_manager",1,0,0,0
"access_stock_location_product_manager","stock.location product manager","model_stock_location","product.group_product_manager",1,0,0,0
"access_stock_lines_date","report.stock.lines.date all","model_report_stock_lines_date",,1,0,0,0
+"access_stock_report_tracklots","stock.report.tracklots","model_stock_report_tracklots","stock.group_stock_user",1,1,1,1
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 8b5356a8573..c6a4d51cbcb 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1000,7 +1000,10 @@ class stock_move(osv.osv):
\nThe state is \'Waiting\' if the move is waiting for another one.'),
'price_unit': fields.float('Unit Price',
digits=(16, int(config['price_accuracy']))),
- 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner"),
+ 'backorder_id': fields.related('picking_id','backorder_id',type='many2one', relation="stock.picking", string="Back Orders"),
+ 'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin"),
}
_constraints = [
(_check_tracking,
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 4a1aa8b237c..548b1def5bc 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -93,15 +93,6 @@
-
- New Periodical Inventory
- ir.actions.act_window
- stock.inventory
- form
- form,tree
- [('state','=','draft')]
-
-
=============================
Lot
=============================
@@ -598,6 +589,26 @@
+
+
+
+ stock.picking.list.select
+ stock.picking
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#
# Delivery Orders
@@ -742,74 +753,6 @@
-
- Delivery Orders to Process
- stock.picking
- ir.actions.act_window
- form
- tree,form,calendar
- [('state','=','assigned'),('type','=','delivery')]
- {'contact_display': 'partner'}
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- calendar
-
-
-
-
- Future Delivery Orders
- stock.picking
- ir.actions.act_window
- form
- tree,form,calendar
- [('state','=','confirmed'),('type','=','delivery')]
- {'contact_display': 'partner'}
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- calendar
-
-
-
-
- Calendar of Deliveries
- stock.picking
- ir.actions.act_window
- form
- calendar,tree,form
- [('state','=','assigned'),('type','=','delivery')]
- {'contact_display': 'partner'}
-
-
#
# Sending Products
#
@@ -917,7 +860,6 @@
tree,form,calendar[('type','=','out')]{'contact_display': 'partner'}
-
@@ -939,64 +881,6 @@
-
- Available Picking
- stock.picking
- ir.actions.act_window
- form
- tree,form,calendar
- [('state','=','assigned'),('type','=','out')]
- {'contact_display': 'partner'}
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- calendar
-
-
-
-
- Confirmed Picking Waiting Availability
- stock.picking
- ir.actions.act_window
- form
- tree,form,calendar
- [('state','=','confirmed'),('type','=','out')]
- {'contact_display': 'partner'}
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- calendar
-
-
-
#
# Reception of Products
#
@@ -1106,7 +990,6 @@
tree,form,calendar[('type','=','in')]{'contact_display': 'partner'}
-
@@ -1128,64 +1011,6 @@
-
- Picking to Process
- stock.picking
- ir.actions.act_window
- form
- tree,form,calendar
- [('state','=','assigned'),('type','=','in')]
- {'contact_display': 'partner'}
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- calendar
-
-
-
-
-
- New Reception Picking
- stock.picking
- ir.actions.act_window
- form
- form,tree,calendar
- {'contact_display': 'partner'}
- [('type','=','in')]
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- calendar
-
-
-
-
Internal Movesstock.picking
@@ -1194,47 +1019,10 @@
tree,form,calendar[('type','=','internal')]{'contact_display': 'partner'}
-
-
-
- Available Picking
- stock.picking
- ir.actions.act_window
- form
- tree,form,calendar
- [('state','=','assigned'),('type','=','internal')]
- {'contact_display': 'partner'}
-
-
-
-
-
- Confirmed Picking Waiting Availability
- stock.picking
- ir.actions.act_window
- form
- tree,form,calendar
- [('state','=','confirmed'),('type','=','internal')]
- {'contact_display': 'partner'}
-
-
-
-
-
- New Internal Picking
- stock.picking
- ir.actions.act_window
- form
- form,tree,calendar
- [('state','=','draft'),('type','=','internal')]
- {'contact_display': 'partner'}
-
-
-
=============================
Move Tracking
=============================
@@ -1309,45 +1097,125 @@
+
+
+ stock.move.search
+ stock.move
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Stock Movesstock.moveir.actions.act_windowform
+
-
- Draft Moves
- stock.move
- ir.actions.act_window
- form
- [('state','=','draft')]
-
-
-
-
-
- Available Moves
- stock.move
- ir.actions.act_window
- form
- [('state','=','assigned')]
-
-
-
-
Pickingstock.pickingir.actions.act_windowformtree,form,calendar
+ {'contact_display': 'partner'}
+ ====================================
+ Reception Picking (By Stock Move)
+ ====================================
+
+
+ stock.move.tree2
+ stock.move
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ stock.move.form2
+ stock.move
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ stock.move.search2
+ stock.move
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reception Picking Stock Moves
+ stock.move
+ ir.actions.act_window
+ form
+ tree,form
+ [('picking_id.type','=','in')]
+
+
+
+
+
# -------------------------------------------------------------
# Stock incoterms
diff --git a/addons/stock/stock_wizard.xml b/addons/stock/stock_wizard.xml
index 319e8926bb7..2c1fc950f34 100644
--- a/addons/stock/stock_wizard.xml
+++ b/addons/stock/stock_wizard.xml
@@ -21,6 +21,13 @@
name="stock.partial_picking"
string="Partial picking"/>
+
+
).
+#
+# 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 time
+import netsvc
+from tools.misc import UpdateableStr, UpdateableDict
+import pooler
+
+import wizard
+from osv import osv
+import tools
+from tools.translate import _
+
+_moves_arch = UpdateableStr()
+_moves_fields = UpdateableDict()
+
+_moves_arch_end = '''
+