Skip to content

Commit

Permalink
deleted old button & refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
susu105 committed Jun 23, 2020
1 parent 5c9775a commit bc62d79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
18 changes: 0 additions & 18 deletions som_generationkwh/somenergia_soci_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,5 @@
<field name="view_id" ref="view_generationkwh_kwh_per_share_tree"/>
</record>
<menuitem action="action_generationkwh_kwh_per_share_tree" id="menu_generationkwh_kwh_per_share_tree" parent="menu_gkwh_base"/>

<record id="view_partner_form_soci_generationkwh_fields" model="ir.ui.view">
<field name="name">somenergia.soci.form</field>
<field name="model">somenergia.soci</field>
<field name="type">form</field>
<field name="inherit_id" ref="som_partner_account.view_partner_form_soci_fields"/>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<data>
<xpath expr="//form[@string='Partners']/group/field[@name='supplier']" position="after">
<group colspan="2" attrs="{'invisible': [('baixa','=', True)]}">
<button name="verifica_baixa_soci" string="Baixa soci" type="object" icon="gtk-execute"/>
</group>
</xpath>
</data>
</field>
</record>

</data>
</openerp>
2 changes: 1 addition & 1 deletion som_generationkwh/wizard/wizard_baixa_soci.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def baixa_soci(self, cursor, uid, ids, context=None, send_mail=False):
else:
if send_mail:
self.send_mail(cursor, uid, soci_id[0])
self.write(cursor, uid, ids, {'state':'ok'})
self.write(cursor, uid, ids, {'state':'ok'})


def baixa_soci_and_send_mail(self, cursor, uid, ids, context=None):
Expand Down
4 changes: 2 additions & 2 deletions som_generationkwh/wizard/wizard_baixa_soci.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@


<record model="ir.actions.act_window" id="action_wizard_confirm_soci_baixa">
<field name="name">Baixa de soci</field>
<field name="name">Baixa de sòcia</field>
<field name="res_model">wizard.baixa.soci</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
Expand All @@ -53,7 +53,7 @@

<record id="value_wizard_confirm_soci_baixa" model="ir.values">
<field name="object" eval="1"/>
<field name="name">Baixa de soci</field>
<field name="name">Baixa de sòcia</field>
<field name="key2">client_action_multi</field>
<field name="key">action</field>
<field name="model">somenergia.soci</field>
Expand Down

0 comments on commit bc62d79

Please sign in to comment.