• Tutorials
  • Api Documentation
  • Download
  • Credits
Show / Hide Table of Contents
  • AutoCheck.Core
    • Output
    • Output.Log
    • Output.Style
    • Output.Type
    • Script
    • Script.ExecutionMode
    • Utils
    • Utils.OS
  • AutoCheck.Core.Connectors
    • Atom
    • Base
    • Compressed
    • Css
    • Csv
    • CsvDocument
    • Dmoj
    • GDrive
    • Html
    • Math
    • Odoo
    • Operator
    • PlainText
    • PlainText.PlainTextDocument
    • Postgres
    • Rss
    • Shell
    • TextStream
    • Xml
    • Xml.XmlNodeType
  • AutoCheck.Core.CopyDetectors
    • Base
    • Base.Mode
    • Css
    • Html
    • PlainText
    • PlainText.File
    • SourceCode
    • SqlLog
    • Xml
  • AutoCheck.Core.Events
    • LogUpdateEventArgs
    • StatusUpdateEventArgs
    • StatusUpdateEventArgs.ExecutionEvent
  • AutoCheck.Core.Exceptions
    • ArgumentInvalidException
    • ArgumentNotFoundException
    • ConfigFileMissingException
    • ConnectionInvalidException
    • ConnectorInvalidException
    • ConnectorNotFoundException
    • DocumentInvalidException
    • DownloadFailedException
    • ItemNotFoundException
    • PorpertyNotFoundException
    • QueryInvalidException
    • RegexInvalidException
    • ResultMismatchException
    • ScriptInvalidException
    • ScriptNotFoundException
    • StyleInvalidException
    • StyleNotAppliedException
    • StyleNotFoundException
    • TableInconsistencyException
    • VariableInvalidException
    • VariableNotFoundException
  • Google.DiffMatchPatch
    • Diff
    • DiffMatchPatch
    • Operation
    • Patch

Class Odoo

Allows in/out operations and/or data validations with an Odoo instance.

Inheritance
System.Object
AutoCheck.Core.Connector
Postgres
Odoo
Implements
System.IDisposable
Inherited Members
Postgres.Conn
Postgres.Host
Postgres.Database
Postgres.User
Postgres.Password
Postgres.BinPath
Postgres.Student
Postgres.Dispose()
Postgres.TestConnection()
Postgres.ExecuteQuery(String)
Postgres.ExecuteNonQuery(String)
Postgres.ExecuteScalar<T>(String)
Postgres.ExistsDataBase()
Postgres.CreateDataBase(String, String)
Postgres.CreateDataBase(String)
Postgres.CreateDataBase()
Postgres.ImportSqlFile(String)
Postgres.DropDataBase()
Postgres.Select(Postgres.Source, String)
Postgres.Select(Postgres.Source, String[])
Postgres.Select(Postgres.Source, Postgres.Filter, String)
Postgres.Select(Postgres.Source, Postgres.Filter, String[])
Postgres.Select(String, String, String)
Postgres.Select(String, String, String[])
Postgres.GetField<T>(Postgres.Source, String, ListSortDirection)
Postgres.GetField<T>(Postgres.Source, Postgres.Filter, String, ListSortDirection)
Postgres.GetField<T>(String, String, String, ListSortDirection)
Postgres.CountRegisters(Postgres.Source)
Postgres.CountRegisters(Postgres.Source, Postgres.Filter)
Postgres.CountRegisters(String, String)
Postgres.Insert<T>(Postgres.Destination, String, Dictionary<String, Object>)
Postgres.Insert<T>(String, String, Dictionary<String, Object>)
Postgres.Insert(Postgres.Destination, Dictionary<String, Object>)
Postgres.Insert(String, Dictionary<String, Object>)
Postgres.Update(Postgres.Destination, Dictionary<String, Object>)
Postgres.Update(Postgres.Destination, Postgres.Filter, Dictionary<String, Object>)
Postgres.Update(Postgres.Destination, Postgres.Source, Postgres.Filter, Dictionary<String, Object>)
Postgres.Update(String, String, String, Dictionary<String, Object>)
Postgres.Delete(Postgres.Destination)
Postgres.Delete(Postgres.Destination, Postgres.Filter)
Postgres.Delete(Postgres.Destination, Postgres.Source, Postgres.Filter)
Postgres.Delete(String, String, String)
Postgres.GetUsers()
Postgres.CountUsers()
Postgres.CreateUser(String, String)
Postgres.DropUser(String)
Postgres.ExistsUser(String)
Postgres.GetRoles()
Postgres.CountRoles()
Postgres.CreateRole(String)
Postgres.DropRole(String)
Postgres.ExistsRole(String)
Postgres.Grant(String, Postgres.Destination, String)
Postgres.Grant(String, String, String)
Postgres.Grant(String, String)
Postgres.Revoke(String, Postgres.Destination, String)
Postgres.Revoke(String, String, String)
Postgres.Revoke(String, String)
Postgres.GetMembership(String)
Postgres.GetTablePrivileges(Postgres.Source, String)
Postgres.GetTablePrivileges(String, String)
Postgres.GetSchemaPrivileges(String, String)
Postgres.CompareSelects(String, String)
Postgres.GetViewDefinition(String)
Postgres.GetViewDefinition(Postgres.Source)
Postgres.GetForeignKeys(String)
Postgres.GetForeignKeys(Postgres.Source)
AutoCheck.Core.Connector.CurrentOS
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoCheck.Core.Connectors
Assembly: AutoCheck.dll
Syntax
public class Odoo : Postgres, IDisposable

