Hi good day!,
I just want to as on how to assign/send/copy long text field value to another text field in odoo 10 by a xmlrpc webservice. 
Thank you very much in advance!
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
Hi good day!,
I just want to as on how to assign/send/copy long text field value to another text field in odoo 10 by a xmlrpc webservice. 
Thank you very much in advance!
- Firstly, you have to set up the connection to your odoo instance :
```
import xmlrpc.client
url = 'http://your-odoo-server'
db = 'your-database-name'
username = 'your-odoo-username'
password = 'your-odoo-password'
common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(url))
uid = common.authenticate(db, username, password, {})
models = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(url))
```
- Then, you can fetch the record IDs you want to copy, you can use 'search and read' to get it
```
model_name = 'your.odoo.model' # Replace with your actual Odoo model name
record_ids = [1, 2, 3] # Replace with the IDs of the records you want to update
```
- finally, you deal with these record IDs and proceed to the update,
```
for record_id in record_ids:
record = models.execute_kw(db, uid, password, model_name, 'read', [record_id], {'fields': ['field_to_copy', 'target_field']})
# Check if the source field has a value
if record[0]['field_to_copy']:
source_value = record[0]['field_to_copy']
# Update the target field with the source value
models.execute_kw(db, uid, password, model_name, 'write', [[record_id], {'target_field': source_value}])
```
*** Please note that if you are working with long text fields, the API response might not include the complete text in a single call. You may need to adjust your code to handle this situation based on your specific requirements.
*** I hope it can be helpful. Thx
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden| Gerelateerde posts | Antwoorden | Weergaven | Activiteit | |
|---|---|---|---|---|
|  | 2 jun. 24  | 2248 | ||
|  | 1 apr. 23  | 2009 | ||
|  | 1 mrt. 23  | 2951 | ||
|  | 0 dec. 22  | 2546 | ||
| 
            
                INSTALLING ODOO 10C ERROR
            
            
                    Opgelost
            
         |  | 1 okt. 21  | 4465 |