From 39adfe070f8f41cc7cf2aa8fbd4f8d7221b9986a Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Wed, 16 Jun 2010 13:15:00 +0200
Subject: [PATCH 1/4] [FIX] sale orders dates
bzr revid: nel@tinyerp.com-20100616111500-hm9u1np13tt8nlnn
---
addons/sale_order_dates/sale.py | 3 ++-
addons/stock/stock_view.xml | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/addons/sale_order_dates/sale.py b/addons/sale_order_dates/sale.py
index 1b4bad360e6..877199b32ad 100644
--- a/addons/sale_order_dates/sale.py
+++ b/addons/sale_order_dates/sale.py
@@ -48,7 +48,8 @@ class sale_order_dates(osv.osv):
dt=DateTime.strptime(order.date_order, '%Y-%m-%d') + DateTime.RelativeDateTime(days=line.delay or 0.0)
dt_s = dt.strftime('%Y-%m-%d')
dates_list.append(dt_s)
- res[order.id] = min(dates_list)
+ if dates_list:
+ res[order.id] = min(dates_list)
return res
_columns = {
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index ab33b07aacb..3fdfda9e057 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -322,6 +322,7 @@
+
From 5c854d68caf08e1baecced7ec858c998e8b82d9e Mon Sep 17 00:00:00 2001
From: Fabien Pinckaers
Date: Wed, 16 Jun 2010 13:38:52 +0200
Subject: [PATCH 2/4] merge
bzr revid: fp@tinyerp.com-20100616113852-cj3dwha1w74l5q3w
---
addons/idea/test/test_idea.yml | 4 ++--
addons/purchase/purchase_view.xml | 3 +--
addons/sale_order_dates/__openerp__.py | 8 +++++---
addons/sale_order_dates/sale_view.xml | 12 +++++-------
addons/stock/stock.py | 5 +----
5 files changed, 14 insertions(+), 18 deletions(-)
diff --git a/addons/idea/test/test_idea.yml b/addons/idea/test/test_idea.yml
index 4c3f5301a5a..bcb764f8933 100644
--- a/addons/idea/test/test_idea.yml
+++ b/addons/idea/test/test_idea.yml
@@ -19,13 +19,13 @@
user_id: base.user_root
- |
- I check that idea on draft state.
+ I check that the idea is in draft state.
-
!assert {model: idea.idea, id: idea_idea_0}:
- state == 'draft'
- |
- I open this idea by click on "Open" button.
+ I open this idea by clicking on the "Open" button.
-
!workflow {model: idea.idea, action: idea_open, ref: idea_idea_0}
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 3a7277a4766..e6cf510b018 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -91,8 +91,7 @@
-
-
+
diff --git a/addons/sale_order_dates/__openerp__.py b/addons/sale_order_dates/__openerp__.py
index e8a2cf6e6b6..0f7a56fba20 100644
--- a/addons/sale_order_dates/__openerp__.py
+++ b/addons/sale_order_dates/__openerp__.py
@@ -21,11 +21,13 @@
{
- 'name': 'Customer & Sales',
+ 'name': 'Sale Order Dates',
'version': '1.0',
'category': 'Generic Modules/CRM & SRM',
- 'description': """Sale Orders Dates""",
- 'author': 'Tiny',
+ 'description': """
+Add commitment, requested and effective dates on the sale order.
+""",
+ 'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ["sale"],
'init_xml': [
diff --git a/addons/sale_order_dates/sale_view.xml b/addons/sale_order_dates/sale_view.xml
index 7f5edf811ef..54248fa0176 100644
--- a/addons/sale_order_dates/sale_view.xml
+++ b/addons/sale_order_dates/sale_view.xml
@@ -2,22 +2,20 @@
-
+
sale.order.form.inherit5
sale.order
form
-
-
+
-
-
+
-
+
-
+
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index a7241c2bbe6..924bf69c520 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -2251,7 +2251,7 @@ class stock_inventory(osv.osv):
'prodlot_id': lot_id,
'date': inv.date,
'date_planned': inv.date,
- 'state': 'assigned'
+ 'state': 'done'
}
if change > 0:
value.update( {
@@ -2271,9 +2271,6 @@ class stock_inventory(osv.osv):
'product_qty': line.product_qty
})
move_ids.append(self._inventory_line_hook(cr, uid, line, value))
- if len(move_ids):
- self.pool.get('stock.move').action_done(cr, uid, move_ids,
- context=context)
self.write(cr, uid, [inv.id], {'state': 'done', 'date_done': time.strftime('%Y-%m-%d %H:%M:%S'), 'move_ids': [(6, 0, move_ids)]})
return True
From e28676b821b440bdaa9771adccf36b902dfe0b00 Mon Sep 17 00:00:00 2001
From: "Vir (Open ERP)"
Date: Wed, 16 Jun 2010 17:11:41 +0530
Subject: [PATCH 3/4] [MOD,IMP] point_of_sale : improvements in pos order
report, account,hr,mrp,project,stock: changes in icons
bzr revid: vir@tinyerp.com-20100616114141-l6nbfgc6wsof1hzh
---
addons/account/account_invoice_view.xml | 20 +++++------
addons/account/account_view.xml | 20 +++++------
.../project_account_analytic_line_view.xml | 2 +-
.../account_analytic_entries_report_view.xml | 2 +-
.../report/account_analytic_report_view.xml | 2 +-
.../report/account_entries_report_view.xml | 2 +-
.../report/account_invoice_report_view.xml | 2 +-
.../account_automatic_reconcile_view.xml | 4 +--
.../wizard/account_central_journal_view.xml | 2 +-
.../wizard/account_change_currency_view.xml | 2 +-
addons/account/wizard/account_chart_view.xml | 2 +-
.../wizard/account_invoice_state_view.xml | 6 ++--
.../wizard/account_journal_select_view.xml | 4 +--
.../account_move_bank_reconcile_view.xml | 4 +--
.../wizard/account_move_journal_view.xml | 4 +--
...ccount_move_line_reconcile_select_view.xml | 4 +--
.../wizard/account_move_line_select_view.xml | 4 +--
...ount_move_line_unreconcile_select_view.xml | 4 +--
.../account_open_closed_fiscalyear_view.xml | 4 +--
.../account_partner_balance_report_view.xml | 2 +-
.../wizard/account_period_close_view.xml | 2 +-
.../account/wizard/account_reconcile_view.xml | 4 +--
.../account_statement_from_invoice_view.xml | 2 +-
.../account/wizard/account_use_model_view.xml | 4 +--
.../wizard/account_validate_move_view.xml | 2 +-
addons/crm/report/crm_lead_report_view.xml | 2 +-
.../crm/report/crm_phonecall_report_view.xml | 2 +-
.../report/crm_claim_report_view.xml | 2 +-
.../report/crm_fundraising_report_view.xml | 2 +-
addons/hr_attendance/hr_attendance_view.xml | 2 +-
.../report/hr_evaluation_report_view.xml | 2 +-
.../report/hr_expense_report_view.xml | 2 +-
.../report/available_holidays_view.xml | 2 +-
.../report/hr_holidays_report_view.xml | 2 +-
.../report/hr_recruitment_report_view.xml | 2 +-
.../hr_timesheet_invoice_report_view.xml | 2 +-
.../hr_timesheet_sheet_view.xml | 20 +++++------
.../report/timesheet_report_view.xml | 2 +-
.../mrp/report/mrp_production_order_view.xml | 2 +-
.../report/report_pos_order_view.xml | 13 ++++---
addons/project/report/project_report_view.xml | 2 +-
.../report/project_issue_report_view.xml | 4 +--
.../purchase/report/purchase_report_view.xml | 34 +++++++++----------
addons/sale/report/sale_report_view.xml | 4 +--
.../stock/report/report_stock_move_view.xml | 2 +-
.../report/report_stock_picking_view.xml | 2 +-
46 files changed, 111 insertions(+), 106 deletions(-)
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 1f86fb07b90..2421c4c044d 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -193,7 +193,7 @@
-
+
@@ -202,12 +202,12 @@
-
+
-
-
+
+
-
+
@@ -256,7 +256,7 @@
-
+
@@ -286,7 +286,7 @@
-
+
@@ -295,11 +295,11 @@
-
-
+
+
-
+
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 1b9e166ac81..ab28fa3925c 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -407,9 +407,9 @@
-
-
-
+
+
+
@@ -465,7 +465,7 @@
-
+
@@ -956,8 +956,8 @@
-
-
+
+
@@ -1094,9 +1094,9 @@
-
-
-
+
+
+
@@ -1372,7 +1372,7 @@
-
+
diff --git a/addons/account/project/wizard/project_account_analytic_line_view.xml b/addons/account/project/wizard/project_account_analytic_line_view.xml
index 96d9186cfa8..d564ffb5c81 100644
--- a/addons/account/project/wizard/project_account_analytic_line_view.xml
+++ b/addons/account/project/wizard/project_account_analytic_line_view.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml
index 1564859540a..3b9e3ec193e 100644
--- a/addons/account/report/account_analytic_entries_report_view.xml
+++ b/addons/account/report/account_analytic_entries_report_view.xml
@@ -66,7 +66,7 @@
-
+
diff --git a/addons/account/report/account_analytic_report_view.xml b/addons/account/report/account_analytic_report_view.xml
index 290e6950569..070b3a8c10a 100644
--- a/addons/account/report/account_analytic_report_view.xml
+++ b/addons/account/report/account_analytic_report_view.xml
@@ -82,7 +82,7 @@
-
+
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
index 0c3a77db2a7..5645c34d20c 100644
--- a/addons/account/report/account_entries_report_view.xml
+++ b/addons/account/report/account_entries_report_view.xml
@@ -93,7 +93,7 @@
-
+
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index 542b695e7dd..448f2abaf6d 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -111,7 +111,7 @@
-
+
diff --git a/addons/account/wizard/account_automatic_reconcile_view.xml b/addons/account/wizard/account_automatic_reconcile_view.xml
index 9711fc9b941..02fbb5a7376 100644
--- a/addons/account/wizard/account_automatic_reconcile_view.xml
+++ b/addons/account/wizard/account_automatic_reconcile_view.xml
@@ -21,7 +21,7 @@
-
+
@@ -56,7 +56,7 @@
-
+
diff --git a/addons/account/wizard/account_central_journal_view.xml b/addons/account/wizard/account_central_journal_view.xml
index dfe704c7051..b833af4a9dd 100644
--- a/addons/account/wizard/account_central_journal_view.xml
+++ b/addons/account/wizard/account_central_journal_view.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/addons/account/wizard/account_change_currency_view.xml b/addons/account/wizard/account_change_currency_view.xml
index 5dca78673c5..3eae57dfe61 100644
--- a/addons/account/wizard/account_change_currency_view.xml
+++ b/addons/account/wizard/account_change_currency_view.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/addons/account/wizard/account_chart_view.xml b/addons/account/wizard/account_chart_view.xml
index 66da81d24f6..24a1effb689 100644
--- a/addons/account/wizard/account_chart_view.xml
+++ b/addons/account/wizard/account_chart_view.xml
@@ -17,7 +17,7 @@
-
diff --git a/addons/account/wizard/account_invoice_state_view.xml b/addons/account/wizard/account_invoice_state_view.xml
index e0c22a0007f..8bdfb4ba8e2 100644
--- a/addons/account/wizard/account_invoice_state_view.xml
+++ b/addons/account/wizard/account_invoice_state_view.xml
@@ -10,7 +10,7 @@
-
+
@@ -43,8 +43,8 @@
diff --git a/addons/account/wizard/account_journal_select_view.xml b/addons/account/wizard/account_journal_select_view.xml
index 71a0d591768..d2cfc95a77f 100644
--- a/addons/account/wizard/account_journal_select_view.xml
+++ b/addons/account/wizard/account_journal_select_view.xml
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/addons/account/wizard/account_move_bank_reconcile_view.xml b/addons/account/wizard/account_move_bank_reconcile_view.xml
index 89342803aaf..f17c2396255 100644
--- a/addons/account/wizard/account_move_bank_reconcile_view.xml
+++ b/addons/account/wizard/account_move_bank_reconcile_view.xml
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/addons/account/wizard/account_move_journal_view.xml b/addons/account/wizard/account_move_journal_view.xml
index 7a25932bb98..c423a79e77c 100644
--- a/addons/account/wizard/account_move_journal_view.xml
+++ b/addons/account/wizard/account_move_journal_view.xml
@@ -16,8 +16,8 @@
-
-
+
+
diff --git a/addons/account/wizard/account_move_line_reconcile_select_view.xml b/addons/account/wizard/account_move_line_reconcile_select_view.xml
index dbd25408fe1..08a44a33639 100644
--- a/addons/account/wizard/account_move_line_reconcile_select_view.xml
+++ b/addons/account/wizard/account_move_line_reconcile_select_view.xml
@@ -13,8 +13,8 @@
-
-
+
diff --git a/addons/account/wizard/account_move_line_select_view.xml b/addons/account/wizard/account_move_line_select_view.xml
index d0b6a2f709a..bf3831baea0 100644
--- a/addons/account/wizard/account_move_line_select_view.xml
+++ b/addons/account/wizard/account_move_line_select_view.xml
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/addons/account/wizard/account_move_line_unreconcile_select_view.xml b/addons/account/wizard/account_move_line_unreconcile_select_view.xml
index 7d10c02f010..86681106845 100644
--- a/addons/account/wizard/account_move_line_unreconcile_select_view.xml
+++ b/addons/account/wizard/account_move_line_unreconcile_select_view.xml
@@ -13,8 +13,8 @@
-
-
+
diff --git a/addons/account/wizard/account_open_closed_fiscalyear_view.xml b/addons/account/wizard/account_open_closed_fiscalyear_view.xml
index c5269939e0c..b8c914cd737 100644
--- a/addons/account/wizard/account_open_closed_fiscalyear_view.xml
+++ b/addons/account/wizard/account_open_closed_fiscalyear_view.xml
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/addons/account/wizard/account_partner_balance_report_view.xml b/addons/account/wizard/account_partner_balance_report_view.xml
index 55fb71553d7..35a2556982d 100644
--- a/addons/account/wizard/account_partner_balance_report_view.xml
+++ b/addons/account/wizard/account_partner_balance_report_view.xml
@@ -31,7 +31,7 @@
-
+
diff --git a/addons/account/wizard/account_period_close_view.xml b/addons/account/wizard/account_period_close_view.xml
index 0866e64bdb6..82e7f8b3f3a 100644
--- a/addons/account/wizard/account_period_close_view.xml
+++ b/addons/account/wizard/account_period_close_view.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/addons/account/wizard/account_reconcile_view.xml b/addons/account/wizard/account_reconcile_view.xml
index 0f92376e045..1bed69d45fe 100644
--- a/addons/account/wizard/account_reconcile_view.xml
+++ b/addons/account/wizard/account_reconcile_view.xml
@@ -54,7 +54,7 @@
-
+
@@ -99,7 +99,7 @@
-
+
diff --git a/addons/account/wizard/account_statement_from_invoice_view.xml b/addons/account/wizard/account_statement_from_invoice_view.xml
index 6f17279888c..05b77a1d570 100644
--- a/addons/account/wizard/account_statement_from_invoice_view.xml
+++ b/addons/account/wizard/account_statement_from_invoice_view.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml
index fec632c2e59..ccd8b594296 100644
--- a/addons/account/wizard/account_use_model_view.xml
+++ b/addons/account/wizard/account_use_model_view.xml
@@ -52,7 +52,7 @@
-
+
@@ -67,7 +67,7 @@
-
+
diff --git a/addons/account/wizard/account_validate_move_view.xml b/addons/account/wizard/account_validate_move_view.xml
index 27ca48662bc..d0fd808dd3a 100644
--- a/addons/account/wizard/account_validate_move_view.xml
+++ b/addons/account/wizard/account_validate_move_view.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index 0601cd47c71..1eb4a2928a3 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -126,7 +126,7 @@
domain="[]"
context="{'group_by':'company_id'}" />
-
diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml
index f1f5eb4a490..58136ea7a43 100644
--- a/addons/crm/report/crm_phonecall_report_view.xml
+++ b/addons/crm/report/crm_phonecall_report_view.xml
@@ -136,7 +136,7 @@
domain="[]"
context="{'group_by':'company_id'}" />
-
diff --git a/addons/crm_claim/report/crm_claim_report_view.xml b/addons/crm_claim/report/crm_claim_report_view.xml
index 7892039436c..0664295b83d 100644
--- a/addons/crm_claim/report/crm_claim_report_view.xml
+++ b/addons/crm_claim/report/crm_claim_report_view.xml
@@ -152,7 +152,7 @@
context="{'group_by':'type_id'}" />
-
-
-
+
diff --git a/addons/hr_evaluation/report/hr_evaluation_report_view.xml b/addons/hr_evaluation/report/hr_evaluation_report_view.xml
index 5406a7a3fbd..2a5cbe21ad9 100644
--- a/addons/hr_evaluation/report/hr_evaluation_report_view.xml
+++ b/addons/hr_evaluation/report/hr_evaluation_report_view.xml
@@ -82,7 +82,7 @@
-
+
diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml
index bcc560573ab..b25ba45dd60 100644
--- a/addons/hr_expense/report/hr_expense_report_view.xml
+++ b/addons/hr_expense/report/hr_expense_report_view.xml
@@ -99,7 +99,7 @@
-
+
diff --git a/addons/hr_holidays/report/available_holidays_view.xml b/addons/hr_holidays/report/available_holidays_view.xml
index 5fd9a9c0199..327cdab032b 100644
--- a/addons/hr_holidays/report/available_holidays_view.xml
+++ b/addons/hr_holidays/report/available_holidays_view.xml
@@ -88,7 +88,7 @@
-
+
diff --git a/addons/hr_holidays/report/hr_holidays_report_view.xml b/addons/hr_holidays/report/hr_holidays_report_view.xml
index 24ea6745270..7f42982eaad 100644
--- a/addons/hr_holidays/report/hr_holidays_report_view.xml
+++ b/addons/hr_holidays/report/hr_holidays_report_view.xml
@@ -90,7 +90,7 @@
-
+
diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
index 4fca4a8b239..93a63ca6e49 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml
+++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
@@ -95,7 +95,7 @@
-
+
diff --git a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
index b3f81e5fbb1..882edfeee5a 100644
--- a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
+++ b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
@@ -76,7 +76,7 @@
-
+
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index 51edeea837b..cbaf4cd802f 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -105,12 +105,12 @@
-
+
-
-
-
+
+
+
@@ -121,8 +121,8 @@
-
-
+
+
@@ -176,10 +176,10 @@
-
-
-
-
+
+
+
+
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
index 51e6b5d295c..4a6e486dac3 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
+++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
@@ -91,7 +91,7 @@
-
+
diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml
index 61aff34bf91..9c4d4924924 100644
--- a/addons/mrp/report/mrp_production_order_view.xml
+++ b/addons/mrp/report/mrp_production_order_view.xml
@@ -81,7 +81,7 @@
-
+
diff --git a/addons/point_of_sale/report/report_pos_order_view.xml b/addons/point_of_sale/report/report_pos_order_view.xml
index ecd3d431a3a..3efe9548c70 100644
--- a/addons/point_of_sale/report/report_pos_order_view.xml
+++ b/addons/point_of_sale/report/report_pos_order_view.xml
@@ -38,7 +38,6 @@
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="POS ordered created last 365 days"/>
+
-
@@ -76,7 +81,7 @@
-
+
@@ -90,7 +95,7 @@
form
tree,graph
- {'search_default_month':1,'search_default_User':1}
+ {'search_default_today':1,'search_default_User':1}
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index 9b685001664..92edbc78d77 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -117,7 +117,7 @@
-
+
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index b4d0af02185..c422d987db5 100644
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -93,7 +93,7 @@
-
@@ -118,7 +118,7 @@
context="{'group_by':'company_id'}" />
-
-
-
-
-
-
@@ -80,21 +80,21 @@
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml
index 4e6d75694fe..41ebc1de088 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -78,7 +78,7 @@
-
@@ -99,7 +99,7 @@
-
+
diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml
index e8ec9ed2983..0f41c0e4b3b 100644
--- a/addons/stock/report/report_stock_move_view.xml
+++ b/addons/stock/report/report_stock_move_view.xml
@@ -98,7 +98,7 @@
-
+
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index a14298ff771..83405f2c1bf 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -83,7 +83,7 @@
-
+
From b0a2103e5973b73ff5bb752a7939777df6e03110 Mon Sep 17 00:00:00 2001
From: Fabien Pinckaers
Date: Wed, 16 Jun 2010 14:25:03 +0200
Subject: [PATCH 4/4] removed not clean module
bzr revid: fp@tinyerp.com-20100616122503-swfhu1nwxwzsmctk
---
addons/stock_avg_consommation/__init__.py | 25 -----
addons/stock_avg_consommation/__openerp__.py | 35 ------
.../stock_avg_consommation.py | 100 ------------------
.../stock_avg_consommation_view.xml | 18 ----
.../stock_avg_consommation/wizard/__init__.py | 24 -----
.../wizard/stock_avg_consommation_wizard.py | 57 ----------
6 files changed, 259 deletions(-)
delete mode 100644 addons/stock_avg_consommation/__init__.py
delete mode 100644 addons/stock_avg_consommation/__openerp__.py
delete mode 100644 addons/stock_avg_consommation/stock_avg_consommation.py
delete mode 100644 addons/stock_avg_consommation/stock_avg_consommation_view.xml
delete mode 100644 addons/stock_avg_consommation/wizard/__init__.py
delete mode 100644 addons/stock_avg_consommation/wizard/stock_avg_consommation_wizard.py
diff --git a/addons/stock_avg_consommation/__init__.py b/addons/stock_avg_consommation/__init__.py
deleted file mode 100644
index c4d17a90d9a..00000000000
--- a/addons/stock_avg_consommation/__init__.py
+++ /dev/null
@@ -1,25 +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 stock_avg_consommation
-import wizard
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_avg_consommation/__openerp__.py b/addons/stock_avg_consommation/__openerp__.py
deleted file mode 100644
index 37008770cae..00000000000
--- a/addons/stock_avg_consommation/__openerp__.py
+++ /dev/null
@@ -1,35 +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 .
-#
-##############################################################################
-
-
-{
- 'name': 'Stock Average consommation',
- 'version': '1.0',
- 'category': 'Generic Modules/Inventory Control',
- 'author': 'Tiny',
- 'depends': ['stock'],
- 'init_xml': [],
- 'update_xml': ['stock_avg_consommation_view.xml'],
- 'demo_xml': [],
- 'installable': True,
- 'active': False,
-}
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_avg_consommation/stock_avg_consommation.py b/addons/stock_avg_consommation/stock_avg_consommation.py
deleted file mode 100644
index b9dab63d18b..00000000000
--- a/addons/stock_avg_consommation/stock_avg_consommation.py
+++ /dev/null
@@ -1,100 +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 .
-#
-##############################################################################
-
-from osv import fields,osv
-import tools
-import ir
-import pooler
-from mx import DateTime
-from datetime import datetime
-import time
-from dateutil.relativedelta import relativedelta
-
-class stock_avg_consommation(osv.osv):
- _name = "stock.avg.consommation"
- _inherit="product.product"
-
- def _compute_avg_consommation(self, cr, uid, ids, fields, args, context={}):
- print ids, fields, args, context
- date_str=False
- from_date=context.get('from_date',False)
- to_date=context.get('to_date',False)
-
- if from_date and to_date:
- date_str="date_planned>='%s' and date_planned<='%s'"%(from_date,to_date)
- elif from_date:
- date_str="date_planned>='%s'"%(from_date)
- elif to_date:
- date_str="date_planned<='%s'"%(to_date)
-
- date_object_to = to_date and datetime.strptime(to_date, '%Y-%m-%d %H:%M:%S') or datetime.now()
- date_object_from = from_date and datetime.strptime(from_date, '%Y-%m-%d %H:%M:%S') or (datetime.now() + relativedelta(days=-30))
- dd = date_object_to - date_object_from
- total_days=dd.days+1
- if not from_date and not to_date:
- date_str="date_planned>='%s' and date_planned<='%s'"%(date_object_from.strftime('%Y-%m-%d 00:00:00'), date_object_to.strftime('%Y-%m-%d 23:59:59'))
- elif not from_date:
- date_str="date_planned>='%s'"%(date_object_from.strftime('%Y-%m-%d 00:00:00'))
- elif not to_date:
- date_str="date_planned<='%s'"%(date_object_to.strftime('%Y-%m-%d 23:59:59'))
- res={}
- for line_id in ids:
- res[line_id] = False
- location_ids = []
-
- if context.get('location', False):
- if type(context['location']) == type(1):
- location_ids = [context['location']]
- elif type(context['location']) in (type(''), type(u'')):
- location_ids = self.pool.get('stock.location').search(cr, uid, [('name','ilike',context['location'])], context=context)
- else:
- location_ids = context['location']
- else:
- location_ids = []
- wids = self.pool.get('stock.warehouse').search(cr, uid, [], context=context)
- for w in self.pool.get('stock.warehouse').browse(cr, uid, wids, context=context):
- location_ids.append(w.lot_stock_id.id)
-
- # build the list of ids of children of the location given by id
- if context.get('compute_child',True):
- child_location_ids = self.pool.get('stock.location').search(cr, uid, [('location_id', 'child_of', location_ids)])
- location_ids = child_location_ids or location_ids
- else:
- location_ids = location_ids
-
-
-
- #sql = """select product_id,sum(product_qty) from stock_move sm,stock_picking sp where sm.picking_id=sp.id and sp.type in ('out','delivery') and %s and location_id <> ANY(%s) and location_dest_id =ANY(%s) group by product_id""" % (date_str, location_ids, location_ids)
- sql = """select product_id,sum(product_qty) from stock_move sm,stock_picking sp where sm.picking_id=sp.id and sp.type in ('out','delivery') and """+date_str+""" and sm.location_id not in %s and sm.location_dest_id in %s group by product_id"""
- cr.execute(sql, [tuple(location_ids), tuple(location_ids)])
- product_ids = []
- res_sum = cr.fetchall()
- for line_id, avg in res_sum:
- res[line_id] = avg/total_days
- product_ids.append(avg)
- return res
-
- _columns = {
- 'avg_consommation':fields.function(_compute_avg_consommation,method=True, type='float', string="Average Consommation"),
- }
-stock_avg_consommation()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_avg_consommation/stock_avg_consommation_view.xml b/addons/stock_avg_consommation/stock_avg_consommation_view.xml
deleted file mode 100644
index d9afed69af3..00000000000
--- a/addons/stock_avg_consommation/stock_avg_consommation_view.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
- stock.avg.consommation.tree
- stock.avg.consommation
- tree
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/stock_avg_consommation/wizard/__init__.py b/addons/stock_avg_consommation/wizard/__init__.py
deleted file mode 100644
index a7d7cfed3dc..00000000000
--- a/addons/stock_avg_consommation/wizard/__init__.py
+++ /dev/null
@@ -1,24 +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 stock_avg_consommation_wizard
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/stock_avg_consommation/wizard/stock_avg_consommation_wizard.py b/addons/stock_avg_consommation/wizard/stock_avg_consommation_wizard.py
deleted file mode 100644
index 7d5d8657aa2..00000000000
--- a/addons/stock_avg_consommation/wizard/stock_avg_consommation_wizard.py
+++ /dev/null
@@ -1,57 +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 .
-#
-##############################################################################
-
-from osv import fields, osv
-
-class stock_location_product(osv.osv_memory):
- _inherit = "stock.location.product"
-
- def action_open_window(self, cr, uid, ids, context):
- """ To open location wise product information specific to given duration
- @param self: The object pointer.
- @param cr: A database cursor
- @param uid: ID of the user currently logged in
- @param ids: An ID or list of IDs if we want more than one
- @param context: A standard dictionary
- @return: Invoice type
- """
-
- mod_obj = self.pool.get('ir.model.data')
- view = mod_obj._get_id(cr, uid, 'stock_avg_consommation', 'stock_avg_consommation_tree')
- id = mod_obj.read(cr, uid, view, ['res_id'])
-
- for location_obj in self.read(cr, uid, ids, ['from_date', 'to_date']):
- return {
- 'name': False,
- 'view_id':[id['res_id']],
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'stock.avg.consommation',
- 'type': 'ir.actions.act_window',
- 'context': {'location': context['active_id'],
- 'from_date': location_obj['from_date'],
- 'to_date': location_obj['to_date']},
- 'domain': [('type', '<>', 'service')],
- }
-
-stock_location_product()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file