Skip to content

Instantly share code, notes, and snippets.

View ovnicraft's full-sized avatar
🎯
Focusing

Christian Salamea ovnicraft

🎯
Focusing
View GitHub Profile
class AccountInvoiceLine(osv.osv):
_inherit = 'account.invoice.line'
def _amount_line(self, cr, uid, ids, prop, unknow_none, unknow_dict):
res = {}
tax_obj = self.pool.get('account.tax')
cur_obj = self.pool.get('res.currency')
company_currency = self.pool['res.company'].browse(cr, uid, obj.company_id.id).currency_id.id
for line in self.browse(cr, uid, ids):
res[obj.id] = {'amount_tax': 0, 'price_subtotal': 0}
# This script is for devstack
INTERACTIVE=true
while getopts "y" opt; do
case "$opt" in
y)
INTERACTIVE=false
esac
done
if [ "$INTERACTIVE" = true ] ; then
# This script is for devstack
INTERACTIVE=true
while getopts "y" opt; do
case "$opt" in
y)
INTERACTIVE=false
esac
done
if [ "$INTERACTIVE" = true ] ; then
UPDATE ppl_ubicacion
SET pabellon_name='PABELLON A2',ala_name='ALA 2', piso_name='A2'
WHERE nombre_centro= 'CDP GUAYAQUIL' and pabellon_name='PABELLON A1'and id_celda>=2826;
select *
from ppl_ubicacion
where nombre_centro= 'CDP GUAYAQUIL'
and pabellon_name='PABELLON A1'
and id_celda>=2826
order by pabellon_name;
create or replace view ppl_ubicacion as
select
prison_person.id, prison_person.name as ppl_name, prison_person.last_name, prison_person.location_id,
prison_location.name, (select prison_location.name FROM prison_location WHERE id=prison_person.etapa_id) as etapa_name,
(SELECT prison_location.name FROM prison_location WHERE id=prison_person.pabellon_id) as pabellon_name,
prison_person.etapa_id, prison_person.pabellon_id
from
prison_person
join
prison_location
| 524137 | problem | block-v1:mineduc-forma+LMN101+2015_07+type@problem+block@e9d02abbc79246709ec83458db95c193 | 35546 | {"correct_map": {"e9d02abbc79246709ec83458db95c193_7_1": {"hint": "", "hintmode": null, "correctness": "correct", "msg": "", "npoints": null, "queuestate": null}, "e9d02abbc79246709ec83458db95c193_4_1": {"hint": "", "hintmode": null, "correctness": "incorrect", "msg": "", "npoints": null, "queuestate": null}, "e9d02abbc79246709ec83458db95c193_13_1": {"hint": "", "hintmode": null, "correctness": "incorrect", "msg": "", "npoints": null, "queuestate": null}, "e9d02abbc79246709ec83458db95c193_8_1": {"hint": "", "hintmode": null, "correctness": "incorrect", "msg": "", "npoints": null, "queuestate": null}, "e9d02abbc79246709ec83458db95c193_9_1": {"hint": "", "hintmode": null, "correctness": "correct", "msg": "", "npoints": null, "queuestate": null}, "e9d02abbc79246709ec83458db95c193_6_1": {"hint": "", "hintmode": null, "correctness": "incorrect", "msg": "", "npoints": null, "queuestate":
"section_breakdown": [
{
"category": "Prueba 1\u00b0",
"prominent": true, "percent": 0,
"detail": "Prueba 1\u00b0 = 0%",
"label": "PRB1"
},
{
"category": "Prueba 2\u00b0",
__author__ = 'name1984'
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import MySQLdb
import json
import csv
import sys
@ovnicraft
ovnicraft / employee.xml
Created September 22, 2015 18:02 — forked from palichis/employee.xml
employee view
<record model="ir.ui.view" id="view_employee_modified_form">
<field name="name">hr.employee.modified.form</field>
<field name="model">hr.employee</field>
<field name="type">form</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="company_id" position="replace">
<field name="company_id" invisible="1"/>
<field name="work_email" widget="email" colspan="3"/>
</field>
@ovnicraft
ovnicraft / gist:4740432
Last active December 12, 2015 07:58 — forked from anonymous/gist:4740427
nohup python openerp-server --addons-path=../addons/,../web6.1/addons &