[web2py] Re: How to do list: reference and list: interger work together
Here are my solution with JS var add = document.getElementById("Adicionar"); var addProduto = document.getElementById("Kits_ID_EntradaProdutoEstoque__row"); var addQuantidade = document.getElementById("Kits_QuantidadeProdutos_grow_input"); var produtos = document.getElementById("Kits_ID_EntradaProdutoEstoque"); add.addEventListener('click', adicionar) function adicionar(){ //inputs que serão criados ao apertar o botão de adicionar var produtoNome = document.createElement('select'); var produtoQuantidade = document.createElement('input'); var li = document.createElement("li"); addProduto.appendChild(produtoNome); produtoNome.className = "form-control produto"; produtoNome.id="Kits_ID_EntradaProdutoEstoque"; produtoNome.name = "ID_EntradaProdutoEstoque"; addQuantidade.appendChild(li); li.appendChild(produtoQuantidade); produtoQuantidade.className = "form-control integer"; for(var x = 0; x <= produtos.options.length; x++ ){ var newoption = document.createElement("option"); newoption.value = produtos.options[x].value newoption.text = produtos.options[x].text; produtoNome.add(newoption); } } -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Cannot resolve reference
the table should exist first than you can reference it, seems it's a chicken egg problem: 1. table board_meeting have a field that reference to table company_process (event) 2. table company_process have any fields taht reference to table board_meeting (board_meeting, egm) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Cannot resolve reference
Hi, I am getting 'Cannot resolve reference company_process in board_meeting definition' error when using circular reference.. Table structure db.define_table('board_meeting', Field('agenda', 'json'), Field('process',db.process), Field('event','reference company_process'), Field('serial', length=100), Field('address','string'), Field('description','text'), Field('resolution','json'), format = '%(serial)s') db.define_table("company_process", Field('process',db.process), Field('company',db.company), Field('board_meeting',db.board_meeting), Field('egm',db.board_meeting), Field('steps','integer'), Field('filling_document','json'), auth.signature, format='%(process)s') I am using web2py 2.16.1 Please help me to solve this. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.