← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/pso-dev-addons3 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3

 

pso (Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/pso-dev-addons3 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #438717 Error in account_anglo_saxon when using foreign currency
  https://bugs.launchpad.net/bugs/438717
  #539539 product - VAT definition - multicompany
  https://bugs.launchpad.net/bugs/539539
  #589256 Wrong tax calculation in point of sale (POS)
  https://bugs.launchpad.net/bugs/589256
  #617974 trunk - hr payment - rounding issue payment slip
  https://bugs.launchpad.net/bugs/617974
  #646350 [trunk] sale analysis - wrong average price
  https://bugs.launchpad.net/bugs/646350
  #663585 [6.0rc1] suggested improvements to PO and SO form view
  https://bugs.launchpad.net/bugs/663585
  #663967 [RC1] SO -History - can delete related invoice
  https://bugs.launchpad.net/bugs/663967
  #666592 save and close crash adding product in point of sale
  https://bugs.launchpad.net/bugs/666592
  #669360 hr_timeeshet_sheet : installation fails on 1st (and probably last) date of the month.
  https://bugs.launchpad.net/bugs/669360
  #669533 [hr_timesheet] Employee timesheet reports confuse employee id and user id
  https://bugs.launchpad.net/bugs/669533
  #672684 Manual Global Tax
  https://bugs.launchpad.net/bugs/672684
  #673835 Sales, Purchase and Invoice Analysis Problem
  https://bugs.launchpad.net/bugs/673835
  #689924 [sale_margin] purchase price is wrong
  https://bugs.launchpad.net/bugs/689924
  #691810 Cannot cancel invoice BUG
  https://bugs.launchpad.net/bugs/691810
  #692456 Sale Order Reference not unique
  https://bugs.launchpad.net/bugs/692456
  #692735 [6.0] sales - canceled SO should not be black (normal)
  https://bugs.launchpad.net/bugs/692735
  #692964 in hr_recruitment, add a column "Subject" in applicants list view
  https://bugs.launchpad.net/bugs/692964
  #692976 expenses list shouldn't be editable
  https://bugs.launchpad.net/bugs/692976
  #693788 payroll compute sheet error
  https://bugs.launchpad.net/bugs/693788
  #694107 Point of Sale Journals credits customer debtor account instead of product's income accounts (v6rc1)
  https://bugs.launchpad.net/bugs/694107
  #694876 [6.0] dashboard finance - company analysis - P&L accounts seems to use data of all periods/fy
  https://bugs.launchpad.net/bugs/694876

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/pso-dev-addons3/+merge/45236

Hello,

Improved yml and demo files to remove static datetime values with datetime lib.

Thanks,
pso (Open ERP)
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/pso-dev-addons3/+merge/45236
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/pso-dev-addons3 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'point_of_sale/point_of_sale_demo.xml'
--- point_of_sale/point_of_sale_demo.xml	2010-12-30 09:58:09 +0000
+++ point_of_sale/point_of_sale_demo.xml	2011-01-05 13:42:57 +0000
@@ -26,7 +26,7 @@
 			<field eval="0" name="reconciled"/>
 			<field eval="450.0" name="residual"/>
 			<field name="move_name">/</field>
-			<field name="date_invoice">2010-10-07</field>
+			<field name="date_invoice">time.strftime('%Y-%m-%d')</field>
 			<field name="period_id" ref="account.period_10"/>
 			<field eval="450.0" name="amount_untaxed"/>
 			<field model="account.move" name="move_id" search="[('name', '=', u'SAJ/2010/010')]"/>
@@ -53,7 +53,7 @@
 			<field name="date_validity">2011-04-07</field>
 			<field name="shop_id" ref="sale.shop"/>
 			<field name="user_salesman_id" ref="base.user_root"/>
-			<field name="date_order">2010-10-07 16:53:11</field>
+			<field name="date_order">time.strftime('%Y-%m-%d %H:%M:%S')</field>
 			<field name="partner_id" ref="base.res_partner_agrolait"/>
 			<field eval="1" name="nb_print"/>
 			<field name="user_id" ref="base.user_root"/>
@@ -62,7 +62,7 @@
 			<field name="state">paid</field>
 			<field name="sale_manager" ref="base.user_root"/>
 			<field name="pricelist_id" ref="product.list0"/>
-			<field name="date_validation">2010-10-07</field>
+			<field name="date_validation">time.strftime('%Y-%m-%d')</field>
 			<field name="name">POS/019</field>
 			<field name="price_type">tax_excluded</field>
 			<field model="account.invoice" name="invoice_id" search="[('name', '=', u'Invoice from POS: POS/019')]"/>
@@ -76,7 +76,7 @@
 			<field name="journal_id" ref="account.sales_journal"/>
 			<field name="company_id" ref="base.main_company"/>
 			<field name="period_id" ref="account.period_10"/>
-			<field name="date">2010-10-07</field>
+			<field name="date">time.strftime('%Y-%m-%d')</field>
 		</record>
 		<record id="account_bank_statement_line_paymentpos0" model="account.bank.statement.line">
 			<field name="partner_id" ref="base.res_partner_agrolait"/>
@@ -87,7 +87,7 @@
 			<field name="account_id" ref="account.a_recv"/>
 			<field name="journal_id">Cash Journal - (test)</field>
 			<field eval="[(6,0,[])]" name="move_ids"/>
-			<field name="date">2010-10-07</field>
+			<field name="date">time.strftime('%Y-%m-%d')</field>
 			<field eval="450.0" name="amount"/>
 			<field eval="0" name="is_acc"/>
 			<field eval="0" name="am_out"/>
@@ -98,18 +98,18 @@
 		<record id="stock_picking_out0" model="stock.picking">
 			<field name="origin">POS/019</field>
 			<field model="pos.order" name="pos_order" search="[('name', '=', u'POS/019')]"/>
-			<field name="date_done">2010-10-07 16:53:46</field>
+			<field name="date_done">time.strftime('%Y-%m-%d %H:%M:%S')</field>
 			<field eval="1" name="auto_picking"/>
 			<field name="move_type">direct</field>
 			<field name="company_id" ref="base.main_company"/>
 			<field name="note">POS notes </field>
 			<field name="state">done</field>
 			<field name="type">out</field>
-			<field name="min_date">2010-10-07 16:53:46</field>
-			<field name="date">2010-10-07 16:33:30</field>
+			<field name="min_date">time.strftime('%Y-%m-%d %H:%M:%S')</field>
+			<field name="date">time.strftime('%Y-%m-%d %H:%M:%S')</field>
 			<field name="name">OUT/00019</field>
 			<field name="invoice_state">none</field>
-			<field name="max_date">2010-10-07 16:53:46</field>
+			<field name="max_date">time.strftime('%Y-%m-%d %H:%M:%S')</field>
 		</record>
 		<record id="stock_move_stockmovepos0" model="stock.move">
 			<field name="origin">POS/019</field>
@@ -123,12 +123,12 @@
 			<field name="company_id" ref="base.main_company"/>
 			<field name="state">done</field>
 			<field eval="[(6,0,[])]" name="move_history_ids"/>
-			<field name="date_expected">2010-10-07 16:33:30</field>
-			<field name="date">2010-10-07 16:33:30</field>
+			<field name="date_expected">time.strftime('%Y-%m-%d %H:%M:%S')</field>
+			<field name="date">time.strftime('%Y-%m-%d %H:%M:%S')</field>
 			<field name="name">Stock move (POS 12)</field>
 			<field eval="[(6,0,[])]" name="move_history_ids2"/>
 			<field name="product_id" ref="product.product_product_pc1"/>
-			<field name="date_planned">2010-10-07 16:53:46</field>
+			<field name="date_planned">time.strftime('%Y-%m-%d %H:%M:%S')</field>
 			<field name="location_dest_id" ref="stock.stock_location_customers"/>
 			<field model="stock.picking" name="picking_id" search="[('name', '=', u'OUT/00019')]"/>
 		</record>
@@ -166,7 +166,7 @@
 		
 		<record id="line1_pos" model="pos.order.line">
             <field name="order_id" ref="order_pos1"/>
-            <field name="date_planned">2010/09/15</field>
+            <field name="date_planned">time.strftime('%Y-%m-%d')</field>
             <field name="name">[PC3] Medium PC</field>
             <field name="product_id" ref="product.product_product_pc3"/>
             <field model="res.company" name="company_id" search="[]"/>
@@ -178,7 +178,7 @@
         
         <record id="line12_pos" model="pos.order.line">
             <field name="order_id" ref="order_pos1"/>
-            <field name="date_planned">2010/09/15</field>
+            <field name="date_planned">time.strftime('%Y-%m-%d')</field>
             <field name="name">[PC2] Basic+ PC (assembly on order)</field>
             <field name="product_id" ref="product.product_product_pc2"/>
             <field model="res.company" name="company_id" search="[]"/>
@@ -190,7 +190,7 @@
         
         <record id="line2_pos" model="pos.order.line">
             <field name="order_id" ref="order_pos2"/>
-            <field name="date_planned">2010/09/15</field>
+            <field name="date_planned">time.strftime('%Y-%m-%d')</field>
             <field name="name">[PC1] Basic PC</field>
             <field name="product_id" ref="product.product_product_pc1"/>
             <field model="res.company" name="company_id" search="[]"/>

=== modified file 'point_of_sale/test/point_of_sale_report.yml'
--- point_of_sale/test/point_of_sale_report.yml	2010-12-30 09:58:09 +0000
+++ point_of_sale/test/point_of_sale_report.yml	2011-01-05 13:42:57 +0000
@@ -89,11 +89,11 @@
   !record {model: account.bank.statement, id: account_bank_statement_st0}:
     name: St.05/19
     balance_end_real: 0.0
-    date: '2010-05-19'
+    date: !eval time.strftime('%Y-%m-%d')
     journal_id: account_journal_cash0
     line_ids:
         - name: statement
-          date: "2010-10-13"
+          date: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month+5,datetime.now().day)"
           type: customer
           account_id: account_pos_account_sales
           amount: 100

