[IMP]account, website_sale: improvement into the invoice form view
with this commit, we have restructured 'other info' tab with few fields and updated the tooltips and update the 'XPath' regarding the new restructure Task ID: 1930087
This commit is contained in:
@@ -287,7 +287,7 @@ class AccountInvoice(models.Model):
|
||||
default=False, copy=False,
|
||||
help="Technical field holding the number given to the invoice, automatically set when the invoice is validated then stored to set the same number again if the invoice is cancelled, set to draft and re-validated.")
|
||||
reference = fields.Char(string='Payment Ref.', copy=False, readonly=True, states={'draft': [('readonly', False)]},
|
||||
help='The payment communication that will be automatically populated once the invoice validation. You can also write a free communication.')
|
||||
help='Automatically generated once the invoice is confirmed. You can also write a free communication.')
|
||||
comment = fields.Text('Additional Information', readonly=True, states={'draft': [('readonly', False)]}, default=_default_comment)
|
||||
|
||||
state = fields.Selection([
|
||||
@@ -387,7 +387,9 @@ class AccountInvoice(models.Model):
|
||||
readonly=True, states={'draft': [('readonly', False)]},
|
||||
default=lambda self: self.env.user, copy=False)
|
||||
fiscal_position_id = fields.Many2one('account.fiscal.position', string='Fiscal Position', oldname='fiscal_position',
|
||||
readonly=True, states={'draft': [('readonly', False)]})
|
||||
readonly=True, states={'draft': [('readonly', False)]},
|
||||
help="""Fiscal positions are used to adapt taxes and accounts for particular customers or sales orders/invoices.
|
||||
The default value comes from the customer.""")
|
||||
commercial_partner_id = fields.Many2one('res.partner', string='Commercial Entity', compute_sudo=True,
|
||||
related='partner_id.commercial_partner_id', store=True, readonly=True,
|
||||
help="The commercial entity that will be used on Journal Entries for this invoice")
|
||||
|
||||
@@ -468,7 +468,6 @@
|
||||
<field name="date_invoice" options="{'datepicker': {'warn_future': true}}"/>
|
||||
<field name="date_due" attrs="{'readonly': ['|',('payment_term_id','!=',False), ('state', 'in', ['open', 'in_payment', 'paid'])]}" force_save="1"/>
|
||||
<field name="move_name" invisible="1"/>
|
||||
<field name="user_id" groups="base.group_user"/>
|
||||
<label for="currency_id" groups="base.group_multi_currency"/>
|
||||
<div groups="base.group_multi_currency">
|
||||
<field name="currency_id" options="{'no_create': True, 'no_open': True}" class="oe_inline"/>
|
||||
@@ -597,19 +596,20 @@
|
||||
<page string="Other Info" name="other_info">
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="journal_id" groups="account.group_account_user"
|
||||
options="{'no_create': True}" attrs="{'readonly':[('move_name','!=',False)]}"/>
|
||||
<field domain="[('company_id', '=', company_id),('internal_type','=', 'receivable'), ('deprecated', '=', False)]"
|
||||
name="account_id" groups="account.group_account_user"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<field name="reference" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="name"/>
|
||||
<field name="move_id" groups="account.group_account_user" attrs="{'invisible': [('move_id', '=', False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="incoterm_id" options="{'no_create': True}"/>
|
||||
<field name="fiscal_position_id" options="{'no_create': True}" />
|
||||
<field name="move_id" groups="account.group_account_user" attrs="{'invisible': [('move_id', '=', False)]}"/>
|
||||
<field name="name"/>
|
||||
<field name="origin" groups="base.group_user" attrs="{'invisible': [('origin', '=', False)]}"/>
|
||||
<field name="reference" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="partner_bank_id" domain="[('partner_id.ref_company_ids', 'in', [company_id])]" context="{'default_partner_id':company_id}"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
<field name="model">account.invoice</field>
|
||||
<field name="inherit_id" ref="account.invoice_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="fiscal_position_id" position="after">
|
||||
<xpath expr="//page[@name='other_info']//field[@name='company_id']" position="after">
|
||||
<field name="website_id" groups="website.group_multi_website"/>
|
||||
</field>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user