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.

137 lines
7.0KB

  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="tax_included_amount" groups="money.tax_groups" sum="合计" optional="show"/>
  66. <field name="note" optional="show"/>
  67. </list>
  68. </field>
  69. <group>
  70. <group>
  71. <field name="bank_id" readonly="state!='draft'"/>
  72. </group>
  73. <group>
  74. <field name="total_amount"/>
  75. </group>
  76. </group>
  77. <field name="note" placeholder="备注"/>
  78. </sheet>
  79. <chatter/>
  80. </form>
  81. </field>
  82. </record>
  83. <!--其他收入/支出单 search 视图-->
  84. <record id="other_money_order_search" model="ir.ui.view">
  85. <field name="name">other.money.order.search</field>
  86. <field name="model">other.money.order</field>
  87. <field name="arch" type="xml">
  88. <search string="其他收入/支出单 ">
  89. <field name="name"/>
  90. <field name="partner_id"/>
  91. <field name="total_amount"/>
  92. <field name="state"/>
  93. <filter name="draft" string="草稿" domain="[('state','=','draft')]"/>
  94. <filter name="done" string="已确认" domain="[('state','=','done')]"/>
  95. <filter name="by_partner" string="往来单位" domain="[]" context="{'group_by':'partner_id'}"/>
  96. <filter name="by_day" string="单据日期" domain="[]" context="{'group_by':'date:day'}"/>
  97. </search>
  98. </field>
  99. </record>
  100. <!-- 其他收入单 action -->
  101. <record id="other_money_receipt_action" model="ir.actions.act_window">
  102. <field name="name">其他收入单</field>
  103. <field name="type">ir.actions.act_window</field>
  104. <field name="res_model">other.money.order</field>
  105. <field name="view_mode">list,form</field>
  106. <field name='context'>{'type':'other_get'}</field>
  107. <field name="domain">[('type','=','other_get')]</field>
  108. <field name="help" type="html">
  109. <p class="oe_view_nocontent_create">
  110. 点击创建其他收入单
  111. </p>
  112. </field>
  113. </record>
  114. <!-- 其他支出单 action -->
  115. <record id="other_money_payment_action" model="ir.actions.act_window">
  116. <field name="name">其他支出单</field>
  117. <field name="type">ir.actions.act_window</field>
  118. <field name="res_model">other.money.order</field>
  119. <field name="view_mode">list,form</field>
  120. <field name='context'>{'type':'other_pay'}</field>
  121. <field name="domain">[('type','=','other_pay')]</field>
  122. <field name="help" type="html">
  123. <p class="oe_view_nocontent_create">
  124. 点击创建其他支出单
  125. </p>
  126. </field>
  127. </record>
  128. <!-- 其他收入单menu、其他支出单menu -->
  129. <menuitem id="menu_other_money_receipt_action" action="other_money_receipt_action" parent="menu_money_manage" groups='money.other_get_pay_groups' sequence="5"/>
  130. <menuitem id="menu_other_money_payment_action" action="other_money_payment_action" parent="menu_money_manage" groups='money.other_get_pay_groups' sequence="6"/>
  131. </data>
  132. </odoo>
上海开阖软件有限公司 沪ICP备12045867号-1