=== modified file 'point_of_sale/test/point_of_sale_test.yml'
--- point_of_sale/test/point_of_sale_test.yml	2010-12-30 09:58:09 +0000
+++ point_of_sale/test/point_of_sale_test.yml	2011-01-05 13:42:57 +0000
@@ -289,8 +289,8 @@
 -
   !record {model: pos.order, id: pos_order_pos0}:
     company_id: base.main_company
-    date_order: '2010-05-13 15:02:48'
-    date_validity: '2010-11-13'
+    date_order: !eval time.strftime('%Y-%m-%d %H:%M:%S')
+    date_validity: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month+6,datetime.now().day)"
     lines:
       - company_id: base.main_company
         name: Order Line/01
@@ -336,7 +336,7 @@
   !record {model: pos.make.payment, id: pos_make_payment_0}:
     amount: 1615.0
     journal: 7
-    payment_date: "2010-05-13"
+    payment_date: !eval time.strftime("%Y-%m-%d")
     payment_name: Payment
     product_id: product_product_hppaviliondesktoppcs0
     pricelist_id: product.list0
@@ -398,7 +398,7 @@
   !record {model: pos.make.payment, id: pos_make_payment_1}:
     amount: 680.0
     journal: 7
-    payment_date: "2010-05-13"
+    payment_date: !eval time.strftime("%Y-%m-%d")
     payment_name: Payment
     product_id: product_product_hppaviliondesktoppcs0
     pricelist_id: product.list0