Constructors

| Improve this Doc View Source

Odoo(Int32, String, String, String, String, String)

Creates a new connector instance.

Declaration
public Odoo(int companyID, string host, string database, string username, string password = null, string binPath = "C:\\Program Files\\PostgreSQL\\10\\bin")
Parameters
Type Name Description
System.Int32 companyID

The company ID which will be used to operate.

System.String host

Host address in order to connect with the running PostgreSQL service, wich contains the Odoo database.

System.String database

The Odoo database name.

System.String username

The Odoo database username, which will be used to perform operations.

System.String password

The Odoo database password, which will be used to perform operations.

System.String binPath
| Improve this Doc View Source

Odoo(String, String, String, String, String, String)

Creates a new connector instance.

Declaration
public Odoo(string companyName, string host, string database, string username, string password = null, string binPath = "C:\\Program Files\\PostgreSQL\\10\\bin")
Parameters
Type Name Description
System.String companyName

The company name which will be used to operate.

System.String host

Host address in order to connect with the running PostgreSQL service, wich contains the Odoo database.

System.String database

The Odoo database name.

System.String username

The Odoo database username, which will be used to perform operations.

System.String password

The Odoo database password, which will be used to perform operations.

System.String binPath

Properties

| Improve this Doc View Source

CompanyID

The current company ID that will be used to acces and filter all the requested data.

