Views not "working" just processing

:wink:

i am back again.

i think i create model and views no errors (at least) but when i try to use it, i juste see “processing” and nothing happens i suppress non rel fields

is there a manners to “see” tryton doing things to see where it is “stuck” ?
===== my model ========

class Contrats(DeactivableMixin, ModelSQL, ModelView, MultiValueMixin):
	'Contrats'
	__name__ = 'formo.contrats'

	_rec_name = 'code'
	code = fields.Char('Code', required=True, select=True)
	type_contrat = fields.Many2One('formo.contrats_types', "Type de contrat")
	AyantDroits = fields.Many2Many(
        'formo.contrats_rel_ayant_droits', 'party', 'contrats', "Categories",
        help="The categories the party belongs to.")
	regles =  fields.Many2Many('formo.contrats_rel_formo.règles', 'contrat','regles', "Règles")
	produits = fields.Many2Many(
		'formo.contrats_rel_product.product', 'contrat', 'produit', "Produits")

class ContratsType(DeactivableMixin, ModelSQL, ModelView, MultiValueMixin):
	'Contrats types'
	__name__ = 'formo.contrats_types'
	name= fields.Char('Type de Contrat',required=True, select=True)
	notes=fields.Text('Notes')	
	

class ContratsAyants_droits(DeactivableMixin, ModelSQL, ModelView, MultiValueMixin):
    'Contrats - Ayantdroits'
    __name__ = 'formo.contrats_rel_ayant_droits'
    _table = 'formo_contrat_ayantdroits_rel'
    party = fields.Many2One('party.party', 'Party', ondelete='CASCADE',
            required=True, select=True)
    contrats = fields.Many2One('formo.contrats', 'Contrats',
        ondelete='CASCADE', required=True, select=True)
    quotité = fields.Numeric('Part')


class ContratsProduits(DeactivableMixin, ModelSQL, ModelView, MultiValueMixin):
    'Contrats - Produits'
    __name__ = 'formo.contrats_rel_product.product'
    _table = 'formo_contrat_products_rel'
    contrat = fields.Many2One('formo.contrats', 'Contrat', ondelete='CASCADE',
            required=True, select=True)
    produit = fields.Many2One('product.template', 'Produits',
        ondelete='CASCADE', required=True, select=True)
    goToZz=fields.Binary('Zz',required=True)

and the xml =======

<record model="ir.action.act_window" id="act_formo_delatour_contrat_action">
        <field name="name">contrat_</field>
        <field name="res_model">formo.contrats</field>
</record>
<record model="ir.action.act_window.view" id="act_formo_delatour_contrat_tree">
        <field name="sequence" eval="10"/>
        <field name="view" ref="formo_delatour_contrat_tree_id"/>
        <field name="act_window" ref="act_formo_delatour_contrat_action"/>
</record>
<record model="ir.ui.view" id="formo_delatour_contrat_tree_id">
    <field name="model">formo.contrats</field>
    <field name="type">tree</field>
    <!--field name="inherit" ref="inherit_view_id"/-->
    <!--field name="field_childs">field name</field-->
    <field name="name">contrat_tree</field>
</record>

and the view=========

<?xml version="1.0"?>
<tree>
        <field name="_rec_name"/>
        <field name="date_contrat"/>
        <field name="type_contrat"/>
</tree>

you can run both trytond and tryton from shell with the -v flag.
I think for maximum verbosity you can run it with -vvv and see the logs on the console.

:slight_smile:

i’ll see if i can see things

Your view contains:

But I don’t see a field called _rec_name, or date_contrat in your formo.contrats model.
So when the client is loading your view, I suspect it is failing and raising an error when trying to display it, so you just see the “Processing…” forever.

Start by trying the following view to see if that works:

<?xml version="1.0"?>
<tree>
        <field name="code"/>
        <field name="type_contrat"/>
</tree>
1 Like

i did not write all fields, because a lot, i just wrote that seems to me relevant.

i tried with -vvv … a lot of info…

so tried to active fields one by one to see what was causing the problem and i narrowing it.

you gave the good impulse

things are beginning to fell working :wink:

thanks very much to you all that helps

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.