mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[12.0][REF] - Contract Variable quantity: split from analytic accoun
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountAbstractAnalyticContractLine(models.AbstractModel):
|
||||
_inherit = 'account.abstract.analytic.contract.line'
|
||||
class ContractAbstractContractLine(models.AbstractModel):
|
||||
_inherit = 'contract.abstract.contract.line'
|
||||
|
||||
qty_type = fields.Selection(
|
||||
selection=[
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountAnalyticAccount(models.Model):
|
||||
_inherit = "account.analytic.account"
|
||||
class ContractContract(models.Model):
|
||||
_inherit = "contract.contract"
|
||||
|
||||
skip_zero_qty = fields.Boolean(
|
||||
string='Skip Zero Qty Lines',
|
||||
|
||||
@@ -9,7 +9,7 @@ from odoo.tools.safe_eval import safe_eval
|
||||
|
||||
|
||||
class AccountAnalyticInvoiceLine(models.Model):
|
||||
_inherit = 'account.analytic.invoice.line'
|
||||
_inherit = 'contract.line'
|
||||
|
||||
@api.multi
|
||||
def _get_quantity_to_invoice(
|
||||
|
||||
@@ -20,8 +20,8 @@ class ContractLineFormula(models.Model):
|
||||
'env': self.env,
|
||||
'context': self.env.context,
|
||||
'user': self.env.user,
|
||||
'line': self.env['account.analytic.invoice.line'],
|
||||
'contract': self.env['account.analytic.account'],
|
||||
'line': self.env['contract.line'],
|
||||
'contract': self.env['contract.contract'],
|
||||
'invoice': self.env['account.invoice'],
|
||||
'quantity': 0,
|
||||
'period_first_date': False,
|
||||
|
||||
Reference in New Issue
Block a user