← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/uco-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1

 

Ujjvala Collins (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/uco-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #530681 [trunk - base_calendar] exrule field without functionality [IMP]
  https://bugs.launchpad.net/bugs/530681
  #681463 [6.0][project] template project shouldn't pollute the analytic chart of account
  https://bugs.launchpad.net/bugs/681463
  #697443 Bug in the tree view of the projects, when grouping by parent
  https://bugs.launchpad.net/bugs/697443
  #701556 name trouble in phone call section in partner from view
  https://bugs.launchpad.net/bugs/701556

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/uco-dev-addons1/+merge/46470

[Bug-fixes]
--------------
* lp:681463, [6.0][project] template project shouldn't pollute the analytic chart of account.
  -> project, analytic: Template project shouldn't pollute the analytic chart of account.
* lp:530681, [trunk - base_calendar] exrule field without functionality [IMP]
  -> crm: Added exrule field in the view for recurrency with exception rules.


-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/uco-dev-addons1/+merge/46470
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/uco-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1.
=== modified file 'account/project/project_view.xml'
--- account/project/project_view.xml	2011-01-14 00:11:01 +0000
+++ account/project/project_view.xml	2011-01-17 12:14:18 +0000
@@ -53,7 +53,7 @@
             <field name="name">account.analytic.account.tree</field>
             <field name="model">account.analytic.account</field>
             <field name="type">tree</field>
-            <field name="field_parent">child_ids</field>
+            <field name="field_parent">child_complete_ids</field>
             <field name="arch" type="xml">
                 <tree colors="red:(date&lt;current_date);black:(date&gt;=current_date);black:(date==False)" string="Analytic account" toolbar="1">
                     <field name="name"/>

=== modified file 'analytic/analytic.py'
--- analytic/analytic.py	2011-01-14 00:11:01 +0000
+++ analytic/analytic.py	2011-01-17 12:14:18 +0000
@@ -109,6 +109,20 @@
     def _complete_name_calc(self, cr, uid, ids, prop, unknow_none, unknow_dict):
         res = self.name_get(cr, uid, ids)
         return dict(res)
+    
+    def _child_compute(self, cr, uid, ids, name, arg, context=None):
+        result = {}
+        if context is None:
+            context = {}
+        
+        for account in self.browse(cr, uid, ids, context=context):
+            for child in account.child_ids:
+                if child.state == 'template':
+                    account.child_ids.pop(account.child_ids.index(child))
+            result[account.id] = map(lambda x: x.id, account.child_ids)
+
+        return result
+
 
     _columns = {
         'name': fields.char('Account Name', size=128, required=True),
@@ -118,6 +132,7 @@
         'description': fields.text('Description'),
         'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', select=2),
         'child_ids': fields.one2many('account.analytic.account', 'parent_id', 'Child Accounts'),
+        'child_complete_ids': fields.function(_child_compute, relation='account.analytic.account', method=True, string="Account Hierarchy", type='many2many'),
         'line_ids': fields.one2many('account.analytic.line', 'account_id', 'Analytic Entries'),
         'balance': fields.function(_debit_credit_bal_qtty, method=True, type='float', string='Balance', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),
         'debit': fields.function(_debit_credit_bal_qtty, method=True, type='float', string='Debit', multi='debit_credit_bal_qtty', digits_compute=dp.get_precision('Account')),

=== modified file 'crm/crm_meeting_view.xml'
--- crm/crm_meeting_view.xml	2011-01-14 00:11:01 +0000
+++ crm/crm_meeting_view.xml	2011-01-17 12:14:18 +0000
@@ -182,7 +182,9 @@
                                 <newline />
                                 <field name="end_date" attrs="{'invisible' : [('end_type', '!=', 'end_date')] }"/>
                                 <newline />
-                           
+                                
+                                <separator string="Set exception rule" colspan="4"/>
+                                <field name="exrule" colspan="2"/>
                       
                             </group>
                             <group col="8" colspan="4" name="Select weekdays" attrs="{'invisible' :[('rrule_type','not in', ['weekly'])]}">


Follow ups