bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | 476,600 |
def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | 476,601 |
def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | 476,602 |
def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | 476,603 |
def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | 476,604 |
def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | def test_deserialize_clears_old_error_on_success(self): BundleDeserializationError.objects.create( bundle = self.bundle, error_message="not important").save() mock = self.mocker.patch(self.bundle) expect(mock._do_deserialize()) self.mocker.replay() self.bundle.deserialize() # note we cannot check for self.bundle.deseri... | 476,605 |
def dispatch(self): args = self.parser.parse_args() command = args.command_cls(self.parser, args) command.invoke(args) | def dispatch(self, args=None): args = self.parser.parse_args(args) command = args.command_cls(self.parser, args) command.invoke(args) | 476,606 |
def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | 476,607 |
def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | 476,608 |
def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | 476,609 |
def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | 476,610 |
def test_get_json_attr_types(self): self.assertEqual(DashboardBundle.get_json_attr_types(), {'test_runs': [TestRuns]}) | def test_get_json_attr_types(self): self.assertEqual(DashboardBundle.get_json_attr_types(), {'test_runs': [TestRuns]}) | 476,611 |
def __init__(self, parser, args): super(XMLRPCCommand, self).__init__(parser, args) parts = urlparse.urlsplit(args.dashboard_url) if args.username and args.password: netloc = "%s:%s@%s:%d" % ( args.username, args.password, parts.host, parts.port or 80) else: netloc = parts.netloc urltext = urlparse.urlunsplit((parts.sc... | def __init__(self, parser, args): super(XMLRPCCommand, self).__init__(parser, args) parts = urlparse.urlsplit(args.dashboard_url) if args.username and args.password: netloc = "%s:%s@%s" % ( args.username, args.password, parts.host, parts.port or 80) else: netloc = parts.netloc urltext = urlparse.urlunsplit((parts.schem... | 476,612 |
def __init__(self, parser, args): super(XMLRPCCommand, self).__init__(parser, args) parts = urlparse.urlsplit(args.dashboard_url) if args.username and args.password: netloc = "%s:%s@%s:%d" % ( args.username, args.password, parts.host, parts.port or 80) else: netloc = parts.netloc urltext = urlparse.urlunsplit((parts.sc... | def __init__(self, parser, args): super(XMLRPCCommand, self).__init__(parser, args) parts = urlparse.urlsplit(args.dashboard_url) if args.username and args.password: netloc = "%s:%s@%s:%d" % ( args.username, args.password, parts.netloc) else: netloc = parts.netloc urltext = urlparse.urlunsplit((parts.scheme, netloc, "/... | 476,613 |
def mock_imports(self, reload_list=None): """ Make prohibit_importing() work by hiding and importing again all the modules that depended on an imported prohibited module. | def mock_imports(self, reload_list=None): """ Make prohibit_importing() work by hiding and importing again all the modules that depended on an imported prohibited module. | 476,614 |
def clean(self): cleaned_data = self.cleaned_data print cleaned_data if (cleaned_data.get('user', '') is not None and cleaned_data.get('group') is not None): raise forms.ValidationError('BundleStream cannot have both user ' 'and name set at the same time') return super(BundleStreamAdminForm, self).clean() | def clean(self): cleaned_data = self.cleaned_data if (cleaned_data.get('user', '') is not None and cleaned_data.get('group') is not None): raise forms.ValidationError('BundleStream cannot have both user ' 'and name set at the same time') return super(BundleStreamAdminForm, self).clean() | 476,615 |
def register_arguments(cls, parser): group = parser.add_argument_group("Dashboard Server options") group.add_argument("--dashboard-url", required=True, metavar="URL", help="URL of your validation dashboard") group.add_argument("--verbose-xml-rpc", action="store_true", default=False, help="Show XML-RPC data") | def register_arguments(cls, parser): group = parser.add_argument_group("Dashboard Server options") group.add_argument("--dashboard-url", required=True, metavar="URL", help="URL of your validation dashboard") group.add_argument("--verbose-xml-rpc", action="store_true", default=False, help="Show XML-RPC data") | 476,616 |
def _set_measurement(self, value): valid_types = (int, long, float, Decimal, NoneType) if not isinstance(value, valid_types): raise TypeError("Measurement must be an int, long, float, Decimal or None") self._measurement = value | def _set_measurement(self, value): valid_types = (int, long, float, Decimal, NoneType) if not isinstance(value, valid_types): raise TypeError("Measurement must be an int, long, float, Decimal or None") self._measurement = value | 476,617 |
def _set_measurement(self, value): valid_types = (int, long, float, Decimal, NoneType) if not isinstance(value, valid_types): raise TypeError("Measurement must be an int, long, float, Decimal or None") self._measurement = value | def _set_measurement(self, value): valid_types = (int, long, float, Decimal, NoneType) if not isinstance(value, valid_types): raise TypeError("Measurement must be an int, long, float, Decimal or None") self._measurement = value | 476,618 |
def _set_duration(self, duration): if duration is not None and not isinstance(duration, timedelta): raise TypeError("Duration must be None or timedelta " "instance") if duration is not None and duration.days < 0: raise ValueError("Duration cannot be negative") self._duration = duration | def _set_duration(self, duration): if duration is not None and not isinstance(duration, timedelta): raise TypeError("Duration must be None or timedelta " "instance") if duration is not None and duration.days < 0: raise ValueError("Duration cannot be negative") self._duration = duration | 476,619 |
def test_get_help_defaults_to_None(self): class mysterious(Command): pass self.assertEqual(mysterious.get_help(), None) | def test_get_help_defaults_to_None(self): class mysterious(Command): pass self.assertEqual(mysterious.get_help(), None) | 476,620 |
def test_template_used(self): response = self.client.get("/streams" + self.bundle_stream.pathname) if self.bundle_stream.can_access(self.user): self.assertTemplateUsed(response, "dashboard_app/bundle_stream_detail.html") else: self.assertTemplateUsed(response, "403.html") | def test_template_used(self): response = self.client.get("/streams" + self.bundle_stream.pathname) if self.bundle_stream.can_access(self.user): self.assertTemplateUsed(response, "dashboard_app/bundle_stream_detail.html") else: self.assertTemplateUsed(response, "403.html") | 476,621 |
def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification. spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] na... | 476,622 |
def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification `spec`: list of dictionaries List of values to make_bundle_stream() yields: list of created bundle streams """ bundle_streams = [] for stream_args in spec: initargs = { 'user': None, 'group': None, 'slu... | 476,623 |
def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | 476,624 |
def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | def created_bundle_streams(spec): """ Helper context manager that creates bundle streams according to specification spec is a list of dictionaries with the following keys: user: string indicating user name to create [optional] group: string indicating group name to create [optional] slug: slug-like name [optional] nam... | 476,625 |
def deserialize(self): """ Deserialize the contents of this bundle. | def deserialize(self): """ Deserialize the contents of this bundle. | 476,626 |
... def _deserialize(cls, doc): | ... def _deserialize(cls, doc): | 476,627 |
def __eq__(self, other): return self.name == other.name and \ debian_version_compare(self.version, other.version) == 0 | def __eq__(self, other): return self.name == other.name and \ debian_version_compare(self.version, other.version) == 0 | 476,628 |
def invoke_remote(self): response = self.server.get(self.args.SHA1) if self.args.output is None: filename = response['content_filename'] if os.path.exists(filename) and not self.args.overwrite: print "File {filename!r} already exists".format( filename=filename) print "You may pass --overwrite to write over it" return s... | def invoke_remote(self): response = self.server.get(self.args.SHA1) if self.args.output is None: filename = response['content_filename'] if os.path.exists(filename) and not self.args.overwrite: print "File {filename!r} already exists".format( filename=filename) print "You may pass --overwrite to write over it" return s... | 476,629 |
def __init__(self, test_result, test_id=None, message=None, timestamp=None, duration=None): """ Initialize qualitative sample instance. | def __init__(self, test_result, test_id=None, message=None, timestamp=None, duration=None): """ Initialize qualitative sample instance. | 476,630 |
def test_debian_import_failure(self): """ Make sure we import debian_bundle if debian is not available """ self.prohibit_importing('debian.debian_support') self.mock_imports('launch_control.sw_profile') mocker = Mocker() obj = mocker.replace('debian_bundle.debian_support.version_compare') mocker.replay() import launch_... | def test_debian_import_failure(self): """ Make sure we import debian_bundle if debian is not available """ self.prohibit_importing('debian.debian_support') self.mock_imports('launch_control.sw_profile') mocker = Mocker() obj = mocker.replace('debian_bundle.debian_support.version_compare') mocker.replay() import launch_... | 476,631 |
def _set_log_filename(self, log_filename): self._log_filename = log_filename | def _set_log_filename(self, log_filename): self._log_filename = log_filename | 476,632 |
def _set_log_lineno(self, log_lineno): self._log_lineno = log_lineno | def _set_log_lineno(self, log_lineno): self._log_lineno = log_lineno | 476,633 |
def deserialize(self, content_sha1): """ Name ---- `deserialize` (`content_sha1`) | def deserialize(self, content_sha1): """ Name ---- `deserialize` (`content_sha1`) | 476,634 |
def memory_model_to_db_model(self, c_bundle, s_bundle): """ Translate a memory model to database model """ from dashboard_app.models import ( Attachment, HardwareDevice, NamedAttribute, SoftwarePackage, Test, TestCase, TestResult, TestRun, ) # All variables prefixed with c_ refer to CLIENT SIDE models # All variables p... | def memory_model_to_db_model(self, c_bundle, s_bundle): """ Translate a memory model to database model """ from dashboard_app.models import ( Attachment, HardwareDevice, NamedAttribute, SoftwarePackage, Test, TestCase, TestResult, TestRun, ) # All variables prefixed with c_ refer to CLIENT SIDE models # All variables p... | 476,635 |
def test_echo(self): self.assertEqual(self.xml_rpc_call("echo", 1), 1) self.assertEqual(self.xml_rpc_call("echo", "string"), "string") self.assertEqual(self.xml_rpc_call("echo", 1.5), 1.5) retval = self.xml_rpc_call("ping") self.assertEqual(retval, "pong") | def test_echo(self): self.assertEqual(self.xml_rpc_call("echo", 1), 1) self.assertEqual(self.xml_rpc_call("echo", "string"), "string") self.assertEqual(self.xml_rpc_call("echo", 1.5), 1.5) retval = self.xml_rpc_call("ping") self.assertEqual(retval, "pong") | 476,636 |
def version(self): """ Name ---- `version` () | def version(self): """ Name ---- `version` () | 476,637 |
def __unicode__(self): return _(u"{name}: {value}").format( name = self.name, value = self.value) | def __unicode__(self): return _(u"{name}: {value}").format( name = self.name, value = self.value) | 476,638 |
def mock_imports(self, reload_list=None): """ Make prohibit_importing() work by hiding and importing again all the modules that depended on an imported prohibited module. | def mock_imports(self, reload_list=None): """ Make prohibit_importing() work by hiding and importing again all the modules that depended on an imported prohibited module. | 476,639 |
def test_test_result__unknown(self): obj = TestResult(result=TestResult.RESULT_UNKNOWN, id=1) self.assertEqual(unicode(obj), "#1 unknown") | def test_test_result__unknown(self): obj = TestResult(result=TestResult.RESULT_UNKNOWN, id=1) self.assertEqual(unicode(obj), "#1 unknown") | 476,640 |
def test_csrf_not_protecting_xml_rpc_views(self): """call version and check that we didn't get 403""" endpoint_path = reverse("dashboard_app.dashboard_xml_rpc_handler") request_body = xmlrpclib.dumps((), methodname="version") response = self.client.post(endpoint_path, request_body, "text/xml") self.assertContains(respo... | def test_csrf_not_protecting_xml_rpc_views(self): """call version and check that we didn't get 403""" endpoint_path = reverse("xml-rpc") request_body = xmlrpclib.dumps((), methodname="version") response = self.client.post(endpoint_path, request_body, "text/xml") self.assertContains(response, "<methodResponse>", status_... | 476,641 |
def __init__(self, format=None, test_runs=None): self.format = format or self.FORMAT self.test_runs = test_runs or [] | def __init__(self, format=None, test_runs=None): self.format = format or self.FORMAT self.test_runs = test_runs or [] | 476,642 |
def test_cross_site_login_fails(self): response = self.client.post(self.login_path, { 'user': 'user', 'pass': 'pass'}) self.assertEquals(response.status_code, 403) | def test_cross_site_login_fails(self): response = self.client.post(self.login_path, { 'user': 'user', 'pass': 'pass'}) self.assertEquals(response.status_code, 403) | 476,643 |
def test_csrf_not_protecting_xml_rpc_views(self): """call version and check that we didn't get 403""" request_body = xmlrpclib.dumps((), methodname="version") response = self.client.post( self.endpoint_path, request_body, "text/xml") self.assertContains(response, "<methodResponse>", status_code=200) | def test_csrf_not_protecting_xml_rpc_views(self): """call version and check that we didn't get 403""" request_body = xmlrpclib.dumps((), methodname="version") response = self.client.post(endpoint_path, request_body, "text/xml") self.assertContains(response, "<methodResponse>", status_code=200) | 476,644 |
def parse(data): header = {} signals = {1:('0',0),2:('1',0),3:('Local',0)} modules = {} for token in data: objtype=token.get('ObjTp','') if objtype=='Hd': header['dealer']=token.get('DlrNm','n/a') header['programer']=token.get('PgmNm','n/a') header['file']=token.get('PrNm','n/a') header['hint']=token.get('CltNm','n/a'... | def parse(data): header = {} signals = {1:('0',0),2:('1',0),3:('Local',0)} modules = {} for token in data: objtype=token.get('ObjTp','') if objtype=='Hd': header['dealer']=token.get('DlrNm','n/a') header['programer']=token.get('PgmNm','n/a') header['file']=token.get('PrNm','n/a') header['hint']=token.get('CltNm','n/a... | 476,645 |
def nonum(name): return filter(lambda x: not x.isdigit(), name) | def nonum(name): return filter(lambda x: not x.isdigit(), name) | 476,646 |
def make_dot(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] checkT = False checkF = False limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or a... | def make_dot(header, signals, modules): dot_file = [make_head(header)] checkT = False checkF = False limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or adv_len(modules[m]['outs']), modules) limit_mods.sort() for m in limit_mods: dot_file.append(make_node(m, modules[m])) checkT = 2 in modules[m]['ins'] or chec... | 476,647 |
def make_dot(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] checkT = False checkF = False limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or a... | def make_dot(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] checkT = False checkF = False limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or a... | 476,648 |
def make_dot_merged(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or adv_len(modules[m]['outs... | def make_dot_merged(header, signals, modules): dot_file = [make_head(header)] limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or adv_len(modules[m]['outs']), modules) limit_mods.sort() dot_file.extend(map(lambda m: make_node(m, modules[m]), limit_mods)) dot_file.append('') limit_sigs = filter(lambda s: is_s... | 476,649 |
def make_dot_merged(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or adv_len(modules[m]['outs... | def make_dot_merged(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or adv_len(modules[m]['outs... | 476,650 |
def make_dot_merged(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or adv_len(modules[m]['outs... | def make_dot_merged(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or adv_len(modules[m]['outs... | 476,651 |
def make_dot_merged(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] limit_mods = filter(lambda m: adv_len(modules[m]['ins']) or adv_len(modules[m]['outs... | def make_dot_merged(header, signals, modules): head = """// file: %s\n// dealer: %s\n// programmer: %s\n// hint: %s\n\ndigraph {"""%( header['file'],header['dealer'],header['programer'],header['hint']) tail = """}""" dot_file = [head] limit_mods ... | 476,652 |
def main(): if len(sys.argv) != 2: print 'Please specify one filename on the command line.' sys.exit(1) text = open(sys.argv[1],"rt").read() tree = tokenize(text) header,sigs,mods = parse(tree) print make_dot(header,sigs,mods) #print make_dot_merged(header,sigs,mods) | def main(): usage = "usage: %prog [options] inputfile\ninputfile of smw/umc/cmc Crestron's filetypes" parser = OptionParser(usage=usage) parser.add_option("-o","--output", dest="output", help="write result to FILE", metavar="FILE") parser.add_option("-m","--merged", dest="merge", action="store_true", help="make \"mer... | 476,653 |
def main(): if len(sys.argv) != 2: print 'Please specify one filename on the command line.' sys.exit(1) text = open(sys.argv[1],"rt").read() tree = tokenize(text) header,sigs,mods = parse(tree) print make_dot(header,sigs,mods) #print make_dot_merged(header,sigs,mods) | def main(): if len(sys.argv) != 2: print 'Please specify one filename on the command line.' sys.exit(1) text = open(sys.argv[1],"rt").read() tree = tokenize(text) header,sigs,mods = parse(tree) print make_dot(header,sigs,mods) #print make_dot_merged(header,sigs,mods) | 476,654 |
def checkEqual(var1, var2): check(var1 == var2, "Values not equal: '" + str(var1) + "' !='" + str(var2) + "'") | def checkEqual(var1, var2): check(var1 == var2, "Values not equal: '" + str(var1) + "' !='" + str(var2) + "'") | 476,655 |
def checkEqual(var1, var2): check(var1 == var2, "Values not equal: '" + str(var1) + "' !='" + str(var2) + "'") | def checkEqual(var1, var2): check(var1 == var2, "Values not equal: '" + str(var1) + "' !='" + str(var2) + "'") | 476,656 |
def checkEqual(var1, var2): check(var1 == var2, "Values not equal: '" + str(var1) + "' !='" + str(var2) + "'") | def checkEqual(var1, var2): check(var1 == var2, "Values not equal: '" + str(var1) + "' !='" + str(var2) + "'") | 476,657 |
def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None): res = {} for account in self.browse(cr, uid, ids, context=context): res[account.id] = account.ca_theorical + account.total_cost for id in ids: res[id] = round(res.get(id, 0.0),2) return res | def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None): res = {} for account in self.browse(cr, uid, ids, context=context): res[account.id] = account.ca_theorical + account.total_cost for id in ids: res[id] = round(res.get(id, 0.0),2) return res | 476,658 |
def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None): res = {} for account in self.browse(cr, uid, ids, context=context): res[account.id] = account.ca_theorical + account.total_cost for id in ids: res[id] = round(res.get(id, 0.0),2) return res | def _theorical_margin_calc(self, cr, uid, ids, name, arg, context=None): res = {} for account in self.browse(cr, uid, ids, context=context): res[account.id] = account.ca_theorical + account.total_cost for id in ids: res[id] = round(res.get(id, 0.0),2) return res | 476,659 |
def _user(self, cr, uid, ids, name, arg, context=None): res = {} cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] for id in ids: ids2 = self.search(cr, uid, [('parent_id', 'child_of', [id])]) if ids2: cr.execute('SELECT DISTINCT("user") FROM account_analytic_analysis_summary_user ' \ 'WHERE accou... | def _user(self, cr, uid, ids, name, arg, context=None): res = {} cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] for id in ids: ids2 = self.search(cr, uid, [('parent_id', 'child_of', [id])]) if ids2: cr.execute('SELECT DISTINCT("user") FROM account_analytic_analysis_summary_user ' \ 'WHERE accou... | 476,660 |
def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): if context is None: context = {} if not ids: return [] | def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): if context is None: context = {} if not ids: return [] | 476,661 |
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_ana... | def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): res = {} res_final = {} child_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) for i in child_ids: res[i] = {} for n in [name]: res[i][n] = 0.0 if not child_ids: return res if child_ids: cr.execute("SELECT account_... | 476,662 |
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_ana... | def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_ana... | 476,663 |
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_ana... | def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_ana... | 476,664 |
def _total_cost_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("""SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_an... | def _total_cost_calc(self, cr, uid, ids, name, arg, context=None): res = {} res_final = {} child_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) for i in child_ids: res[i] = {} for n in [name]: res[i][n] = 0.0 if not child_ids: return res if child_ids: cr.execute("""SELECT accoun... | 476,665 |
def _total_cost_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("""SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_an... | def _total_cost_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("""SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_an... | 476,666 |
def _total_cost_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("""SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_an... | def _total_cost_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)], context=context)) if parent_ids: cr.execute("""SELECT account_analytic_line.account_id, COALESCE(SUM(amount_currency), 0.0) \ FROM account_analytic_line \ JOIN account_an... | 476,667 |
def _analysis_all(self, cr, uid, ids, fields, arg, context=None): dp = 2 res = dict([(i, {}) for i in ids]) | def _analysis_all(self, cr, uid, ids, fields, arg, context=None): dp = 2 res = dict([(i, {}) for i in ids]) | 476,668 |
def _analysis_all(self, cr, uid, ids, fields, arg, context=None): dp = 2 res = dict([(i, {}) for i in ids]) | def _analysis_all(self, cr, uid, ids, fields, arg, context=None): dp = 2 res = dict([(i, {}) for i in ids]) | 476,669 |
def _analysis_all(self, cr, uid, ids, fields, arg, context=None): dp = 2 res = dict([(i, {}) for i in ids]) | def _analysis_all(self, cr, uid, ids, fields, arg, context=None): dp = 2 res = dict([(i, {}) for i in ids]) | 476,670 |
def _analysis_all(self, cr, uid, ids, fields, arg, context=None): dp = 2 res = dict([(i, {}) for i in ids]) | def _analysis_all(self, cr, uid, ids, fields, arg, context=None): dp = 2 res = dict([(i, {}) for i in ids]) | 476,671 |
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analytic_journal \ on... | def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analytic_journal \ on... | 476,672 |
def _total_cost_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute("""select account_analytic_line.account_id,COALESCE(sum(amount_currency),0.0) \ | def _total_cost_calc(self, cr, uid, ids, name, arg, context=None): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute("""select account_analytic_line.account_id,COALESCE(sum(amount_currency),0.0) \ | 476,673 |
def _ca_theorical_calc(self, cr, uid, ids, name, arg, context=None): res = {} res2 = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) # Warning # This computation doesn't take care of pricelist ! # Just consider list_price if parent_ids: cr.execute("""select account_analytic_line.account_id... | def _ca_theorical_calc(self, cr, uid, ids, name, arg, context=None): res = {} res2 = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) # Warning # This computation doesn't take care of pricelist ! # Just consider list_price if parent_ids: cr.execute("""select account_analytic_line.account_id... | 476,674 |
def _ca_theorical_calc(self, cr, uid, ids, name, arg, context=None): res = {} res2 = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) # Warning # This computation doesn't take care of pricelist ! # Just consider list_price if parent_ids: cr.execute("""select account_analytic_line.account_id... | def _ca_theorical_calc(self, cr, uid, ids, name, arg, context=None): res = {} res2 = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) # Warning # This computation doesn't take care of pricelist ! # Just consider list_price if parent_ids: cr.execute("""select account_analytic_line.account_id... | 476,675 |
def _user(self, cr, uid, ids, name, arg, context=None): res = {} cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] for id in ids: parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute('SELECT DISTINCT("user") FROM account_analytic_analysis_summary_use... | def _user(self, cr, uid, ids, name, arg, context=None): res = {} cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] for id in ids: parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute('SELECT DISTINCT("user") FROM account_analytic_analysis_summary_use... | 476,676 |
def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] account_ids = [int(str(x/max_user - (x%max_user == 0 and 1 or 0))) for x in ids] user_ids = [int(str(x-((x/max_user - (x... | def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] account_ids = [int(str(x/max_user - (x%max_user == 0 and 1 or 0))) for x in ids] user_ids = [int(str(x-((x/max_user - (x... | 476,677 |
def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] account_ids = [int(str(x/max_user - (x%max_user == 0 and 1 or 0))) for x in ids] user_ids = [int(str(x-((x/max_user - (x... | def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] account_ids = [int(str(x/max_user - (x%max_user == 0 and 1 or 0))) for x in ids] user_ids = [int(str(x-((x/max_user - (x... | 476,678 |
def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] account_ids = [int(str(x/max_user - (x%max_user == 0 and 1 or 0))) for x in ids] user_ids = [int(str(x-((x/max_user - (x... | def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') cr.execute('SELECT MAX(id) FROM res_users') max_user = cr.fetchone()[0] account_ids = [int(str(x/max_user - (x%max_user == 0 and 1 or 0))) for x in ids] user_ids = [int(str(x-((x/max_user - (x... | 476,679 |
def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): if not context: context={} if not ids: return [] | def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): if not context: context={} if not ids: return [] | 476,680 |
def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') account_ids = [int(str(int(x))[:-6]) for x in ids] month_ids = [int(str(int(x))[-6:]) for x in ids] parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', account_ids)])) if parent... | def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') account_ids = [int(str(int(x))[:-6]) for x in ids] month_ids = [int(str(int(x))[-6:]) for x in ids] parent_ids = tuple(account_obj.search(cr, uid, [('parent_id', 'child_of', account_ids)])) if... | 476,681 |
def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') account_ids = [int(str(int(x))[:-6]) for x in ids] month_ids = [int(str(int(x))[-6:]) for x in ids] parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', account_ids)])) if parent... | def _unit_amount(self, cr, uid, ids, name, arg, context=None): res = {} account_obj = self.pool.get('account.analytic.account') account_ids = [int(str(int(x))[:-6]) for x in ids] month_ids = [int(str(int(x))[-6:]) for x in ids] parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', account_ids)])) if parent... | 476,682 |
def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): if not context: context={} if not ids: return [] | def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): if not context: context={} if not ids: return [] | 476,683 |
def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): if not context: context={} if not ids: return [] | def _read_flat(self, cr, user, ids, fields, context=None, load='_classic_read'): if not context: context={} if not ids: return [] | 476,684 |
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analyti... | def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analytic_journal \ on a... | 476,685 |
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analyti... | def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analyti... | 476,686 |
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analyti... | def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analyti... | 476,687 |
def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analyti... | def _ca_invoiced_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, COALESCE(sum(amount_currency),0.0) \ from account_analytic_line \ join account_analyti... | 476,688 |
def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: # Amount uninvoiced hours to invoice at sale price # Warning # This computation doesn't take care of pricelist ! # Just consider list_price acc_set = ",".join(map... | def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: # Amount uninvoiced hours to invoice at sale price # Warning # This computation doesn't take care of pricelist ! # Just consider list_price acc... | 476,689 |
def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: # Amount uninvoiced hours to invoice at sale price # Warning # This computation doesn't take care of pricelist ! # Just consider list_price acc_set = ",".join(map... | def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: # Amount uninvoiced hours to invoice at sale price # Warning # This computation doesn't take care of pricelist ! # Just consider list_price cr.execute("""SELECT a... | 476,690 |
def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: # Amount uninvoiced hours to invoice at sale price # Warning # This computation doesn't take care of pricelist ! # Just consider list_price acc_set = ",".join(map... | def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: # Amount uninvoiced hours to invoice at sale price # Warning # This computation doesn't take care of pricelist ! # Just consider list_price acc_set = ",".join(map... | 476,691 |
def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: # Amount uninvoiced hours to invoice at sale price # Warning # This computation doesn't take care of pricelist ! # Just consider list_price acc_set = ",".join(map... | def _ca_to_invoice_calc(self, cr, uid, ids, name, arg, context={}): res = {} res2 = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: # Amount uninvoiced hours to invoice at sale price # Warning # This computation doesn't take care of pricelist ! # Just consider list_price acc_set = ",".join(map... | 476,692 |
def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id, COALESCE(sum(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_anal... | def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context={}): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute("select account_analytic_line.account_id, COALESCE(sum(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journa... | 476,693 |
def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id, COALESCE(sum(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_anal... | def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id, COALESCE(sum(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_anal... | 476,694 |
def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id, COALESCE(sum(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_anal... | def _hours_qtt_non_invoiced_calc (self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id, COALESCE(sum(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_anal... | 476,695 |
def _hours_quantity_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id,COALESCE(SUM(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_analytic_line.... | def _hours_quantity_calc(self, cr, uid, ids, name, arg, context={}): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute("select account_analytic_line.account_id,COALESCE(SUM(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on acc... | 476,696 |
def _hours_quantity_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id,COALESCE(SUM(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_analytic_line.... | def _hours_quantity_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id,COALESCE(SUM(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_analytic_line.... | 476,697 |
def _hours_quantity_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id,COALESCE(SUM(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_analytic_line.... | def _hours_quantity_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: cr.execute("select account_analytic_line.account_id,COALESCE(SUM(unit_amount),0.0) \ from account_analytic_line \ join account_analytic_journal \ on account_analytic_line.... | 476,698 |
def _total_cost_calc(self, cr, uid, ids, name, arg, context={}): res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("""select account_analytic_line.account_id,COALESCE(sum(amount_currency),0.0) \ | def _total_cost_calc(self, cr, uid, ids, name, arg, context={}): res = {} parent_ids = tuple(self.search(cr, uid, [('parent_id', 'child_of', ids)])) if parent_ids: cr.execute("""select account_analytic_line.account_id,COALESCE(sum(amount_currency),0.0) \ | 476,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.