snailmail_views.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record model="ir.ui.view" id="snailmail_letter_list">
  4. <field name="name">snailmail.letter.tree</field>
  5. <field name="model">snailmail.letter</field>
  6. <field name="arch" type="xml">
  7. <tree decoration-danger="state=='error'" decoration-muted="state=='sent'" string="Letters">
  8. <field name="attachment_id" string="Document"/>
  9. <field name="partner_id"/>
  10. <field name="user_id"/>
  11. <field name="state" invisible="1"/>
  12. <field name="info_msg" widget="html"/>
  13. <field name="company_id" groups="base.group_multi_company"/>
  14. </tree>
  15. </field>
  16. </record>
  17. <record model="ir.ui.view" id="snailmail_letter_form">
  18. <field name="name">snailmail.letter.form</field>
  19. <field name="model">snailmail.letter</field>
  20. <field name="arch" type="xml">
  21. <form>
  22. <header>
  23. <button name="snailmail_print" string="Send Now" type="object" states="pending,error" class="oe_highlight"/>
  24. <button name="cancel" string="Cancel" type="object" states="pending,error"/>
  25. <field name="state" widget="statusbar" statusbar_visible="pending,sent,canceled"/>
  26. </header>
  27. <sheet>
  28. <div class="oe_title">
  29. <h1><field name="display_name"/></h1>
  30. </div>
  31. <group>
  32. <field name="reference" widget="reference"/>
  33. <field name="attachment_datas" filename="attachment_fname"/>
  34. <field name="attachment_fname" invisible="1"/>
  35. <field name="partner_id"/>
  36. <field name="user_id"/>
  37. <field name="info_msg" widget="html"/>
  38. </group>
  39. <group groups="base.group_no_one">
  40. <field name="model"/>
  41. <field name="res_id"/>
  42. <field name="color"/>
  43. <field name="duplex"/>
  44. </group>
  45. </sheet>
  46. </form>
  47. </field>
  48. </record>
  49. <record model="ir.actions.act_window" id="action_mail_letters">
  50. <field name="name">Snailmail Letters</field>
  51. <field name="res_model">snailmail.letter</field>
  52. <field name="view_mode">form,tree</field>
  53. <field name="domain">[('state', '!=', 'draft')]</field>
  54. <field name="view_id" ref="snailmail_letter_list" />
  55. </record>
  56. <menuitem id="menu_snailmail_letters" parent="base.menu_email" action="action_mail_letters"
  57. sequence="50"/>
  58. </odoo>