summaryrefslogtreecommitdiff
path: root/addons/account/wizard/account_invoice_send_views.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/account/wizard/account_invoice_send_views.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/account/wizard/account_invoice_send_views.xml')
-rw-r--r--addons/account/wizard/account_invoice_send_views.xml94
1 files changed, 94 insertions, 0 deletions
diff --git a/addons/account/wizard/account_invoice_send_views.xml b/addons/account/wizard/account_invoice_send_views.xml
new file mode 100644
index 00000000..518aed6d
--- /dev/null
+++ b/addons/account/wizard/account_invoice_send_views.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="account_invoice_send_wizard_form" model="ir.ui.view">
+ <field name="name">account.invoice.send.form</field>
+ <field name="model">account.invoice.send</field>
+ <field name="groups_id" eval="[(4,ref('base.group_user'))]"/>
+ <field name="arch" type="xml">
+ <form string="Invoice send &amp; Print">
+ <!-- truly invisible fields for control and options -->
+ <field name="composition_mode" invisible="1"/>
+ <field name="invoice_ids" invisible="1"/>
+ <field name="email_from" invisible="1" />
+ <field name="mail_server_id" invisible="1"/>
+ <div name="option_print">
+ <field name="is_print" />
+ <b><label for="is_print"/></b>
+ <div name="info_form" attrs="{'invisible': ['|', ('is_print', '=', False), ('composition_mode', '=', 'mass_mail')]}" class="text-center text-muted d-inline-block">
+ Preview as a PDF
+ </div>
+ </div>
+ <div name="option_email">
+ <field name="is_email" />
+ <b><label for="is_email"/></b>
+ </div>
+ <div class="text-left d-inline-block mr8" attrs="{'invisible': ['|', ('is_email','=', False), ('invoice_without_email', '=', False)]}">
+ <field name="invoice_without_email" class="mr4"/>
+ </div>
+ <div name="mail_form" attrs="{'invisible': [('is_email', '=', False)]}">
+ <!-- visible wizard -->
+ <div attrs="{'invisible': [('composition_mode', '=', 'mass_mail')]}">
+ <group>
+ <label for="partner_ids" string="Recipients" groups="base.group_user"/>
+ <div groups="base.group_user">
+ <span attrs="{'invisible': [('composition_mode', '!=', 'mass_mail')]}">
+ <strong>Email mass mailing</strong> on
+ <span>the selected records</span>
+ </span>
+ <span>Followers of the document and</span>
+ <field name="partner_ids" widget="many2many_tags_email" placeholder="Add contacts to notify..."
+ context="{'force_email':True, 'show_email':True}" attrs="{'invisible': [('composition_mode', '=', 'mass_mail')]}"/>
+ </div>
+ <field name="subject" placeholder="Subject..." attrs="{'required': [('is_email', '=', True), ('composition_mode', '=', 'comment')]}"/>
+ </group>
+ <field name="body" style="border:none;" options="{'style-inline': true}"/>
+ </div>
+ <group>
+ <group attrs="{'invisible': [('composition_mode', '=', 'mass_mail')]}">
+ <field name="attachment_ids" widget="many2many_binary" string="Attach a file" nolabel="1" colspan="2" attrs="{'invisible': [('composition_mode', '=', 'mass_mail')]}"/>
+ </group>
+ <group>
+ <field name="template_id" options="{'no_create': True, 'no_edit': True}"
+ context="{'default_model': 'account.move'}"/>
+ </group>
+ </group>
+ </div>
+
+ <footer>
+ <button string="Send &amp; Print"
+ attrs="{'invisible': ['|', ('is_email', '=', False), ('is_print', '=', False)]}"
+ name="send_and_print_action" type="object" class="send_and_print btn-primary o_mail_send"/>
+ <button string="Send"
+ attrs="{'invisible': ['|', ('is_print', '=', True), ('is_email', '=', False)]}"
+ name="send_and_print_action" type="object" class="send btn-primary o_mail_send"/>
+ <button string="Print"
+ attrs="{'invisible': ['|', ('is_print', '=', False), ('is_email', '=', True)]}"
+ name="send_and_print_action" type="object" class="print btn-primary o_mail_send"/>
+ <button string="Cancel" class="btn-secondary" special="cancel" />
+ <button icon="fa-lg fa-save" type="object" name="save_as_template" string="Save as new template"
+ attrs="{'invisible': ['|', ('composition_mode', '=', 'mass_mail'), ('is_email', '=', False)]}"
+ class="pull-right btn-secondary" help="Save as a new template" />
+ </footer>
+ </form>
+ </field>
+ </record>
+
+ <record id="invoice_send" model="ir.actions.act_window">
+ <field name="name">Send &amp; print</field>
+ <field name="res_model">account.invoice.send</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ <field name="context" eval="{
+ 'default_template_id': ref('account.email_template_edi_invoice'),
+ 'mark_invoice_as_sent': True,
+ 'custom_layout': 'mail.mail_notification_paynow',
+ }"/>
+ <field name="binding_model_id" ref="model_account_move"/>
+ <field name="binding_view_types">list</field>
+ </record>
+
+ </data>
+
+</odoo>