Delivery period changed into Shipment period
This commit is contained in:
@@ -19,6 +19,8 @@ import logging
|
||||
from collections import defaultdict
|
||||
from trytond.exceptions import UserWarning, UserError
|
||||
from trytond.modules.account.exceptions import PeriodNotFoundError
|
||||
from trytond.modules.purchase_trade.company_defaults import (
|
||||
default_itsa_currency, default_itsa_unit, is_itsa_company)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -101,11 +103,25 @@ class Fee(ModelSQL,ModelView):
|
||||
|
||||
fee_date = fields.Date("Date")
|
||||
|
||||
@classmethod
|
||||
@classmethod
|
||||
def default_fee_date(cls):
|
||||
Date = Pool().get('ir.date')
|
||||
return Date.today()
|
||||
|
||||
@classmethod
|
||||
def default_currency(cls):
|
||||
if is_itsa_company():
|
||||
currency = default_itsa_currency()
|
||||
if currency:
|
||||
return currency
|
||||
|
||||
@classmethod
|
||||
def default_unit(cls):
|
||||
if is_itsa_company():
|
||||
unit = default_itsa_unit()
|
||||
if unit:
|
||||
return unit
|
||||
|
||||
@classmethod
|
||||
def default_generated_by_rule(cls):
|
||||
return False
|
||||
@@ -1056,6 +1072,20 @@ class FeeRule(ModelSQL, ModelView):
|
||||
def default_weight_type(cls):
|
||||
return 'brut'
|
||||
|
||||
@classmethod
|
||||
def default_currency(cls):
|
||||
if is_itsa_company():
|
||||
currency = default_itsa_currency()
|
||||
if currency:
|
||||
return currency
|
||||
|
||||
@classmethod
|
||||
def default_unit(cls):
|
||||
if is_itsa_company():
|
||||
unit = default_itsa_unit()
|
||||
if unit:
|
||||
return unit
|
||||
|
||||
@staticmethod
|
||||
def _same_record(left, right):
|
||||
return bool(
|
||||
|
||||
Reference in New Issue
Block a user