-
Notifications
You must be signed in to change notification settings - Fork 0
/
Untitled Document 2
51 lines (29 loc) · 1.43 KB
/
Untitled Document 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[ADD] zoomingcar, zoomingcar_project, zoomingcar_account: sequence,BridgeModule
Created bridge module and implemented ir.sequence, chatterbox,kanbanview,
demo data,report in zoomingcar module
[IMP] l10n_in_edi: Before Test connection check GST number
In this commit:
=================
- This commit adds functionality to check if the GST number is present
before testing the connection for the l10n_in_reports_gstr.
def l10n_in_gstr_gst_send_otp(self):
if(not(self.company_id.vat)):
raise UserError("Please enter a GST number for the company")
else:
response = self.env["l10n_in.gst.return.period"]._otp_request(self.company_id)
if response.get('error'):
error_message = "\n".join(["[%s] %s"%(error.get('code'), error.get('message')) for error in response.get("error", {})])
raise UserError(error_message)
context = {
"default_l10n_in_gstr_gst_token": response.get("txn"),
"default_company_id": self.company_id.id,
}
form = self.env.ref("l10n_in_reports_gstr.view_get_otp_validate_wizard")
return {
"name": _("Otp Request"),
"type": "ir.actions.act_window",
"res_model": "res.config.settings",
"views": [[form.id, "form"]],
"target": "new",
"context": context,
}