openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04522
[Merge] lp:~openerp-dev/openobject-addons/training_task_2084 into lp:~openobject-training/openobject-addons/training
gpa(Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/training_task_2084 into lp:~openobject-training/openobject-addons/training.
Requested reviews:
Bhumika (OpenERP) (sbh-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/training_task_2084/+merge/54505
solved the task 2084
--
https://code.launchpad.net/~openerp-dev/openobject-addons/training_task_2084/+merge/54505
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/training_task_2084.
=== modified file 'training/partner.py'
--- training/partner.py 2011-03-22 13:28:41 +0000
+++ training/partner.py 2011-03-23 12:34:14 +0000
@@ -185,9 +185,8 @@
_("Please, Could you configure the contact's function ?"))
- functions = [x.function for x in proxy.browse(cr, uid, ids, context=context)]
- proxy = self.pool.get('res.partner.job')
- job_ids = proxy.search(cr, uid,
+ functions = [x.function for x in res_partn_job_pool.browse(cr, uid, ids, context=context)]
+ job_ids = res_partn_job_pool.search(cr, uid,
domain + [('function', 'in', functions),('state', '=', 'current')])
if not job_ids:
=== modified file 'training/training.py'
--- training/training.py 2011-03-22 13:36:33 +0000
+++ training/training.py 2011-03-23 12:34:14 +0000
@@ -2785,10 +2785,7 @@
context = {}
assert len(ids) == 1
seance = self.browse(cr, uid, ids[0], context)
- if not seance.course_id.course_type_id:
- raise osv.except_osv(_('Warning'),
- _("You have to select course type in the seance of course"))
- return seance.course_id.course_type_id.product_id
+ return seance.course_id.course_type_id.product_id or False
training_seance()
@@ -4122,7 +4119,7 @@
'course_id': seance and seance.course_id.id or False,
'duration': seance and seance.duration or False,
'state_seance': seance and seance.state or False,
- 'product_id': seance and seance._get_product().id or False,
+ 'product_id': seance and seance._get_product() and seance._get_product().id or False,
'price': self._default_price_compute(cr, uid, job_id, seance, context=context)
}}
=== modified file 'training/training_view.xml'
--- training/training_view.xml 2011-03-22 11:24:03 +0000
+++ training/training_view.xml 2011-03-23 12:34:14 +0000
@@ -169,7 +169,7 @@
<field name="objective" nolabel="1" colspan="4"/>
</page>
<page string="Cost Prices">
- <field name="product_id" required="1"/>
+ <field name="product_id" />
</page>
</notebook>
</form>
Follow ups