Add sales

This commit is contained in:
Oscar 2021-06-03 16:16:12 -05:00
parent d8436d9ed3
commit 953b45b0eb
6 changed files with 8 additions and 22 deletions

View File

@ -11,11 +11,6 @@ from trytond.transaction import Transaction
from trytond.model import ModelView, fields
from trytond.wizard import Wizard, StateView, Button, StateReport
__all__ = [
'PortfolioBySalesmanStart', 'PortfolioBySalesman',
'PortfolioBySalesmanReport'
]
_ZERO = Decimal('0.0')
@ -42,6 +37,7 @@ class PortfolioBySalesman(Wizard):
def do_print_(self, action):
data = {
'ids': [],
'company': self.start.company.id,
'to_date': self.start.to_date,
}
@ -59,10 +55,8 @@ class PortfolioBySalesmanReport(Report):
return domain
@classmethod
def get_context(cls, records, data):
report_context = super(PortfolioBySalesmanReport, cls).get_context(
records, data
)
def get_context(cls, records, header, data):
report_context = super().get_context(records, header, data)
pool = Pool()
Invoice = pool.get('account.invoice')

View File

@ -3,11 +3,6 @@
from trytond.model import fields
from trytond.pool import PoolMeta
__all__ = [
'Party', 'PortfolioDetailedStart',
'PortfolioDetailed', 'PortfolioDetailedReport'
]
class Party(metaclass=PoolMeta):
__name__ = 'party.party'

View File

@ -4,9 +4,6 @@ from trytond.model import fields
from trytond.pool import PoolMeta
from trytond.pyson import Eval
__all__ = ['Sale', 'Invoice']
class Sale(metaclass=PoolMeta):
__name__ = 'sale.sale'
salesman = fields.Many2One('company.employee', 'Salesman', states={

View File

@ -1,5 +1,5 @@
[tryton]
version=5.0.2
version=6.0.0
depends:
account_invoice
sale

View File

@ -2,10 +2,10 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath
expr="/form/notebook/page[@id='sale']/field[@name='sale_price_list']"
position="after">
<xpath expr="/form/notebook/page[@id='general']" position="after">
<page string="Sales" id="sales">
<label name="salesman"/>
<field name="salesman"/>
</page>
</xpath>
</data>

View File

@ -3,7 +3,7 @@
this repository contains the full copyright notices and license terms. -->
<form>
<label name="company"/>
<field name="company"/>
<field name="company" widget="selection"/>
<label name="to_date"/>
<field name="to_date"/>
</form>