← Back to team overview

openerp-community team mailing list archive

Re: lp:~phong-nguyen-thanh/openobject-addons/addons-extra-trunk-hotel into lp:openobject-addons/extra-trunk

 

Hi Mr. Phong

How do you do, i hope well,

I was testing Hotel module and found an error when i was trying create  
a Folio from Reservation,

By the other hand,  are there a bit little adjustment to do, i  
think .....

" When a room is reserved dont must be appers or be in off   in  the  
product list, associated to the room type,  thus the frontdesk have a
full wiew about disponibility in one click.

Have a nice day...

Attach the folio error.

Regards

Luis Tobar R.


Error Folio.

Traceback (most recent call last):
   File "/home/terp/openerp-server-6.0.0-rc1/bin/netsvc.py", line 489,  
in dispatch
     result = ExportService.getService(service_name).dispatch(method,  
auth, params)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/service/ 
web_services.py", line 586, in dispatch
     res = fn(db, uid, *params)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/osv/osv.py", line 57,  
in wrapper
     return f(self, dbname, *args, **kwargs)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/osv/osv.py", line  
160, in exec_workflow
     res = self.exec_workflow_cr(cr, uid, obj, method, *args)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/osv/osv.py", line  
153, in exec_workflow_cr
     return wf_service.trg_validate(uid, obj, args[0], method, cr)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
wkf_service.py", line 80, in trg_validate
     res2 = instance.validate(cr, id, ident, signal)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
instance.py", line 48, in validate
     workitem.process(cr, witem, ident, signal, force_running,  
stack=stack)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
workitem.py", line 61, in process
     ok = _split_test(cr, workitem, activity['split_mode'], ident,  
signal, stack)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
workitem.py", line 174, in _split_test
     _join_test(cr, t[0], t[1], ident, stack)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
workitem.py", line 182, in _join_test
     create(cr,[activity], inst_id, ident, stack)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
workitem.py", line 41, in create
     process(cr, res, ident, stack=stack)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
workitem.py", line 53, in process
     result = _execute(cr, workitem, activity, ident, stack)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
workitem.py", line 107, in _execute
     wkf_expr.execute(cr, ident, workitem, activity)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
wkf_expr.py", line 68, in execute
     return _eval_expr(cr, ident, workitem, activity['action'])
   File "/home/terp/openerp-server-6.0.0-rc1/bin/workflow/ 
wkf_expr.py", line 58, in _eval_expr
     ret = eval(line, env, nocopy=True)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/tools/safe_eval.py",  
line 271, in safe_eval
     return eval(test_expr(expr,_SAFE_OPCODES, mode=mode),  
globals_dict, locals_dict)
   File "", line 1, in <module>
   File "/home/terp/openerp-server-6.0.0-rc1/bin/osv/orm.py", line  
