GoodERP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

136 lines
6.9KB

  1. <?xml version="1.0"?>
  2. <odoo>
  3. <data>
  4. <!--其他收入/支出list-->
  5. <record id="other_money_order_list" model="ir.ui.view">
  6. <field name="name">other.money.order.list</field>
  7. <field name="model">other.money.order</field>
  8. <field name="arch" type="xml">
  9. <list string="其他收支单" decoration-info='state == "draft"' decoration-muted= 'state == "cancel"' >
  10. <field name="name" optional="show"/>
  11. <field name="date" optional="show"/>
  12. <field name="partner_id" optional="show"/>
  13. <field name="details" widget="html" optional="show"/>
  14. <field name="total_amount" optional="show"/>
  15. <field name="state" optional="show"/>
  16. <field name="note" optional="show"/>
  17. <field name="is_init" invisible="1" optional="show"/>
  18. </list>
  19. </field>
  20. </record>
  21. <!--其他收入/支出form-->
  22. <record id="other_money_order_form" model="ir.ui.view">
  23. <field name="name">other.money.order.form</field>
  24. <field name="model">other.money.order</field>
  25. <field name="arch" type="xml">
  26. <form string="其他收支单">
  27. <header>
  28. <button name="other_money_done" invisible="state!='draft'" string="确认" type="object" class="oe_highlight"/>
  29. <button name="other_money_draft" invisible="state!='done'" string="撤销确认" type="object"/>
  30. <button name="action_cancel" invisible="state!='draft'" string="作废" type="object"/>
  31. <!-- <button name="print_other_money_order" invisible="state!='done'" string="打印" type="object" class="oe_highlight"/> -->
  32. <field name="state" widget="statusbar"/>
  33. </header>
  34. <sheet>
  35. <div class="oe_title">
  36. <h1>
  37. <field name="name" class="oe_inline" readonly="1"/>
  38. </h1>
  39. </div>
  40. <group>
  41. <group>
  42. <field name='type' invisible='1' readonly="state!='draft'"/>
  43. <field name="partner_id" readonly="state!='draft'"
  44. options="{'no_open': True, 'no_create': True}"/>
  45. <field name="receiver"
  46. invisible="type!='other_pay'"
  47. />
  48. <field name="bank_name" invisible="type!='other_pay'"/>
  49. <field name="bank_num" invisible="type!='other_pay'"/>
  50. </group>
  51. <group>
  52. <field name="date" readonly="state!='draft'"/>
  53. <field name="voucher_id"/>
  54. </group>
  55. </group>
  56. <field name="line_ids" context="{'order_type': type}" readonly="state!='draft'">
  57. <list string="其他收支单明细" editable="bottom">
  58. <field name="service" groups="core.service_groups" optional="show"/>
  59. <field name="category_id" required="1" domain="[('type', '=', parent.type)]" optional="show"/>
  60. <field name="account_id" optional="show"/>
  61. <field name="auxiliary_id" optional="show"/>
  62. <field name="amount" sum="合计" optional="show"/>
  63. <field name="tax_rate" groups="money.tax_groups" optional="show"/>
  64. <field name="tax_amount" groups="money.tax_groups" sum="合计" optional="show"/>
  65. <field name="note" optional="show"/>
  66. </list>
  67. </field>
  68. <group>
  69. <group>
  70. <field name="bank_id" readonly="state!='draft'"/>
  71. </group>
  72. <group>
  73. <field name="total_amount"/>
  74. </group>
  75. </group>
  76. <field name="note" placeholder="备注"/>
  77. </sheet>
  78. <chatter/>
  79. </form>
  80. </field>
  81. </record>
  82. <!--其他收入/支出单 search 视图-->
  83. <record id="other_money_order_search" model="ir.ui.view">
  84. <field name="name">other.money.order.search</field>
  85. <field name="model">other.money.order</field>
  86. <field name="arch" type="xml">
  87. <search string="其他收入/支出单 ">
  88. <field name="name"/>
  89. <field name="partner_id"/>
  90. <field name="total_amount"/>
  91. <field name="state"/>
  92. <filter name="draft" string="草稿" domain="[('state','=','draft')]"/>
  93. <filter name="done" string="已确认" domain="[('state','=','done')]"/>
  94. <filter name="by_partner" string="往来单位" domain="[]" context="{'group_by':'partner_id'}"/>
  95. <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
  96. </search>
  97. </field>
  98. </record>
  99. <!-- 其他收入单 action -->
  100. <record id="other_money_receipt_action" model="ir.actions.act_window">
  101. <field name="name">其他收入单</field>
  102. <field name="type">ir.actions.act_window</field>
  103. <field name="res_model">other.money.order</field>
  104. <field name="view_mode">list,form</field>
  105. <field name='context'>{'type':'other_get'}</field>
  106. <field name="domain">[('type','=','other_get')]</field>
  107. <field name="help" type="html">
  108. <p class="oe_view_nocontent_create">
  109. 点击创建其他收入单
  110. </p>
  111. </field>
  112. </record>
  113. <!-- 其他支出单 action -->
  114. <record id="other_money_payment_action" model="ir.actions.act_window">
  115. <field name="name">其他支出单</field>
  116. <field name="type">ir.actions.act_window</field>
  117. <field name="res_model">other.money.order</field>
  118. <field name="view_mode">list,form</field>
  119. <field name='context'>{'type':'other_pay'}</field>
  120. <field name="domain">[('type','=','other_pay')]</field>
  121. <field name="help" type="html">
  122. <p class="oe_view_nocontent_create">
  123. 点击创建其他支出单
  124. </p>
  125. </field>
  126. </record>
  127. <!-- 其他收入单menu、其他支出单menu -->
  128. <menuitem id="menu_other_money_receipt_action" action="other_money_receipt_action" parent="menu_money_manage" groups='money.other_get_pay_groups' sequence="5"/>
  129. <menuitem id="menu_other_money_payment_action" action="other_money_payment_action" parent="menu_money_manage" groups='money.other_get_pay_groups' sequence="6"/>
  130. </data>
  131. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1