=== modified file 'project/test/test_project.yml'
--- project/test/test_project.yml	2010-12-30 09:58:09 +0000
+++ project/test/test_project.yml	2011-01-05 13:42:57 +0000
@@ -10,7 +10,7 @@
   Create task 'Technical Training' for this project
 -
   !record {model: project.task, id: project_task_technicaltraining0}:
-    date_start: '2010-05-31 11:48:38'
+    date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S')
     name: Technical Training
     planned_hours: 30.0
     project_id: project_project_openerptrainingprogramme0
@@ -20,7 +20,7 @@
   Create task 'Functional Training' for this project
 -
   !record {model: project.task, id: project_task_functionaltraining0}:
-    date_start: '2010-05-31 11:49:11'
+    date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S')
     name: Functional Training
     planned_hours: 30.0
     project_id: project_project_openerptrainingprogramme0
@@ -136,7 +136,7 @@
 -
   !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
     work_ids:
-      - date: '2010-05-31 15:04:22'
+      - date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
         hours: 10.0
         name: Training on OpenERP modules, models and classes
         user_id: base.user_root
@@ -151,7 +151,7 @@
 -
   !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
     work_ids:
-      - date: '2010-06-01 15:04:46'
+      - date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
         hours: 10.0
         name: Training on OpenERP xml views
         user_id: base.user_root
