Odoo Help

0
3 Answers
3
Avatar

Anas Taji

--Anas Taji--
2243
| 6 7 8
Amman, Jordan
--Anas Taji--

Skype: anas.taji-sw

Email: anas.taji@smartway-jo.com

Anas Taji
1/23/14, 9:24 PM

Have a look at this Tutorial, it will help you to start your customization..%

1
Avatar

Jagdish Panchal

--Jagdish Panchal--

2703
| 5 4 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
3/31/14, 4:50 AM
0
Avatar

Odoo

--Odoo --

1454
| 5 2 5
India
--Odoo --

Working in Odoo TEchnologies

Odoo
3/31/14, 4:47 AM

class Tour(osv.osv):

_name = 'tour.create'
_description = 'tour.create'

_columns = {




                'adltprice':fields.float('Adult CostPrice ', required=True),
                 'chldprice':fields.float('Child CostPrice', required=True),

                    }

class tour_booking(osv.osv):

_name='tour.booking'
_inherits = {'res.partner':'partner_id'}



          'adult_id':fields.integer('Adults',required=True),
          'child_id':fields.integer('Childs',required=True),

def calc_total_amount(self,cr,uid,ids,context=None):

    for fee in self.pool.get('tour.create').browse(cr,uid,ids,context=context):
        chldprice_value=fee.chldprice
        adltprice_value=fee.adltprice            
    num=self.read(cr,uid,ids,['adult_id','child_id'],context=context)
    child_cost=num[0]['child_id']*chldprice_value
    adult_cost=num[0]['adult_id']*adltprice_value

    total=child_cost+adult_cost
    vals={
           'tour_total':total

           }
    self.write(cr,uid,ids,vals)
    return True   

 this function returned correct result  in first time ,bt in second time onwards it raised error need help......

---------------ERROR ----------------

tour_test openerp.osv.orm: No field_values found for ids [3] in browse_record(tour.create, 3) 2014-03-31 06:22:11,039 1080 ERROR tour_test openerp.osv.osv: Uncaught exception

Field chldprice not found in browse_record(tour.create, 3)' 2014-03-31 06:22:11,039 1080 ERROR tour_test openerp.netsvc: Field chldprice not found in browse_record(tour.create, 3)

Ask a Question
Writer
1454
Odoo
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now