Пример #1
0
    def validate_warehouse(self):
        from erpnext.stock.utils import validate_warehouse_company

        warehouses = list(set([d.warehouse for d in self.get("items") if getattr(d, "warehouse", None)]))

        for w in warehouses:
            validate_warehouse_company(w, self.company)
Пример #2
0
    def validate_warehouse(self):
        from erpnext.stock.utils import validate_warehouse_company

        warehouses = list(set([d.warehouse for d in self.get(self.fname) if d.warehouse]))

        for w in warehouses:
            validate_warehouse_company(w, self.company)
Пример #3
0
	def validate_warehouse_belongs_to_company(self):
		warehouses = [self.fg_warehouse, self.wip_warehouse]
		for d in self.get("required_items"):
			if d.source_warehouse not in warehouses:
				warehouses.append(d.source_warehouse)

		for wh in warehouses:
			validate_warehouse_company(wh, self.company)
Пример #4
0
    def validate_warehouse_belongs_to_company(self):
        warehouses = [self.fg_warehouse, self.wip_warehouse]
        for d in self.get("required_items"):
            if d.source_warehouse not in warehouses:
                warehouses.append(d.source_warehouse)

        for wh in warehouses:
            validate_warehouse_company(wh, self.company)
Пример #5
0
    def validate_warehouse(self):
        from erpnext.stock.utils import validate_warehouse_company

        warehouses = list(
            set([d.warehouse for d in self.get(self.fname) if d.warehouse]))

        for w in warehouses:
            validate_warehouse_company(w, self.company)
Пример #6
0
	def validate_warehouse(self):
		from erpnext.stock.utils import validate_warehouse_company

		warehouses = list(set([d.warehouse for d in
			self.get("items") if getattr(d, "warehouse", None)]))

		for w in warehouses:
			validate_warehouse_company(w, self.company)
Пример #7
0
	def validate(self):
		from erpnext.stock.utils import validate_warehouse_company
		self.validate_mandatory()
		self.validate_item()
		validate_warehouse_company(self.warehouse, self.company)
		self.scrub_posting_time()

		from erpnext.accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.posting_date, self.fiscal_year, self.meta.get_label("posting_date"), self)
Пример #8
0
	def validate(self):
		from erpnext.stock.utils import validate_warehouse_company
		self.validate_mandatory()
		self.validate_item()
		validate_warehouse_company(self.warehouse, self.company)
		self.scrub_posting_time()

		from erpnext.accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.posting_date, self.fiscal_year,
			self.meta.get_label("posting_date"))
Пример #9
0
 def validate(self):
     self.flags.ignore_submit_comment = True
     from erpnext.stock.utils import validate_warehouse_company
     self.validate_mandatory()
     self.validate_item()
     self.validate_batch()
     validate_warehouse_company(self.warehouse, self.company)
     self.scrub_posting_time()
     self.validate_and_set_fiscal_year()
     self.block_transactions_against_group_warehouse()
Пример #10
0
	def validate(self):
		self.flags.ignore_submit_comment = True
		from erpnext.stock.utils import validate_warehouse_company
		self.validate_mandatory()
		self.validate_item()
		self.validate_batch()
		validate_warehouse_company(self.warehouse, self.company)
		self.scrub_posting_time()
		self.validate_and_set_fiscal_year()
		self.block_transactions_against_group_warehouse()
Пример #11
0
	def validate(self):
		self.flags.ignore_submit_comment = True
		from erpnext.stock.utils import validate_warehouse_company
		self.validate_mandatory()
		self.validate_item()
		self.validate_batch()
		validate_warehouse_company(self.warehouse, self.company)
		self.scrub_posting_time()

		from erpnext.accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.posting_date, self.fiscal_year, self.meta.get_label("posting_date"), self)
Пример #12
0
	def validate(self):
		self.flags.ignore_submit_comment = True
		from erpnext.stock.utils import validate_warehouse_company
		self.validate_mandatory()
		self.validate_item()
		self.validate_batch()
		validate_warehouse_company(self.warehouse, self.company)
		self.scrub_posting_time()
		self.validate_and_set_fiscal_year()

		from erpnext.accounts.utils import validate_fiscal_year
		validate_fiscal_year(self.posting_date, self.fiscal_year, self.meta.get_label("posting_date"), self)
Пример #13
0
	def validate_warehouse(self):
		from erpnext.stock.utils import validate_warehouse_company

		warehouses = list(set([d.warehouse for d in
			self.get("items") if getattr(d, "warehouse", None)]))

		target_warehouses = list(set([d.target_warehouse for d in
			self.get("items") if getattr(d, "target_warehouse", None)]))

		warehouses.extend(target_warehouses)

		from_warehouse = list(set([d.from_warehouse for d in
			self.get("items") if getattr(d, "from_warehouse", None)]))

		warehouses.extend(from_warehouse)

		for w in warehouses:
			validate_warehouse_company(w, self.company)
Пример #14
0
    def validate_warehouse(self):
        from erpnext.stock.utils import validate_warehouse_company

        for w in [self.fg_warehouse, self.wip_warehouse]:
            validate_warehouse_company(w, self.company)
Пример #15
0
	def validate_warehouse(self):
		from erpnext.stock.utils import validate_warehouse_company

		for w in [self.fg_warehouse, self.wip_warehouse]:
			validate_warehouse_company(w, self.company)