Browse Source
Merge pull request #110 from management-and-acounting-on-line/10.0-contract-analytic-tags
[10.0] Added analytic tags to contracts
pull/218/head
Pedro M. Baeza
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
9 additions and
1 deletions
-
contract/__manifest__.py
-
contract/models/account_analytic_account.py
-
contract/models/account_analytic_invoice_line.py
-
contract/views/account_analytic_account_view.xml
-
contract/views/account_analytic_contract_view.xml
|
|
@ -9,7 +9,7 @@ |
|
|
|
|
|
|
|
{ |
|
|
|
'name': 'Contracts Management - Recurring', |
|
|
|
'version': '10.0.4.0.1', |
|
|
|
'version': '10.0.4.1.1', |
|
|
|
'category': 'Contract Management', |
|
|
|
'license': 'AGPL-3', |
|
|
|
'author': "OpenERP SA, " |
|
|
|
|
|
@ -188,6 +188,8 @@ class AccountAnalyticAccount(models.Model): |
|
|
|
'uom_id': line.uom_id.id, |
|
|
|
'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 |
|
|
|
invoice_line._onchange_product_id() |
|
|
|
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.' |
|
|
|
' It should be less or equal to 100', |
|
|
|
) |
|
|
|
analytic_tag_ids = fields.Many2many( |
|
|
|
'account.analytic.tag', |
|
|
|
string='Analytic Tags', |
|
|
|
) |
|
|
|
sequence = fields.Integer( |
|
|
|
string="Sequence", |
|
|
|
default=10, |
|
|
|
|
|
@ -82,6 +82,7 @@ |
|
|
|
<field name="specific_price" invisible="1"/> |
|
|
|
<field name="discount" groups="sale.group_discount_per_so_line" /> |
|
|
|
<field name="price_subtotal"/> |
|
|
|
<field name="analytic_tag_ids" widget="many2many_tags"/> |
|
|
|
</tree> |
|
|
|
</field> |
|
|
|
</div> |
|
|
|
|
|
@ -41,6 +41,7 @@ |
|
|
|
<field name="specific_price" invisible="1"/> |
|
|
|
<field name="discount" groups="sale.group_discount_per_so_line" /> |
|
|
|
<field name="price_subtotal" /> |
|
|
|
<field name="analytic_tag_ids" widget="many2many_tags" /> |
|
|
|
</tree> |
|
|
|
</field> |
|
|
|
</group> |
|
|
|