mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[10.0] Added analytic tags to contracts
This commit adds ability to specify analytic tags on contracts invoice lines, which will be propagated to invoice lines.
This commit is contained in:
committed by
Дмитро Катюха
parent
e383e90823
commit
a8ef7c939d
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Contracts Management - Recurring',
|
'name': 'Contracts Management - Recurring',
|
||||||
'version': '10.0.4.0.1',
|
'version': '10.0.4.1.1',
|
||||||
'category': 'Contract Management',
|
'category': 'Contract Management',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'author': "OpenERP SA, "
|
'author': "OpenERP SA, "
|
||||||
|
|||||||
@@ -188,6 +188,8 @@ class AccountAnalyticAccount(models.Model):
|
|||||||
'uom_id': line.uom_id.id,
|
'uom_id': line.uom_id.id,
|
||||||
'discount': line.discount,
|
'discount': line.discount,
|
||||||
})
|
})
|
||||||
|
# Add analytic tags to invoice line
|
||||||
|
invoice_line.analytic_tag_ids |= line.analytic_tag_ids
|
||||||
# Get other invoice line values from product onchange
|
# Get other invoice line values from product onchange
|
||||||
invoice_line._onchange_product_id()
|
invoice_line._onchange_product_id()
|
||||||
invoice_line_vals = invoice_line._convert_to_write(invoice_line._cache)
|
invoice_line_vals = invoice_line._convert_to_write(invoice_line._cache)
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ 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',
|
||||||
)
|
)
|
||||||
|
analytic_tag_ids = fields.Many2many(
|
||||||
|
'account.analytic.tag',
|
||||||
|
string='Analytic Tags',
|
||||||
|
)
|
||||||
sequence = fields.Integer(
|
sequence = fields.Integer(
|
||||||
string="Sequence",
|
string="Sequence",
|
||||||
default=10,
|
default=10,
|
||||||
|
|||||||
@@ -82,6 +82,7 @@
|
|||||||
<field name="specific_price" invisible="1"/>
|
<field name="specific_price" invisible="1"/>
|
||||||
<field name="discount" groups="sale.group_discount_per_so_line" />
|
<field name="discount" groups="sale.group_discount_per_so_line" />
|
||||||
<field name="price_subtotal"/>
|
<field name="price_subtotal"/>
|
||||||
|
<field name="analytic_tag_ids" widget="many2many_tags"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<field name="specific_price" invisible="1"/>
|
<field name="specific_price" invisible="1"/>
|
||||||
<field name="discount" groups="sale.group_discount_per_so_line" />
|
<field name="discount" groups="sale.group_discount_per_so_line" />
|
||||||
<field name="price_subtotal" />
|
<field name="price_subtotal" />
|
||||||
|
<field name="analytic_tag_ids" widget="many2many_tags" />
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
Reference in New Issue
Block a user