~openerp-chinese-team/openerp-china/openerp-china

« back to all changes in this revision

Viewing changes to shineit_po/report/po_report.py

  • Committer: JoshuaJan
  • Date: 2012-02-21 03:21:40 UTC
  • Revision ID: joshua@openerp.cn-20120221032140-4wwk95ftpf9x24ec
change the shipped date for report MM

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
            'time':time,
12
12
            'get_po':self._get_po,
13
13
            'get_move':self._get_move,
 
14
            'format_num':self._format_num,
14
15
            })
15
16
 
 
17
    def _format_num(self, num, digits=2):
 
18
        if int(num) == num:
 
19
            return int(num)
 
20
        if round(num,1) == round(num,2):
 
21
            return self.formatLang(num,1)
 
22
        else:
 
23
            return self.formatLang(num,digits)
 
24
     
16
25
    def _get_po(self, so_name=None, product_id=None):
17
26
        result = {}
18
27
        po_obj = self.pool.get('purchase.order')