Add lims_account_invoice module as extras_depend on lims_project_tas module

This commit is contained in:
Sebastián Marró 2019-01-16 13:46:51 -03:00
parent fa8833a2ef
commit 4b62faca67
6 changed files with 31 additions and 8 deletions

View file

@ -28,12 +28,6 @@ class Invoice:
__name__ = 'account.invoice'
__metaclass__ = PoolMeta
# lims_project = fields.Many2One('lims.project', 'TAS Project',
# domain=[('type', '=', 'tas')],
# states={
# 'readonly': Eval('state') != 'draft',
# 'invisible': Eval('type').in_(['in'])
# })
no_send_invoice = fields.Boolean('No send invoice',
states={'invisible': Eval('type') == 'in'},
depends=['type'],

View file

@ -449,7 +449,7 @@ class Move:
__metaclass__ = PoolMeta
label_quantity = fields.Float("Label Quantity",
digits=(16, Eval('unit_digits', 2)))
digits=(16, Eval('unit_digits', 2)), depends=['unit_digits'])
origin_purchase_unit_price = fields.Numeric('Unit Price',
digits=price_digits)
origin_purchase_currency = fields.Many2One('currency.currency',

View file

@ -5,6 +5,7 @@
from trytond.pool import Pool
from . import project
from . import configuration
from . import invoice
def register():
@ -15,3 +16,7 @@ def register():
configuration.LabWorkYear,
configuration.LabWorkYearSequence,
module='lims_project_tas', type_='model')
Pool.register(
invoice.Invoice,
module='lims_project_tas', type_='model',
depends=['lims_account_invoice'])

View file

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# This file is part of lims_project_tas module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
from trytond.model import fields
from trytond.pool import PoolMeta
from trytond.pyson import Eval
__all__ = ['Invoice']
class Invoice:
__name__ = 'account.invoice'
__metaclass__ = PoolMeta
lims_project = fields.Many2One('lims.project', 'TAS Project',
domain=[('type', '=', 'tas')],
states={
'readonly': Eval('state') != 'draft',
'invisible': Eval('type').in_(['in'])
})

View file

@ -2,6 +2,8 @@
version=5.0.0
depends:
lims_project
extras_depend:
lims_account_invoice
xml:
project.xml
configuration.xml

View file

@ -40,7 +40,7 @@ major_version, minor_version, _ = version.split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
requires = ['pytz', 'xlrd', 'xlutils', 'PyPDF2']
requires = ['pytz', 'xlrd', 'xlutils', 'PyPDF2', 'pandas']
packages = []
package_dir = {}
package_data = {}