Source code for odoo_xmlrpc_twisted.functions.update_product

"""
Module updates a product
"""


# call the function "get_settings_odoo" to get the parameters
# for the logging of the model on the "odoo Webservice API"
try:
    from .get_settings_odoo import get_settings_odoo
except ImportError:
    from get_settings_odoo import get_settings_odoo
result   = get_settings_odoo()
db       = result[0]
uid      = result[1]
password = result[3]
models   = result[4] 


[docs] def update_product(product_id, name, description): """ Functions updates a product with name and description. """ result = False if product_id != '': # update the product result = models.execute_kw(db,uid, password, 'product.product', 'write', [[product_id], {'name': name, 'description': description}]) return(result)