177, in <lambda>
     return lambda *args, **argv: attr(self._cr, self._uid,  
[self._id], *args, **argv)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/addons/ 
hotel_reservation/hotel_reservation.py", line 127, in _create_folio
     cr.execute('insert into hotel_folio_reservation_rel  
(order_id,invoice_id) values (%d,%d)', (reservation.id, folio))
   File "/home/terp/openerp-server-6.0.0-rc1/bin/sql_db.py", line 75,  
in wrapper
     return f(self, *args, **kwargs)
   File "/home/terp/openerp-server-6.0.0-rc1/bin/sql_db.py", line 122,  
in execute
     res = self._obj.execute(query, params)
TypeError: %d format: a number is required, not str








El 29-11-2010, a las 8:06, Phong Nguyen escribió:

> Phong Nguyen has proposed merging lp:~phong-nguyen-thanh/openobject- 
> addons/addons-extra-trunk-hotel into lp:openobject-addons/extra-trunk.
>
> Requested reviews:
>  OpenERP Committers (openerp-commiter)
>
>
> Update modules related to hotel management to work with OpenERP 6.0
> -- 
> https://code.launchpad.net/~phong-nguyen-thanh/openobject-addons/ 
> addons-extra-trunk-hotel/+merge/42089
> Your team OpenERP Community is subscribed to branch lp:~phong-nguyen- 
> thanh/openobject-addons/addons-extra-trunk-hotel.
> === renamed file 'hotel/__terp__.py' => 'hotel/__openerp__.py'
> === modified file 'hotel/hotel_view.xml'
> --- hotel/hotel_view.xml	2009-05-06 05:12:56 +0000
> +++ hotel/hotel_view.xml	2010-11-29 11:06:20 +0000
> @@ -672,4 +672,4 @@
> 				  parent="menu_open_hotel_service_type_form_tree"/>
> 	
> 	</data>
> -</openerp>
> \ No newline at end of file
> +</openerp>
>
> === modified file 'hotel/hotel_wizard.xml'
> --- hotel/hotel_wizard.xml	2009-04-27 13:38:52 +0000
> +++ hotel/hotel_wizard.xml	2010-11-29 11:06:20 +0000
> @@ -8,12 +8,13 @@
> 			name="hotel.folio.total_folio"
> 			menu="False"
> 			id="wizard_hotel_total"/>
> -		
> +
> 		<menuitem
> -			name="Hotel Management/Reports/Hotel Folio Report"
> +			name="Hotel Folio Report"
> 			action="wizard_hotel_total"
> 			type="wizard"
> 			id="wizard_hotel_menu"
> +			parent="hotel_report_menu"
> 			sequence="31"/>
> 	</data>
> -</openerp>
> \ No newline at end of file
> +</openerp>
>
> === renamed file 'hotel_housekeeping/__terp__.py' =>  
> 'hotel_housekeeping/__openerp__.py'
> === modified file 'hotel_housekeeping/hotel_housekeeping_view.xml'
> --- hotel_housekeeping/hotel_housekeeping_view.xml	2009-05-06  
> 05:12:56 +0000
> +++ hotel_housekeeping/hotel_housekeeping_view.xml	2010-11-29  
> 11:06:20 +0000
> @@ -80,9 +80,10 @@
> 			<field name="view_mode">tree,form</field>
> 			<field name="view_id" ref="view_hotel_housekeeping_tree"/>
> 		</record>
> -		<menuitem name="Hotel Management/Housekeeping"
> +		<menuitem name="Housekeeping"
> 		          id="menu_open_hotel_housekeeping_form_tree"
> 				  action="open_hotel_housekeeping_form_tree"
> +				  parent="hotel.hotel_management_menu"
> 				  sequence="4" />
> 			
> 		<!--
> @@ -178,4 +179,4 @@
> 					 action="action_h_activity_form"
> 					  
> parent="menu_action_hotel_housekeeping_activity_type_view_form"/>
> 	</data>
> -</openerp>	
> \ No newline at end of file
> +</openerp>	
>
> === modified file 'hotel_housekeeping/hotel_housekeeping_wizard.xml'
> --- hotel_housekeeping/hotel_housekeeping_wizard.xml	2009-04-27  
> 13:38:52 +0000
> +++ hotel_housekeeping/hotel_housekeeping_wizard.xml	2010-11-29  
> 11:06:20 +0000
> @@ -10,11 +10,12 @@
> 			id="wizard_hotel_housekeeping_activity_report"/>
> 		
> 		<menuitem
> -			name="Hotel Management/Reports/Activity Report"
> +			name="Activity Report"
> 			action="wizard_hotel_housekeeping_activity_report"
> 			type="wizard"
> 			menu="False"
> 			id="wizard_activity_menu"
> +			parent="hotel.hotel_report_menu"
> 			sequence="29"/>
> 	</data>
> -</openerp>
> \ No newline at end of file
> +</openerp>
>
> === renamed file 'hotel_reservation/__terp__.py' =>  
> 'hotel_reservation/__openerp__.py'
> === modified file 'hotel_reservation/hotel_reservation_view.xml'
> --- hotel_reservation/hotel_reservation_view.xml	2009-05-06 05:12:56  
> +0000
> +++ hotel_reservation/hotel_reservation_view.xml	2010-11-29 11:06:20  
> +0000
> @@ -93,9 +93,10 @@
> 			<field name="view_type">form</field>
> 			<field name="view_mode">tree,form</field>
> 		</record>
> -		<menuitem name="Hotel Management/All Reservation"
> +		<menuitem name="All Reservations"
> 				  id="menu_action_hotel_reservation_tree_all"
> 				  action="action_hotel_reservation_tree_all"
> +				  parent="hotel.hotel_management_menu"
> 				  sequence="3"/>
> 		<menuitem name="New Reservation"
> 		          id="menu_open_hotel_reservation_form_tree"
> @@ -111,9 +112,10 @@
> 			<field name="view_mode">tree,form</field>
> 			<field name="domain">[('state','=','draft')]</field>
> 		</record>
> -		<menuitem name="Hotel Management/All Reservation/"
> +		<menuitem name="All Draft Reservations"
> 				    id="menu_action_hotel_reservation_tree_draft"
> 				    action="action_hotel_reservation_tree_draft"
> +				    parent="menu_action_hotel_reservation_tree_all"
> 				    sequence="17"/>
> 				
> 		<record model="ir.actions.act_window"  
> id="action_hotel_reservation_tree_confirm">
> @@ -124,9 +126,10 @@
> 			<field name="view_mode">tree,form</field>
> 			<field name="domain">[('state','=','confirm')]</field>
> 		</record>
> -		<menuitem name="Hotel Management/All Reservation/"
> +		<menuitem name="All Confirm Reservations"
> 				  id="menu_action_hotel_reservation_tree_confirm"
> 				  action="action_hotel_reservation_tree_confirm"
> +				  parent="menu_action_hotel_reservation_tree_all"
> 				  sequence="18"/>
> 					
> 		<record model="ir.actions.act_window"  
> id="action_hotel_reservation_tree_done">
> @@ -137,9 +140,10 @@
> 			<field name="view_mode">tree,form</field>
> 			<field name="domain">[('state','=','done')]</field>
> 		</record>
> -		<menuitem name="Hotel Management/All Reservation/"
> +		<menuitem name="All Done Reservations"
> 				  id="menu_action_hotel_reservation_tree_done"
> 				  action="action_hotel_reservation_tree_done"
> +				  parent="menu_action_hotel_reservation_tree_all"
> 				  sequence="19"/>
> 		
> 		<record model="ir.ui.view" id="hotel_calendar_view">
> @@ -157,4 +161,4 @@
> 					
> 		
> 	</data>
> -</openerp>
> \ No newline at end of file
> +</openerp>
>
> === modified file 'hotel_reservation/hotel_reservation_wizard.xml'
> --- hotel_reservation/hotel_reservation_wizard.xml	2009-04-27  
> 13:38:52 +0000
> +++ hotel_reservation/hotel_reservation_wizard.xml	2010-11-29  
> 11:06:20 +0000
> @@ -16,11 +16,12 @@
> 			id="wizard_hotel_reservation_report_reservation"/>
> 		
> 		<menuitem
> -			name="Hotel Management/Reports/Hotel Reservation Report"
> +			name="Hotel Reservation Report"
> 			action="wizard_hotel_reservation_report_reservation"
> 			type="wizard"
> 			menu="False"
> +			parent="hotel.hotel_report_menu"
> 			id="wizard_res_menu"
> 			sequence="28"/>
> 	</data>
> -</openerp>
> \ No newline at end of file
> +</openerp>
>
> === renamed file 'hotel_restaurant/__terp__.py' => 'hotel_restaurant/ 
> __openerp__.py'
> === modified file 'hotel_restaurant/hotel_restaurant_view.xml'
> --- hotel_restaurant/hotel_restaurant_view.xml	2010-03-25 14:16:13  
> +0000
> +++ hotel_restaurant/hotel_restaurant_view.xml	2010-11-29 11:06:20  
> +0000
> @@ -1,7 +1,7 @@
> <?xml version="1.0"?>
> <openerp>
> 	<data>
> -	<menuitem  id="hotel_restaurant_menu" name="Hotel Management/ 
> Restaurant" sequence="3"/>
> +	<menuitem  id="hotel_restaurant_menu" name="Restaurant"  
> parent="hotel.hotel_management_menu" sequence="3"/>
> 		<!-- ==============================
> 			Table Master
> 		============================== -->
> @@ -427,4 +427,4 @@
>
>
> 	</data>
> -</openerp>
> \ No newline at end of file
> +</openerp>
>
> === modified file 'hotel_restaurant/hotel_restaurant_wizard.xml'
> --- hotel_restaurant/hotel_restaurant_wizard.xml	2009-04-27 13:38:52  
> +0000
> +++ hotel_restaurant/hotel_restaurant_wizard.xml	2010-11-29 11:06:20  
> +0000
> @@ -14,10 +14,11 @@
> 			id="wizard_hotel_table_res"/>
> 			
> 		<menuitem
> -			name="Hotel Management/Reports/Table Reservation List"
> +			name="Table Reservation List"
> 			action="wizard_hotel_table_res"
> 			type="wizard"
> +			parent="hotel.hotel_report_menu"
> 			id="wizard_list_menu"
> 			sequence="30"/>
> 	</data>
> -</openerp>
> \ No newline at end of file
> +</openerp>
>
> === renamed file 'profile_hotel/__terp__.py' => 'profile_hotel/ 
> __openerp__.py'
> === renamed file 'report_hotel_reservation/__terp__.py' =>  
> 'report_hotel_reservation/__openerp__.py'
> === modified file 'report_hotel_reservation/ 
> report_hotel_reservation_view.xml'
> --- report_hotel_reservation/report_hotel_reservation_view.xml	 
> 2010-07-06 05:10:58 +0000
> +++ report_hotel_reservation/report_hotel_reservation_view.xml	 
> 2010-11-29 11:06:20 +0000
> @@ -70,7 +70,8 @@
> 			<field name="view_mode">graph,tree</field>
> 			<field name = "view_id"  
> ref="view_hotel_reservation_status_graph_bar"/>
>  	</record>
> -	<menuitem name = "Hotel Management/Reports/This Month"
> +	<menuitem name = "This Month"
> +			  parent="hotel.hotel_report_menu"
> 			  id = "menu_hotel_reservation_this_month"/>
>
>  	<menuitem name="States By Reservation"
>
> === renamed file 'report_hotel_restaurant/__terp__.py' =>  
> 'report_hotel_restaurant/__openerp__.py'
> === modified file 'report_hotel_restaurant/ 
> report_hotel_restaurant_view.xml'
> --- report_hotel_restaurant/report_hotel_restaurant_view.xml	 
> 2010-07-06 05:10:58 +0000
> +++ report_hotel_restaurant/report_hotel_restaurant_view.xml	 
> 2010-11-29 11:06:20 +0000
> @@ -62,7 +62,8 @@
> 		<field name="view_mode">graph,tree</field>
>
> 	</record>
> -	<menuitem name = "Hotel Management/Reports/This Month"
> +	<menuitem name = "This Month"
> +			  parent="hotel.hotel_report_menu"
> 			  id = "menu_hotel_restaurant_this_month"/>
>
> 	<record model="ir.actions.act_window"  
> id="action_report_hotel_restaurant_status_tree_graph_bar">
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp

-- 
https://code.launchpad.net/~phong-nguyen-thanh/openobject-addons/addons-extra-trunk-hotel/+merge/42089
Your team OpenERP Community is subscribed to branch lp:~phong-nguyen-thanh/openobject-addons/addons-extra-trunk-hotel.



References