aii: stock reconciliation with test case

This commit is contained in:
Nabin Hait
2013-03-19 12:01:46 +05:30
parent c3afb256b4
commit 89a94d8135
17 changed files with 383 additions and 222 deletions

View File

@@ -18,6 +18,7 @@ from __future__ import unicode_literals
import webnotes
from webnotes import msgprint, _
from webnotes.utils import flt
from utilities.transaction_base import TransactionBase
class AccountsController(TransactionBase):
@@ -70,7 +71,6 @@ class AccountsController(TransactionBase):
def get_stock_in_hand_account(self):
stock_in_hand_account = webnotes.conn.get_value("Company", self.doc.company, "stock_in_hand_account")
if not stock_in_hand_account:
msgprint(_("Missing") + ": "
+ _(webnotes.get_doctype("company").get_label("stock_in_hand_account")

View File

@@ -24,9 +24,9 @@ from buying.utils import get_item_details
from setup.utils import get_company_currency
from webnotes.model.utils import round_floats_in_doc
from controllers.accounts_controller import AccountsController
from controllers.stock_controller import StockController
class BuyingController(AccountsController):
class BuyingController(StockController):
def validate(self):
if self.meta.get_field("currency"):
self.company_currency = get_company_currency(self.doc.company)