:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export const contactOperations: INodeProperties[] = [
|
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
|
|
|
default: 'create',
|
|
|
|
noDataExpression: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'contact',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a new contact',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a contact',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a contact',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Delete a contact',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
description: 'Get a contact',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a contact',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get All',
|
|
|
|
value: 'getAll',
|
|
|
|
description: 'Get all contacts',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get all contacts',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Update',
|
|
|
|
value: 'update',
|
|
|
|
description: 'Update a contact',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Update a contact',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
export const contactDescription: INodeProperties[] = [
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* contact:create */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'contactName',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'contact',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
default: {},
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'contact',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Address',
|
|
|
|
name: 'address',
|
|
|
|
type: 'fixedCollection',
|
|
|
|
default: {},
|
|
|
|
placeholder: 'Add Address',
|
|
|
|
typeOptions: {
|
|
|
|
multipleValues: false,
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'value',
|
|
|
|
displayName: 'Address',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'City',
|
|
|
|
name: 'city',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Country Name or ID',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
name: 'country_id',
|
|
|
|
type: 'options',
|
2022-07-14 13:05:11 -07:00
|
|
|
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
default: '',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getCountries',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'State Name or ID',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
name: 'state_id',
|
|
|
|
type: 'options',
|
2022-07-14 13:05:11 -07:00
|
|
|
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
default: '',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getStates',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Street',
|
|
|
|
name: 'street',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Street 2',
|
|
|
|
name: 'street2',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Zip Code',
|
|
|
|
name: 'zip',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Email',
|
|
|
|
name: 'email',
|
|
|
|
type: 'string',
|
2022-06-20 07:54:01 -07:00
|
|
|
placeholder: 'name@email.com',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Internal Notes',
|
|
|
|
name: 'comment',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Job Position',
|
|
|
|
name: 'function',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Mobile',
|
|
|
|
name: 'mobile',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Phone',
|
|
|
|
name: 'phone',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Tax ID',
|
|
|
|
name: 'vat',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Website',
|
|
|
|
name: 'website',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* contact:get */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Contact ID',
|
|
|
|
name: 'contactId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'get',
|
|
|
|
'delete',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'contact',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* contact:getAll */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
{
|
|
|
|
displayName: 'Return All',
|
|
|
|
name: 'returnAll',
|
|
|
|
type: 'boolean',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'contact',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'getAll',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: false,
|
|
|
|
description: 'Whether to return all results or only up to a given limit',
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
displayName: 'Limit',
|
|
|
|
name: 'limit',
|
|
|
|
type: 'number',
|
|
|
|
default: 50,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'contact',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'getAll',
|
|
|
|
],
|
|
|
|
returnAll: [
|
|
|
|
false,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
minValue: 1,
|
|
|
|
maxValue: 1000,
|
|
|
|
},
|
|
|
|
description: 'Max number of results to return',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Options',
|
|
|
|
name: 'options',
|
|
|
|
type: 'collection',
|
|
|
|
default: {},
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'getAll',
|
|
|
|
'get',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'contact',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
2022-06-20 07:54:01 -07:00
|
|
|
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-multi-options
|
|
|
|
displayName: 'Fields to Include',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
name: 'fieldsList',
|
|
|
|
type: 'multiOptions',
|
2022-07-14 13:05:11 -07:00
|
|
|
description: 'Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
default: [],
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getModelFields',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* contact:update */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Contact ID',
|
|
|
|
name: 'contactId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'update',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'contact',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Update Fields',
|
|
|
|
name: 'updateFields',
|
|
|
|
type: 'collection',
|
|
|
|
default: {},
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
operation: [
|
|
|
|
'update',
|
|
|
|
],
|
|
|
|
resource: [
|
|
|
|
'contact',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Address',
|
|
|
|
name: 'address',
|
|
|
|
type: 'fixedCollection',
|
|
|
|
default: {},
|
|
|
|
placeholder: 'Add Address',
|
|
|
|
typeOptions: {
|
|
|
|
multipleValues: false,
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'value',
|
|
|
|
displayName: 'Address',
|
|
|
|
values: [
|
|
|
|
{
|
|
|
|
displayName: 'City',
|
|
|
|
name: 'city',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Country Name or ID',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
name: 'country_id',
|
|
|
|
type: 'options',
|
2022-07-14 13:05:11 -07:00
|
|
|
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
default: '',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getCountries',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'State Name or ID',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
name: 'state_id',
|
|
|
|
type: 'options',
|
2022-07-14 13:05:11 -07:00
|
|
|
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
default: '',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getStates',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Street',
|
|
|
|
name: 'street',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Street 2',
|
|
|
|
name: 'street2',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Zip Code',
|
|
|
|
name: 'zip',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Email',
|
|
|
|
name: 'email',
|
|
|
|
type: 'string',
|
2022-06-20 07:54:01 -07:00
|
|
|
placeholder: 'name@email.com',
|
:sparkles: Add Odoo Node (#2601)
* added odoo scaffolding
* update getting data from odoo instance
* added scaffolding for main loop and request functions
* added functions for CRUD opperations
* improoved error handling for odooJSONRPCRequest
* updated odoo node and fixing nodelinter issues
* fixed alpabetical order
* fixed types in odoo node
* fixing linter errors
* fixing linter errors
* fixed data shape returned from man loop
* updated node input types, added fields list to models
* update when custom resource is selected options for fields list will be populated dynamicly
* minor fixes
* :hammer: fixed credential test, updating CRUD methods
* :hammer: added additional fields to crm resource
* :hammer: added descriptions, fixed credentials test bug
* :hammer: standardize node and descriptions design
* :hammer: removed comments
* :hammer: added pagination to getAll operation
* :zap: removed leftover function from previous implementation, removed required from optional fields
* :zap: fixed id field, added indication of type and if required to field description, replaced string input in filters to fetched list of fields
* :hammer: fetching list of models from odoo, added selection of fields to be returned to predefined models, fixes accordingly to review
* :zap: Small improvements
* :hammer: extracted adress fields into collection, changed fields to include in descriptions, minor tweaks
* :zap: Improvements
* :hammer: working on review
* :hammer: fixed linter errors
* :hammer: review wip
* :hammer: review wip
* :hammer: review wip
* :zap: updated display name for URL in credentials
* :hammer: added checks for valid id to delete and update
* :zap: Minor improvements
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-03-05 11:33:42 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Internal Notes',
|
|
|
|
name: 'comment',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Job Position',
|
|
|
|
name: 'function',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Mobile',
|
|
|
|
name: 'mobile',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Name',
|
|
|
|
name: 'name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Phone',
|
|
|
|
name: 'phone',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Tax ID',
|
|
|
|
name: 'vat',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Website',
|
|
|
|
name: 'website',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
];
|