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 |
# Copyright (c) 2021, Hard n Soft Technologies Pvt Ltd and contributors |
||||
# For license information, please see license.txt |
# For license information, please see license.txt |
||||
|
from __future__ import unicode_literals |
||||
# import frappe |
import frappe |
||||
from frappe.model.document import Document |
from frappe.model.document import Document |
||||
|
from frappe import _ |
||||
|
#from magic import magic |
||||
|
|
||||
class Variant(Document): |
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