[ADD] Contract: fiscal position

[ADD] Contract: new contributor

[REF] Contract: indexes
This commit is contained in:
Thomas Binsfeld
2019-01-16 09:32:48 +01:00
committed by sbejaoui
parent 22c1b25311
commit 19b3f50d34
4 changed files with 18 additions and 2 deletions

View File

@@ -19,7 +19,8 @@ class AbstractAccountAnalyticContract(models.AbstractModel):
name = fields.Char(required=True)
# Needed for avoiding errors on several inherited behaviors
partner_id = fields.Many2one(
comodel_name="res.partner", string="Partner (always False)"
comodel_name="res.partner", string="Partner (always False)",
index=True,
)
pricelist_id = fields.Many2one(
comodel_name='product.pricelist', string='Pricelist'
@@ -27,6 +28,7 @@ class AbstractAccountAnalyticContract(models.AbstractModel):
contract_type = fields.Selection(
selection=[('sale', 'Customer'), ('purchase', 'Supplier')],
default='sale',
index=True,
)
journal_id = fields.Many2one(
@@ -35,6 +37,7 @@ class AbstractAccountAnalyticContract(models.AbstractModel):
default=lambda s: s._default_journal(),
domain="[('type', '=', contract_type),"
"('company_id', '=', company_id)]",
index=True,
)
company_id = fields.Many2one(
'res.company',