Migrate to py3
This commit is contained in:
parent
64d6be265e
commit
460ce14037
|
@ -1,10 +1,10 @@
|
|||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
from trytond.pool import Pool
|
||||
from .party import *
|
||||
from . import party
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
Party,
|
||||
party.Party,
|
||||
module='party_credit_limit', type_='model')
|
||||
|
|
6
party.py
6
party.py
|
@ -13,10 +13,8 @@ from trytond.transaction import Transaction
|
|||
__all__ = ['Party']
|
||||
|
||||
|
||||
class Party:
|
||||
class Party(metaclass=PoolMeta):
|
||||
__name__ = 'party.party'
|
||||
__metaclass__ = PoolMeta
|
||||
|
||||
unpayed_amount = fields.Function(fields.Numeric('Unpayed',
|
||||
digits=(16, Eval('currency_digits', 2)),
|
||||
depends=['currency_digits'], help="Due amount until today."),
|
||||
|
@ -175,7 +173,7 @@ class Party:
|
|||
amounts = super(Party, cls).get_credit_amount(parties, name)
|
||||
with Transaction().set_context(without_sales=True):
|
||||
uninvoiced = cls.get_draft_invoices_amount(parties, name)
|
||||
for party, value in uninvoiced.iteritems():
|
||||
for party, value in uninvoiced.items():
|
||||
amounts[party] += value
|
||||
return amounts
|
||||
|
||||
|
|
5
setup.py
5
setup.py
|
@ -7,10 +7,7 @@ from setuptools import setup
|
|||
import re
|
||||
import os
|
||||
import io
|
||||
try:
|
||||
from configparser import ConfigParser
|
||||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
from configparser import ConfigParser
|
||||
|
||||
MODULE = 'party_credit_limit'
|
||||
PREFIX = 'trytonspain'
|
||||
|
|
|
@ -136,7 +136,7 @@ Create an Inventory::
|
|||
>>> inventory_line.expected_quantity = 0.0
|
||||
>>> inventory.click('confirm')
|
||||
>>> inventory.state
|
||||
u'done'
|
||||
'done'
|
||||
|
||||
Create 2 Moves::
|
||||
|
||||
|
|
Loading…
Reference in New Issue