@@ -166,7 +166,7 @@
 -
   !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
     work_ids:
-      - date: '2010-06-02 15:05:24'
+      - date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
         hours: 10.0
         name: Training on workflows
         user_id: base.user_root
@@ -202,7 +202,7 @@
 -
   !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
     work_ids:
-      - date: '2010-05-31 15:08:40'
+      - date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
         hours: 10.0
         name: Training on reports and wizards
         user_id: base.user_root
@@ -253,7 +253,7 @@
 -
   !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}:
     work_ids:
-      - date: '2010-05-31 16:55:27'
+      - date: !eval time.strftime('%Y-%m-%d %H:%M:%S')
         hours: 5.0
         name: Training on yml
         user_id: base.user_root

=== modified file 'project_long_term/test/schedule_phase_tasks.yml'
--- project_long_term/test/schedule_phase_tasks.yml	2010-12-30 09:58:09 +0000
+++ project_long_term/test/schedule_phase_tasks.yml	2011-01-05 13:42:57 +0000
@@ -15,7 +15,7 @@
   Create phase 'Develop GUI' in Outlook
 - 
   !record {model: project.phase, id: project_phase_phase0}:
-    date_start: '2010-06-02'
+    date_start: !eval time.strftime("%Y-%m-%d")
     duration: 200.0
     name: Develop GUI in Outlook
     product_uom: product.uom_day

=== modified file 'project_long_term/test/schedule_project_phases.yml'
--- project_long_term/test/schedule_project_phases.yml	2010-12-30 09:58:09 +0000
+++ project_long_term/test/schedule_project_phases.yml	2011-01-05 13:42:57 +0000
@@ -9,7 +9,7 @@
   Create a project phase 'Defining Client's Basic Idea of Project'
 - 
   !record {model: project.phase, id: project_phase_definingclientsbasicideaofproject0}:
-    date_start: '2010-06-02'
+    date_start: !eval time.strftime('%Y-%m-%d')
     duration: 15.0
     name: "Defining Client's Basic Idea of Project"
     product_uom: product.uom_day
@@ -20,7 +20,7 @@
   Create project phase 'Establishing Project Feasibility'
 - 
   !record {model: project.phase, id: project_phase_establishingprojectfeasibility0}:
-    date_start: '2010-06-02'
+    date_start: !eval time.strftime('%Y-%m-%d')
     duration: 30.0
     name: Establishing Project Feasibility
     product_uom: product.uom_day
@@ -30,7 +30,7 @@
   Create project phase 'Preparation of Engineering Designs'
 - 
   !record {model: project.phase, id: project_phase_preparationofengineeringdesigns0}:
-    date_start: '2010-06-02'
+    date_start: !eval time.strftime('%Y-%m-%d')
     duration: 100.0
     name: Preparation of Engineering Designs
     product_uom: product.uom_hour