Declaration
public int CompanyID { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

CompanyName

The current company name.

Declaration
public string CompanyName { get; set; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

GetCompanyData(Int32)

Requests for the company data.

Declaration
public DataTable GetCompanyData(int companyID)
Parameters
Type Name Description
System.Int32 companyID

The company ID wich will be used to request.

Returns
Type Description
System.Data.DataTable

The company data (all the 'res.company' table fields, logo).

| Improve this Doc View Source

GetCompanyData(String)

Requests for the company data.

Declaration
public DataTable GetCompanyData(string companyName)
Parameters
Type Name Description
System.String companyName

The company name wich will be used to request.

Returns
Type Description
System.Data.DataTable

The company data (all the 'res.company' table fields, logo).

| Improve this Doc View Source

GetCompanyID(String, Boolean)

Requests for the company ID.

Declaration
public int GetCompanyID(string companyName, bool strict = false)
Parameters
Type Name Description
System.String companyName

The company name wich will be used to request.

System.Boolean strict

When strict is on, the company name match will be exact.

Returns
Type Description
System.Int32

The company ID.

| Improve this Doc View Source

GetInvoiceCode(String)

Requests for the invoice code.

Declaration
public string GetInvoiceCode(string orderCode)
Parameters
Type Name Description
System.String orderCode

The order code, related to the invoice, wich will be used to request.

Returns
Type Description
System.String

The invoice data.

| Improve this Doc View Source

GetInvoiceData(Int32)

Requests for the purchase data, header and lines

Declaration
public DataTable GetInvoiceData(int invoiceID)
Parameters
Type Name Description
System.Int32 invoiceID

The invoiceID ID wich will be used to request.

Returns
Type Description
System.Data.DataTable

The purchase data.

| Improve this Doc View Source

GetInvoiceData(String)

Requests for the invoice data, headers only

Declaration
public DataTable GetInvoiceData(string orderCode)
Parameters
Type Name Description
System.String orderCode

The order code, related to the invoice, wich will be used to request.

Returns
Type Description
System.Data.DataTable

The invoice data.

| Improve this Doc View Source

GetInvoiceID(String)

Requests for the invoice code.

Declaration
public int GetInvoiceID(string orderCode)
Parameters
Type Name Description
System.String orderCode

The order code, related to the invoice, wich will be used to request.

Returns
Type Description
System.Int32

The invoice data.

| Improve this Doc View Source

GetLastPosSaleID()

Requests for the last (higher) Point Of Sale sale ID.

Declaration
public int GetLastPosSaleID()
Returns
Type Description
System.Int32

The last POS sale ID (id, code, amount_total, product_name, product_qty, product_price_unit, product_id).

| Improve this Doc View Source

GetLastPurchaseID()

Requests for the last purchase ID (the higher ID).

Declaration
public int GetLastPurchaseID()
Returns
Type Description
System.Int32

The last purchase ID.

| Improve this Doc View Source

GetLastSaleID()

Requests for the last (higher) sale ID.

Declaration
public int GetLastSaleID()
Returns
Type Description
System.Int32

The last sale ID.

| Improve this Doc View Source

GetPosSaleCode(Int32)

Requests for the Point Of Sale sale code.

Declaration
public string GetPosSaleCode(int posSaleID)
Parameters
Type Name Description
System.Int32 posSaleID

The POS sale ID wich will be used to request.

Returns
Type Description
System.String

The POS sale code.

| Improve this Doc View Source

GetPosSaleData(Int32)

Requests for the Point Of Sale sale data, header and lines.

Declaration
public DataTable GetPosSaleData(int posSaleID)
Parameters
Type Name Description
System.Int32 posSaleID
Returns
Type Description
System.Data.DataTable

The POS sale data.

| Improve this Doc View Source

GetPosSaleData(String)

Requests for the Point Of Sale sale data, header and lines.

Declaration
public DataTable GetPosSaleData(string posSaleCode)
Parameters
Type Name Description
System.String posSaleCode
Returns
Type Description
System.Data.DataTable

The POS sale data.

| Improve this Doc View Source

GetPosSaleID(String)

Requests for the Point Of Sale sale ID.

Declaration
public int GetPosSaleID(string posSaleCode)
Parameters
Type Name Description
System.String posSaleCode

The POS sale code wich will be used to request.

Returns
Type Description
System.Int32

The POS sale ID (id, code, amount_total, product_name, product_qty, product_price_unit, product_id).

| Improve this Doc View Source

GetProductTemplateData(Int32)

Requests for the product template data, so all the product data (including variants) can be retrieved.

Declaration
public DataTable GetProductTemplateData(int templateID)
Parameters
Type Name Description
System.Int32 templateID

The product template ID wich will be used to request.

Returns
Type Description
System.Data.DataTable

The product template data, including variants (product_id, template_id, name, type, sell_price, purchase_price, supplier_id, file_size, attribute, value).

| Improve this Doc View Source

GetProductTemplateData(String)

Requests for the product template data, so all the product data (including variants) can be retrieved.

Declaration
public DataTable GetProductTemplateData(string productName)
Parameters
Type Name Description
System.String productName

The product name wich will be used to request.

Returns
Type Description
System.Data.DataTable

The product template data, including variants (product_id, template_id, name, type, sell_price, purchase_price, supplier_id, file_size, attribute, value).

| Improve this Doc View Source

GetProductTemplateID(String, Boolean)

Requests for the product template ID.

Declaration
public int GetProductTemplateID(string productName, bool strict = false)
Parameters
Type Name Description
System.String productName

The product name wich will be used to request.

System.Boolean strict

When strict is on, the product name match will be exact.

Returns
Type Description
System.Int32

The product template ID.

| Improve this Doc View Source

GetProviderData(Int32)

Requests for the provider data.

Declaration
public DataTable GetProviderData(int providerID)
Parameters
Type Name Description
System.Int32 providerID

The provider ID wich will be used to request.

Returns
Type Description
System.Data.DataTable

The provider data (all the 'res.partner' table fields, logo).

| Improve this Doc View Source

GetProviderData(String)

Requests for the provider data.

Declaration
public DataTable GetProviderData(string providerName)
Parameters
Type Name Description
System.String providerName

The provider name wich will be used to request.

Returns
Type Description
System.Data.DataTable

The provider data (all the 'res.partner' table fields, logo).

| Improve this Doc View Source

GetProviderID(String, Boolean)

Requests for the provider ID.

Declaration
public int GetProviderID(string providerName, bool strict = false)
Parameters
Type Name Description
System.String providerName

The provider name wich will be used to request.

System.Boolean strict

When strict is on, the provider name match will be exact.

Returns
Type Description
System.Int32

The provider ID.

| Improve this Doc View Source

GetPurchaseCode(Int32)

Requests for the purchase code.

Declaration
public string GetPurchaseCode(int purchaseID)
Parameters
Type Name Description
System.Int32 purchaseID

The purchase ID wich will be used to request.

Returns
Type Description
System.String

The purchase ID.

| Improve this Doc View Source

GetPurchaseData(Int32)

Requests for the purchase data, header and lines

Declaration
public DataTable GetPurchaseData(int purchaseID)
Parameters
Type Name Description
System.Int32 purchaseID

The purchase ID wich will be used to request.

Returns
Type Description
System.Data.DataTable

The purchase data (id, code, amount_total, product_name, product_qty, product_price_unit, product_id)

| Improve this Doc View Source

GetPurchaseData(String)

Requests for the purchase data, header and lines

Declaration
public DataTable GetPurchaseData(string purchaseCode)
Parameters
Type Name Description
System.String purchaseCode

The purchase code wich will be used to request.

Returns
Type Description
System.Data.DataTable

The purchase data (id, code, amount_total, product_name, product_qty, product_price_unit, product_id)

| Improve this Doc View Source

GetPurchaseID(String)

Requests for the purchase ID.

Declaration
public int GetPurchaseID(string purchaseCode)
Parameters
Type Name Description
System.String purchaseCode

The purchase code wich will be used to request.

Returns
Type Description
System.Int32

The purchase ID.

| Improve this Doc View Source

GetSaleCode(Int32)

Requests for the sale code.

Declaration
public string GetSaleCode(int saleID)
Parameters
Type Name Description
System.Int32 saleID

The sale ID wich will be used to request.

Returns
Type Description
System.String

The sale code.

| Improve this Doc View Source

GetSaleData(Int32)

Requests for the sale data, header and lines.

Declaration
public DataTable GetSaleData(int saleID)
Parameters
Type Name Description
System.Int32 saleID

The sale ID wich will be used to request.

Returns
Type Description
System.Data.DataTable

The sale data (id, code, amount_total, product_name, product_qty, product_price_unit, product_id).

| Improve this Doc View Source

GetSaleData(String)

Requests for the sale data, header and lines.

Declaration
public DataTable GetSaleData(string saleCode)
Parameters
Type Name Description
System.String saleCode

The sale code wich will be used to request.

Returns
Type Description
System.Data.DataTable

The sale data (id, code, amount_total, product_name, product_qty, product_price_unit, product_id).

| Improve this Doc View Source

GetSaleID(String)

Requests for the sale ID.

Declaration
public int GetSaleID(string saleCode)
Parameters
Type Name Description
System.String saleCode

The sale code wich will be used to request.

Returns
Type Description
System.Int32

The sale ID.

| Improve this Doc View Source

GetScrappedStockData()

Requests for all the information about scrapped stock data.

Declaration
public DataTable GetScrappedStockData()
Returns
Type Description
System.Data.DataTable

The scrapped stock data.

| Improve this Doc View Source

GetStockMovementData(String, Boolean)

Requests for the stock movement data, only headers.

Declaration
public DataTable GetStockMovementData(string orderCode, bool isReturn)
Parameters
Type Name Description
System.String orderCode

The order code (or number) wich will be used to request.

System.Boolean isReturn

If true, the stock movement is related with a return.

Returns
Type Description
System.Data.DataTable

The stock movement data (id, product_id, product_name, product_qty, location_id, state).

| Improve this Doc View Source

GetUserData(Int32)

Requests for the user data, including the groups and permissions

Declaration
public DataTable GetUserData(int userID)
Parameters
Type Name Description
System.Int32 userID

The user ID wich will be used to request.

Returns
Type Description
System.Data.DataTable

The user data (id, name, active, group).

| Improve this Doc View Source

GetUserData(String)

Requests for the user data, including the groups and permissions

Declaration
public DataTable GetUserData(string userName)
Parameters
Type Name Description
System.String userName

The user name wich will be used to request.

Returns
Type Description
System.Data.DataTable

The user data (id, name, active, group).

| Improve this Doc View Source

GetUserID(String, Boolean)

Requests for the user ID.

Declaration
public int GetUserID(string userName, bool strict = false)
Parameters
Type Name Description
System.String userName

The user name wich will be used to request.

System.Boolean strict

When strict is on, the user name match will be exact.

Returns
Type Description
System.Int32

The user ID.

| Improve this Doc View Source

GetUserName(Int32)

Requests for the user name.

Declaration
public string GetUserName(int userID)
Parameters
Type Name Description
System.Int32 userID

The user ID wich will be used to request.

Returns
Type Description
System.String

The user ID.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX