Ubuntu
3 years ago
3 changed files with 32 additions and 25 deletions
File diff suppressed because one or more lines are too long
@ -1,8 +1,16 @@ |
|||
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors |
|||
# For license information, please see license.txt |
|||
|
|||
# import frappe |
|||
from __future__ import unicode_literals |
|||
import frappe |
|||
from frappe.model.document import Document |
|||
from frappe import _ |
|||
#from magic import magic |
|||
|
|||
class Variant(Document): |
|||
pass |
|||
def validate(self): |
|||
# mime = magic.Magic(mime=True) |
|||
if self.variant: |
|||
self.variant = self.variant.strip() |
|||
# self.variant = mime.from_file("/home/ubuntu/frappe-bench/sites/guidedsmartservice.com/public/files/anydesk.xlsx") |
|||
self.name = self.vehicle + '.' + self.variant |
|||
|
|||
|
Loading…
Reference in new issue