@@ -41,7 +41,7 @@
   Create project phase 'Procurement of Works and Goods'
 - 
   !record {model: project.phase, id: project_phase_procurementofworksandgoods0}:
-    date_start: '2010-06-02'
+    date_start: !eval time.strftime('%Y-%m-%d')
     duration: 24.0
     name: Procurement of Works and Goods
     product_uom: product.uom_hour
@@ -52,7 +52,7 @@
   Create project phase 'Project Construction'
 - 
   !record {model: project.phase, id: project_phase_projectconstruction0}:
-    date_start: '2010-06-02'
+    date_start: !eval time.strftime('%Y-%m-%d')
     duration: 4320.0
     name: Project Construction
     product_uom: product.uom_hour
@@ -63,7 +63,7 @@
   Create project phase 'Project Completion'
 - 
   !record {model: project.phase, id: project_phase_projectcompletion0}:
-    date_start: '2010-06-02'
+    date_start: !eval time.strftime('%Y-%m-%d')
     duration: 240.0
     name: Project Completion
     product_uom: product.uom_hour

=== modified file 'project_long_term/test/schedule_project_tasks.yml'
--- project_long_term/test/schedule_project_tasks.yml	2010-12-30 09:58:09 +0000
+++ project_long_term/test/schedule_project_tasks.yml	2011-01-05 13:42:57 +0000
@@ -16,7 +16,7 @@
   Create phase 'Develop GUI' in thunderbird
 - 
   !record {model: project.phase, id: project_phase_phase1}:
-    date_start: '2010-06-02'
+    date_start: !eval time.strftime('%Y-%m-%d')
     duration: 200.0
     name: Develop GUI in thunderbird
     product_uom: product.uom_day

=== modified file 'project_mrp/test/project_task_procurement.yml'
--- project_mrp/test/project_task_procurement.yml	2010-12-30 09:58:09 +0000
+++ project_mrp/test/project_task_procurement.yml	2011-01-05 13:42:57 +0000
@@ -19,7 +19,7 @@
   I create a sale order for product Partners Training which has type 'Service'.
 - 
   !record {model: sale.order, id: sale_order_so0}:
-    date_order: '2010-05-21'
+    date_order: !eval time.strftime('%Y-%m-%d')
     invoice_quantity: order
     name: SO006
     order_policy: manual

=== modified file 'project_planning/test/planning_states.yml'
--- project_planning/test/planning_states.yml	2010-12-30 09:58:09 +0000
+++ project_planning/test/planning_states.yml	2011-01-05 13:42:57 +0000
@@ -3,8 +3,8 @@
 - 
   !record {model: report_account_analytic.planning, id: report_account_analytic_planning_projectplanning0}:
     business_days: 20
-    date_from: '2010-06-01'
-    date_to: '2010-06-30'
+    date_from: !eval time.strftime('%Y-%m-%d')
+    date_to: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month+1,datetime.now().day)"
     name: Project Planning
     state: draft
     user_id: base.user_demo

=== modified file 'project_retro_planning/test/deadline_change.yml'
--- project_retro_planning/test/deadline_change.yml	2010-12-30 09:58:09 +0000
+++ project_retro_planning/test/deadline_change.yml	2011-01-05 13:42:57 +0000
@@ -10,9 +10,9 @@
   Create task 'Plan all projects'
 - 
   !record {model: project.task, id: project_task_planallprojects0}:
-    date_deadline: '2010-06-07'
-    date_end: '2010-06-04 14:00:00'
-    date_start: '2010-06-01 17:25:32'
+    date_deadline: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month,datetime.now().day+6)"
+    date_end: !eval "'%s-%s-%s %s:%s:%s' %(datetime.now().year,datetime.now().month,datetime.now().day+3,datetime.now().hour,datetime.now().minute,datetime.now().second)"
+    date_start: !eval time.strftime('%Y-%m-%d %H:%M:%S')
     name: Plan all projects
     planned_hours: 24.0
     project_id: project_project_retroplanning0


Follow ups