summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorjpr-odoo <jpr@openerp.com>2019-02-18 06:32:40 +0000
committerjpr-odoo <jpr@openerp.com>2019-04-12 09:04:26 +0000
commit3d204d063f98d443ede8f09fb29f9f91085bb2fd (patch)
tree0b8110f932d7624859a88cd878f9ff3766f0f427 /addons
parenta7ac71ed4404aa2630619c331d725f4f545626f8 (diff)
[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
Diffstat (limited to 'addons')
-rw-r--r--addons/account/models/account_invoice.py6
-rw-r--r--addons/account/views/account_invoice_view.xml8
-rw-r--r--addons/website_sale/views/account_views.xml4
3 files changed, 10 insertions, 8 deletions
diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index f2a5e0d785b..e639196597f 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -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")
diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml
index 1076f3892fd..988c7d14e22 100644
--- a/addons/account/views/account_invoice_view.xml
+++ b/addons/account/views/account_invoice_view.xml
@@ -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>
diff --git a/addons/website_sale/views/account_views.xml b/addons/website_sale/views/account_views.xml
index 22ffabfeadb..9d743657f92 100644
--- a/addons/website_sale/views/account_views.xml
+++ b/addons/website_sale/views/account_views.xml
@@ -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> \ No newline at end of file