← Back to team overview

openerp-dev-web team mailing list archive

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

 

Meera Trambadia (OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #600547 Invoice totals not updated when a line is moved (store={...} bug?)
  https://bugs.launchpad.net/bugs/600547
  #690895 copy account.move crash 
  https://bugs.launchpad.net/bugs/690895
  #694144 [6.0] sales manager dashboard - sales by month - sql query error, usabiliy
  https://bugs.launchpad.net/bugs/694144
  #695632 [RC1]Two same fields creating problem in web-client
  https://bugs.launchpad.net/bugs/695632
  #695960 [6.0RC1][hr_timesheet]Problems printing timesheet reports
  https://bugs.launchpad.net/bugs/695960
  #702805 an employee shouldn't be able to see expenses and holidays of others employee
  https://bugs.launchpad.net/bugs/702805
  #703836 [Trunk] hr_expense: Invoice button not working
  https://bugs.launchpad.net/bugs/703836
  #705766 Wrong Picked Widget in Sale Order in OpenERP v6.0.1
  https://bugs.launchpad.net/bugs/705766
  #707144 [6.0] hr_payroll 'C/D' versus 'D/C' 
  https://bugs.launchpad.net/bugs/707144

For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1/+merge/47368

[FIX] hr_payroll:removed extra table from report and changed the label" --fixes lp:707144 
[FIX] sale:picked progressbar now shows the amount(percentage) of picking done --fixes lp:705766 
-- 
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1/+merge/47368
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-mtr1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'hr_payroll/report/report_payroll_advice.rml'
--- hr_payroll/report/report_payroll_advice.rml	2011-01-14 00:11:01 +0000
+++ hr_payroll/report/report_payroll_advice.rml	2011-01-25 08:33:07 +0000
@@ -126,30 +126,6 @@
   </stylesheet>
   <story>
   <pto>
-  <pto_header>
-    <blockTable colWidths="61.0,166.0,84.0,82.0,111.0,35.0" style="Table4">
-      <tr>
-        <td>
-          <para style="terp_tblheader_Details">SI. No.</para>
-        </td>
-        <td>
-          <para style="terp_tblheader_Details">Name of the Employee</para>
-        </td>
-        <td>
-          <para style="terp_tblheader_Details_Right">Amount</para>
-        </td>
-        <td>
-          <para style="terp_tblheader_Details_Right">By Salary</para>
-        </td>
-        <td>
-          <para style="terp_tblheader_Details">Bank Account</para>
-        </td>
-        <td>
-          <para style="terp_tblheader_Details">C/D</para>
-        </td>
-      </tr>
-    </blockTable>
-  </pto_header>
     <para style="terp_default_8">[[repeatIn(objects,'o')]]</para>
     <blockTable colWidths="269.0,269.0" style="Table1">
       <tr>
@@ -239,7 +215,7 @@
           <para style="terp_tblheader_Details">Bank Account</para>
         </td>
         <td>
-          <para style="terp_tblheader_Details">C/D</para>
+          <para style="terp_tblheader_Details">D/C</para>
         </td>
       </tr>
     </blockTable>

=== modified file 'sale/sale.py'
--- sale/sale.py	2011-01-19 08:38:17 +0000
+++ sale/sale.py	2011-01-25 08:33:07 +0000
@@ -95,7 +95,7 @@
         for id in ids:
             res[id] = [0.0, 0.0]
         cr.execute('''SELECT
-                p.sale_id, sum(m.product_qty), mp.state as mp_state
+                p.sale_id, sum(m.product_qty), mp.state as mp_state, m.state as state, p.type as tp
             FROM
                 stock_move m
             LEFT JOIN
@@ -103,15 +103,21 @@
             LEFT JOIN
                 procurement_order mp on (mp.move_id=m.id)
             WHERE
-                p.sale_id IN %s GROUP BY mp.state, p.sale_id''', (tuple(ids),))
-        for oid, nbr, mp_state in cr.fetchall():
-            if mp_state == 'cancel':
+                p.sale_id IN %s GROUP BY m.state, mp.state, p.sale_id, p.type''', (tuple(ids),))
+        
+        for oid, nbr, state, move_state, type_pick in cr.fetchall():
+            if state == 'cancel':
                 continue
-            if mp_state == 'done':
+            res[oid][1] += nbr or 0.0
+            if state == 'done' or move_state == 'done':
                 res[oid][0] += nbr or 0.0
-                res[oid][1] += nbr or 0.0
-            else:
-                res[oid][1] += nbr or 0.0
+                
+            if type_pick == 'in':#this is a returned picking
+                res[oid][1] -= 2*nbr or 0.0 # Deducting the return picking qty
+                if state == 'done' or move_state == 'done':
+                    nbr += nbr
+                res[oid][0] -= nbr or 0.0   
+                
         for r in res:
             if not res[r][1]:
                 res[r] = 0.0


Follow ups