This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AsyncStorage } from 'react-native' | |
import { OdooRPC } from '../node-odoorpc' | |
type QueryFirstParams = { | |
model: string, | |
id: number, | |
fields: [string], | |
} | |
type QueryParams = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const UPDATE_INVENTORY_ADJUSTMENTS = 'UPDATE_INVENTORY_ADJUSTMENTS' | |
export function updateInventoryAdjustments(inventoryAdjustments) { | |
return { | |
type: UPDATE_INVENTORY_ADJUSTMENTS, | |
payload: { | |
inventoryAdjustments, | |
}, | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { | |
View, | |
StyleSheet, | |
} from 'react-native' | |
import { connect } from 'react-redux' | |
import { NavigationScreenProp } from 'react-navigation' | |
import Colors from '../../common/Colors' | |
import Header from '../../common/Header' | |
import Transactions from './Transactions' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Joi from 'joi' | |
import jwt from 'jsonwebtoken' | |
import logger from '../logger' | |
import RestController from './RestController' | |
import AppError from '../AppError' | |
export default class ApplicationsController extends RestController { | |
async validateAppToken(payload) { | |
logger.debug('validate application token with data', payload) | |
const validationSchema = Joi.object().keys({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PromiseRouter from './PromiseRouter' | |
function hello(req) { | |
const { authController } = req.config | |
return authController.sayHello() | |
} | |
export default class AuthRouter extends PromiseRouter { | |
mountRoutes() { | |
this.route('GET', '/hello', req => (hello(req))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Validator from 'validatorjs' | |
import styled from 'styled-components' | |
import en from 'validatorjs/src/lang/en' | |
import { TextField } from 'office-ui-fabric-react/lib/TextField' | |
import { DefaultButton } from 'office-ui-fabric-react/lib/Button' | |
Validator.setMessages('en', en) | |
const Spacer = styled.div` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result = db.session.execute( | |
db | |
.update(Contact, values={'value': payload['value']}, returning=Contact.__table__.columns) | |
.where(Contact.id == payload['id']) | |
) | |
db.session.commit() | |
fetched_data = result.first() | |
contact = {} | |
for (index, column) in enumerate(result.keys()): | |
contact[column] = fetched_data[index] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE [dbo].[AspNetRoleClaims] ( | |
[Id] INT IDENTITY (1, 1) NOT NULL, | |
[RoleId] NVARCHAR (450) NOT NULL, | |
[ClaimType] NVARCHAR (MAX) NULL, | |
[ClaimValue] NVARCHAR (MAX) NULL, | |
CONSTRAINT [PK_AspNetRoleClaims] PRIMARY KEY CLUSTERED ([Id] ASC), | |
CONSTRAINT [FK_AspNetRoleClaims_AspNetRoles_RoleId] FOREIGN KEY ([RoleId]) REFERENCES [dbo].[AspNetRoles] ([Id]) ON DELETE CASCADE | |
); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCrfaYSxlYBMtYUrxxobQPMvPu+FPrQjfacG2XLp7gH5MGnt6ChSyBzAVs9x0goanp6HBX/yq7m4yOjAJr+/Us/rRwjTB5f39jyt0rxqmdmLZKgJf6FhOjfxcJYlJMdUmhFUQyKq3Z0jDAZeu7Fd1LXp8Ky8ow1Ra1eT9FAHZzSfzW9EBKibmKc8+dQpw4mnHc2GpCO7Fqd3m120zDSJJHtn+xrQGB5akLeMO3HBkAPeKUq+ntPA6qz5nRT8Nx9kIo3sDMMWT7Cu3l/rrjondufpP72WAeeZ4GN42K3XQJAqnp/AjXrtN/cCnMT8N9YjgXLVLyVZc4vKbCNfXCd/vRn [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quants = env['stock.quant'].search([]) | |
move_line_ids = [] | |
warning = '' | |
for quant in quants: | |
move_lines = env["stock.move.line"].search([ | |
('product_id', '=', quant.product_id.id), | |
('location_id', '=', quant.location_id.id), | |
('lot_id', '=', quant.lot_id.id), | |
('package_id', '=', quant.package_id.id), | |
('owner_id', '=', quant.owner_id.id), |