|
- <?xml version="1.0"?>
- <odoo>
- <data>
- <!--其他收入/支出list-->
- <record id="other_money_order_list" model="ir.ui.view">
- <field name="name">other.money.order.list</field>
- <field name="model">other.money.order</field>
- <field name="arch" type="xml">
- <list string="其他收支单" decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
- <field name="name" optional="show"/>
- <field name="date" optional="show"/>
- <field name="partner_id" optional="show"/>
- <field name="details" widget="html" optional="show"/>
- <field name="total_amount" optional="show"/>
- <field name="state" optional="show"/>
- <field name="note" optional="show"/>
- <field name="is_init" invisible="1" optional="show"/>
- </list>
- </field>
- </record>
-
- <!--其他收入/支出form-->
- <record id="other_money_order_form" model="ir.ui.view">
- <field name="name">other.money.order.form</field>
- <field name="model">other.money.order</field>
- <field name="arch" type="xml">
- <form string="其他收支单">
- <header>
- <button name="other_money_done" invisible="state!='draft'" string="确认" type="object" class="oe_highlight"/>
- <button name="other_money_draft" invisible="state!='done'" string="撤销确认" type="object"/>
- <button name="action_cancel" invisible="state!='draft'" string="作废" type="object"/>
- <!-- <button name="print_other_money_order" invisible="state!='done'" string="打印" type="object" class="oe_highlight"/> -->
- <field name="state" widget="statusbar"/>
- </header>
- <sheet>
- <div class="oe_title">
- <h1>
- <field name="name" class="oe_inline" readonly="1"/>
- </h1>
- </div>
- <group>
- <group>
- <field name='type' invisible='1' readonly="state!='draft'"/>
- <field name="partner_id" readonly="state!='draft'"
- options="{'no_open': True, 'no_create': True}"/>
- <field name="receiver"
- invisible="type!='other_pay'"
- />
- <field name="bank_name" invisible="type!='other_pay'"/>
- <field name="bank_num" invisible="type!='other_pay'"/>
- </group>
- <group>
- <field name="date" readonly="state!='draft'"/>
- <field name="voucher_id"/>
- </group>
- </group>
- <field name="line_ids" context="{'order_type': type}" readonly="state!='draft'">
- <list string="其他收支单明细" editable="bottom">
- <field name="service" groups="core.service_groups" optional="show"/>
- <field name="category_id" required="1" domain="[('type', '=', parent.type)]" optional="show"/>
- <field name="account_id" optional="show"/>
- <field name="auxiliary_id" optional="show"/>
- <field name="amount" sum="合计" optional="show"/>
- <field name="tax_rate" groups="money.tax_groups" optional="show"/>
- <field name="tax_amount" groups="money.tax_groups" sum="合计" optional="show"/>
- <field name="note" optional="show"/>
- </list>
- </field>
- <group>
- <group>
- <field name="bank_id" readonly="state!='draft'"/>
- </group>
- <group>
- <field name="total_amount"/>
- </group>
- </group>
- <field name="note" placeholder="备注"/>
- </sheet>
- <chatter/>
- </form>
- </field>
- </record>
-
- <!--其他收入/支出单 search 视图-->
- <record id="other_money_order_search" model="ir.ui.view">
- <field name="name">other.money.order.search</field>
- <field name="model">other.money.order</field>
- <field name="arch" type="xml">
- <search string="其他收入/支出单 ">
- <field name="name"/>
- <field name="partner_id"/>
- <field name="total_amount"/>
- <field name="state"/>
- <filter name="draft" string="草稿" domain="[('state','=','draft')]"/>
- <filter name="done" string="已确认" domain="[('state','=','done')]"/>
- <filter name="by_partner" string="往来单位" domain="[]" context="{'group_by':'partner_id'}"/>
- <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
- </search>
- </field>
- </record>
-
- <!-- 其他收入单 action -->
- <record id="other_money_receipt_action" model="ir.actions.act_window">
- <field name="name">其他收入单</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">other.money.order</field>
- <field name="view_mode">list,form</field>
- <field name='context'>{'type':'other_get'}</field>
- <field name="domain">[('type','=','other_get')]</field>
- <field name="help" type="html">
- <p class="oe_view_nocontent_create">
- 点击创建其他收入单
- </p>
- </field>
- </record>
-
- <!-- 其他支出单 action -->
- <record id="other_money_payment_action" model="ir.actions.act_window">
- <field name="name">其他支出单</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">other.money.order</field>
- <field name="view_mode">list,form</field>
- <field name='context'>{'type':'other_pay'}</field>
- <field name="domain">[('type','=','other_pay')]</field>
- <field name="help" type="html">
- <p class="oe_view_nocontent_create">
- 点击创建其他支出单
- </p>
- </field>
- </record>
- <!-- 其他收入单menu、其他支出单menu -->
- <menuitem id="menu_other_money_receipt_action" action="other_money_receipt_action" parent="menu_money_manage" groups='money.other_get_pay_groups' sequence="5"/>
- <menuitem id="menu_other_money_payment_action" action="other_money_payment_action" parent="menu_money_manage" groups='money.other_get_pay_groups' sequence="6"/>
- </data>
- </odoo>
-
|