[WIP] Payments Notifications

This commit is contained in:
Dario Lodeiros
2019-03-12 16:53:34 +01:00
parent c618847ec2
commit ef4bab656d
8 changed files with 81 additions and 33 deletions

View File

@@ -428,7 +428,7 @@
decoration-success="folio_pending_amount == 0 and checkout <= current_date and not overbooking"
decoration-warning="overbooking">
<field name="splitted" invisible="1" />
<field name="pricelist_id" invisible="1" />
<field name="pricelist_id" invisible="1" />
<button icon="fa fa-1x fa-chain-broken"
type="object"
class="oe_stat_button"

View File

@@ -7,6 +7,9 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='communication']" position="after">
<field name="folio_id"/>
<field name="save_amount" invisible="1"/>
<field name="save_journal" invisible="1"/>
<field name="save_date" invisible="1"/>
</xpath>
</field>
</record>
@@ -19,6 +22,15 @@
<header>
<button name="post" class="oe_highlight" states="draft" string="Confirm" type="object"/>
<button name="action_draft" class="oe_highlight" states="cancelled" string="Set To Draft" type="object"/>
<button string="Validate" name="post" type="object" class="btn-primary"
attrs="{'invisible': [('state','!=','draft')]}"/>
<button string="Modify" name="modify" type="object" class="btn-primary"
attrs="{'invisible': [('state','=','draft')]}"/>
<button string="Return" name="return_payment_folio" type="object" class="btn-primary"
attrs="{'invisible': [('state','=','draft')]}"/>
<button string="Delete" name="delete" type="object" class="btn-primary"
attrs="{'invisible': [('state','=','draft')]}"/>
<button string="Cancel" class="btn-default" special="cancel"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted,reconciled,cancelled"/>
</header>
<sheet>
@@ -44,36 +56,31 @@
<group>
<group>
<field name="payment_type" invisible="1"/>
<field name="save_amount" invisible="1"/>
<field name="save_date" invisible="1"/>
<field name="save_journal_id" invisible="1"/>
<field name="partner_type" widget="selection" invisible="1"/>
<field name="partner_id" attrs="{'required': [('state', '=', 'draft'), ('payment_type', 'in', ('inbound', 'outbound'))], 'invisible': [('payment_type', 'not in', ('inbound', 'outbound'))], 'readonly': [('state', '!=', 'draft')]}" context="{'default_is_company': True, 'default_supplier': payment_type == 'outbound', 'default_customer': payment_type == 'inbound'}"/>
<field name="partner_id" attrs="{'required': [('state', '=', 'draft'), ('payment_type', 'in', ('inbound', 'outbound'))], 'invisible': [('payment_type', 'not in', ('inbound', 'outbound'))]}" context="{'default_is_company': True, 'default_supplier': payment_type == 'outbound', 'default_customer': payment_type == 'inbound'}"/>
<label for="amount"/>
<div name="amount_div" class="o_row">
<field name="amount" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="amount" />
<field name="currency_id" options="{'no_create': True, 'no_open': True}" groups="base.group_multi_currency" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
</div>
<field name="journal_id" widget="selection" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="journal_id" widget="selection" />
<field name="destination_journal_id" widget="selection" attrs="{'required': [('payment_type', '=', 'transfer')], 'invisible': [('payment_type', '!=', 'transfer')], 'readonly': [('state', '!=', 'draft')]}"/>
<field name="hide_payment_method" invisible="1"/>
<field name="payment_method_id" string=" " widget="radio" attrs="{'invisible': [('hide_payment_method', '=', True)], 'readonly': [('state', '!=', 'draft')]}"/>
<field name="payment_method_id" string=" " widget="radio" attrs="{'invisible': [('hide_payment_method', '=', True)]}"/>
<field name="payment_method_code" invisible="1"/>
</group>
<group>
<field name="payment_date" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<field name="communication" attrs="{'invisible': [('state', '!=', 'draft'), ('communication', '=', False)], 'readonly': [('state', '!=', 'draft')]}"/>
<field name="folio_id"/>
<field name="payment_date" />
<field name="communication" attrs="{'invisible': [('state', '!=', 'draft'), ('communication', '=', False)]}"/>
<field name="folio_id" readonly="1" force_save="1"/>
</group>
</group>
</sheet>
<footer>
<button string="Validate" name="post" type="object" class="btn-primary"
attrs="{'invisible': [('state','!=','draft')]}"/>
<button string="Modify" name="modify" type="object" class="btn-primary"
attrs="{'invisible': [('state','=','draft')]}"/>
<button string="Return" name="return_payment_folio" type="object" class="btn-primary"
attrs="{'invisible': [('state','=','draft')]}"/>
<button string="Delete" name="delete" type="object" class="btn-primary"
attrs="{'invisible': [('state','=','draft')]}"/>
<button string="Cancel" class="btn-default" special="cancel"/>
</footer>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>