mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract: Add display sequence on contract lines (#119)
This commit is contained in:
committed by
Francisco Ivan Anton Prieto
parent
422afcbda2
commit
c868de7779
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Contracts Management - Recurring',
|
'name': 'Contracts Management - Recurring',
|
||||||
'version': '10.0.3.0.0',
|
'version': '10.0.3.1.0',
|
||||||
'category': 'Contract Management',
|
'category': 'Contract Management',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'author': "OpenERP SA, "
|
'author': "OpenERP SA, "
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ from odoo.tools.translate import _
|
|||||||
|
|
||||||
class AccountAnalyticInvoiceLine(models.Model):
|
class AccountAnalyticInvoiceLine(models.Model):
|
||||||
_name = 'account.analytic.invoice.line'
|
_name = 'account.analytic.invoice.line'
|
||||||
|
_order = "sequence,id"
|
||||||
|
|
||||||
product_id = fields.Many2one(
|
product_id = fields.Many2one(
|
||||||
'product.product',
|
'product.product',
|
||||||
@@ -54,6 +55,11 @@ class AccountAnalyticInvoiceLine(models.Model):
|
|||||||
help='Discount that is applied in generated invoices.'
|
help='Discount that is applied in generated invoices.'
|
||||||
' It should be less or equal to 100',
|
' It should be less or equal to 100',
|
||||||
)
|
)
|
||||||
|
sequence = fields.Integer(
|
||||||
|
string="Sequence",
|
||||||
|
default=10,
|
||||||
|
help="Sequence of the contract line when displaying contracts",
|
||||||
|
)
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
@api.depends('quantity', 'price_unit', 'discount')
|
@api.depends('quantity', 'price_unit', 'discount')
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
<div attrs="{'invisible': [('recurring_invoices','=',False)]}">
|
<div attrs="{'invisible': [('recurring_invoices','=',False)]}">
|
||||||
<field name="recurring_invoice_line_ids">
|
<field name="recurring_invoice_line_ids">
|
||||||
<tree string="Account Analytic Lines" editable="bottom">
|
<tree string="Account Analytic Lines" editable="bottom">
|
||||||
|
<field name="sequence" widget="handle" />
|
||||||
<field name="product_id"/>
|
<field name="product_id"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="quantity"/>
|
<field name="quantity"/>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
<group name="group_invoice_lines" string="Invoice Lines">
|
<group name="group_invoice_lines" string="Invoice Lines">
|
||||||
<field name="recurring_invoice_line_ids">
|
<field name="recurring_invoice_line_ids">
|
||||||
<tree string="Account Analytic Lines" editable="bottom">
|
<tree string="Account Analytic Lines" editable="bottom">
|
||||||
|
<field name="sequence" widget="handle" />
|
||||||
<field name="product_id" />
|
<field name="product_id" />
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="quantity" />
|
<field name="quantity" />
|
||||||
|
|||||||
Reference in New Issue
Block a user