update demo scripts für testsystem
							parent
							
								
									3a95f9df32
								
							
						
					
					
						commit
						27278f8288
					
				
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -1,13 +1,20 @@ | ||||||
| # -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||||
| import odoorpc | import odoorpc | ||||||
| 
 | 
 | ||||||
| host = 'localhost' | # host = 'erp.tzaustria.info' | ||||||
| port = 8080 | # port = 8080 | ||||||
| db = 'tz-austria_1' | # db = 'tz-austria_1' | ||||||
| user = 'tz-admin' | # user = 'tz-admin' | ||||||
| pw = 'x' | # pw = 'x' | ||||||
| 
 | 
 | ||||||
| odoo = odoorpc.ODOO(host, port=port) | host = 'erp.tzaustria.info' | ||||||
|  | port = 443 | ||||||
|  | db = 'odoo-test' | ||||||
|  | user = 'tz-admin' | ||||||
|  | pw = '12tza345' | ||||||
|  | protocol="jsonrpc+ssl" | ||||||
|  | 
 | ||||||
|  | odoo = odoorpc.ODOO(host, protocol=protocol, port=port) | ||||||
| odoo.login(db, user, pw) | odoo.login(db, user, pw) | ||||||
| 
 | 
 | ||||||
| values = { | values = { | ||||||
|  | @ -16,9 +23,9 @@ values = { | ||||||
|     "note": "note", |     "note": "note", | ||||||
|     "date_order": "2017-11-21", |     "date_order": "2017-11-21", | ||||||
|     "assembled": True, |     "assembled": True, | ||||||
|     "line_id": "12345", |     "line_id": "0000", | ||||||
|     "portal_id": "111111", |     "portal_id": "111111", | ||||||
|     "portal_delivery_id": "222222", |     "portal_delivery_id": "111112", | ||||||
|     "delivery_firstname": "Huber", |     "delivery_firstname": "Huber", | ||||||
|     "delivery_lastname": "Bauer", |     "delivery_lastname": "Bauer", | ||||||
|     "delivery_midname": False, |     "delivery_midname": False, | ||||||
|  | @ -37,7 +44,7 @@ values = { | ||||||
|     }], |     }], | ||||||
|     "order_lines": [{ |     "order_lines": [{ | ||||||
|         "name": "Beschreibung der Zeile", |         "name": "Beschreibung der Zeile", | ||||||
|         "product_id": "01", |         "product_id": "MEL_MDFB180_KR0876_000000", | ||||||
|         "price_unit": 50.00, |         "price_unit": 50.00, | ||||||
|         "product_uom_qty": 4.0, |         "product_uom_qty": 4.0, | ||||||
|         "lot_id": { |         "lot_id": { | ||||||
|  |  | ||||||
|  | @ -7,11 +7,18 @@ db = 'tz-austria_1' | ||||||
| user = 'admin' | user = 'admin' | ||||||
| pw = 'x' | pw = 'x' | ||||||
| 
 | 
 | ||||||
| odoo = odoorpc.ODOO(host, port=port) | host = 'erp.tzaustria.info' | ||||||
|  | port = 443 | ||||||
|  | db = 'odoo-test' | ||||||
|  | user = 'tz-admin' | ||||||
|  | pw = '12tza345' | ||||||
|  | protocol="jsonrpc+ssl" | ||||||
|  | 
 | ||||||
|  | odoo = odoorpc.ODOO(host, protocol=protocol, port=port) | ||||||
| odoo.login(db, user, pw) | odoo.login(db, user, pw) | ||||||
| 
 | 
 | ||||||
| sale_order_obj = odoo.env['sale.order'] | sale_order_obj = odoo.env['sale.order'] | ||||||
| 
 | 
 | ||||||
| result = sale_order_obj.pg_get_orders("12345", "approved", 8) | result = sale_order_obj.pg_get_orders("0000", "approved", 8) | ||||||
| 
 | 
 | ||||||
| print(result) | print(result) | ||||||
|  |  | ||||||
|  | @ -7,11 +7,18 @@ db = 'tz-austria_1' | ||||||
| user = 'tz-admin' | user = 'tz-admin' | ||||||
| pw = 'x' | pw = 'x' | ||||||
| 
 | 
 | ||||||
| odoo = odoorpc.ODOO(host, port=port) | host = 'erp.tzaustria.info' | ||||||
|  | port = 443 | ||||||
|  | db = 'odoo-test' | ||||||
|  | user = 'tz-admin' | ||||||
|  | pw = '12tza345' | ||||||
|  | protocol="jsonrpc+ssl" | ||||||
|  | 
 | ||||||
|  | odoo = odoorpc.ODOO(host, protocol=protocol, port=port) | ||||||
| odoo.login(db, user, pw) | odoo.login(db, user, pw) | ||||||
| 
 | 
 | ||||||
| values = { | values = { | ||||||
|     "default_code": "04", |     "default_code": "TESTAAAA", | ||||||
|     "name": "Produktname", |     "name": "Produktname", | ||||||
|     "length": 45.01, |     "length": 45.01, | ||||||
|     "width": 13.45, |     "width": 13.45, | ||||||
|  | @ -25,9 +32,9 @@ values = { | ||||||
|     "notes": "notes", |     "notes": "notes", | ||||||
|     "material_type_id": "Holz", |     "material_type_id": "Holz", | ||||||
|     "categ_id": "all", |     "categ_id": "all", | ||||||
|     "intrastat_id": "TEst", |     "intrastat_id": "34052000", | ||||||
|     "sale_ok": True, |     "sale_ok": True, | ||||||
|     "assembly_line_ids": ["12345", "12346"], |     "assembly_line_ids": ["0000"], | ||||||
|     "list_price": 50.00, |     "list_price": 50.00, | ||||||
|     "can_be_sold_unconfigured": True, |     "can_be_sold_unconfigured": True, | ||||||
|     'image': "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", |     'image': "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue