[IMP] account & account_edi: Some visual improvements.

Hide invoice_origin field.
Hide partner_bank_id for customer invoice.
Remove margin-bottom for report layout in "base" module.
Hide electronic invoicing message for "Send & Print" action.

Task ID: #2277282

closes odoo/odoo#52953

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
This commit is contained in:
Florian Gilbert
2020-06-15 08:54:12 +00:00
parent 8a1af90cac
commit 7db53df9cb
4 changed files with 10 additions and 15 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ class AccountMove(models.Model):
help='Technical field used to fit the generic behavior in mail templates.')
is_move_sent = fields.Boolean(readonly=True, default=False, copy=False,
help="It indicates that the invoice/payment has been sent.")
partner_bank_id = fields.Many2one('res.partner.bank', string='Bank Account',
partner_bank_id = fields.Many2one('res.partner.bank', string='Recipient Bank',
help='Bank Account Number to which the invoice will be paid. A Company bank account if this is a Customer Invoice or Vendor Credit Note, otherwise a Partner bank account number.',
check_company=True)
payment_reference = fields.Char(string='Payment Reference', index=True, copy=False,
+1 -2
View File
@@ -998,8 +998,7 @@
<label for="ref" string="Customer Reference" />
<field name="ref" nolabel="1"/>
<field name="invoice_user_id" domain="[('share', '=', False)]" widget="many2one_avatar_user"/>
<field name="invoice_origin" string="Source Document" force_save="1"
attrs="{'invisible': [('invoice_origin', '=', False)]}"/>
<field name="invoice_origin" string="Source Document" force_save="1" invisible="1"/>
<field name="partner_bank_id"
context="{'default_partner_id': commercial_partner_id}"
domain="[('partner_id', '=', bank_partner_id)]"
@@ -7,18 +7,14 @@
<field name="inherit_id" ref="account.account_invoice_send_wizard_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='mail_form']" position='before'>
<div name="edi_format_option">
<div name="edi_format_option" attrs="{'invisible':[('edi_format_ids', '=', [])]}">
<group>
<label for="edi_format_ids"/>
<div class="oe_inline">
<field name="edi_format_ids"
nolabel="1"
widget="many2many_tags"
placeholder="You can set default electronic invoicing formats on the journal"
attrs="{'invisible':[('edi_format_ids', '=', [])]}"/>
<div attrs="{'invisible':[('edi_format_ids', '!=', [])]}">
<i>Please, set electronic invoicing formats on the journal</i>
</div>
placeholder="You can set default electronic invoicing formats on the journal"/>
</div>
</group>
</div>
@@ -13,17 +13,17 @@
<field name="custom_colors" invisible="1" />
<field name="logo_primary_color" invisible="1" />
<field name="logo_secondary_color" invisible="1" />
<field name="report_layout_id" widget="radio" string="Layout" class="mb-4" />
<field name="logo" widget="image" class="mb-4" />
<field name="report_layout_id" widget="radio" string="Layout"/>
<field name="logo" widget="image"/>
<label for="primary_color" string="Colors" />
<div class="o_document_layout_colors">
<field name="primary_color" widget="color" class="mb-4" />
<field name="secondary_color" widget="color" class="mb-4" />
<field name="primary_color" widget="color"/>
<field name="secondary_color" widget="color"/>
<button class="btn btn-link" title="Reset to logo colors" attrs="{'invisible': [('custom_colors', '=', False)]}">
<label for="custom_colors" class="fa fa-refresh mb-4" string="" />
<label for="custom_colors" class="fa fa-refresh" string="" />
</button>
</div>
<field name="font" widget="font" class="mb-4" />
<field name="font" widget="font"/>
<field name="report_header" widget="char" placeholder="e.g. Global Business Solutions" />
<field name="report_footer" string="Footer" placeholder="e.g. Opening hours, bank accounts (one per line)" />
<field name="paperformat_id" required="1" />