Cmdlets for Odoo

Build 24.0.9060

Update-Odoo Cmdlet

Parameters   Output Objects  

Updates Odoo data.

Syntax

Update-Odoo [parameters]

Remarks

The Update-Odoo cmdlet allows you to use a syntax similar to SQL UPDATE statements to update Odoo data.

$conn = Connect-Odoo -User 'MyUser' -APIToken 'MyToken' -URL 'https://MyOdooSite/' -Database 'MyDatabase'
Update-Odoo -Connection $conn -Table "res_users" -Columns @("email") -Values @("[email protected]") -Id "12"
The Where parameter can also be used to specify the primary key of the table:
Update-Odoo -Connection $conn -Table "res_users" -Columns @("email") -Values @("[email protected]") -Where "id = '12'"
The primary key can also be passed to the cmdlet along the pipeline:
Select-Odoo -Connection $conn -Table res_users -Where "company_name = 'Company Inc.'" | Update-Odoo -Columns @("company_name") -Values @("Company Inc. 2")

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060